From 48a5e55ee200d676f231aaccef633bc554b849e5 Mon Sep 17 00:00:00 2001 From: Andrew Robert Nicols Date: Mon, 21 May 2012 11:08:32 +0100 Subject: [PATCH] MDL-33128 Swap Activities and Resources in the module chooser --- course/renderer.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/course/renderer.php b/course/renderer.php index 2831feda9ec..88e2bb5d824 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); } + // Activities + $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