Skip to content

Commit

Permalink
Merge branch 'MDL-24419-master' of git://github.com/sammarshallou/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed May 17, 2012
2 parents ffa7d1c + 52f1406 commit 6e0d176
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions course/format/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,11 @@ public function print_multiple_section_page($course, $sections, $mods, $modnames
} else {
// This will create a course section if it doesn't exist..
$thissection = get_course_section($section, $course->id);

// The returned section is only a bare database object rather than
// a section_info object - we will need at least the uservisible
// field in it.
$thissection->uservisible = true;
}
// Show the section if the user is permitted to access it, OR if it's not available
// but showavailability is turned on
Expand Down
2 changes: 2 additions & 0 deletions course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2752,8 +2752,10 @@ function get_course_section($section, $courseid) {
$cw->summaryformat = FORMAT_HTML;
$cw->sequence = "";
$id = $DB->insert_record("course_sections", $cw);
rebuild_course_cache($courseid, true);
return $DB->get_record("course_sections", array("id"=>$id));
}

/**
* Given a full mod object with section and course already defined, adds this module to that section.
*
Expand Down

0 comments on commit 6e0d176

Please sign in to comment.