diff --git a/course/renderer.php b/course/renderer.php index 22e5e2c41b8..d43d15ca2ad 100644 --- a/course/renderer.php +++ b/course/renderer.php @@ -188,15 +188,7 @@ class core_course_renderer extends plugin_renderer_base { // Put all options into one tag 'alloptions' to allow us to handle scrolling $formcontent .= html_writer::start_tag('div', array('class' => 'alloptions')); - // First display Resources - $resources = array_filter($modules, - create_function('$mod', 'return ($mod->archetype === MOD_CLASS_RESOURCE);')); - if (count($resources)) { - $formcontent .= $this->course_modchooser_title('resources'); - $formcontent .= $this->course_modchooser_module_types($resources); - } - - // Then activities + // Activities $activities = array_filter($modules, create_function('$mod', 'return ($mod->archetype !== MOD_CLASS_RESOURCE);')); if (count($activities)) { @@ -204,6 +196,14 @@ class core_course_renderer extends plugin_renderer_base { $formcontent .= $this->course_modchooser_module_types($activities); } + // Resources + $resources = array_filter($modules, + create_function('$mod', 'return ($mod->archetype === MOD_CLASS_RESOURCE);')); + if (count($resources)) { + $formcontent .= $this->course_modchooser_title('resources'); + $formcontent .= $this->course_modchooser_module_types($resources); + } + $formcontent .= html_writer::end_tag('div'); // modoptions $formcontent .= html_writer::end_tag('div'); // types