Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Linked activities

From MoodleDocs


Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable.


In large courses we often find a sets of similar activities (quizzes, assignments and so on), which share many settings (i.e. module settings) - but not all, of course. Maintaining of such sets is quite a pain: imagine youself adding a new IP range on 6-10 quizzes. So we need an usable and robust way to handle such sets - linked activities.

This page is to discuss and find a better way to do so.

Let's call the setting some parameter of course module instance. Setting isn't necessary one control on the form (it may be a group of related controls, check boxes for example). Setting may be a field in db, or not - needs thinking.

A set is a group of course module instances, that share common settings.

Issues

  • linked activities may need to response on editing one of them (and deleting), so they need an events on these occasion. Anyone interested please vote for MDL-16203.
  • modules now handle settings (from form to db and from db to form) in a bulk, there is no way to say the module "please save in db (or show on the form) this setting and not leave others be". It's possible to do this without module help, but if module can map individual settings to db/form(controls) it would help.
  • A similar idea was proposed for bulk editing of completion conditions, which should be generalized to match this proposal: MDL-30049

Interface

Level 0: Save as another

Done in Moodle 2.1 as copy acitivity.

Level 1: Bulk activities editing

This doesn't require DB change, and hopefully can be done in 1.9 too. Block bulk_module_edit is intented to be placed in a course page.

Step 1: Select a module type to edit

Bulk edit1.JPG

Step 2: Select instances to edit

Bulk edit2.JPG

Step 3: Select fields to edit

Bulk edit3.JPG Sorry, quiz has quite a long list of form fields which doesn't fit in screenshot.

Step 4: Edit and save form

Bulk edit4.JPG


Level 2: Sets of activities

On this level system would be able to store sets of related instances and provide a one-click link to edit them. This'll require new db tables, so it probably 2.0 only.

There must be a block which displays a sets as a links to edit them, and new controls on index.php page to create (manage?) sets.

If events on update instance would be fired, than it is possible to have sets which are automatically update some settings whenever one of the activities in set are updated.

Architecture