From 143d743743a4103c858a8cb53ba3ee21a83e2c6e Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Sat, 28 Apr 2012 13:56:35 +0800 Subject: [PATCH] MDL-32508 course: make_editting_buttons now takes optionally returns to section --- course/lib.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/course/lib.php b/course/lib.php index f9dcab0fb47..5b7f13a0b05 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1372,7 +1372,7 @@ function get_print_section_cm_text(cm_info $cm, $course) { /** * Prints a section full of activity modules */ -function print_section($course, $section, $mods, $modnamesused, $absolute=false, $width="100%", $hidecompletion=false) { +function print_section($course, $section, $mods, $modnamesused, $absolute=false, $width="100%", $hidecompletion=false, $sectionreturn = false) { global $CFG, $USER, $DB, $PAGE, $OUTPUT; static $initialised; @@ -1643,7 +1643,12 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false, $mod->groupmode = false; } echo '  '; - echo make_editing_buttons($mod, $absolute, true, $mod->indent, $section->section); + + if ($sectionreturn) { + echo make_editing_buttons($mod, $absolute, true, $mod->indent, $section->section); + } else { + echo make_editing_buttons($mod, $absolute, true, $mod->indent, 0); + } echo $mod->get_after_edit_icons(); } -- 2.36.1