Skip to content

Commit

Permalink
Fix use of course renderer.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed May 8, 2024
1 parent 3c0c9de commit 4c27e66
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions classes/output/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ public function __construct(\moodle_page $page, $target) {
}

$this->editing = $page->user_is_editing();
// Use our custom course renderer if we need to.
if ($this->courseformat->show_editor()) {
$this->courserenderer = $this->page->get_renderer('format_vsf', 'course');
}
if ((!$this->editing) && ($this->courseformat->get_course_display() == COURSE_DISPLAY_SINGLEPAGE)) {
$this->moduleview = true;
} else {
$this->moduleview = false;
}
// Use our custom course renderer if we need to.
if (($this->moduleview) || ($this->courseformat->show_editor())) {
$this->courserenderer = $this->page->get_renderer('format_vsf', 'course');
}

if ($this->courseformat->show_editor()) {
if (empty($this->hidecontrols)) {
Expand Down

0 comments on commit 4c27e66

Please sign in to comment.