Merge branch 'wip-MDL-38747-master' of https://github.com/satrun77/moodle
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user