diff --git a/lang/en/question.php b/lang/en/question.php
index 071c2fc42c2..fbfb40522d3 100644
--- a/lang/en/question.php
+++ b/lang/en/question.php
@@ -137,6 +137,7 @@ $string['getcategoryfromfile'] = 'Get category from file';
$string['getcontextfromfile'] = 'Get context from file';
$string['changepublishstatuscat'] = 'Category "{$a->name}" in course "{$a->coursename}" will have it\'s sharing status changed from {$a->changefrom} to {$a->changeto}.';
$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';
@@ -152,11 +153,13 @@ $string['invalidcategoryidforparent'] = 'Invalid category id for parent!';
$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';
@@ -186,6 +189,7 @@ $string['nocate'] = 'No such category {$a}!';
$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';
@@ -211,12 +215,14 @@ $string['questioncategory'] = 'Question category';
$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.';
diff --git a/mod/quiz/lang/en/quiz.php b/mod/quiz/lang/en/quiz.php
index 420fca6ac60..f964d47fafc 100644
--- a/mod/quiz/lang/en/quiz.php
+++ b/mod/quiz/lang/en/quiz.php
@@ -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';
@@ -108,7 +107,6 @@ $string['bestgrade'] = 'Best grade';
$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,
@@ -217,13 +215,11 @@ $string['datasetdefinitions'] = 'Reusable dataset definitions for category {$a}'
$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.';
@@ -290,7 +286,6 @@ $string['erroraccessingreport'] = 'You cannot access this report';
$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';
@@ -328,23 +323,8 @@ $string['formulaerror'] = 'Formula errors!';
$string['fractionsaddwrong'] = 'The positive grades you have chosen do not add up to 100% Instead, they add up to {$a}% Do you want to go back and fix this question?';
$string['fractionsnomax'] = 'One of the answers should be 100%, so that it is possible to get a full grade for this question. 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';
@@ -371,7 +351,6 @@ $string['guestsno'] = 'Sorry, guests cannot see or attempt quizzes';
$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.
@@ -389,7 +368,6 @@ $string['importfromthisfile'] = 'Import from this file';
$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';
@@ -420,7 +398,6 @@ $string['link'] = 'Link';
$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';
@@ -430,22 +407,13 @@ $string['marks'] = 'Marks';
$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.';
@@ -475,8 +443,6 @@ $string['nodataset'] = 'nothing - it is not a wild card';
$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';
@@ -498,7 +464,6 @@ $string['noreviewuntilshort'] = 'Available {$a}';
$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! 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)?';
@@ -576,8 +541,6 @@ $string['questiondeleted'] = 'This question has been deleted. Please contact you
$string['questioninuse'] = 'The question \'{$a->questionname}\' is currently being used in: {$a->quiznames} 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'] = 'Question {$a->number} {$a->attributes}';
$string['questionnonavinfo'] = 'Information {$a->number} {$a->attributes}';
$string['questionnotloaded'] = 'Question {$a} has not been loaded from the database';
@@ -647,7 +610,6 @@ $string['regradedisplayexplanation'] = 'Attempts that change during regrading ar
$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';
@@ -762,8 +724,6 @@ $string['shufflequestions'] = 'Shuffle questions';
$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';
@@ -800,21 +760,17 @@ $string['timesup'] = 'Time is up!';
$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'] = 'Warning: 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.';
@@ -829,22 +785,14 @@ $string['validate'] = 'Validate';
$string['viewallanswers'] = 'View {$a} quiz attempts';
$string['viewallreports'] = 'View reports for {$a} attempts';
$string['warningmissingtype'] = 'This question is of a type that has not been installed on your Moodle yet. Please alert your Moodle administrator.';
-$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!';
diff --git a/question/category.php b/question/category.php
index 03154dcd7b6..2c6e0e11ed2 100644
--- a/question/category.php
+++ b/question/category.php
@@ -60,7 +60,7 @@ $PAGE->set_pagelayout('standard');
$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){
diff --git a/question/category_class.php b/question/category_class.php
index 35d07968f44..e9de26bc7b7 100644
--- a/question/category_class.php
+++ b/question/category_class.php
@@ -98,7 +98,7 @@ class question_category_list_item extends list_item {
$str = $extraargs['str'];
$category = $this->item;
- $editqestions = get_string('editquestions', 'quiz');
+ $editqestions = get_string('editquestions', 'question');
/// Each section adds html to be displayed as part of this list item
$questionbankurl = new moodle_url("/question/edit.php", ($this->parentlist->pageurl->params() + array('category'=>"$category->id,$category->contextid")));
@@ -157,25 +157,24 @@ class question_category_object {
$this->tab = str_repeat(' ', $this->tabsize);
$this->str->course = get_string('course');
- $this->str->category = get_string('category', 'quiz');
- $this->str->categoryinfo = get_string('categoryinfo', 'quiz');
- $this->str->questions = get_string('questions', 'quiz');
+ $this->str->category = get_string('category', 'question');
+ $this->str->categoryinfo = get_string('categoryinfo', 'question');
+ $this->str->questions = get_string('questions', 'question');
$this->str->add = get_string('add');
$this->str->delete = get_string('delete');
$this->str->moveup = get_string('moveup');
$this->str->movedown = get_string('movedown');
$this->str->edit = get_string('editthiscategory', 'question');
$this->str->hide = get_string('hide');
- $this->str->publish = get_string('publish', 'quiz');
$this->str->order = get_string('order');
- $this->str->parent = get_string('parent', 'quiz');
+ $this->str->parent = get_string('parent', 'question');
$this->str->add = get_string('add');
$this->str->action = get_string('action');
- $this->str->top = get_string('top', 'quiz');
- $this->str->addcategory = get_string('addcategory', 'quiz');
- $this->str->editcategory = get_string('editcategory', 'quiz');
+ $this->str->top = get_string('top');
+ $this->str->addcategory = get_string('addcategory', 'question');
+ $this->str->editcategory = get_string('editcategory', 'question');
$this->str->cancel = get_string('cancel');
- $this->str->editcategories = get_string('editcategories', 'quiz');
+ $this->str->editcategories = get_string('editcategories', 'question');
$this->str->page = get_string('page');
$this->pageurl = $pageurl;
@@ -354,7 +353,7 @@ class question_category_object {
$vars = new stdClass();
$vars->name = $category->name;
$vars->count = $questionsincategory;
- echo $OUTPUT->box(get_string('categorymove', 'quiz', $vars), 'generalbox boxaligncenter');
+ echo $OUTPUT->box(get_string('categorymove', 'question', $vars), 'generalbox boxaligncenter');
$this->moveform->display();
}
@@ -371,7 +370,7 @@ class question_category_object {
public function add_category($newparent, $newcategory, $newinfo, $return = false) {
global $DB;
if (empty($newcategory)) {
- print_error('categorynamecantbeblank', 'quiz');
+ print_error('categorynamecantbeblank', 'question');
}
list($parentid, $contextid) = explode(',', $newparent);
//moodle_form makes sure select element output is legal no need for further cleaning
@@ -404,7 +403,7 @@ class question_category_object {
public function update_category($updateid, $newparent, $newname, $newinfo) {
global $CFG, $DB;
if (empty($newname)) {
- print_error('categorynamecantbeblank', 'quiz');
+ print_error('categorynamecantbeblank', 'question');
}
// Get the record we are updating.
diff --git a/question/category_form.php b/question/category_form.php
index c1bedac7e19..4fd71ee9e19 100644
--- a/question/category_form.php
+++ b/question/category_form.php
@@ -45,7 +45,7 @@ class question_category_edit_form extends moodleform {
$contexts = $this->_customdata['contexts'];
$currentcat = $this->_customdata['currentcat'];
//--------------------------------------------------------------------------------
- $mform->addElement('header', 'categoryheader', get_string('addcategory', 'quiz'));
+ $mform->addElement('header', 'categoryheader', get_string('addcategory', 'question'));
$questioncategoryel = $mform->addElement('questioncategory', 'parent', get_string('parentcategory', 'question'),
array('contexts'=>$contexts, 'top'=>true, 'currentcat'=>$currentcat, 'nochildrenof'=>$currentcat));
@@ -57,14 +57,14 @@ class question_category_edit_form extends moodleform {
$mform->addElement('text','name', get_string('name'),'maxlength="254" size="50"');
$mform->setDefault('name', '');
- $mform->addRule('name', get_string('categorynamecantbeblank', 'quiz'), 'required', null, 'client');
+ $mform->addRule('name', get_string('categorynamecantbeblank', 'question'), 'required', null, 'client');
$mform->setType('name', PARAM_MULTILANG);
- $mform->addElement('textarea', 'info', get_string('categoryinfo', 'quiz'), array('rows'=> '10', 'cols'=>'45'));
+ $mform->addElement('textarea', 'info', get_string('categoryinfo', 'question'), array('rows'=> '10', 'cols'=>'45'));
$mform->setDefault('info', '');
$mform->setType('info', PARAM_MULTILANG);
//--------------------------------------------------------------------------------
- $this->add_action_buttons(false, get_string('addcategory', 'quiz'));
+ $this->add_action_buttons(false, get_string('addcategory', 'question'));
//--------------------------------------------------------------------------------
$mform->addElement('hidden', 'id', 0);
$mform->setType('id', PARAM_INT);
diff --git a/question/edit.php b/question/edit.php
index ecb3438d989..34fc61f4d85 100644
--- a/question/edit.php
+++ b/question/edit.php
@@ -61,7 +61,7 @@ $questionbank->process_actions();
// TODO log this page view.
$context = $contexts->lowest();
-$streditingquestions = get_string('editquestions', "quiz");
+$streditingquestions = get_string('editquestions', 'question');
$PAGE->set_title($streditingquestions);
$PAGE->set_heading($COURSE->fullname);
echo $OUTPUT->header();
diff --git a/question/editlib.php b/question/editlib.php
index ba34c4c8dd0..b11aced5539 100644
--- a/question/editlib.php
+++ b/question/editlib.php
@@ -389,7 +389,7 @@ class question_bank_checkbox_column extends question_bank_column_base {
protected $firstrow = true;
public function init() {
- $this->strselect = get_string('select', 'quiz');
+ $this->strselect = get_string('select');
}
public function get_name() {
@@ -1193,7 +1193,7 @@ class question_bank_view {
protected function print_choose_category_message($categoryandcontext) {
echo "
';
if ($caneditall || $canmoveall || $canuseall){
- echo ' '.get_string('withselected', 'quiz').': ';
+ echo ' '.get_string('withselected', 'question').': ';
if (function_exists('module_specific_buttons')) {
echo module_specific_buttons($this->cm->id,$cmoptions);
@@ -1374,7 +1374,7 @@ class question_bank_view {
}
if ($canmoveall && count($addcontexts)) {
- echo '\n";
+ echo '\n";
question_category_select_menu($addcontexts, false, 0, "$category->id,$category->contextid");
}
@@ -1538,12 +1538,12 @@ class question_bank_view {
// Add an explanation about questions in use
if ($inuse) {
- $questionnames .= ' '.get_string('questionsinuse', 'quiz');
+ $questionnames .= ' '.get_string('questionsinuse', 'question');
}
$baseurl = new moodle_url('edit.php', $this->baseurl->params());
$deleteurl = new moodle_url($baseurl, array('deleteselected'=>$questionlist, 'confirm'=>md5($questionlist), 'sesskey'=>sesskey()));
- echo $OUTPUT->confirm(get_string("deletequestionscheck", "quiz", $questionnames), $deleteurl, $baseurl);
+ echo $OUTPUT->confirm(get_string('deletequestionscheck', 'question', $questionnames), $deleteurl, $baseurl);
return true;
}
@@ -1660,7 +1660,7 @@ function question_edit_setup($edittab, $baseurl, $requirecmid = false, $requirec
$catparts = explode(',', $pagevars['cat']);
if (!$catparts[0] || (FALSE !== array_search($catparts[1], $contextlistarr)) ||
!$DB->count_records_select("question_categories", "id = ? AND contextid = ?", array($catparts[0], $catparts[1]))) {
- print_error('invalidcategory', 'quiz');
+ print_error('invalidcategory', 'question');
}
} else {
$category = $defaultcategory;
diff --git a/question/engine/datalib.php b/question/engine/datalib.php
index df733ea7d80..c20370a3ea6 100644
--- a/question/engine/datalib.php
+++ b/question/engine/datalib.php
@@ -16,7 +16,7 @@
// along with Moodle. If not, see .
/**
- * Code for loading and saving quiz attempts to and from the database.
+ * Code for loading and saving question attempts to and from the database.
*
* @package moodlecore
* @subpackage questionengine
@@ -311,9 +311,9 @@ WHERE
}
/**
- * Load summary information about the state of each question in a group of attempts.
- * This is used by the quiz manual grading report, to show how many attempts
- * at each question need to be graded.
+ * Load summary information about the state of each question in a group of
+ * attempts. This is used, for example, by the quiz manual grading report,
+ * to show how many attempts at each question need to be graded.
*
* @param qubaid_condition $qubaids used to restrict which usages are included
* in the query. See {@link qubaid_condition}.
diff --git a/question/engine/lib.php b/question/engine/lib.php
index 93716ac1af2..4b6cf6401af 100644
--- a/question/engine/lib.php
+++ b/question/engine/lib.php
@@ -586,7 +586,7 @@ abstract class question_flags {
/**
* Exception thrown when the system detects that a student has done something
* out-of-order to a question. This can happen, for example, if they click
- * the back button in a quiz, then try to submit a different response.
+ * the browser's back button in a quiz, then try to submit a different response.
*
* @copyright 2010 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
diff --git a/question/engine/renderer.php b/question/engine/renderer.php
index dacabd3e00b..c076d50fcc6 100644
--- a/question/engine/renderer.php
+++ b/question/engine/renderer.php
@@ -336,7 +336,7 @@ class core_question_renderer extends plugin_renderer_base {
$url = new moodle_url($options->questionreviewlink, array('slot' => $qa->get_slot(), 'step' => $i));
$stepno = $this->output->action_link($url, $stepno,
new popup_action('click', $url, 'reviewquestion', array('width' => 450, 'height' => 650)),
- array('title' => get_string('reviewresponse', 'quiz')));
+ array('title' => get_string('reviewresponse', 'question')));
}
$user = new stdClass();
$user->id = $step->get_user_id();
diff --git a/question/engine/simpletest/helpers.php b/question/engine/simpletest/helpers.php
index 985e4fcc160..bc8999562f0 100644
--- a/question/engine/simpletest/helpers.php
+++ b/question/engine/simpletest/helpers.php
@@ -278,7 +278,7 @@ class test_question_maker {
self::initialise_a_question($description);
$description->name = 'Description question';
$description->questiontext = 'This text tells you a bit about the next few questions in this quiz.';
- $description->generalfeedback = 'This is what this seciton of the quiz should have taught you.';
+ $description->generalfeedback = 'This is what this section of the quiz should have taught you.';
$description->qtype = question_bank::get_qtype('description');
return $description;
diff --git a/question/export.php b/question/export.php
index fa97d131314..b4f98630a3c 100644
--- a/question/export.php
+++ b/question/export.php
@@ -43,9 +43,7 @@ if (empty($categoryid)) {
}
list($catid, $catcontext) = explode(',', $pagevars['cat']);
-if (!$category = $DB->get_record("question_categories", array("id" => $catid, 'contextid' => $catcontext))) {
- print_error('nocategory','quiz');
-}
+$category = $DB->get_record('question_categories', array("id" => $catid, 'contextid' => $catcontext), '*', MUST_EXIST);
/// Header
$PAGE->set_url($thispageurl->out());
diff --git a/question/format.php b/question/format.php
index 53d4036287a..a45b2e38841 100644
--- a/question/format.php
+++ b/question/format.php
@@ -205,7 +205,7 @@ class qformat_default {
* Handle parsing error
*/
function error($message, $text='', $questionname='') {
- $importerrorquestion = get_string('importerrorquestion','quiz');
+ $importerrorquestion = get_string('importerrorquestion', 'question');
echo "
\n";
echo "$importerrorquestion $questionname";
@@ -282,25 +282,25 @@ class qformat_default {
set_time_limit(0);
// STAGE 1: Parse the file
- echo $OUTPUT->notification(get_string('parsingquestions','quiz'), 'notifysuccess');
+ echo $OUTPUT->notification(get_string('parsingquestions', 'question'), 'notifysuccess');
if (! $lines = $this->readdata($this->filename)) {
- echo $OUTPUT->notification(get_string('cannotread','quiz'));
+ echo $OUTPUT->notification(get_string('cannotread', 'question'));
return false;
}
if (!$questions = $this->readquestions($lines, $context)) { // Extract all the questions
- echo $OUTPUT->notification(get_string('noquestionsinfile','quiz'));
+ echo $OUTPUT->notification(get_string('noquestionsinfile', 'question'));
return false;
}
// STAGE 2: Write data to database
- echo $OUTPUT->notification(get_string('importingquestions', 'quiz',
+ echo $OUTPUT->notification(get_string('importingquestions', 'question',
$this->count_questions($questions)), 'notifysuccess');
// check for errors before we continue
if ($this->stoponerror and ($this->importerrors>0)) {
- echo $OUTPUT->notification(get_string('importparseerror','quiz'));
+ echo $OUTPUT->notification(get_string('importparseerror', 'question'));
return true;
}
@@ -326,7 +326,7 @@ class qformat_default {
}
}
if (!$answersvalid) {
- echo $OUTPUT->notification(get_string('matcherror', 'quiz'));
+ echo $OUTPUT->notification(get_string('invalidgrade', 'question'));
++$gradeerrors;
continue;
}
@@ -598,7 +598,7 @@ class qformat_default {
*/
function readquestion($lines) {
- $formatnotimplemented = get_string('formatnotimplemented','quiz');
+ $formatnotimplemented = get_string('formatnotimplemented', 'question');
echo "
$formatnotimplemented
";
return NULL;
@@ -737,7 +737,7 @@ class qformat_default {
// did we actually process anything
if ($count==0) {
- print_error('noquestions', 'quiz', $continuepath);
+ print_error('noquestions', 'question', $continuepath);
}
// final pre-process on exported data
@@ -837,7 +837,7 @@ class qformat_default {
*/
function writequestion($question) {
// if not overidden, then this is an error.
- $formatnotimplemented = get_string('formatnotimplemented','quiz');
+ $formatnotimplemented = get_string('formatnotimplemented', 'question');
echo "
$formatnotimplemented
";
return NULL;
}
@@ -847,10 +847,11 @@ class qformat_default {
* @return string file path
*/
function question_get_export_dir() {
+ // TODO is this still used.
global $USER;
if ($this->canaccessbackupdata) {
- $dirname = get_string("exportfilename","quiz");
- $path = $this->course->id.'/backupdata/'.$dirname; // backupdata is protected directory
+ $dirname = get_string('exportfilename', 'question');
+ $path = $this->course->id . '/backupdata/' . $dirname; // backupdata is protected directory
} else {
$path = 'temp/questionexport/' . $USER->id;
}
diff --git a/question/format/gift/format.php b/question/format/gift/format.php
index 030473021d7..8e96191b23a 100644
--- a/question/format/gift/format.php
+++ b/question/format/gift/format.php
@@ -134,8 +134,7 @@ class qformat_gift extends qformat_default {
function check_answer_count($min, $answers, $text) {
$countanswers = count($answers);
if ($countanswers < $min) {
- $importminerror = get_string('importminerror', 'quiz');
- $this->error($importminerror, $text);
+ $this->error(get_string('importminerror', 'qformat_gift'), $text);
return false;
}
@@ -227,7 +226,7 @@ class qformat_gift extends qformat_default {
$answertext = '';
$answerlength = 0;
} else if (!(($answerstart !== false) and ($answerfinish !== false))) {
- $this->error(get_string('braceerror', 'quiz'), $text);
+ $this->error(get_string('braceerror', 'qformat_gift'), $text);
return false;
} else {
$answerlength = $answerfinish - $answerstart;
@@ -307,7 +306,7 @@ class qformat_gift extends qformat_default {
}
if (!isset($question->qtype)) {
- $giftqtypenotset = get_string('giftqtypenotset', 'quiz');
+ $giftqtypenotset = get_string('giftqtypenotset', 'qformat_gift');
$this->error($giftqtypenotset, $text);
return false;
}
@@ -398,7 +397,7 @@ class qformat_gift extends qformat_default {
foreach ($answers as $key => $answer) {
$answer = trim($answer);
if (strpos($answer, "->") === false) {
- $giftmatchingformat = get_string('giftmatchingformat','quiz');
+ $giftmatchingformat = get_string('giftmatchingformat','qformat_gift');
$this->error($giftmatchingformat, $answer);
return false;
break 2;
@@ -490,7 +489,7 @@ class qformat_gift extends qformat_default {
if (count($answers) == 0) {
// invalid question
- $giftnonumericalanswers = get_string('giftnonumericalanswers','quiz');
+ $giftnonumericalanswers = get_string('giftnonumericalanswers','qformat_gift');
$this->error($giftnonumericalanswers, $text);
return false;
break;
@@ -552,7 +551,7 @@ class qformat_gift extends qformat_default {
break;
default:
- $this->error(get_string('giftnovalidquestion', 'quiz'), $text);
+ $this->error(get_string('giftnovalidquestion', 'qformat_gift'), $text);
return fale;
break;
diff --git a/question/format/gift/lang/en/qformat_gift.php b/question/format/gift/lang/en/qformat_gift.php
index 605c28d3dba..bc1c1a0d29c 100644
--- a/question/format/gift/lang/en/qformat_gift.php
+++ b/question/format/gift/lang/en/qformat_gift.php
@@ -24,7 +24,17 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$string['nohandler'] = 'No handler for question type {$a}';
-$string['gift'] = 'GIFT format';
-$string['gift_help'] = 'GIFT format enables multiple-choice, true-false, short answer, matching, missing word, numerical and essay questions to be imported or exported via text file.';
+$string['braceerror'] = 'Could not find {...} around answers';
+$string['gift'] = 'Gift format';
+$string['gift_help'] = 'Gift format enables multiple-choice, true-false, short answer, matching, missing word, numerical and essay questions to be imported or exported via text file.';
$string['gift_link'] = 'qformat/gift';
+$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['importminerror'] = 'There is an error in the question. There are not enough answers for this question type';
+$string['nohandler'] = 'No handler for question type {$a}';
+$string['pluginname'] = 'Gift format';
diff --git a/question/format/learnwise/format.php b/question/format/learnwise/format.php
index d4d81e2afbe..4e700538cd6 100644
--- a/question/format/learnwise/format.php
+++ b/question/format/learnwise/format.php
@@ -33,7 +33,7 @@ defined('MOODLE_INTERNAL') || die();
*
* Alton College, Hampshire, UK - Tom Flannaghan, Andrew Walker
*
- * Imports learnwise multiple choice quizzes (single and multiple answers)
+ * Imports learnwise multiple choice questions (single and multiple answers)
* currently ignores the deduct attribute for multiple answer questions
* deductions are currently simply found by dividing the award for the incorrect
* answer by the total number of options
diff --git a/question/format/qti_two/format.php b/question/format/qti_two/format.php
index 881e5e6ce08..1e6238a5c39 100644
--- a/question/format/qti_two/format.php
+++ b/question/format/qti_two/format.php
@@ -136,7 +136,7 @@ class qformat_qti_two extends qformat_default {
function importpreprocess() {
global $CFG;
- print_error('cannotimportformat', 'question', "$CFG->wwwroot/mod/quiz/import.php?category=$category->id");
+ print_error('cannotimportformat', 'question');
}
function exportpreprocess() {
@@ -266,7 +266,7 @@ function handle_questions_media(&$questions, $path, $courseid) {
// create a directory for the exports (if not already existing)
if (!$export_dir = make_upload_directory($this->question_get_export_dir().'/'.$this->filename)) {
- print_error('cannotcreatepath', 'quiz', '', $export_dir);
+ print_error('cannotcreatepath', 'question', '', $export_dir);
}
$path = $CFG->dataroot.'/'.$this->question_get_export_dir().'/'.$this->filename;
@@ -561,9 +561,9 @@ function xml_entitize(&$collection) {
case TRUEFALSE:
$qanswers = $question->options->answers;
$answers[0] = (array)$qanswers['true'];
- $answers[0]['answer'] = get_string("true", "quiz");
+ $answers[0]['answer'] = get_string('true', 'qtype_truefalse');
$answers[1] = (array)$qanswers['false'];
- $answers[1]['answer'] = get_string("false", "quiz");
+ $answers[1]['answer'] = get_string('false', 'qtype_truefalse');
if (!empty($shuffleanswers)) {
$answers = $this->shuffle_things($answers);
diff --git a/question/format/qti_two/qt_common.php b/question/format/qti_two/qt_common.php
index b3753c9493e..a2d60cbdb45 100644
--- a/question/format/qti_two/qt_common.php
+++ b/question/format/qti_two/qt_common.php
@@ -36,7 +36,6 @@ defined('MOODLE_INTERNAL') || die();
* @calledfrom type//editquestion.php
*/
function get_course_media_files($courseid) {
-// this code lifted from mod/quiz/question.php and modified
throw new coding_exception('qti_two not converted to new fil api yet, sorry');
/*global $CFG;
$images = null;
@@ -146,7 +145,7 @@ function get_media_tag($file, $courseid = 0, $alt = 'media file', $width = 0, $h
return "";
}
else {
- require_once("$CFG->dirroot/mod/quiz/format/qti/custommediafilter.php");
+ require_once("$CFG->dirroot/question/format/qti/custommediafilter.php");
return custom_mediaplugin_filter('', $courseid, $width, $height);
}
}
diff --git a/question/format/webct/format.php b/question/format/webct/format.php
index 5bec434bd24..2897f961c5a 100644
--- a/question/format/webct/format.php
+++ b/question/format/webct/format.php
@@ -266,7 +266,7 @@ class qformat_webct extends qformat_default {
}
if (strlen($question->name) > 255) {
$question->name = substr($question->name,0,250)."...";
- $warnings[] = get_string("questionnametoolong", "quiz", $nQuestionStartLine);
+ $warnings[] = get_string("questionnametoolong", "qformat_webct", $nQuestionStartLine);
}
if (!isset($question->defaultmark)) {
$question->defaultmark = 1;
@@ -278,11 +278,11 @@ class qformat_webct extends qformat_default {
// Perform sanity checks
$QuestionOK = TRUE;
if (strlen($question->questiontext) == 0) {
- $warnings[] = get_string("missingquestion", "quiz", $nQuestionStartLine);
+ $warnings[] = get_string("missingquestion", "qformat_webct", $nQuestionStartLine);
$QuestionOK = FALSE;
}
if (sizeof($question->answer) < 1) { // a question must have at least 1 answer
- $errors[] = get_string("missinganswer", "quiz", $nQuestionStartLine);
+ $errors[] = get_string("missinganswer", "qformat_webct", $nQuestionStartLine);
$QuestionOK = FALSE;
}
else {
@@ -320,7 +320,7 @@ class qformat_webct extends qformat_default {
case SHORTANSWER:
if ($maxfraction != 1) {
$maxfraction = $maxfraction * 100;
- $errors[] = "'$question->name': ".get_string("wronggrade", "quiz", $nLineCounter).' '.get_string("fractionsnomax", "quiz", $maxfraction);
+ $errors[] = "'$question->name': ".get_string("wronggrade", "qformat_webct", $nLineCounter).' '.get_string("fractionsnomax", "question", $maxfraction);
$QuestionOK = FALSE;
}
break;
@@ -329,14 +329,14 @@ class qformat_webct extends qformat_default {
if ($question->single) {
if ($maxfraction != 1) {
$maxfraction = $maxfraction * 100;
- $errors[] = "'$question->name': ".get_string("wronggrade", "quiz", $nLineCounter).' '.get_string("fractionsnomax", "quiz", $maxfraction);
+ $errors[] = "'$question->name': ".get_string("wronggrade", "qformat_webct", $nLineCounter).' '.get_string("fractionsnomax", "question", $maxfraction);
$QuestionOK = FALSE;
}
} else {
$totalfraction = round($totalfraction,2);
if ($totalfraction != 1) {
$totalfraction = $totalfraction * 100;
- $errors[] = "'$question->name': ".get_string("wronggrade", "quiz", $nLineCounter).' '.get_string("fractionsaddwrong", "quiz", $totalfraction);
+ $errors[] = "'$question->name': ".get_string("wronggrade", "qformat_webct", $nLineCounter).' '.get_string("fractionsaddwrong", "question", $totalfraction);
$QuestionOK = FALSE;
}
}
@@ -422,10 +422,6 @@ class qformat_webct extends qformat_default {
if (preg_match("~^:TYPE:C~i",$line)) {
// Calculated Question
- /* $warnings[] = get_string("calculatedquestion", "quiz", $nLineCounter);
- unset($question);
- $ignore_rest_of_question = TRUE; // Question Type not handled by Moodle
- */
$question = $this->defaultquestion();
$question->qtype = CALCULATED;
$question->answers = array(); // No problem as they go as :FORMULA: from webct
@@ -453,7 +449,7 @@ class qformat_webct extends qformat_default {
if (preg_match("~^:TYPE:P~i",$line)) {
// Paragraph Question
- $warnings[] = get_string("paragraphquestion", "quiz", $nLineCounter);
+ $warnings[] = get_string("paragraphquestion", "qformat_webct", $nLineCounter);
unset($question);
$ignore_rest_of_question = TRUE; // Question Type not handled by Moodle
continue;
@@ -461,7 +457,7 @@ class qformat_webct extends qformat_default {
if (preg_match("~^:TYPE:~i",$line)) {
// Unknow Question
- $warnings[] = get_string("unknowntype", "quiz", $nLineCounter);
+ $warnings[] = get_string("unknowntype", "qformat_webct", $nLineCounter);
unset($question);
$ignore_rest_of_question = TRUE; // Question Type not handled by Moodle
continue;
@@ -475,7 +471,7 @@ class qformat_webct extends qformat_default {
$name = trim($webct_options[1]);
if (strlen($name) > 255) {
$name = substr($name,0,250)."...";
- $warnings[] = get_string("questionnametoolong", "quiz", $nLineCounter);
+ $warnings[] = get_string("questionnametoolong", "qformat_webct", $nLineCounter);
}
$question->name = $name;
continue;
@@ -656,7 +652,7 @@ class qformat_webct extends qformat_default {
}
if (sizeof($errors) > 0) {
- echo "
';
}
}
@@ -409,7 +409,7 @@ class embedded_cloze_qtype extends default_questiontype {
if ($options->readonly && $options->correct_responses) {
$strfeedbackwrapped = get_string('correctanswerandfeedback', 'qtype_multianswer');
}else {
- $strfeedbackwrapped = get_string('feedback', 'quiz');
+ $strfeedbackwrapped = get_string('feedback', 'question');
}
$popup = " onmouseover=\"return overlib('$feedback', STICKY, MOUSEOFF, CAPTION, '$strfeedbackwrapped', FGCOLOR, '#FFFFFF');\" ".
" onmouseout=\"return nd();\" ";
diff --git a/question/type/multichoice/lang/en/qtype_multichoice.php b/question/type/multichoice/lang/en/qtype_multichoice.php
index 0aaad11cd50..838aead7016 100644
--- a/question/type/multichoice/lang/en/qtype_multichoice.php
+++ b/question/type/multichoice/lang/en/qtype_multichoice.php
@@ -64,6 +64,6 @@ $string['pleaseselectatleastoneanswer'] = 'Please select at least one answer.';
$string['selectmulti'] = 'Select one or more:';
$string['selectone'] = 'Select one:';
$string['shuffleanswers'] = 'Shuffle the choices?';
-$string['shuffleanswers_help'] = 'If enabled, the order of the answers is randomly shuffled for each attempt, provided that "Shuffle within questions" in the quiz settings is also enabled.';
+$string['shuffleanswers_help'] = 'If enabled, the order of the answers is randomly shuffled for each attempt, provided that "Shuffle within questions" in the activity settings is also enabled.';
$string['singleanswer'] = 'Choose one answer.';
$string['toomanyselected'] = 'You have selected too many options.';
diff --git a/question/type/numerical/edit_numerical_form.php b/question/type/numerical/edit_numerical_form.php
index 06cdaf7c093..8999c85096b 100644
--- a/question/type/numerical/edit_numerical_form.php
+++ b/question/type/numerical/edit_numerical_form.php
@@ -39,7 +39,7 @@ class question_edit_numerical_form extends question_edit_form {
function get_per_answer_fields(&$mform, $label, $gradeoptions, &$repeatedoptions, &$answersoption) {
$repeated = parent::get_per_answer_fields($mform, $label, $gradeoptions, $repeatedoptions, $answersoption);
- $tolerance =& $mform->createElement('text', 'tolerance', get_string('acceptederror', 'quiz'));
+ $tolerance =& $mform->createElement('text', 'tolerance', get_string('acceptederror', 'qtype_numerical'));
$repeatedoptions['tolerance']['type'] = PARAM_NUMBER;
array_splice($repeated, 3, 0, array($tolerance));
$repeated[1]->setSize(10);
diff --git a/question/type/numerical/lang/en/qtype_numerical.php b/question/type/numerical/lang/en/qtype_numerical.php
index e7ac9c7018a..a1e1b4970e2 100644
--- a/question/type/numerical/lang/en/qtype_numerical.php
+++ b/question/type/numerical/lang/en/qtype_numerical.php
@@ -24,6 +24,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+$string['acceptederror'] = 'Accepted error';
$string['addingnumerical'] = 'Adding a Numerical question';
$string['addmoreanswerblanks'] = 'Blanks for {no} More Answers';
$string['addmoreunitblanks'] = 'Blanks for {no} More Units';
@@ -31,10 +32,12 @@ $string['answermustbenumberorstar'] = 'The answer must be a number, or \'*\'.';
$string['answerno'] = 'Answer {$a}';
$string['decfractionofquestiongrade'] = 'as decimal fraction (0-1) of question grade';
$string['decfractionofresponsegrade'] = 'as decimal fraction (0-1) of response grade';
+$string['decimalformat'] = 'decimals';
$string['editableunittext'] = 'Text input element';
$string['editingnumerical'] = 'Editing a Numerical question';
$string['errornomultiplier'] = 'You must specify a multiplier for this unit.';
$string['errorrepeatedunit'] = 'You cannot have two units with the same name.';
+$string['geometric'] = 'Geometric';
$string['instructions'] = 'Instructions ';
$string['leftexample'] = 'LEFT as $1.00';
$string['noneditableunittext'] = 'NON editable text of Unit No1';
@@ -59,12 +62,15 @@ If you add the unit kW with a multiplier of 0.001, this will add a correct respo
Note that the accepted error is also multiplied, so an allowed error of 100W would become an error of 0.1kW.';
$string['manynumerical'] = 'Only the NUMERICAL ANSWER will be graded using optional units ';
+$string['nominal'] = 'Nominal';
$string['onlynumerical'] = 'Only the NUMERICAL ANSWER will be graded, no units allowed';
$string['oneunitshown'] = 'Only the NUMERICAL ANSWER will be graded, Unit1 will be shown';
+$string['relative'] = 'Relative';
$string['rightexample'] = 'RIGHT as 1.00cm';
$string['selectunits'] = 'Select units';
$string['selectunit'] = 'Select one unit';
$string['studentunitanswer'] = 'UNIT ANSWER displayed as a ';
+$string['tolerancetype'] = 'Tolerance type';
$string['unitchoice'] = 'Multichoice (radio elements)';
$string['unitdisplay'] = 'Unit 1 displayed ';
$string['unitedit'] = 'Edit unit';
diff --git a/question/type/opaque/lang/en/qtype_opaque.php b/question/type/opaque/lang/en/qtype_opaque.php
index 5ba75874e3a..62e9c07e339 100644
--- a/question/type/opaque/lang/en/qtype_opaque.php
+++ b/question/type/opaque/lang/en/qtype_opaque.php
@@ -24,7 +24,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-$string['accessoutofsequence'] = 'You have accessed this page out of sequence. Please do not use the Back button when attempting quizzes.';
+$string['accessoutofsequence'] = 'You have accessed this page out of sequence. Please do not use the Back button when attempting questions.';
$string['addengine'] = 'Add another engine';
$string['addingopaque'] = 'Adding an Opaque question';
$string['cannotaccessfile'] = 'You are not allowed to access this file.';
diff --git a/question/type/opaque/simpletest/testlocallib.php b/question/type/opaque/simpletest/testlocallib.php
index 929d9f30fab..b2c46f81688 100644
--- a/question/type/opaque/simpletest/testlocallib.php
+++ b/question/type/opaque/simpletest/testlocallib.php
@@ -27,8 +27,6 @@
defined('MOODLE_INTERNAL') || die();
-require_once($CFG->dirroot . '/mod/quiz/locallib.php');
-
/**
* Unit tests for (some of) ../locallib.php.
diff --git a/question/type/oumultiresponse/edit_oumultiresponse_form.php b/question/type/oumultiresponse/edit_oumultiresponse_form.php
index 51e06009fb0..a352f26ff93 100644
--- a/question/type/oumultiresponse/edit_oumultiresponse_form.php
+++ b/question/type/oumultiresponse/edit_oumultiresponse_form.php
@@ -58,7 +58,7 @@ class qtype_oumultiresponse_edit_form extends question_edit_form {
$repeated[] = $mform->createElement('header', 'choicehdr', get_string('choiceno', 'qtype_multichoice', '{no}'));
$repeated[] = $mform->createElement('text', 'answer', get_string('answer', 'question'), array('size' => 50));
$repeated[] = $mform->createElement('checkbox', 'correctanswer', get_string('correctanswer', 'qtype_oumultiresponse'));
- $repeated[] = $mform->createElement('editor', 'feedback', get_string('feedback', 'quiz'),
+ $repeated[] = $mform->createElement('editor', 'feedback', get_string('feedback', 'question'),
array('rows' => 5), $this->editoroptions);
// These are returned by arguments passed by reference.
diff --git a/question/type/questiontype.php b/question/type/questiontype.php
index e8e394f43ec..9afec52cf37 100644
--- a/question/type/questiontype.php
+++ b/question/type/questiontype.php
@@ -355,7 +355,7 @@ class question_type {
}
if ($question->penalty > 1 or $question->penalty < 0) {
- $question->errors['penalty'] = get_string('invalidpenalty', 'quiz');
+ $question->errors['penalty'] = get_string('invalidpenalty', 'question');
}
if (isset($form->defaultmark)) {
diff --git a/question/type/random/edit_random_form.php b/question/type/random/edit_random_form.php
index 8c96d18ea1b..9b00a1ac80d 100644
--- a/question/type/random/edit_random_form.php
+++ b/question/type/random/edit_random_form.php
@@ -53,10 +53,10 @@ class question_edit_random_form extends question_edit_form {
// Standard fields at the start of the form.
$mform->addElement('header', 'generalheader', get_string("general", 'form'));
- $mform->addElement('questioncategory', 'category', get_string('category', 'quiz'),
+ $mform->addElement('questioncategory', 'category', get_string('category', 'question'),
array('contexts' => $this->contexts->having_cap('moodle/question:useall')));
- $mform->addElement('advcheckbox', 'questiontext[text]', get_string('recurse', 'quiz'), null, null, array(0, 1));
+ $mform->addElement('advcheckbox', 'questiontext[text]', get_string('includingsubcategories', 'qtype_random'), null, null, array(0, 1));
$mform->addElement('hidden', 'name');
$mform->setType('name', PARAM_ALPHA);
diff --git a/question/type/random/lang/en/qtype_random.php b/question/type/random/lang/en/qtype_random.php
index 03504d5628f..543879c1fd7 100644
--- a/question/type/random/lang/en/qtype_random.php
+++ b/question/type/random/lang/en/qtype_random.php
@@ -26,8 +26,9 @@
$string['configselectmanualquestions'] = 'Can the random question type select a manually graded question when it is making its random choice of a question from a category?';
$string['editingrandom'] = 'Editing a random question';
+$string['includingsubcategories'] = 'Including subcategories';
$string['random'] = 'Random';
-$string['random_help'] = 'A random question is not a question type as such, but is a way of inserting a randomly-chosen question from a specified category into a quiz.';
+$string['random_help'] = 'A random question is not a question type as such, but is a way of inserting a randomly-chosen question from a specified category into an activity.';
$string['randomqname'] = 'Random ({$a})';
$string['randomqplusname'] = 'Random ({$a} and sub-categories)';
$string['selectedby'] = '{$a->questionname} selected by {$a->randomname}';
diff --git a/question/type/randomsamatch/edit_randomsamatch_form.php b/question/type/randomsamatch/edit_randomsamatch_form.php
index 42dbd4f6da8..e275cde0432 100644
--- a/question/type/randomsamatch/edit_randomsamatch_form.php
+++ b/question/type/randomsamatch/edit_randomsamatch_form.php
@@ -55,7 +55,7 @@ class question_edit_randomsamatch_form extends question_edit_form {
function data_preprocessing($question) {
if (empty($question->name)) {
- $question->name = get_string("randomsamatch", "quiz");
+ $question->name = get_string("randomsamatch", "quiz");
}
if (empty($question->questiontext)) {
diff --git a/question/type/shortanswer/questiontype.php b/question/type/shortanswer/questiontype.php
index e18f2a45067..e88fded90f4 100644
--- a/question/type/shortanswer/questiontype.php
+++ b/question/type/shortanswer/questiontype.php
@@ -118,7 +118,7 @@ class qtype_shortanswer extends question_type {
// Perform sanity checks on fractional grades
if ($maxfraction != 1) {
- $result->noticeyesno = get_string('fractionsnomax', 'quiz', $maxfraction * 100);
+ $result->noticeyesno = get_string('fractionsnomax', 'question', $maxfraction * 100);
return $result;
}
}
diff --git a/question/type/truefalse/questiontype.php b/question/type/truefalse/questiontype.php
index 591dff99731..39422c065e3 100644
--- a/question/type/truefalse/questiontype.php
+++ b/question/type/truefalse/questiontype.php
@@ -54,7 +54,7 @@ class qtype_truefalse extends question_type {
$answer->id = $DB->insert_record('question_answers', $answer);
}
- $answer->answer = get_string('true', 'quiz');
+ $answer->answer = get_string('true', 'qtype_truefalse');
$answer->fraction = $question->correctanswer;
$answer->feedback = $this->import_or_save_files($question->feedbacktrue,
$context, 'question', 'answerfeedback', $answer->id);
@@ -72,7 +72,7 @@ class qtype_truefalse extends question_type {
$answer->id = $DB->insert_record('question_answers', $answer);
}
- $answer->answer = get_string('false', 'quiz');
+ $answer->answer = get_string('false', 'qtype_truefalse');
$answer->fraction = 1 - (int)$question->correctanswer;
$answer->feedback = $this->import_or_save_files($question->feedbackfalse,
$context, 'question', 'answerfeedback', $answer->id);