Skip to content

Commit

Permalink
MDL-20636 Massively reduce the number of references to quiz in the qu…
Browse files Browse the repository at this point in the history
…estion code.

This mostly involves moving lang strings around, but I don't have time to do an AMOS script now.
  • Loading branch information
timhunt committed Feb 23, 2011
1 parent 88f0eb1 commit 5e8a85a
Show file tree
Hide file tree
Showing 57 changed files with 247 additions and 267 deletions.
6 changes: 6 additions & 0 deletions lang/en/question.php
Expand Up @@ -137,6 +137,7 @@
$string['getcontextfromfile'] = 'Get context from file';
$string['changepublishstatuscat'] = '<a href="{$a->caturl}">Category "{$a->name}"</a> in course "{$a->coursename}" will have it\'s sharing status changed from <strong>{$a->changefrom} to {$a->changeto}</strong>.';
$string['chooseqtypetoadd'] = 'Choose a question type to add';
$string['editquestions'] = 'Edit questions';
$string['ignorebroken'] = 'Ignore broken links';
$string['impossiblechar'] = 'Impossible character {$a} detected as parenthesis character';
$string['importcategory'] = 'Import category';
Expand All @@ -152,11 +153,13 @@
$string['invalidcategoryidtomove'] = 'Invalid category id to move!';
$string['invalidconfirm'] = 'Confirmation string was incorrect';
$string['invalidcontextinhasanyquestions'] = 'Invalid context passed to question_context_has_any_questions.';
$string['invalidpenalty'] = 'Invalid penalty';
$string['invalidwizardpage'] = 'Incorrect or no wizard page specified!';
$string['lastmodifiedby'] = 'Last modified by';
$string['linkedfiledoesntexist'] = 'Linked file {$a} doesn\'t exist';
$string['makechildof'] = 'Make child of \'{$a}\'';
$string['maketoplevelitem'] = 'Move to top level';
$string['matcherror'] = 'Grades do not match grade options - question skipped';
$string['matchgrades'] = 'Match grades';
$string['matchgradeserror'] = 'Error if grade not listed';
$string['matchgradesnearest'] = 'Nearest grade if not listed';
Expand Down Expand Up @@ -186,6 +189,7 @@
$string['nopermissionadd'] = 'You don\'t have permission to add questions here.';
$string['nopermissionmove'] = 'You don\'t have permission to move questions from here. You must save the question in this category or save it as a new question.';
$string['noprobs'] = 'No problems found in your question database.';
$string['notenoughanswers'] = 'This type of question requires at least {$a} answers';
$string['notenoughdatatoeditaquestion'] = 'Neither a question id, nor a category id and question type, was specified.';
$string['notenoughdatatomovequestions'] = 'You need to provide the question ids of questions you want to move.';
$string['notflagged'] = 'Not flagged';
Expand All @@ -211,12 +215,14 @@
$string['questioncatsfor'] = 'Question categories for \'{$a}\'';
$string['questiondoesnotexist'] = 'This question does not exist';
$string['questionname'] = 'Question name';
$string['questionno'] = 'Question {$a}';
$string['questionsaveerror'] = 'Errors occur during saving question - ({$a})';
$string['questionsmovedto'] = 'Questions still in use moved to "{$a}" in the parent course category.';
$string['questionsrescuedfrom'] = 'Questions saved from context {$a}.';
$string['questionsrescuedfrominfo'] = 'These questions (some of which may be hidden) were saved when context {$a} was deleted because they are still used by some quizzes or other activities.';
$string['questiontype'] = 'Question type';
$string['questionuse'] = 'Use question in this activity';
$string['reviewresponse'] = 'Review response';
$string['saveflags'] = 'Save the state of the flags';
$string['selectacategory'] = 'Select a category:';
$string['selectaqtypefordescription'] = 'Select a question type to see its description.';
Expand Down
54 changes: 1 addition & 53 deletions mod/quiz/lang/en/quiz.php
Expand Up @@ -24,7 +24,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['acceptederror'] = 'Accepted error';
$string['accessnoticesheader'] = 'You can preview this quiz, but if this were a real attempt, you would be blocked because:';
$string['action'] = 'Action';
$string['adaptive'] = 'Adaptive mode';
Expand Down Expand Up @@ -108,7 +107,6 @@
$string['blackboard'] = 'Blackboard';
$string['blackboard_six'] = 'Blackboard V6+';
$string['bothattempts'] = 'Show students with and without attempts';
$string['braceerror'] = 'Could not find {...} around answers';
$string['browsersecurity'] = 'Browser security';
$string['browsersecurity_help'] = 'If "Full screen pop-up with some JavaScript security" is selected,
Expand Down Expand Up @@ -217,13 +215,11 @@
$string['datasetnumber'] = 'Number';
$string['daysavailable'] = 'Days available';
$string['decimaldigits'] = 'Decimal digits in grades';
$string['decimalformat'] = 'decimals';
$string['decimalplaces'] = 'Decimal places in grades';
$string['decimalplaces_help'] = 'This setting specifies the number of digits shown after the decimal point when displaying grades or grades. It only effects the display of grades, not the grades stored in the database, nor the internal calculations, which are carried out to full accuracy.';
$string['decimalplacesquestion'] = 'Decimal places in question grades';
$string['decimalplacesquestion_help'] = 'This setting specifies the number of digits shown after the decimal point when displaying the grades for individual questions.';
$string['decimalpoints'] = 'Decimal points';
$string['decimals'] = 'with {$a}';
$string['default'] = 'Default';
$string['defaultgrade'] = 'Default question grade';
$string['defaultinfo'] = 'The default category for questions.';
Expand Down Expand Up @@ -290,7 +286,6 @@
$string['errorinquestion'] = 'Error in question';
$string['errormissingquestion'] = 'Error: The system is missing the question with id {$a}';
$string['errornotnumbers'] = 'Error - answers must be numeric';
$string['errorsdetected'] = '{$a} error(s) detected';
$string['errorunexpectedevent'] = 'Unexpected event code {$a->event} found for question {$a->questionid} in attempt {$a->attemptid}.';
$string['essay'] = 'Essay';
$string['essayquestions'] = 'Questions';
Expand Down Expand Up @@ -328,23 +323,8 @@
$string['fractionsaddwrong'] = 'The positive grades you have chosen do not add up to 100%<br />Instead, they add up to {$a}%<br />Do you want to go back and fix this question?';
$string['fractionsnomax'] = 'One of the answers should be 100%, so that it is<br />possible to get a full grade for this question.<br />Do you want to go back and fix this question?';
$string['fromfile'] = 'from file:';
$string['functiondisabledbysecuremode'] = 'That functionality is currently disabled';
$string['functiontakesatleasttwo'] = 'The function {$a} must have at least two arguments';
$string['functiontakesnoargs'] = 'The function {$a} does not take any arguments';
$string['functiontakesonearg'] = 'The function {$a} must have exactly one argument';
$string['functiontakesoneortwoargs'] = 'The function {$a} must have either one or two arguments';
$string['functiontakestwoargs'] = 'The function {$a} must have exactly two arguments';
$string['generalfeedback'] = 'General feedback';
$string['generalfeedback_help'] = 'General feedback is text which is shown after a question has been attempted. Unlike feedback for a specific question which depends on the response given, the same general feedback is always shown.';
$string['generatevalue'] = 'Generate a new value between';
$string['geometric'] = 'Geometric';
$string['gift'] = 'GIFT format';
$string['giftleftbraceerror'] = 'Could not find a {';
$string['giftmatchingformat'] = 'Matching question answers are improperly formatted';
$string['giftnonumericalanswers'] = 'No answers found for numerical question';
$string['giftnovalidquestion'] = 'No valid question found';
$string['giftqtypenotset'] = 'Question type is not set';
$string['giftrightbraceerror'] = 'Could not find a }';
$string['grade'] = 'Grade';
$string['gradeall'] = 'Grade all';
$string['gradeaverage'] = 'Average grade';
Expand All @@ -371,7 +351,6 @@
$string['hidebreaks'] = 'Hide page breaks';
$string['hidereordertool'] = 'Hide the reordering tool';
$string['history'] = 'History of responses:';
$string['illegalformulasyntax'] = 'Illegal formula syntax starting with \'{$a}\'';
$string['imagedisplay'] = 'Image to display';
$string['import'] = 'Import';
$string['import_help'] = 'This function allows you to import questions from external text files.
Expand All @@ -389,7 +368,6 @@
$string['importingquestions'] = 'Importing {$a} questions from file';
$string['importmaxerror'] = 'There is an error in the question. There are too many answers.';
$string['importmax10error'] = 'There is an error in the question. You may not have more than ten answers';
$string['importminerror'] = 'There is an error in the question. There are not enough answers for this question type';
$string['importparseerror'] = 'Error(s) found parsing the import file. No questions have been imported. To import any good questions try again setting \'Stop on error\' to \'No\'';
$string['importquestions'] = 'Import questions from file';
$string['inactiveoverridehelp'] = '* Student does not have the correct group or role to attempt the quiz';
Expand Down Expand Up @@ -420,7 +398,6 @@
$string['listitems'] = 'Listing of items in quiz';
$string['literal'] = 'Literal';
$string['loadingquestionsfailed'] = 'Loading questions failed: {$a}';
$string['loguniform'] = 'digits, from a loguniform distribution';
$string['makecopy'] = 'Save as new question';
$string['managetypes'] = 'Manage question types and servers';
$string['manualgrading'] = 'Grading';
Expand All @@ -430,22 +407,13 @@
$string['match'] = 'Matching';
$string['matchanswer'] = 'Matching answer';
$string['matchanswerno'] = 'Matching answer {$a}';
$string['matcherror'] = 'Grades do not match grade options - question skipped';
$string['matchgrades'] = 'Match grades';
$string['matchgradeserror'] = 'Error if grade not listed';
$string['matchgradesnearest'] = 'Nearest grade if not listed';
$string['messageprovider:confirmation'] = 'Confirmation of your own quiz submissions';
$string['messageprovider:submission'] = 'Notification of quiz submissions';
$string['max'] = 'Max';
$string['min'] = 'Min';
$string['minutes'] = 'Minutes';
$string['missinganswer'] = 'Too few :ANSWER, :Lx, :Rx statements for question line {$a}. You must define at last 2 possible answers';
$string['missingcorrectanswer'] = 'Correct answer must be specified';
$string['missingformula'] = 'Missing formula';
$string['missingitemtypename'] = 'Missing name';
$string['missingname'] = 'Missing question name';
$string['missingquestion'] = 'Missing question label after line {$a}';
$string['missingquestiontext'] = 'Missing question text';
$string['missingword'] = 'Missing word format';
$string['modulename'] = 'Quiz';
$string['modulename_help'] = 'The quiz module enables the teacher to design and set quizzes consisting of multiple choice, true-false, matching and other question types. Each attempt is automatically marked, and the teacher can choose whether to give feedback and/or show correct answers.';
Expand Down Expand Up @@ -475,8 +443,6 @@
$string['nodatasubmitted'] = 'No data was submitted.';
$string['noessayquestionsfound'] = 'No manually graded questions found';
$string['nogradewarning'] = 'This quiz is not graded, so you cannot set overall feedback that differs by grade.';
$string['nomatchinganswer'] = 'You must specify an answer matching the question \'{$a}\'.';
$string['nominal'] = 'Nominal';
$string['nomoreattempts'] = 'No more attempts are allowed';
$string['none'] = 'None';
$string['noopen'] = 'No open date';
Expand All @@ -498,7 +464,6 @@
$string['noscript'] = 'JavaScript must be enabled to continue!';
$string['notavailable'] = 'This quiz is not currently available';
$string['notavailabletostudents'] = 'Note: This quiz is not currently available to your students';
$string['notenoughanswers'] = 'This type of question requires at least {$a} answers';
$string['notenoughrandomquestions'] = 'There are not enough questions in category {$a->category} to create the question {$a->name} ({$a->id}).';
$string['notenoughsubquestions'] = 'Not enough sub-questions have been defined!<br />Do you want to go back and fix this question?';
$string['notimedependentitems'] = 'Time dependent items are not currently supported by the quiz module. As a work around, set a time limit for the whole quiz. Do you wish to choose a different item (or use the current item regardless)?';
Expand Down Expand Up @@ -576,8 +541,6 @@
$string['questioninuse'] = 'The question \'{$a->questionname}\' is currently being used in: <br />{$a->quiznames}<br />The question will not be deleted from these quizzes but only from the category list.';
$string['questionmissing'] = 'Question for this session is missing';
$string['questionname'] = 'Question name';
$string['questionnametoolong'] = 'Question name too long at line {$a} (255 char. max). It has been truncated.';
$string['questionno'] = 'Question {$a}';
$string['questionnonav'] = '<span class="accesshide">Question </span>{$a->number}<span class="accesshide"> {$a->attributes}</span>';
$string['questionnonavinfo'] = '<span class="accesshide">Information </span>{$a->number}<span class="accesshide"> {$a->attributes}</span>';
$string['questionnotloaded'] = 'Question {$a} has not been loaded from the database';
Expand Down Expand Up @@ -647,7 +610,6 @@
$string['regradenotallowed'] = 'You do not have permission to regrade this quiz';
$string['regradingquestion'] = 'Regrading "{$a}".';
$string['regradingquiz'] = 'Regrading quiz "{$a}"';
$string['relative'] = 'Relative';
$string['remove'] = 'Remove';
$string['removeallquizattempts'] = 'Delete all quiz attempts';
$string['removeemptypage'] = 'Remove empty page';
Expand Down Expand Up @@ -762,8 +724,6 @@
$string['shufflequestionsselected'] = 'Shuffle questions has been set, so some actions relating to pages are not available. To change the shuffle option, {$a}.';
$string['shufflewithin'] = 'Shuffle within questions';
$string['shufflewithin_help'] = 'If enabled, the parts making up each question will be randomly shuffled each time a student attempts the quiz, provided the option is also enabled in the question settings. This setting only applies to questions that have multiple parts, such as multiple choice or matching questions.';
$string['significantfigures'] = 'with {$a}';
$string['significantfiguresformat'] = 'significant figures';
$string['singleanswer'] = 'Choose one answer.';
$string['sortage'] = 'Sort by age';
$string['sortalpha'] = 'Sort by name';
Expand Down Expand Up @@ -800,21 +760,17 @@
$string['timetaken'] = 'Time taken';
$string['tofile'] = 'to file';
$string['tolerance'] = 'Tolerance';
$string['tolerancetype'] = 'Tolerance type';
$string['toomanyrandom'] = 'The number of random questions required is more than are still available in the category!';
$string['top'] = 'Top';
$string['totalpointsx'] = 'Total of grades: {$a}';
$string['totalquestionsinrandomqcategory'] = 'Total of {$a} questions in category.';
$string['true'] = 'True';
$string['truefalse'] = 'True/false';
$string['truefalseimporterror'] = '<b>Warning</b>: The true/false question \'{$a->questiontext}\' could not be imported properly. It was not clear whether the correct answer is true or false. The question has been imported assuming that the answer is \'{$a->answer}\'. If this is not correct, you will need to edit the question.';
$string['type'] = 'Type';
$string['unfinished'] = 'open';
$string['ungraded'] = 'Ungraded';
$string['uniform'] = 'decimals, from a uniform distribution';
$string['unit'] = 'Unit';
$string['unknowntype'] = 'Question type not supported at line {$a}. The question will be ignored';
$string['unsupportedformulafunction'] = 'The function {$a} is not supported';
$string['unusedcategorydeleted'] = 'This category has been deleted because, after deleting the course, its questions weren\'t used any more.';
$string['updatesettings'] = 'Update quiz settings';
$string['updatingatttemptgrades'] = 'Updating attempt grades.';
Expand All @@ -829,22 +785,14 @@
$string['viewallanswers'] = 'View {$a} quiz attempts';
$string['viewallreports'] = 'View reports for {$a} attempts';
$string['warningmissingtype'] = '<b>This question is of a type that has not been installed on your Moodle yet.<br />Please alert your Moodle administrator.</b>';
$string['warningsdetected'] = '{$a} warning(s) detected';
$string['webct'] = 'WebCT format';
$string['wheregrade'] = 'Where\'s my grade?';
$string['wildcard'] = 'Wild card';
$string['windowclosing'] = 'This window will close shortly.';
$string['withselected'] = 'With selected';
$string['withsummary'] = 'with summary statistics';
$string['wronggrade'] = 'Wrong grade (after line {$a}) :';
$string['wronguse'] = 'You can not use this page like that';
$string['xhtml'] = 'XHTML format';
$string['xml'] = 'Moodle XML format';
$string['xmlimportnoname'] = 'Missing question name in XML file';
$string['xmlimportnoquestion'] = 'Missing question text in XML file';
$string['xmltypeunsupported'] = 'Question type {$a} is not supported by XML import';
$string['xhtml'] = 'XHTML';
$string['youcannotwait'] = 'This quiz closes before you will be allowed to start another attempt.';
$string['youmustwait'] = 'You must wait before you may re-attempt this quiz. You will be allowed to start another attempt after {$a}.';
$string['youneedtoenrol'] = 'You need to enrol in this course before you can attempt this quiz';
$string['yourfinalgradeis'] = 'Your final grade for this quiz is {$a}.';
$string['zerosignificantfiguresnotallowed'] = 'The correct answer cannot have zero significant figures!';
2 changes: 1 addition & 1 deletion question/category.php
Expand Up @@ -60,7 +60,7 @@
$qcobject = new question_category_object($pagevars['cpage'], $thispageurl, $contexts->having_one_edit_tab_cap('categories'), $param->edit, $pagevars['cat'], $param->delete,
$contexts->having_cap('moodle/question:add'));

$streditingcategories = get_string('editcategories', 'quiz');
$streditingcategories = get_string('editcategories', 'question');
if ($param->left || $param->right || $param->moveup || $param->movedown|| $param->moveupcontext || $param->movedowncontext){
require_sesskey();
foreach ($qcobject->editlists as $list){
Expand Down

0 comments on commit 5e8a85a

Please sign in to comment.