Permalink
Browse files

MDL-39432 course: converted closures to lambda functions

  • Loading branch information...
1 parent 5e00b9a commit c9b3e9eb23a90f7b914aa79e762c5e5de5fefcea Sam Hemelryk committed Apr 30, 2013
Showing with 2 additions and 6 deletions.
  1. +2 −6 course/renderer.php
View
@@ -191,18 +191,14 @@ public function course_modchooser($modules, $course) {
$formcontent .= html_writer::start_tag('div', array('class' => 'alloptions'));
// Activities
- $activities = array_filter($modules, function($mod) {
- return ($mod->archetype !== MOD_ARCHETYPE_RESOURCE && $mod->archetype !== MOD_ARCHETYPE_SYSTEM);
- });
+ $activities = array_filter($modules, create_function('$mod', 'return ($mod->archetype !== MOD_ARCHETYPE_RESOURCE && $mod->archetype !== MOD_ARCHETYPE_SYSTEM);'));
if (count($activities)) {
$formcontent .= $this->course_modchooser_title('activities');
$formcontent .= $this->course_modchooser_module_types($activities);
}
// Resources
- $resources = array_filter($modules, function($mod) {
- return ($mod->archetype === MOD_ARCHETYPE_RESOURCE);
- });
+ $resources = array_filter($modules, create_function('$mod', 'return ($mod->archetype === MOD_ARCHETYPE_RESOURCE);'));
if (count($resources)) {
$formcontent .= $this->course_modchooser_title('resources');
$formcontent .= $this->course_modchooser_module_types($resources);

0 comments on commit c9b3e9e

Please sign in to comment.