Merge branch 'wip-MDL-38747-master' of https://github.com/satrun77/moodle

This commit is contained in:
Eloy Lafuente (stronk7)
2013-07-15 17:02:01 +02:00
@@ -84,6 +84,11 @@ class block_section_links extends block_base {
$courseformatoptions = $courseformat->get_format_options();
$context = context_course::instance($course->id);
// Course format options 'numsections' is required to display the block.
if (empty($courseformatoptions['numsections'])) {
return $this->content;
}
// Prepare the highlight value.
if ($course->format == 'weeks') {
$highlight = ceil((time() - $course->startdate) / 604800);