# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. Index: cvsroot/moodle/moodle/lib/weblib.php --- cvsroot/moodle/moodle/lib/weblib.php Base (1.970.2.117) +++ cvsroot/moodle/moodle/lib/weblib.php Locally Modified (Based On 1.970.2.117) @@ -848,7 +848,6 @@ die; } - /** * Given an array of values, output the HTML for a select element with those options. * Normally, you only need to use the first few parameters. @@ -867,9 +866,17 @@ * @param int $tabindex if give, sets the tabindex attribute on the <select> element. Default none. * @param string $id value to use for the id attribute of the <select> element. If none is given, * then a suitable one is constructed. + * @param mixed $listbox if false, display as a dropdown menu. If true, display as a list box. + * By default, the list box will have a number of rows equal to min(10, count($options)), but if + * $listbox is an integer, that number is used for size instead. + * @param boolean $multiple if true, enable multiple selections, else only 1 item can be selected. Used + * when $listbox display is enabled + * @param string $class value to use for the class attribute of the <select> element. If none is given, + * then a suitable one is constructed. */ function choose_from_menu ($options, $name, $selected='', $nothing='choose', $script='', - $nothingvalue='0', $return=false, $disabled=false, $tabindex=0, $id='') { + $nothingvalue='0', $return=false, $disabled=false, $tabindex=0, + $id='', $listbox=false, $multiple=false, $class='') { if ($nothing == 'choose') { $nothing = get_string('choose') .'...'; @@ -891,18 +898,44 @@ $id = str_replace(']', '', $id); } - $output = '' . "\n"; + if ($nothing) { $output .= '