Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-33128 Swap Activities and Resources in the module chooser

  • Loading branch information...
commit 48a5e55ee200d676f231aaccef633bc554b849e5 1 parent 4f7f2a8
Andrew Nicols andrewnicols authored

Showing 1 changed file with 9 additions and 9 deletions. Show diff stats Hide diff stats

  1. +9 9 course/renderer.php
18 course/renderer.php
@@ -188,15 +188,7 @@ public function course_modchooser($modules, $course) {
188 188 // Put all options into one tag 'alloptions' to allow us to handle scrolling
189 189 $formcontent .= html_writer::start_tag('div', array('class' => 'alloptions'));
190 190
191   - // First display Resources
192   - $resources = array_filter($modules,
193   - create_function('$mod', 'return ($mod->archetype === MOD_CLASS_RESOURCE);'));
194   - if (count($resources)) {
195   - $formcontent .= $this->course_modchooser_title('resources');
196   - $formcontent .= $this->course_modchooser_module_types($resources);
197   - }
198   -
199   - // Then activities
  191 + // Activities
200 192 $activities = array_filter($modules,
201 193 create_function('$mod', 'return ($mod->archetype !== MOD_CLASS_RESOURCE);'));
202 194 if (count($activities)) {
@@ -204,6 +196,14 @@ public function course_modchooser($modules, $course) {
204 196 $formcontent .= $this->course_modchooser_module_types($activities);
205 197 }
206 198
  199 + // Activities
  200 + $resources = array_filter($modules,
  201 + create_function('$mod', 'return ($mod->archetype === MOD_CLASS_RESOURCE);'));
  202 + if (count($resources)) {
  203 + $formcontent .= $this->course_modchooser_title('resources');
  204 + $formcontent .= $this->course_modchooser_module_types($resources);
  205 + }
  206 +
207 207 $formcontent .= html_writer::end_tag('div'); // modoptions
208 208 $formcontent .= html_writer::end_tag('div'); // types
209 209

0 comments on commit 48a5e55

Please sign in to comment.
Something went wrong with that request. Please try again.