modinfo)) { // Create an object containing an entry for each modtype present that has an array of modules of that type $modules = array(); foreach($mods as $mod) { if (!isset($modules->{$mod->mod})) { $modules[$mod->mod] = array(); } $modules[$mod->mod][$mod->cm] = urldecode($mod->name); } // Put the modtypes in order ksort($modules); // From our modules object we can build an existing module menu using separators foreach ($modules as $modtype => $modlist) { natcasesort($modlist); $suboptions = array(); foreach($modlist as $key => $value) { $suboptions[$key] = shorten_text($value, 50); // Keep menu from blowing out } $options[get_string('modulenameplural', $modtype)] = $suboptions; } } ?>
:  config->cmid); ?>