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