From ba15c346b18ccf4a585bf7a367951056ace70230 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Tue, 21 Jun 2011 16:57:37 +0800 Subject: [PATCH] MDL-27956 Lesson - Fixed strings and readquestions scope --- mod/lesson/format.php | 2 +- mod/lesson/lib.php | 9 +-------- mod/quiz/lang/en/quiz.php | 7 ------- question/format/xml/format.php | 1 - question/format/xml/simpletest/testxmlformat.php | 1 + 5 files changed, 3 insertions(+), 17 deletions(-) diff --git a/mod/lesson/format.php b/mod/lesson/format.php index 8fded7b07bc..6f131ad15be 100644 --- a/mod/lesson/format.php +++ b/mod/lesson/format.php @@ -453,7 +453,7 @@ class qformat_default { return false; } - function readquestions($lines) { + protected function readquestions($lines) { /// Parses an array of lines into an array of questions, /// where each item is a question object as defined by /// readquestion(). Questions are defined as anything diff --git a/mod/lesson/lib.php b/mod/lesson/lib.php index 58226d4b9a9..cfb1bbcca11 100644 --- a/mod/lesson/lib.php +++ b/mod/lesson/lib.php @@ -876,14 +876,7 @@ function lesson_get_import_export_formats($type) { $provided = $format_class->provide_export(); } if ($provided) { - //TODO: do NOT rely on [[]] any more!! - $formatname = get_string($fileformat, 'quiz'); - if ($formatname == "[[$fileformat]]") { - $formatname = get_string($fileformat, 'qformat_'.$fileformat); - if ($formatname == "[[$fileformat]]") { - $formatname = $fileformat; // Just use the raw folder name - } - } + $formatname = get_string($fileformat, 'qformat_'.$fileformat); $fileformatnames[$fileformat] = $formatname; } } diff --git a/mod/quiz/lang/en/quiz.php b/mod/quiz/lang/en/quiz.php index 11585068268..7cf7f065d36 100644 --- a/mod/quiz/lang/en/quiz.php +++ b/mod/quiz/lang/en/quiz.php @@ -55,7 +55,6 @@ $string['affectedstudents'] = 'Affected {$a}'; $string['aftereachquestion'] = 'After adding each question'; $string['afternquestions'] = 'After adding {$a} questions'; $string['age'] = 'age'; -$string['aiken'] = 'Aiken format'; $string['allattempts'] = 'All attempts'; $string['allinone'] = 'Unlimited'; $string['allowreview'] = 'Allow review'; @@ -104,8 +103,6 @@ $string['backtoquestionlist'] = 'Back to question list'; $string['backtoquiz'] = 'Back to quiz editing'; $string['basicideasofquiz'] = 'The basic ideas of quiz-making'; $string['bestgrade'] = 'Best grade'; -$string['blackboard'] = 'Blackboard'; -$string['blackboard_six'] = 'Blackboard V6+'; $string['bothattempts'] = 'Show students with and without attempts'; $string['browsersecurity'] = 'Browser security'; $string['browsersecurity_help'] = 'If "Full screen pop-up with some JavaScript security" is selected, @@ -286,7 +283,6 @@ $string['essayquestions'] = 'Questions'; $string['everynquestions'] = 'Every {$a} questions'; $string['everyquestion'] = 'Every question'; $string['everythingon'] = 'Everything on'; -$string['examview'] = 'Examview'; $string['export'] = 'Export'; $string['exportcategory'] = 'export category'; $string['exporterror'] = 'An error occurred during export processing'; @@ -387,7 +383,6 @@ $string['layoutasshown'] = 'Page layout as shown.'; $string['layoutasshownwithpages'] = 'Page layout as shown. (Automatic new page every {$a} questions.)'; $string['layoutshuffledandpaged'] = 'Questions randomly shuffled with {$a} questions per page.'; $string['layoutshuffledsinglepage'] = 'Questions randomly shuffled, all on one page.'; -$string['learnwise'] = 'Learnwise format'; $string['link'] = 'Link'; $string['listitems'] = 'Listing of items in quiz'; $string['literal'] = 'Literal'; @@ -408,12 +403,10 @@ $string['min'] = 'Min'; $string['minutes'] = 'Minutes'; $string['missingcorrectanswer'] = 'Correct answer must be specified'; $string['missingitemtypename'] = 'Missing name'; -$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.'; $string['modulenameplural'] = 'Quizzes'; $string['moveselectedonpage'] = 'Move selected questions to page: {$a}'; -$string['multianswer'] = 'Embedded answers (cloze)'; $string['multichoice'] = 'Multiple choice'; $string['multipleanswers'] = 'Choose at least one answer.'; $string['multiplier'] = 'Multiplier'; diff --git a/question/format/xml/format.php b/question/format/xml/format.php index 2ed0b05b27e..21821a0483e 100644 --- a/question/format/xml/format.php +++ b/question/format/xml/format.php @@ -26,7 +26,6 @@ defined('MOODLE_INTERNAL') || die(); -require_once($CFG->dirroot . '/question/format.php'); require_once($CFG->libdir . '/xmlize.php'); diff --git a/question/format/xml/simpletest/testxmlformat.php b/question/format/xml/simpletest/testxmlformat.php index 9ab295fac37..d45afd2b2db 100644 --- a/question/format/xml/simpletest/testxmlformat.php +++ b/question/format/xml/simpletest/testxmlformat.php @@ -27,6 +27,7 @@ defined('MOODLE_INTERNAL') || die(); require_once($CFG->libdir . '/questionlib.php'); +require_once($CFG->dirroot . '/question/format.php'); require_once($CFG->dirroot . '/question/format/xml/format.php');