continue;
}
- $menu[$plugin_type.'group'] = '--'.$plugin_info['strings'][$plugin_type];
+ $first_plugin = reset($plugins);
- if (!empty($plugins['id'])) {
- $menu[$plugins['link']] = $plugins['string'];
+ if (is_array($first_plugin)) {
+ $menu[$first_plugin['link'].'&'] = '**header**'.get_string($plugin_type, 'grades');
} else {
+ $menu[$plugins['link']] = '**header**'.$plugins['string'];
+ }
+
+ if (empty($plugins['id'])) {
foreach ($plugins as $plugin) {
- $menu[$plugin['link']] = $plugin['string'];
+ $menu[$plugin['link']] = ' ' . $plugin['string'];
$count++;
}
}
/// finally print/return the popup form
if ($count > 1) {
- return popup_form('', $menu, 'choosepluginreport', '', get_string('chooseaction', 'grades'), '', '', $return, 'self');
+ $select = popup_form('', $menu, 'choosepluginreport', '', get_string('chooseaction', 'grades'), '', '', true, 'self');
+ $select = preg_replace('/\>\*\*header\*\*/', ' class="optionheader">', $select);
+ if ($return) {
+ return $select;
+ } else {
+ echo $select;
+ }
} else {
// only one option - no plugin selector needed
return '';