Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-33128 Swap Activities and Resources in the module chooser

  • Loading branch information...
commit 48a5e55ee200d676f231aaccef633bc554b849e5 1 parent 4f7f2a8
@andrewnicols andrewnicols authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 course/renderer.php
View
18 course/renderer.php
@@ -188,15 +188,7 @@ public function course_modchooser($modules, $course) {
// 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 @@ public function course_modchooser($modules, $course) {
$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
Please sign in to comment.
Something went wrong with that request. Please try again.