Note:

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

Linked activities: Difference between revisions

From MoodleDocs
(New page: 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...)
 
Line 14: Line 14:


== Architecture ==
== Architecture ==
First of all, we need to choose one of the ways, described below:
# a set of activities has it's editing form, apart from activities; you use set's form to change settings on all instances in the set, individual form to change settings individually
# if you edit linked setting of one activity in the set, than it'll change all activities in the set
# the set has '''primary''' activity, linked settings in other activities is disable (frozen controls).
A link to the set editing page can be placed in the block (or, if Moodle core developers are interested in such thing, placed in administration block of the course). However, it's quite hard to write this block without cooperation from modules at all. It would be better if a module will cooperate with it, thought a block can contain per-module functions if cooperation is impossible.

Revision as of 21:48, 28 January 2009

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.

Interface

Architecture