More DataForm Help

More DataForm Help

by leah wasser -
Number of replies: 14

Hi All,

I am struggling with implementing the dataforms in Moodle.

My goal is to create a simple photogallery that allows students to present the following:

1. upload an image

2. upload information associated with the image - multiple fields (a caption and an image photographer

3. comment on other images (and i want to be able to comment as well

I am using Moodle 2.2 right now.

I uploaded and installed the dataform plugin for moodle 2.2 on the moodle website.

To simplify things, i tried to use a simple "block" view to present the images in a vertical row. I would like to edit the "add new entry" interface within dataforms, however, i do not see a place to create this custom view.

In the dataform settings i see where i can set "view for edit" and "view for more". However, how do i customize the "add new entry" interface?

Also, has anyone had any issues with thumbnails not always rendering when setting up a custom view?

Thank you kindly for any help with this,

Leah

Average of ratings: -
In reply to leah wasser

Re: More DataForm Help

by Itamar Tzadok -

Please install the newest build (2012090600). It should be avaialble from the plugins repo, from http://substantialmethods.com/course/view.php?id=4&section=2 and from git. There are also new builds for the Dataform block and Dataform embedded resource.

In the new version the block view type is replaced with matrix view type. By default it displays the entries in one column (vertically). But you can set it to display in more than one columns.

The 'Add new entry' will open a new entry form in the displayed view or in the default edit view if set in the views list (E). At this point you cannot change the text of the Add new entry link in the view. But you can remove it from the template (simply delete the ##addnewentry## tag from the general section) and insert your own link in the template and set the link URL to the url of the designated edit view. Alternately you can just use the views list for navigating to and from the edit view.

For comments you can display them inline (as opposed to the standard collapsed) by using the ##comments:inline## tag. You need to have comments enabled site wide.

I'll try to add a few more examples in the next couple of days.

hth smile

In reply to Itamar Tzadok

Re: More DataForm Help

by leah wasser -

Hi there Itamar,

Thank you so much for the patient reply. I am new to Moodle.

Per the new build, I tried to upgrade to the new version as you suggested. I actually had done this yesterday. When i do so, i can no longer edit the views. For example, when i attempt to edit the "block view" i get a blank screen instead of the edit interface that i get with the stable build on the moodle website.

Any advice to remedy these issues and access the edit block features with the new build?


Could this be because we are running moodle version 2.2?

Or perhaps I am doing something else incorrectly?

Thank you in advance

Leah

 

In reply to leah wasser

Re: More DataForm Help

by Itamar Tzadok -

If the previous version you had was the old version (1.0.4) from the Moodle plugins repo, the new version doesn't upgrade it. You should uninstall it and install the new version from scratch (always backup the site (especially database) before installing or upgrading).

The new version should be compatible with Moodle 2.2 but of course if you encounter any issue, let me know.

hth smile

In reply to Itamar Tzadok

Re: More DataForm Help

by leah wasser -

Hi Again,

Thank you. I just performed an uninstall from the moodle web interface on our server. Should i also manually delete the entire "dataform" directory that is in the mod folder before re-uploading the new dataform folder (containing the newest build)?

Leah

In reply to leah wasser

Re: More DataForm Help

by leah wasser -

Hi Again,

To clarify, i asked the above question because i uninstalled the dataform module from moodle. Then i deleted the dataform folder from moodle and reuploaded the  new dataform (latest build) folder. When i did this, i lost access to some of the views i previously had including block and the "fancy" image gallery view.

i also no longer have an image:tn option to populate a matrix with thumbnails. And i lost my settings tab in the "manage" part of my dataform.

I must be doing something wrong. Any advice is appreciated.

leah

In reply to leah wasser

Re: More DataForm Help

by Itamar Tzadok -

When you delete a plugin from Moodle everything related to that plugin is deleted from the database including all the instances you had in courses and data in those instances (that's why backup is important and even export in some cases). Then after you install it again you start afresh.

Some of the features in the old version are either removed or changed in the new one. The settings tab was just a shortcut to some of the settings in the Dataform settings page. It was removed b/c it didn't work very well with the Moodle core API. So for those settings you need to edit the activity in the usual way (that is, from the edit settings link in the activity administraiton in the settings block).

The 'block' view type is now called 'matrix'. It's basically the same with additional settings for arranging the entries in a matrix (table).

The 'fancybox' view no longer exists. It's a simple js extension of the matrix type. I will create and post a preset for this view which you should be able to apply by one click and we'll take it from there.

hth smile

In reply to Itamar Tzadok

Re: More DataForm Help

by leah wasser -

Hi Itamar,

Thank you. This is all very helpful and i appreciate your patience in responding.

I see "edit settings" in the admin panel for the dataform. Can you please tell me where you turn comments on now? Previously i was able to do it in the "settings" link. I do not see a comments option in my dataform settings.

A few more questions.

If i want to edit the "add new entry" interface, where do i go to do that? i have a field called "reference" that users need to fill in. But right now the data entry form just has a blank box for the reference field (no label / text associated with it. I'd like to adjust the position of the box as well in addition to what appears on the page.

Also, is there the ability to create a "thumbnail view"? a matrix of images that are smaller at first until you click on the "more" link?

Thank you.

leah

In reply to leah wasser

Re: More DataForm Help

by Itamar Tzadok -

You don't need to turn comments on in the Dataform. Provided comments are enabled site wide (Site admin -> advanced features -> enable comments), you just need to add the comments tag (##comments## or ##comments:inline## for expended by default) in a view template.

You need to add labels to fields and indeed using a designated view for adding/editing an entry (such as the add entry template in the standard Database activity) is a useful approach. The matrix view should arrange by default the entry fields in a table with the field name as a label. You can modify the template as you see fit. Then you can designate it as the 'edit view' (E) or as the 'more view' (M).

The thumbnail view would be yet another matrix view with number of columns say 3-4. You can set this view as the default (D) so that the activity always open on that view unless specifically directed to another view.

I'm preparing a simple preset of such a gallery. I let you know when ready.

smile

In reply to Itamar Tzadok

Re: More DataForm Help

by leah wasser -

Ok... thank you - yet again. I have comments working and i finally understand how to modify the "edit data / add data" dialog. i didn't understand the checks "D for default", E for "Edit" and M for more. 

Progress! smile

I will look forward to the thumbnail demonstration that you mention. I am not sure how to generate a view which creates thumbails of user uploaded graphics.

thank you!

In reply to leah wasser

Re: More DataForm Help

by Itamar Tzadok -

Here is a preliminary illustration of what it could like like with a thumbnail view.

 Click on an image activates a Fancybox gallery which allows you to browse all the images on the page.

In reply to leah wasser

Re: More DataForm Help

by leah wasser -

Ok - I have run into two interested bugs (or perhaps user error on my part) with this dataform module.

The first is an issue with editing a submission. I can upload a few pictures to my database with associated field attributes. however, when i click on the little "pencil" edit icon, instead of taking me to an interface where i can edit my submission (edit the field text, etc) it takes me to "add data entry". Once submitted, can you go back and edit your submissions into this data form? if not, i will remove the pencil for the time being so as not to confuse our educators.

The second issue is interesting. If i setup a few fields, i can then create a nice view. If i then decide i want another field in my database, and i add it to the view, the view does not load properly (my left hand side bar with links to parts of the course disappears and now i can not do anything in the course (all links are gone).

Any advice on these issues?

Leah

In reply to leah wasser

Re: More DataForm Help

by Itamar Tzadok -

1. the 'single edit' (E) doesn't work very well. Instead I suggest that you create a designated view for managing submissions - 'Manage my images'. This view would display a list of the user's images with the edit and delete icons and the 'Add new entry' link for adding new submissions. Navigation to and from this view would be from the current view dropdown. The main Gallery view would be for browsing only.

2. This sounds like broken html and may happen if you tweak the html and leave some tags open. If you work through the editor (in the matrix view) it shouldn't happen. Could you provide more details?

smile

 

In reply to Itamar Tzadok

Re: More DataForm Help

by leah wasser -

Hi There,

This problem i am having does appear to be broken HTML in terms of content not appearing.. but the odd thing is that i am not modifying any html. i just add a field to my DB. then i add that field to my view. And the view breaks. i am not sure what i am doing wrong.


Also, can you explain to me how i would render thumbnail views of the images? And also how i would create a view where users can edit their own submissions? (what the code for the filter might look like).

Is there documentation that i am missing on doing these things? i have searched for something more out of the box, or more easily configurable however can not seem to find anything. (i may just be missing something as well!)

Thank you so much

leah

In reply to leah wasser

Re: More DataForm Help

by Itamar Tzadok -

Which field and which tag seem to break the html?

With a picture field 'Pic' the thumbnail is [[Pic:tn] ].

Users can edit their submissions in any view. The edit tag ##edit## should display the edit icon and clicking on the icon should open the entry for editing in the view where it is displayed.

I'm afraid the documentation is still work in progress and any help with that wold e greatly appreciated.

smile