]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19799 Upgraded calls to choose_from_menu_nested
authornicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 00:35:06 +0000 (00:35 +0000)
committernicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 00:35:06 +0000 (00:35 +0000)
lib/questionlib.php

index 458424309771570886a3cd06082c0361902df4a5..862bb137bca9b2e64487339e76ea32e1301d7fd8 100644 (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.
  */
 function question_category_select_menu($contexts, $top = false, $currentcat = 0, $selected = "", $nochildrenof = -1) {
+    global $OUTPUT;
     $categoriesarray = question_category_options($contexts, $top, $currentcat, false, $nochildrenof);
     if ($selected) {
         $nothing = '';
     } 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);
 }
 
 /**