Permalink
Browse files

Cherry-picked changes for PULL-460/MDL-26557 into MOODLE_19_STABLE

  • Loading branch information...
1 parent 08bf2b2 commit 5b2d591bcb65f124620c2b444aaba93aeb96a68d Sam Hemelryk committed Mar 21, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/formslib.php
View
@@ -656,12 +656,14 @@ function repeat_elements($elementobjs, $repeats, $options, $repeathiddenname,
/**
* Adds a link/button that controls the checked state of a group of checkboxes.
* @param int $groupid The id of the group of advcheckboxes this element controls
- * @param string $text The text of the link. Defaults to "select all/none"
+ * @param string $text The text of the link. Defaults to selectallornone ("select all/none")
* @param array $attributes associative array of HTML attributes
* @param int $originalValue The original general state of the checkboxes before the user first clicks this element
*/
- function add_checkbox_controller($groupid, $buttontext, $attributes, $originalValue = 0) {
+ function add_checkbox_controller($groupid, $text = null, $attributes = null, $originalValue = 0) {
global $CFG;
+
+ // Set the default text if none was specified
if (empty($text)) {
$text = get_string('selectallornone', 'form');
}

0 comments on commit 5b2d591

Please sign in to comment.