Permalink
Browse files

MDL-28652 qtype calculated, bad display of placeholder names on the e…

…diting form.
  • Loading branch information...
1 parent 80eb52c commit 65be66e4d43ac820ff1c1621c49fac89689dd9a5 @timhunt timhunt committed Aug 8, 2011
@@ -98,8 +98,7 @@ protected function definition() {
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 @@ protected function definition() {
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",
@@ -131,7 +131,7 @@ protected function definition() {
$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 @@ protected function definition() {
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 {
@@ -119,7 +119,7 @@
$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}';

0 comments on commit 65be66e

Please sign in to comment.