Merge branch 'MDL-33128-master-1' of git://git.luns.net.uk/moodle
authorSam Hemelryk <sam@moodle.com>
Wed, 13 Jun 2012 03:40:39 +0000 (15:40 +1200)
committerSam Hemelryk <sam@moodle.com>
Wed, 13 Jun 2012 03:40:39 +0000 (15:40 +1200)
1  2 
course/renderer.php

@@@ -204,6 -196,14 +196,14 @@@ class core_course_renderer extends plug
              $formcontent .= $this->course_modchooser_module_types($activities);
          }
  
 -        // 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