diff --git a/lib/upgrade.txt b/lib/upgrade.txt index f0ee6e8b0246f..d5b605bcec32f 100644 --- a/lib/upgrade.txt +++ b/lib/upgrade.txt @@ -1,6 +1,10 @@ This files describes API changes in core libraries and APIs, information provided here is intended especially for developers. +=== 3.9.4 === +* New optional parameter $extracontent for print_collapsible_region_start(). This allows developers to add interactive HTML elements + (e.g. a help icon) after the collapsible region's toggle link. + === 3.9.3 === * New DML function $DB->delete_records_subquery() to delete records based on a subquery in a way that will work across databases. diff --git a/lib/weblib.php b/lib/weblib.php index c7d3d2b0bb5d9..69ee9f6f63ce2 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2436,9 +2436,11 @@ function print_collapsible_region($contents, $classes, $id, $caption, $userpref * (May be blank if you do not wish the state to be persisted. * @param boolean $default Initial collapsed state to use if the user_preference it not set. * @param boolean $return if true, return the HTML as a string, rather than printing it. + * @param string $extracontent the extra content will show next to caption, eg.Help icon. * @return string|void if $return is false, returns nothing, otherwise returns a string of HTML. */ -function print_collapsible_region_start($classes, $id, $caption, $userpref = '', $default = false, $return = false) { +function print_collapsible_region_start($classes, $id, $caption, $userpref = '', $default = false, $return = false, + $extracontent = null) { global $PAGE; // Work out the initial state. @@ -2458,8 +2460,11 @@ function print_collapsible_region_start($classes, $id, $caption, $userpref = '', $output .= '