mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
Merge branch 'MDL-70094-master' of https://github.com/SangNguyen2601/moodle
This commit is contained in:
commit
1ce10609f3
@ -1,6 +1,10 @@
|
||||
This files describes API changes in core libraries and APIs,
|
||||
information provided here is intended especially for developers.
|
||||
|
||||
=== 4.0 ===
|
||||
* 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.10 ===
|
||||
* PHPUnit has been upgraded to 8.5. That comes with a few changes:
|
||||
- Breaking change: All the "template methods" (setUp(), tearDown()...) now require to return void. This implies
|
||||
|
@ -2441,9 +2441,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.
|
||||
@ -2463,8 +2465,11 @@ function print_collapsible_region_start($classes, $id, $caption, $userpref = '',
|
||||
$output .= '<div id="' . $id . '" class="collapsibleregion ' . $classes . '">';
|
||||
$output .= '<div id="' . $id . '_sizer">';
|
||||
$output .= '<div id="' . $id . '_caption" class="collapsibleregioncaption">';
|
||||
$output .= $caption . ' ';
|
||||
$output .= '</div><div id="' . $id . '_inner" class="collapsibleregioninner">';
|
||||
$output .= $caption . ' </div>';
|
||||
if ($extracontent) {
|
||||
$output .= html_writer::div($extracontent, 'collapsibleregionextracontent');
|
||||
}
|
||||
$output .= '<div id="' . $id . '_inner" class="collapsibleregioninner">';
|
||||
$PAGE->requires->js_init_call('M.util.init_collapsible_region', array($id, $userpref, get_string('clicktohideshow')));
|
||||
|
||||
if ($return) {
|
||||
|
@ -266,9 +266,8 @@ echo html_writer::end_tag('div');
|
||||
echo html_writer::end_tag('form');
|
||||
|
||||
// Output the technical info.
|
||||
print_collapsible_region_start('', 'techinfo', get_string('technicalinfo', 'question') .
|
||||
$OUTPUT->help_icon('technicalinfo', 'question'),
|
||||
'core_question_preview_techinfo_collapsed', true);
|
||||
print_collapsible_region_start('', 'techinfo', get_string('technicalinfo', 'question'),
|
||||
'core_question_preview_techinfo_collapsed', true, false, $OUTPUT->help_icon('technicalinfo', 'question'));
|
||||
foreach ($technical as $info) {
|
||||
echo html_writer::tag('p', $info, array('class' => 'notifytiny'));
|
||||
}
|
||||
|
@ -423,6 +423,13 @@ body.jsenabled .questionflag input[type=checkbox] {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
#page-question-preview .collapsibleregion {
|
||||
.collapsibleregioncaption,
|
||||
.collapsibleregionextracontent {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
// imported from quiz.css
|
||||
|
||||
#page-mod-quiz-edit ul.slots .activityinstance {
|
||||
|
@ -15820,6 +15820,10 @@ body.jsenabled .questionflag input[type=checkbox] {
|
||||
#page-question-preview #techinfo {
|
||||
margin: 1em 0; }
|
||||
|
||||
#page-question-preview .collapsibleregion .collapsibleregioncaption,
|
||||
#page-question-preview .collapsibleregion .collapsibleregionextracontent {
|
||||
display: inline-block; }
|
||||
|
||||
#page-mod-quiz-edit ul.slots .activityinstance > a {
|
||||
display: flex;
|
||||
max-width: 100%;
|
||||
|
@ -16041,6 +16041,10 @@ body.jsenabled .questionflag input[type=checkbox] {
|
||||
#page-question-preview #techinfo {
|
||||
margin: 1em 0; }
|
||||
|
||||
#page-question-preview .collapsibleregion .collapsibleregioncaption,
|
||||
#page-question-preview .collapsibleregion .collapsibleregionextracontent {
|
||||
display: inline-block; }
|
||||
|
||||
#page-mod-quiz-edit ul.slots .activityinstance > a {
|
||||
display: flex;
|
||||
max-width: 100%;
|
||||
|
Loading…
x
Reference in New Issue
Block a user