MDL-19799 Upgraded calls to choose_from_menu_nested

This commit is contained in:
nicolasconnault 2009-08-06 00:35:06 +00:00
parent 0b280bbaa0
commit 641454c6b2

View File

@ -2348,13 +2348,17 @@ function add_indented_names($categories, $nochildrenof = -1) {
* @param integer $selected optionally, the id of a category to be selected by default in the dropdown. * @param integer $selected optionally, the id of a category to be selected by default in the dropdown.
*/ */
function question_category_select_menu($contexts, $top = false, $currentcat = 0, $selected = "", $nochildrenof = -1) { function question_category_select_menu($contexts, $top = false, $currentcat = 0, $selected = "", $nochildrenof = -1) {
global $OUTPUT;
$categoriesarray = question_category_options($contexts, $top, $currentcat, false, $nochildrenof); $categoriesarray = question_category_options($contexts, $top, $currentcat, false, $nochildrenof);
if ($selected) { if ($selected) {
$nothing = ''; $nothing = '';
} else { } else {
$nothing = 'choose'; $nothing = 'choosedots';
} }
choose_from_menu_nested($categoriesarray, 'category', $selected, $nothing); $select = moodle_select::make($categoriesarray, 'category', $selected);
$select->nothingvalue = $nothing;
$select->nested = true;
echo $OUTPUT->select($select);
} }
/** /**