Personalized access to course activities/resources

Personalized access to course activities/resources

by Itamar Tzadok -
Number of replies: 18

A new plugin Availability dataformcontent allows teachers to restrict user access to an activity or section based on content of a designated Dataform instance in the course. The plugin requires the Dataform module plugin. Version for 2.8 awaiting approval in Moodle plugins repo, but already available from git at https://github.com/itamart/moodle-availability_dataformcontent/releases/tag/v2.8.0.

For a related discussion down this forum see Allocate resources/activities to individual students.

Please note: this plugin requires the Dataform module plugin which is available from Moodle plugins repo and from git.

Hope this plugin helps anyone. Feel free to feed back. smile

Average of ratings: Useful (2)
In reply to Itamar Tzadok

Re: Personalized access to course activities/resources

by Hartmut Scherer -

Hi Itamar,

You provided an excellent plugin for the Dataform activity and a very detailed documentation. It only took me some time to discover the [ [EAU:edit]] for giving access to a particular student. This was not your fault at all. I was just so excited that I followed the screenshots without scrolling to 'Steps for basic personalized access.'

For those who want to try it out I recommend going to the Moodle docs Availability dataformcontent and scroll down to 1.2.1 Steps for basic personalized access. Combined with the availability filter, this plugin is a great tool for personalized learning paths. 

With kind regards,

Hartmut

Average of ratings: Useful (1)
In reply to Hartmut Scherer

Re: Personalized access to course activities/resources

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Over Easter I'm going to play with this plugin again -  I remember trying it out  a few years back as it does much more than the standard database but I got a bit flustered with its complexity; hopefully I am older and less flusterable now ( big grin ) and am interested to try it with the new availability condition, so thanks.
Average of ratings: Useful (1)
In reply to Mary Cooch

Re: Personalized access to course activities/resources

by dawn alderson -

This is timely news Mary.  I recently chatted with others about this...in view of Itamar's post and screenshots here:  https://moodle.org/mod/forum/discuss.php?d=307832

 We were chatting about the benefits for practice (and that availability condition-in particular), you know, different sectors.....primary, secondary, FE, Uni and CPD.  

 Be great to read your post, after you have tried it out over Easter-I will spread the word!  If tricky-I will have a play-just let me know-will try and find the time.

Happy Easter  & Many thanks, this is really helpful for practice/implications. 

In reply to Itamar Tzadok

Re: Personalized access to course activities/resources

by Hartmut Scherer -

Hi Itamar,

Here are a few observations after testing the Dataform activity with the new plugin 'availability dataformcontent.'

When I want to restrict access to a Dataform activity, I get this error:

Fatal error: Call to undefined method mod_dataform\helper\calendar_event::load() in /home/pibceduc/public_html/mod/dataform/classes/helper/calendar_event.php on line 48

Trying to delete a 'New Dataform' activity (without the plugin) leads to the following error message:

Can not find data record in database.

Debug info: 

SELECT cm.*, m.name, md.name AS modname FROM {course_modules} cm JOIN {modules} md ON md.id = cm.module JOIN {dataform} m ON m.id = cm.instance WHERE cm.id = :cmid AND md.name = :modulename AND cm.course = :courseid [array ( 'cmid' => 22993, 'modulename' => 'dataform', 'courseid' => '265', )] Error code: invalidrecordunknown

Stack trace:

* line 1479 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown

* line 1352 of /lib/datalib.php: call to moodle_database->get_record_sql()

* line 55 of /course/rest.php: call to get_coursemodule_from_id()

Is the plugin 'availability dataformcontent' designed to work across courses? In one test course I named the Dataform activity 'My personal list of advanced activities,' in a second course I named the Dataform activity 'My personal list of advanced activities_NEW.' When I want to restrict access to activities in any of the two courses, I see both Dataforms with the availability plugins.

In the second course I cannot define the filter 'Availability.' Whenever I save 'From Content' and 'To Content', it just disappears with the saving. So when I edit the filter again, I see the default version without any debug message.

Can I apply presets? I added a new Dataform activity, uploaded a preset from file and added it to the 'Course presets' area, but when I press apply nothing happens. In other words I cannot import a preset with the availability plugin nor do I see a debug message.

Sorry, Itamar, this is not intended to discourage you. I am still excited about the plugin 'availability dataformcontent.' I am also confident that you will find a solution.

With kind regards,

Hartmut

In reply to Hartmut Scherer

Re: Personalized access to course activities/resources

by Itamar Tzadok -

See CONTRIB-5620 re the Dataform error. Resolved, on git, but not yet in a formal release. I will add a branch on git for interim releases, but the next tagged release will be only in May, on the Moodle release point.

The condition doesn't currently work across courses. I've been thinking about adding to the condition configuration a setting for site wide dashboard dataforms. But this and other possible enhancments and considerations require discussion. You can open an issue in the Set: Dataform component tracker for that and we can take it from there.

The availability plugin is not a sub plugin of the Dataform so Dataform content conditions on course activities are not included in a Dataform preset. The conditions are included in the backup of the restricted activity in a course backup, but only if the backup includes the course activities (otherwise, the reference to the dashboard Dataform in the restricted activity will remain unresolved).

smile

In reply to Itamar Tzadok

Re: Personalized access to course activities/resources

by Hartmut Scherer -

Hi Itamar,

Thank you for your detailed response. I implemented CONTRIB-5620 in my Moodle 2.8.3 installation. When I installed a Dataform activity as a dashboard for personalized access to activities in a test course #1 in Moodle 2.8.3+ (Build: 20150205), I was able to restrict access to an activity by time. This is the background of my excitement on March 28 (see post above).

A day later I installed a second Dataform activity as a dashboard with a different name in a test course #2. Now the filter 'Availability' no longer worked in both courses, because the search criteria could not be saved. When I set the search criteria and clicked save, there was no error message, but when I opened the filter again, the search criteria were no longer there. When I checked the filter 'Availability' in course #1, the search criteria were gone as well and could not be set either.

Second observation. Somehow the new plugin 'Availability dataformcontent' is not restricted to a course. When I wanted to restrict access to activities in course #2, I saw the dashboard of course #1 and course #2. So in theory I could have used the dashboard of course #1 with its availability settings for activities in course #2. To me this might be the reason why it is no longer possible to save the filter settings. Finally, I uninstalled the plugin 'Availability dataformcontent' as it interfered with the block Sharing Cart.

With kind regards,

Hartmut

In reply to Hartmut Scherer

Re: Personalized access to course activities/resources

by Itamar Tzadok -

With respect to not being able to apply a preset, assuming you have experienced this issue on 2.9dev, it appears that 2.9 contains some changes that interfere with the current implementation of this feature in the Dataform. Naturally the Dataform will be adjusted accordingly for the release of Dataform 2.9. In the meantime you should probably use Moodle stable versions to test the Dataform. smile

In reply to Itamar Tzadok

Re: Personalized access to course activities/resources

by Itamar Tzadok -

A new packer for backup files: mbz_packer. smile

In reply to Itamar Tzadok

Re: Personalized access to course activities/resources

by dawn alderson -

Itamar-are you saying it is ready to test now? Mary is aiming to do this over Easter...good to go?

In reply to Itamar Tzadok

Re: Personalized access to course activities/resources

by Hartmut Scherer -

Can I use mbz_packer in Moodle 2.8.3 or is this only for the new release of Moodle 2.9? 

In reply to Hartmut Scherer

Re: Personalized access to course activities/resources

by Itamar Tzadok -

Dawn and Hartmut,

I'm preparing an update for 2.8. I'll release it as 2.8.5 in a couple of days so there will be an updated version for Easter.

smile

Average of ratings: Useful (1)
In reply to Itamar Tzadok

Re: Personalized access to course activities/resources

by dawn alderson -

Yes

right, I am due to get 2.7 over Easter...need it for project.  If needs be, I could test and get 2.8, or whatever 2.8.5...but that will be hassley-so, great that Mary has this in hand.

Thanks Itamar, got an itch about this-and its potential.

 D

In reply to Hartmut Scherer

Re: Personalized access to course activities/resources

by Itamar Tzadok -

Just a note that I've released Dataform 2.8.5 and Availability Dataform Content 2.8.1. Both releases together offer better support for using the availability condition. The condition can still be used only within a course. It should now be transferrable with a restricted activity via the sharing cart. smile

In reply to Itamar Tzadok

Re: Personalized access to course activities/resources

by Hartmut Scherer -

Hi Itamar,

Thank you for the updated versions of Dataform 2.8.5 and Availability Dataform Content 2.8.1. I renamed Dataform to Dataform-Old in cPanel and uploaded Dataform 2.8.5 in Moodle 2.8.3. This is the error message that I received when I wanted to go to Notification in Site administration:

SyntaxError: Unexpected end of input    at Object.parse (native)    at Object.Y.namespace.parse (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1427666805/mcore-debug.js:24483:18)    at BRANCH.ajaxProcessResponse (http://pibc-edu.com/theme/yui_combo.php?m/1427666805/block_navigation/navigation/navigation-debug.js:658:33)    at Y.Subscriber._notify (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1427666805/mcore-debug.js:13680:35)    at Y.Subscriber.notify (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1427666805/mcore-debug.js:13709:24)    at Y.CustomEvent._notify (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1427666805/mcore-debug.js:13372:17)    at Y.CustomEvent._procSubs (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1427666805/mcore-debug.js:13498:36)    at Y.CustomEvent.fireSimple (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1427666805/mcore-debug.js:13465:18)    at Y.CustomEvent._fire (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1427666805/mcore-debug.js:13447:29)    at Object.ET.fire (http://pibc-edu.com/theme/yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1427666805/mcore-debug.js:14600:22)

With kind regards,

Hartmut

In reply to Itamar Tzadok

Re: Personalized access to course activities/resources

by Hartmut Scherer -

Update to my previous post:

I had no problems installing Dataform 2.8.1 in Moodle 2.9dev.

In reply to Itamar Tzadok

Re: Personalized access to course activities/resources

by Hartmut Scherer -

Hi Itamar,

The Dataform 2.8.5 and the Availability Dataform Content 2.8.1 work perfectly in Moodle 2.8.3. I set up dashboards in two courses. You created a very fine tool. The gradebook shows only the released activities for the user, a nice clean view. Preset works as well as Sharing Cart. 

I set the date string for the availability to  (%A, %d %B %Y, %I:%M %p), which worked fine. When I edit the filter 'Availability,' I see some code at the top (see screenshot)

edit availability













@all:

For those who want to try out Dataform as a dashboard, I attached a preset.

With kind regards,

Hartmut

Average of ratings: Useful (1)
In reply to Hartmut Scherer

Re: Personalized access to course activities/resources

by Itamar Tzadok -

Glad to hear it works for you! smile

If by "I see some code at the top" you refer to the "Url query: ..." line, then that's part of the normal output, just not styled in any way. The url query is a representation of the filter definition that you can pass via the url if you have the right permission. This should allow you to create links to filtered view without actual filters. The feature is half-baked so you should probably not try it for now. smile

Average of ratings: Useful (1)
In reply to Itamar Tzadok

Re: Personalized access to course activities/resources

by Przemek Kaszubski -
Picture of Particularly helpful Moodlers Picture of Testers

Looking forward to reading Mary's summary from her tests. All this sounds very exciting! Thanks for your hard work, Itamar!