MDL-28652 qtype calculated, bad display of placeholder names on the editing form.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 8 Aug 2011 12:13:37 +0000 (13:13 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 8 Aug 2011 12:13:37 +0000 (13:13 +0100)
question/type/calculated/datasetdefinitions_form.php
question/type/calculated/datasetitems_form.php
question/type/calculated/lang/en/qtype_calculated.php

index 683277b..7821cd6 100644 (file)
@@ -98,8 +98,7 @@ class question_dataset_dependent_definitions_form extends moodleform {
                 list($options, $selected) =
                         $this->qtypeobj->dataset_options($this->question, $datasetname);
                 unset($options['0']); // Mandatory...
-                $label = get_string('wildcard', 'qtype_calculated').
-                        " <strong>$datasetname</strong> ";
+                $label = get_string('wildcard', 'qtype_calculated', $datasetname);
                 $mform->addElement('select', "dataset[$key]", $label, $options);
                 if (isset($datadefscat[$datasetname])) {
                     $mform->addElement('static', "there is a category",
@@ -118,8 +117,7 @@ class question_dataset_dependent_definitions_form extends moodleform {
             if (!isset($datasetmenus[$datasetname])) {
                 list($options, $selected) = $this->qtypeobj->dataset_options(
                         $this->question, $datasetname, false);
-                $label = get_string('wildcard', 'qtype_calculated') .
-                        " <strong>$datasetname</strong> ";
+                $label = get_string('wildcard', 'qtype_calculated', $datasetname);
                 $mform->addElement('select', "dataset[$key]", $label, $options);
                 if (isset($datadefscat[$datasetname])) {
                     $mform->addElement('static', "there is a category",
index 7875e05..fc3564a 100644 (file)
@@ -131,7 +131,7 @@ class question_dataset_dependent_items_form extends moodleform {
         $j = (($this->noofitems) * count($this->datasetdefs))+1;
         foreach ($this->datasetdefs as $defkey => $datasetdef) {
             if ($datasetdef->category |= 0 ) {
-                $name = get_string('sharedwildcardname', 'qtype_calculated', $datasetdef->name);
+                $name = get_string('sharedwildcard', 'qtype_calculated', $datasetdef->name);
             } else {
                 $name = get_string('wildcard', 'qtype_calculated', $datasetdef->name);
             }
@@ -283,7 +283,7 @@ class question_dataset_dependent_items_form extends moodleform {
                                 get_string('wildcard', 'qtype_calculated', $datasetdef->name));
                     } else {
                         $mform->addElement('text', "number[$j]", get_string(
-                                'sharedwildcardname', 'qtype_calculated', $datasetdef->name));
+                                'sharedwildcard', 'qtype_calculated', $datasetdef->name));
                     }
 
                 } else {
index 8ef444f..8ba55b3 100644 (file)
@@ -119,7 +119,7 @@ $string['questiondatasets_help'] = 'Question datasets of wild cards that will be
 $string['questionstoredname'] ='Question stored name';
 $string['replacewithrandom'] = 'Replace with a random value';
 $string['reuseifpossible'] = 'reuse previous value if available';
-$string['sharedwildcard']='Shared wild card <strong>{$a}</strong>';
+$string['sharedwildcard']='Shared wild card {<strong>{$a}</strong>}';
 $string['sharedwildcardname']='Shared wild card ';
 $string['sharedwildcards']='Shared wild cards';
 $string['significantfigures'] = 'with {$a}';