]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15008
authorthepurpleblob <thepurpleblob>
Thu, 10 Jul 2008 15:06:19 +0000 (15:06 +0000)
committerthepurpleblob <thepurpleblob>
Thu, 10 Jul 2008 15:06:19 +0000 (15:06 +0000)
Make question import/export formats fully pluggable, especially in respect of languages.

18 files changed:
lang/en_utf8/help/qformat_aiken/aiken.html [moved from lang/en_utf8/help/quiz/formataiken.html with 100% similarity]
lang/en_utf8/help/qformat_blackboard/blackboard.html [moved from lang/en_utf8/help/quiz/formatblackboard.html with 100% similarity]
lang/en_utf8/help/qformat_blackboard_six/blackboard_six.html [moved from lang/en_utf8/help/quiz/formatblackboard_6.html with 100% similarity]
lang/en_utf8/help/qformat_examview/examview.html [moved from lang/en_utf8/help/quiz/formatexamview.html with 100% similarity]
lang/en_utf8/help/qformat_gift/gift.html [moved from lang/en_utf8/help/quiz/formatgift.html with 100% similarity]
lang/en_utf8/help/qformat_hotpot/hotpot.html [moved from lang/en_utf8/help/quiz/formathotpot.html with 100% similarity]
lang/en_utf8/help/qformat_learnwise/learnwise.html [moved from lang/en_utf8/help/quiz/formatlearnwise.html with 100% similarity]
lang/en_utf8/help/qformat_missingword/missingword.html [moved from lang/en_utf8/help/quiz/formatmissingword.html with 100% similarity]
lang/en_utf8/help/qformat_multianswer/multianswer.html [moved from lang/en_utf8/help/quiz/formatmultianswer.html with 100% similarity]
lang/en_utf8/help/qformat_qti2/qti2.html [moved from lang/en_utf8/help/quiz/formatqti2.html with 100% similarity]
lang/en_utf8/help/qformat_webct/webct.html [moved from lang/en_utf8/help/quiz/formatwebct.html with 100% similarity]
lang/en_utf8/help/qformat_xhtml/xhtml.html [moved from lang/en_utf8/help/quiz/formatxhtml.html with 100% similarity]
lang/en_utf8/help/qformat_xml/xml.html [moved from lang/en_utf8/help/quiz/formatxml.html with 100% similarity]
lang/en_utf8/quiz.php
lib/moodlelib.php
question/export_form.php
question/format/blackboard_six/format.php [moved from question/format/blackboard_6/format.php with 99% similarity]
question/import_form.php

index 3060013bd74511b433d005abd3e06281b1fb5ab9..9a6fa1ea1b9ece3de168fc77d3305c6e2b6bbc93 100644 (file)
@@ -75,7 +75,7 @@ $string['backtoquestionlist'] = 'Back to Question List';
 $string['backtoquiz'] = 'Back to quiz editing';
 $string['bestgrade'] = 'Best grade';
 $string['blackboard'] = 'Blackboard';
-$string['blackboard_6'] = 'Blackboard V6+';
+$string['blackboard_six'] = 'Blackboard V6+';
 $string['braceerror'] = 'Could not find {...} around answers';
 $string['bothattempts'] = 'Show students with and without attempts';
 $string['calculated'] = 'Calculated';
index 12fda3553448c7e072c755cc737081d5488e02e6..7edf1d88feb0479ad25a2a43639b11f2e96858d6 100644 (file)
@@ -5008,6 +5008,7 @@ function places_to_search_for_lang_strings() {
         'filter_' => array('filter'),
         'format_' => array('course/format'),
         'qtype_' => array('question/type'),
+        'qformat_' => array('question/format'),
         'report_' => array($CFG->admin.'/report', 'course/report', 'mod/quiz/report'),
         'repository'=>array('repository'),
         'resource_' => array('mod/resource/type'),
index 11d85135af1475338a821f0cd6c839504bf9d1ff..dac89f48a5e10efe6d09f5836f1c39fea5b1f634 100644 (file)
@@ -14,9 +14,9 @@ class question_export_form extends moodleform {
         $mform->addElement('header','fileformat',get_string('fileformat','quiz'));
         $fileformatnames = get_import_export_formats('export');
         $radioarray = array();
-        foreach ($fileformatnames as $id => $fileformatname) {
-            $radioelement = &MoodleQuickForm::createElement('radio','format','',$fileformatname,$id);
-            $radioelement->setHelpButton(array("format{$id}",$fileformatname,'quiz'));
+        foreach ($fileformatnames as $shortname => $fileformatname) {
+            $radioelement = &MoodleQuickForm::createElement('radio','format','',$fileformatname,$shortname);
+            $radioelement->setHelpButton(array("$shortname",$fileformatname,"qformat_$shortname"));
             $radioarray[] = $radioelement;
         }
         $mform->addGroup($radioarray,'format','',array('<br />'),false);
similarity index 99%
rename from question/format/blackboard_6/format.php
rename to question/format/blackboard_six/format.php
index 62a16cc35e050b470cfd29a1f1c61b042762e549..14be8c3a11bd0589221a04d3a7ac15488bdea98a 100644 (file)
@@ -15,7 +15,7 @@
  */
 require_once ("$CFG->libdir/xmlize.php");
 
-class qformat_blackboard_6 extends qformat_default {
+class qformat_blackboard_six extends qformat_default {
     function provide_import() {
         return true;
     }
index f41797055758052b9c4d5d9b34ea62605590cc1d..6e5a7766a06f4fc2f0dc2d8ef3de9e6deb8c246a 100644 (file)
@@ -15,9 +15,9 @@ class question_import_form extends moodleform {
         $mform->addElement('header','fileformat', get_string('fileformat','quiz'));
         $fileformatnames = get_import_export_formats('import');
         $radioarray = array();
-        foreach ($fileformatnames as $id => $fileformatname) {
-            $radioelement = &MoodleQuickForm::createElement('radio','format','',$fileformatname,$id );
-            $radioelement->setHelpButton(array("format{$id}",$fileformatname,'quiz'));
+        foreach ($fileformatnames as $shortname => $fileformatname) {
+            $radioelement = &MoodleQuickForm::createElement('radio','format','',$fileformatname,$shortname );
+            $radioelement->setHelpButton(array("$shortname",$fileformatname,"qformat_$shortname"));
             $radioarray[] = $radioelement;
         }
         $mform->addGroup($radioarray,'format', '', array('<br />'), false);