diff --git a/backup/restore_form.html b/backup/restore_form.html index 04ed06dd76e..b08433197a9 100644 --- a/backup/restore_form.html +++ b/backup/restore_form.html @@ -638,7 +638,7 @@ if ($restoreuserinfo) { $roles = get_roles_with_capability('moodle/legacy:editingteacher', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM)); $editteacher = reset($roles); - echo $OUTPUT->select(html_select::make ($siterolesarray, "defaultteacheredit", $editteacher->id, 'new role')); + echo html_writer::select($siterolesarray, "defaultteacheredit", $editteacher->id, array(''=>'new role')); echo (''); /// Non-editting teacher @@ -651,7 +651,7 @@ if ($restoreuserinfo) { $roles = get_roles_with_capability('moodle/legacy:teacher', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM)); $teacher = reset($roles); - echo $OUTPUT->select(html_select::make ($siterolesarray, "defaultteacher", $teacher->id, 'new role')); + echo html_writer::select($siterolesarray, "defaultteacher", $teacher->id, array(''=>'new role')); echo (''); @@ -664,7 +664,7 @@ if ($restoreuserinfo) { $roles = get_roles_with_capability('moodle/legacy:student', CAP_ALLOW, get_context_instance(CONTEXT_SYSTEM)); $studentrole = array_shift($roles); - echo $OUTPUT->select(html_select::make ($siterolesarray, "defaultstudent", $studentrole->id, 'new role')); + echo html_writer::select($siterolesarray, "defaultstudent", $studentrole->id, array(''=>'new role')); echo (''); } else { @@ -703,7 +703,7 @@ if ($restoreuserinfo) { } } } - echo $OUTPUT->select(html_select::make ($mappableroles, "roles_".$roleid, $matchrole, 'new role')); + echo html_writer::select($mappableroles, "roles_".$roleid, $matchrole, array(''=>'new role')); echo (''); } } diff --git a/question/type/calculated/questiontype.php b/question/type/calculated/questiontype.php index ab9777bf7eb..8e2051a0c08 100644 --- a/question/type/calculated/questiontype.php +++ b/question/type/calculated/questiontype.php @@ -942,14 +942,10 @@ class question_calculated_qtype extends default_questiontype { ? 'decimals' : 'significantfigures'), 'quiz', $i); } - $select1 = html_select::make($lengthoptions, 'calclength[]', $regs[4], false); - $select1->nothingvalue = ''; - $menu1 = $OUTPUT->select($select1); + $menu1 = html_writer::select($lengthoptions, 'calclength[]', $regs[4], null); - $select2 = html_select::make(array('uniform' => get_string('uniform', 'quiz'), - 'loguniform' => get_string('loguniform', 'quiz')), 'calcdistribution[]', $regs[1], false); - $select2->nothingvalue = ''; - $menu2 = $OUTPUT->select($select2); + $options = array('uniform' => get_string('uniform', 'quiz'), 'loguniform' => get_string('loguniform', 'quiz')); + $menu2 = html_writer::select($options, 'calcdistribution[]', $regs[1], null); return '
' @@ -1387,14 +1383,14 @@ class question_calculated_qtype extends default_questiontype { list($options, $selected) = $this->dataset_options($form, $datasetname); unset($options['0']); // Mandatory... - $datasetmenus[$datasetname] = $OUTPUT->select(html_select::make($options, 'dataset[]', $selected, false)); + $datasetmenus[$datasetname] = html_writer::select($options, 'dataset[]', $selected, null); } } foreach ($optionaldatasets as $datasetname) { if (!isset($datasetmenus[$datasetname])) { list($options, $selected) = $this->dataset_options($form, $datasetname); - $datasetmenus[$datasetname] = $OUTPUT->select(html_select::make($options, 'dataset[]', $selected, false)); + $datasetmenus[$datasetname] = html_writer::select($options, 'dataset[]', $selected, null); } } return $datasetmenus; diff --git a/question/type/match/questiontype.php b/question/type/match/questiontype.php index 6220ed434b0..d4e5b769856 100644 --- a/question/type/match/questiontype.php +++ b/question/type/match/questiontype.php @@ -295,9 +295,9 @@ class question_match_qtype extends default_questiontype { } } - $select = html_select::make($answers, $menuname, $response); - $select->disabled = $options->readonly; - $a->control = $OUTPUT->select($select); + $attributes = array(); + $attributes['disabled'] = $options->readonly ? 'disabled' : null; + $a->control = html_writer::select($answers, $menuname, $response, array(''=>'choosedots'), $attributes); // Neither the editing interface or the database allow to provide // fedback for this question type.