]> git.mjollnir.org Git - moodle.git/commitdiff
merge from 18 STABLE MDL-8809
authorpichetp <pichetp>
Thu, 8 Mar 2007 07:02:53 +0000 (07:02 +0000)
committerpichetp <pichetp>
Thu, 8 Mar 2007 07:02:53 +0000 (07:02 +0000)
question/type/datasetdependent/abstractqtype.php

index 4f4a0fbca92e0eb61acd51df13f5d22083c508ac..d536ad5f6ab2dfe5f43c73494f828f1498ce5f09 100644 (file)
@@ -1,5 +1,6 @@
 <?php  // $Id$
 
+
 ///////////////////////////////////////////////////////////////
 /// ABSTRACT SUPERCLASS FOR QUSTION TYPES THAT USE DATASETS ///
 ///////////////////////////////////////////////////////////////
@@ -596,10 +597,10 @@ class question_dataset_dependent_questiontype extends default_questiontype {
         return $datasetdefs;
     }
 
-    function dataset_options($form, $name) {
+    function dataset_options($form, $name,$prefix='',$langfile='quiz') {
 
         // First options - it is not a dataset...
-        $options['0'] = get_string('nodataset', 'quiz');
+        $options['0'] = get_string($prefix.'nodataset', $langfile);
 
         // Construct question local options
         global $CFG;
@@ -615,9 +616,9 @@ class question_dataset_dependent_questiontype extends default_questiontype {
             $key = "$type-0-$name";
             if ($currentdatasetdef->type == $type
                     and $currentdatasetdef->category == 0) {
-                $options[$key] = get_string("keptlocal$type", 'quiz');
+                $options[$key] = get_string($prefix."keptlocal$type", $langfile);
             } else {
-                $options[$key] = get_string("newlocal$type", 'quiz');
+                $options[$key] = get_string($prefix."newlocal$type", $langfile);
             }
         }
 
@@ -635,12 +636,12 @@ class question_dataset_dependent_questiontype extends default_questiontype {
                     and $categorydef = $categorydatasetdefs[$type]) {
                 if ($currentdatasetdef->type == $type
                         and $currentdatasetdef->id == $categorydef->id) {
-                    $options[$key] = get_string("keptcategory$type", 'quiz');
+                    $options[$key] = get_string($prefix."keptcategory$type", $langfile);
                 } else {
-                    $options[$key] = get_string("existingcategory$type", 'quiz');
+                    $options[$key] = get_string($prefix."existingcategory$type", $langfile);
                 }
             } else {
-                $options[$key] = get_string("newcategory$type", 'quiz');
+                $options[$key] = get_string($prefix."newcategory$type", $langfile);
             }
         }