Skip to content

Commit

Permalink
MDL-28652 qtype calculated, bad display of placeholder names on the e…
Browse files Browse the repository at this point in the history
…diting form.
  • Loading branch information
timhunt committed Aug 8, 2011
1 parent 80eb52c commit 65be66e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions question/type/calculated/datasetdefinitions_form.php
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions question/type/calculated/datasetitems_form.php
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion question/type/calculated/lang/en/qtype_calculated.php
Expand Up @@ -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}';
Expand Down

0 comments on commit 65be66e

Please sign in to comment.