MDL-37085 bug fix in link for module subtypes. Thanks to Andrew Nicols
authorMarina Glancy <marina@moodle.com>
Thu, 17 Jan 2013 01:45:24 +0000 (12:45 +1100)
committerSam Hemelryk <sam@moodle.com>
Thu, 17 Jan 2013 01:51:25 +0000 (14:51 +1300)
course/lib.php

index 703b864..92268fd 100644 (file)
@@ -1169,7 +1169,7 @@ function get_module_metadata($course, $modnames, $sectionreturn = null) {
                     if (get_string_manager()->string_exists('help' . $subtype->name, $modname)) {
                         $subtype->help = get_string('help' . $subtype->name, $modname);
                     }
-                    $subtype->link = new moodle_url($urlbase, array('add' => $subtype->type));
+                    $subtype->link = new moodle_url($urlbase, array('add' => $modname, 'type' => $subtype->name));
                     $group->types[] = $subtype;
                 }
                 $modlist[$course->id][$modname] = $group;