Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Question Engine Changes in Moodle 1.9.

Question Engine Changes in Moodle 1.9

From MoodleDocs
Revision as of 12:10, 17 August 2007 by Jamie Pratt (talk | contribs)

General Clean Up of UI and Code

  • Many parts of the question code have been cleaned up. The Quiz / Question UI has some improvements - the category editing page's table has been replaced by unordered lists and the controls for editing categories have been improved.
  • Question code no longer relies on browser sessions. Before if you had more than one browser window open for editing a quiz / questions navigation would have been unpredictable now you can have several independent browser windows open at once to edit quizzes and questions.

Seperated Questions into Different Category Hierarchies in Different Context Levels

Before 1.9 questions were always associated with one course. You could 'share' a question to allow it to be visible in another course. Now questions can be shared in an activity, a course, a course category or with the whole system. These different levels of sharing are Moodle 'contexts'. (Think of a context as a conceptual space in your Moodle system. Notice an activity is contained in a course, which is contained in a course category, which is contained in the system.) The question editing UI can be accessed from within the course questions area or when setting up an activity. When editing questions in a course you have access to all the containing contexts' questions also. And when editing a quiz / questions in a module you have access to all the containing contexts questions including the courses context. So from the course questions editing area you can access questions available in the course area, possibly several course category areas containing the course (remember Course Categories can contain each other).

More Granular Capabilities

Bear in mind that each of these capabilities can be set for any of the contexts mentioned above. If you someone has a role with a capability set at the :

  • system level then it is normally inherited in the course category, course and activity contexts.
  • course category level then it is normally inherited in all the contained course categories, in the course and activity contexts.
  • course level then it is normally inherited in all activity contexts for activities in that course.

This means that if you have a role with the add capability assigned to you at the system level then you have the add capability all over the site (unless their is an override set for a role you belong to at a lower level). If you have it assigned at the course level that means you have the capability for questions in that course and for questions in all activities in that course.


moodle/question:managecategory

Allows the management of category hierarchies ie. creating, editing and moving categories. (The Categories editing page would be shown if the user has permission to edit the hierarchy in the current context or any parent context.)


moodle/question:add

Controls :

  • the adding of questions to a category.
  • the moving of a question to a category.
  • the import of questions.

This capability would be tested at the module / course / course category / system level depending on the where the user is attempting to create a question.

mine / all

All other capabilities are split into two types mine or all. So the permissions for what you can do with a question depend on whether the question was created by you or someone else.

  • 'all' means the capability allows you to act on all questions, your own questions included (so 'mine' is not tested if you have 'all').
  • 'mine' means only questions created by you.
moodle/question:editmine / editall

Controls whether a user can :

  • edit their own / someone else's question.
  • delete their own / someone else's question.
moodle/question:viewmine / viewall

Controls whether a user can see all of their own / someone else's question. This is different to 'use' which only allows you to preview a question. If you can 'view' that means you can see all the questions answers and it means you can :

  • save as new question
  • export questions in the category
moodle/question:usemine / useall

Controls whether a user can :

  • include their own / someone else's question in an activity (currently only the quiz activity).
  • preview a question


moodle/question:movemine / moveall

Controls moving of questions to another category. You must have permission to do this both in the context you are moving the question from and you must have the 'add' capability in the context you are moving the question to.

Upgrade

On upgrade from an older version of Moodle question capabilities are automatically assigned.

Roles that previously had the moodle/question:manage capability will have :

  • moodle/question:add
  • moodle/question:editmine / editall
  • moodle/question:viewmine / viewall
  • moodle/question:usemine / useall
  • moodle/question:movemine / moveall

This will give them effectively the same permissions as they had previously for questions shared at the course level.

Potential Issues on Upgrade

Questions that are shared above the course level may not be available to course teachers. Normally the teacher role is assigned at the course level so the teacher's capabilities will only cover the course in which they are assigned the teacher role. You must define a new role and assign all users that you want to be able to share questions above the course level that role. You do this by :

=Random Questions Selecting from Subcategories