Where to place user interface for the data, used by all question of some qtype

Where to place user interface for the data, used by all question of some qtype

by Oleg Sychev -
Number of replies: 1
Picture of Core developers Picture of Plugin developers

Suppose I introduce a handful of teacher-controlled meta-data, common for all questions of some type (actually a set of regular expression templates to make real expression more readable and modular). 

Where should I place an interface to view/edit them? 

  • Settings? But they aren't usually accessible for the course author, just site administrators. 
  • Write a special block? 
  • Put a link to special page in the question editing and script for that page inside a question? 
Can you give an advice please?
Average of ratings: -
In reply to Oleg Sychev

Re: Where to place user interface for the data, used by all question of some qtype

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I would do this as a script inside the question-type folder.

There are some similar scripts inside qtype_stack (e.g. https://github.com/maths/moodle-qtype_stack/blob/master/answertests.php, though it is not about managing shared resources.)

Then there is the question of where to link to it. If this was something that teachers use when editing a question of your type, then I would add a link to the form ('static' form element type) that opens the manage templates screen in a pop-up, or something like that.