mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-18004 Fixed problem of duplicate entries in the drop-down
This commit is contained in:
parent
ca6b2d6801
commit
7981d537da
@ -324,13 +324,17 @@ function print_grade_plugin_selector($plugin_info, $return=false) {
|
||||
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++;
|
||||
}
|
||||
}
|
||||
@ -338,7 +342,13 @@ function print_grade_plugin_selector($plugin_info, $return=false) {
|
||||
|
||||
/// 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 '';
|
||||
|
@ -579,7 +579,7 @@ h2.headingblock {
|
||||
}
|
||||
#course-view .dimmed_text img {
|
||||
opacity:0.3;
|
||||
filter: alpha(opacity='30');
|
||||
filter: alpha(opacity='30');
|
||||
}
|
||||
|
||||
/***
|
||||
@ -618,6 +618,9 @@ body#grade-index .grades .header {
|
||||
#grade-aggregation-help code {
|
||||
font-style: normal;
|
||||
}
|
||||
option.optionheader {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/***
|
||||
*** Login
|
||||
|
Loading…
x
Reference in New Issue
Block a user