# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. Index: moodle/lang/en_utf8/question.php --- moodle/lang/en_utf8/question.php Base (1.7.2.8) +++ moodle/lang/en_utf8/question.php Locally Modified (Based On 1.7.2.8) @@ -70,6 +70,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['noquestionwithquestiontext'] = 'Error: the randomly selected Short Answer questions have no question text. Contact the question creator.'; $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['permissionedit'] = 'Edit this question'; Index: moodle/question/type/randomsamatch/questiontype.php --- moodle/question/type/randomsamatch/questiontype.php Base (1.4.4.1) +++ moodle/question/type/randomsamatch/questiontype.php Locally Modified (Based On 1.4.4.1) @@ -15,6 +15,15 @@ class question_randomsamatch_qtype extends question_match_qtype { /// Extends 'match' as there are quite a few simularities... + function print_question_formulation_and_controls(&$question, &$state, $cmoptions, $options) { + $correctanswers = $this->get_correct_responses($question, $state); + if (!empty($correctanswers)) { + parent::print_question_formulation_and_controls(&$question, &$state, $cmoptions, $options); + } else { + echo "
".get_string('noquestionwithquestiontext', 'question')."
"; + } + } + function name() { return 'randomsamatch'; }