quiz: MDL-16478 Allow different open/close dates, etc. for individual students or groups.

This was implemented by Matt Petro of the University of Wisconsin - Madison Engineering
School and Math Department. Many thanks. Reviewed by and committed by Tim Hunt.

This adds a new Overrides tab to the UI, with sub-tabs Group overrides and User overrides.
Each of those lists all the overrides that currently exist, and lets you manage them and
create more.

When a quiz is being attempted, the override that applies to the current user is combined
with the current quiz settings loaded from the quiz table (normally called $quiz).
If there are both user and group overrides, then just the specific user override is used (more specific).
If the user is in several groups, then the overrides are combined to give the most permissive set of options.

There is one new database table quiz_overrides, to store the overrides.
This commit is contained in:
Tim Hunt 2010-03-08 16:01:38 +00:00
parent cdede6fbfe
commit 990650f94c
25 changed files with 1309 additions and 127 deletions

View file

@ -26,8 +26,10 @@ $string['addingrandomsamatch'] = 'Adding a Random Short-Answer Matching question
$string['addingshortanswer'] = 'Adding a Short-Answer question';
$string['addingtruefalse'] = 'Adding a True/False question';
$string['addmoreoverallfeedbacks'] = 'Add {no} more feedback fields';
$string['addnewgroupoverride'] = 'Add group override';
$string['addnewpagesafterselected'] = 'Add new pages after selected questions';
$string['addnewquestionsqbank'] = 'Add questions to the category $a->catname: $a->link';
$string['addnewuseroverride'] = 'Add user override';
$string['addpagehere'] = 'Add page here';
$string['addquestion'] = 'Add question';
$string['addquestions'] = 'Add questions';
@ -220,6 +222,7 @@ $string['deletequestionscheck'] = 'Are you absolutely sure you want to delete th
$string['deleteselected'] = 'Delete selected';
$string['deletingquestionattempts'] = 'Deleting question attempts';
$string['description'] = 'Description';
$string['disabled'] = 'Disabled';
$string['discrimination'] = 'Discrim. Index';
$string['displayoptions'] = 'Display options';
$string['download'] = 'Click to download the exported category file';
@ -244,6 +247,7 @@ $string['editingrandomsamatch'] = 'Editing a Random Short-Answer Matching questi
$string['editingrqp'] = '$a: editing a question';
$string['editingshortanswer'] = 'Editing a Short-Answer question';
$string['editingtruefalse'] = 'Editing a True/False question';
$string['editoverride'] = 'Edit override';
$string['editqcats'] = 'Edit questions categories';
$string['editquestions'] = 'Edit questions';
$string['editquiz'] = 'Edit Quiz';
@ -268,6 +272,7 @@ in course \'$a->coursename\'
You can review this attempt at $a->quizreviewurl.';
$string['emailnotifysubject'] = '$a->studentname has completed quiz $a->quizname';
$string['empty'] = 'Empty';
$string['enabled'] = 'Enabled';
$string['endtest'] = 'End test ...';
$string['erroraccessingreport'] = 'You cannot access this report';
$string['errorinquestion'] = 'Error in question';
@ -350,6 +355,7 @@ $string['gradingdetailsadjustment'] = 'With previous penalties this gives <stron
$string['gradingdetailspenalty'] = 'This submission attracted a penalty of $a.';
$string['gradingdetailszeropenalty'] = 'You were not penalized for this submission.';
$string['gradingmethod'] = 'Grading method: $a';
$string['groupoverrides'] = 'Group overrides';
$string['guestsno'] = 'Sorry, guests cannot see or attempt quizzes';
$string['hidebreaks'] = 'Hide page breaks';
$string['hidereordertool'] = 'Hide the reordering tool';
@ -380,6 +386,7 @@ $string['invalidattemptid'] = 'No such attempt ID exists';
$string['invalidcategory'] = 'Category ID is invalid';
$string['invalidnumericanswer'] = 'One of the answers you entered was not a valid number.';
$string['invalidnumerictolerance'] = 'One of the tolerances you entered was not a valid number.';
$string['invalidoverrideid'] = 'Invalid override id';
$string['invalidquestionid'] = 'Invalid question id';
$string['invalidquizid'] = 'Invalid Quiz ID';
$string['invalidsource'] = 'The source is not accepted as valid.';
@ -444,6 +451,7 @@ $string['noanswers'] = 'No answers were selected!';
$string['noattempts'] = 'No attempts have been made on this quiz';
$string['noattemptstoshow'] = 'There are no attempts to show';
$string['nocategory'] = 'Incorrect or no category specified';
$string['noclose'] = 'No close date';
$string['nocommentsyet'] = 'No comments yet.';
$string['noconnection'] = 'There is currently no connection to a web service that can process this question. Please contact your administrator';
$string['nodataset'] = 'nothing - it is not a wild card';
@ -454,6 +462,8 @@ $string['nomatchinganswer'] = 'You must specify an answer matching the question
$string['nominal'] = 'Nominal';
$string['nomoreattempts'] = 'No more attempts are allowed';
$string['none'] = 'None';
$string['noopen'] = 'No open date';
$string['nooverridedata'] = 'You must override at least one of the quiz settings.';
$string['nopossibledatasets'] = 'No possible datasets';
$string['noquestionintext'] = 'The question text does not contain any embedded questions';
$string['noquestions'] = 'No questions have been added yet';
@ -492,6 +502,14 @@ $string['outofpercent'] = '$a->grade out of a maximum of $a->maxgrade ($a->perce
$string['outofshort'] = '$a->grade/$a->maxgrade';
$string['overallfeedback'] = 'Overall feedback';
$string['overdue'] = 'Overdue';
$string['overridedeletegroupsure'] = 'Are you sure you want to delete the override for group $a?';
$string['overridedeleteusersure'] = 'Are you sure you want to delete the override for user $a?';
$string['override'] = 'Override';
$string['overrides'] = 'Overrides';
$string['overridegroup'] = 'Override group';
$string['overrideuser'] = 'Override user';
$string['overrideusereventname'] = '$a->quiz - Override';
$string['overridegroupeventname'] = '$a->quiz - $a->group';
$string['pagesize'] = 'Attempts shown per page:';
$string['paragraphquestion'] = 'Paragraph Question not supported at line $a. The question will be ignored';
$string['parent'] = 'Parent';
@ -552,6 +570,7 @@ $string['quiz:emailnotifysubmission'] = 'Get email notification of submissions';
$string['quiz:grade'] = 'Grade quizzes manually';
$string['quiz:ignoretimelimits'] = 'Ignores time limit on quizzes';
$string['quiz:manage'] = 'Manage quizzes';
$string['quiz:manageoverrides'] = 'Manage quiz overrides';
$string['quiz:preview'] = 'Preview quizzes';
$string['quiz:regrade'] = 'Regrade quiz attempts';
$string['quiz:reviewmyattempts'] = 'Review your own attempts';
@ -632,6 +651,7 @@ $string['response'] = 'Response';
$string['responses'] = 'Responses';
$string['results'] = 'Results';
$string['reuseifpossible'] = 'reuse previously removed';
$string['reverttodefaults'] = 'Revert to quiz defaults';
$string['review'] = 'Review';
$string['reviewafter'] = 'Allow review after quiz is closed';
$string['reviewalways'] = 'Allow review at any time';
@ -659,6 +679,7 @@ $string['savedfromdeletedcourse'] = 'Saved from deleted course \"$a\"';
$string['savegrades'] = 'Save grades';
$string['savemyanswers'] = 'Save my answers';
$string['savenosubmit'] = 'Save without submitting';
$string['saveoverrideandstay'] = 'Save and enter another override';
$string['savequiz'] = 'Save this whole quiz';
$string['score'] = 'Raw score';
$string['scores'] = 'Scores';
@ -752,6 +773,7 @@ $string['updatesettings'] = 'Update quiz settings';
$string['upgradesure'] = '<div>In particular the quiz module will perform an extensive change of the quiz tables and this upgrade has not yet been sufficiently tested. You are very strongly urged to backup your database tables before proceeding.</div>';
$string['url'] = 'URL';
$string['usedcategorymoved'] = 'This category has been preserved and moved to the site level because it is a published category still in use by other courses.';
$string['useroverrides'] = 'User overrides';
$string['validate'] = 'Validate';
$string['viewallanswers'] = 'View $a quiz attempts';
$string['viewallreports'] = 'View reports for $a attempts';