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: Difference between revisions

From MoodleDocs
No edit summary
 
(28 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Questions}}
{{Moodle 1.9}}
==General Clean Up of UI and Code==
==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.
* 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.
* 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.
* Further work has been done on separating the question bank code from the quiz module to make it possible to access questions in the question bank from other modules.


==Seperated Questions into Different Category Hierarchies in Different Context Levels==
==Better Management of Files Linked to In Questions==


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).
[[Questions linking to files|Since Moodle 1.9 we have some automatic handling of files linked to from questions. When you '''move questions between sharing contexts''' and when you '''back up''' courses with questions in them, Moodle will now help you manage files linked to in your questions.]]


==More Granular Capabilities==
==Separated Questions into Different Category Hierarchies in Different Context Levels==


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 :
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'. More info here [[Question contexts]]


* system level then it is normally inherited in the course category, course and activity contexts.
Upon upgrade :
* course category level then it is normally inherited in all the contained course categories, in the course and activity contexts.
* a category that was shared will now be in the System context and it will have the course name from which it has been taken appended to the category name in brackets.
* course level then it is normally inherited in all activity contexts for activities in that course.
* Questions that were not shared will be put in the course context upon upgrade.
* The only exception to this is the special case outlined below in [[#Random Questions Selecting from Subcategories]]


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.
==More Granular Capabilities==
 
 
====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.
Since Moodle 1.9 we have more granular capabilities for access and use of questions see [[Question permissions]] for more info. Question permissions are now tested in the context in which the questions are shared see [[Question contexts]] for more info.


====Upgrade====
====Upgrade====
Line 73: Line 30:
Roles that previously had the moodle/question:manage capability will have :
Roles that previously had the moodle/question:manage capability will have :


* moodle/question:add
* [[Capabilities/moodle/question:add|moodle/question:add]]
* moodle/question:editmine / editall
* [[Capabilities/moodle/question:editmine|moodle/question:editmine]] / [[Capabilities/moodle/question:editall|editall]]
* moodle/question:viewmine / viewall
* [[Capabilities/moodle/question:viewmine|moodle/question:viewmine]] / [[Capabilities/moodle/question:viewall|viewall]]
* moodle/question:usemine / useall
* [[Capabilities/moodle/question:usemine|moodle/question:usemine]] / [[Capabilities/moodle/question:useall|useall]]
* moodle/question:movemine / moveall
* [[Capabilities/moodle/question:movemine|moodle/question:movemine]] / [[Capabilities/moodle/question:moveall|moveall]]


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


==Potential Issues on Upgrade==
==Potential Issues on Upgrade==
Line 92: Line 49:
* define a new Role Shared Question Creator
* define a new Role Shared Question Creator
* give the role these question permissions :
* give the role these question permissions :
** moodle/question:add
** [[Capabilities/moodle/question:add|moodle/question:add]]
** moodle/question:editmine / editall
** [[Capabilities/moodle/question:editall|moodle/question:editall]]
** moodle/question:viewmine / viewall
** [[Capabilities/moodle/question:viewall|moodle/question:viewall]]
** moodle/question:movemine / moveall
** [[Capabilities/moodle/question:moveall|moodle/question:moveall]]
** [[Capabilities/moodle/question:managecategory|moodle/question:managecategory]]
* and probably also :
* and probably also :
** moodle/question:usemine / useall
** [[Capabilities/moodle/question:useall|moodle/question:useall]]


You can also create a role 'Shared question user':
You can also create a role 'Shared question user':
Line 106: Line 64:
* define a new Role Shared question user
* define a new Role Shared question user
* give the role these question permissions :
* give the role these question permissions :
** moodle/question:add
** [[Capabilities/moodle/question:viewall|moodle/question:viewall]]
** moodle/question:editmine / editall
** [[Capabilities/moodle/question:useall|moodle/question:useall]]
** moodle/question:viewmine / viewall
** moodle/question:movemine / moveall
* and probably also :
** moodle/question:usemine / useall


Assign the role at the system level to give the user the 'Shared question user' /  'Shared Question Creator' permissions in the System context and in all the Course Categories. The user will also have the same permissions in all courses and activities unless you override the permissions at these levels for any of the roles the user has (eg. Teacher / Student etc) a 'prevent' at a lower context level will override an allow at the system or course category level. You assign a role at the system level by going to Administration > Users > Permissions > Assign global roles.
Assign the role at the system level to give the user the 'Shared question user' /  'Shared Question Creator' permissions in the System context and in all the Course Categories. The user will also have the same permissions in all courses and activities unless you override the permissions at these levels for any of the roles the user has (eg. Teacher / Student etc) a 'prevent' at a lower context level will override an allow at the system or course category level. You assign a role at the system level by going to Administration > Users > Permissions > Assign global roles.
Line 118: Line 72:


===Random Questions Selecting from Subcategories===
===Random Questions Selecting from Subcategories===
[[Image:randomquestionenvironmentcheck.jpg|thumb|Screen shot of problems reported in environment check upgrading to 1.9]]


Normally upon upgrade questions that are shared are moved to a category in the system context. Questions that are not shared are kept in the course context.
Normally upon upgrade questions that are shared are moved to a category in the system context. Questions that are not shared are kept in the course context.
Line 135: Line 93:
Questions already included in quizzes will continue to work as before.
Questions already included in quizzes will continue to work as before.


There is an environment check to check for possible problems with 'Random Questions Selecting from Subcategories'. Below is a screen shot.
There is an environment check to check for possible problems with 'Random Questions Selecting from Subcategories'. See screen shot.
 
[[Image:randomquestionadminreport.jpg|thumb|Screen shot of questions admin report reporting problems with random questions.]]
 
More information about the issue on your system is available in Admin / Reports / Question, this is linked to from the environment check message when a problem is detected. Environment checks and the question admin report have been backported to the latest version of MOODLE_18_STABLE.
 
==More info about changes in Moodle 1.9 can be found on these pages==
 
* [[Question permissions explained with diagrams]]
* [[How to let teachers share questions between courses]]
* [[Question bank]]
* [[Question categories]]
* [[Question contexts]]
* [[Question permissions]]
* [[Question reports]]
* [[Questions linking to files]]
* [[Quiz submission email notification]]


More information about the issue is available in Admin / Reports / Question. Environment checks will be backported soon and the question admin report has been backported to the latest version of MOODLE_18_STABLE.
The following permissions are new in Moodle 1.9 (they replace moodle/question:manage, giving more control over exactly what someone can do) :


====Screen shot of problems reported in environment check upgrading to 1.9====
* [[Capabilities/moodle/question:add|moodle/question:add]]
* [[Capabilities/moodle/question:editmine|moodle/question:editmine]] / [[Capabilities/moodle/question:editall|editall]]
* [[Capabilities/moodle/question:viewmine|moodle/question:viewmine]] / [[Capabilities/moodle/question:viewall|viewall]]
* [[Capabilities/moodle/question:usemine|moodle/question:usemine]] / [[Capabilities/moodle/question:useall|useall]]
* [[Capabilities/moodle/question:movemine|moodle/question:movemine]] / [[Capabilities/moodle/question:moveall|moveall]]


[[Image:randomquestionenvironmentcheck.jpg]]
And the following no longer exist :


====Questions admin report reports problems with random questions.====
* [[Capabilities/moodle/question:manage|moodle/question:manage]]
* [[Capabilities/moodle/question:import|moodle/question:import]]
* [[Capabilities/moodle/question:export|moodle/question:export]]


[[Image:randomquestionadminreport.jpg]]
[[de:Änderungen in Bezug auf Fragen in Moodle 1.9]]
[[ja:Moodle 1.9における問題エンジンの変更]]

Latest revision as of 12:06, 23 December 2008


Moodle1.9


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.
  • Further work has been done on separating the question bank code from the quiz module to make it possible to access questions in the question bank from other modules.

Better Management of Files Linked to In Questions

Since Moodle 1.9 we have some automatic handling of files linked to from questions. When you move questions between sharing contexts and when you back up courses with questions in them, Moodle will now help you manage files linked to in your questions.

Separated 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'. More info here Question contexts

Upon upgrade :

  • a category that was shared will now be in the System context and it will have the course name from which it has been taken appended to the category name in brackets.
  • Questions that were not shared will be put in the course context upon upgrade.
  • The only exception to this is the special case outlined below in #Random Questions Selecting from Subcategories

More Granular Capabilities

Since Moodle 1.9 we have more granular capabilities for access and use of questions see Question permissions for more info. Question permissions are now tested in the context in which the questions are shared see Question contexts for more info.

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 :

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

Potential Issues on Upgrade

Access to question categories shared outside a course

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 :

You can also create a role 'Shared question user':

  • log in as an admin
  • go to Administration > Users > Permissions > Define roles
  • click on Add New Role button
  • define a new Role Shared question user
  • give the role these question permissions :

Assign the role at the system level to give the user the 'Shared question user' / 'Shared Question Creator' permissions in the System context and in all the Course Categories. The user will also have the same permissions in all courses and activities unless you override the permissions at these levels for any of the roles the user has (eg. Teacher / Student etc) a 'prevent' at a lower context level will override an allow at the system or course category level. You assign a role at the system level by going to Administration > Users > Permissions > Assign global roles.

You can also assign a role at the course category level by going to Administration > Courses > Add/edit courses and clicking on one of the course category names and then clicking on the Assign Roles link to the top right of the screen. The role will apply to all contained course categories and also to all courses / activities contained.

Random Questions Selecting from Subcategories

Screen shot of problems reported in environment check upgrading to 1.9


Normally upon upgrade questions that are shared are moved to a category in the system context. Questions that are not shared are kept in the course context.

In the following special case this is not true and the sharing status of some questions may have been changed :

  • You have some random questions in your quizzes which are selected from sub categories.
  • AND the sub categories the random questions are selected from have a different 'shared' status to any of the sub categories. Eg. you have a random question in a category that is not shared and some of the sub categories you are selecting from are not shared. OR you have a random question in a category that is shared and some of the sub categories you are selecting from are shared.

There is a special check for this case in the environment check code and a special admin report for checking this.

When a random question as above is found in the question bank then :

  • all sub categories below the random question are set to the same 'shared' status as the category the random question is in.
  • if there is another random question in one of the sub categories it is ignored, all sub categories are set to the same status.

Questions already included in quizzes will continue to work as before.

There is an environment check to check for possible problems with 'Random Questions Selecting from Subcategories'. See screen shot.

Screen shot of questions admin report reporting problems with random questions.

More information about the issue on your system is available in Admin / Reports / Question, this is linked to from the environment check message when a problem is detected. Environment checks and the question admin report have been backported to the latest version of MOODLE_18_STABLE.

More info about changes in Moodle 1.9 can be found on these pages

The following permissions are new in Moodle 1.9 (they replace moodle/question:manage, giving more control over exactly what someone can do) :

And the following no longer exist :