Permalink
Browse files

MDL-32508 course: make_editting_buttons now takes optionally returns …

…to section
  • Loading branch information...
danpoltawski committed Apr 28, 2012
1 parent 838d013 commit 143d743743a4103c858a8cb53ba3ee21a83e2c6e
Showing with 7 additions and 2 deletions.
  1. +7 −2 course/lib.php
View
@@ -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();
}

0 comments on commit 143d743

Please sign in to comment.