Should I just stop worrying and check this in?
Index: lib/weblib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/weblib.php,v
retrieving revision 1.617
diff -u -r1.617 weblib.php
--- lib/weblib.php 27 Aug 2006 21:52:22 -0000 1.617
+++ lib/weblib.php 30 Aug 2006 15:06:30 -0000
@@ -759,6 +759,16 @@
}
/**
+ * Choose value 0 or 1 from a menu with options 'No' and 'Yes'.
+ * Other options like choose_from_menu.
+ */
+function choose_from_menu_yesno($name, $selected, $script = '',
+ $return = false, $disabled = false, $tabindex = 0) {
+ return choose_from_menu(array(get_string('no'), get_string('yes')), $name,
+ $selected, '', $script, '0', $return, $disabled, $tabindex);
+}
+
+/**
* Just like choose_from_menu, but takes a nested array (2 levels) and makes a dropdown menu
* including option headings with the first level.
*/