$mform->setHelpButton('report_user_showrank', array('showrank', get_string('showrank', 'grades'), 'grade'));
if (empty($CFG->grade_report_user_showpercentage)) {
- $options[-1] = get_string('defaultprev', 'grades', $options[0]);
- } else {
$options[-1] = get_string('defaultprev', 'grades', $options[1]);
+ } else {
+ $options[-1] = get_string('defaultprev', 'grades', $options[0]);
}
$mform->addElement('select', 'report_user_showpercentage', get_string('showpercentage', 'grades'), $options);
/// Add settings for this module to the $settings object (it's already defined)
$settings->add(new admin_setting_configcheckbox('grade_report_user_showrank', get_string('showrank', 'grades'), get_string('configshowrank', 'grades'), 0, PARAM_INT));
-$settings->add(new admin_setting_configcheckbox('grade_report_user_showpercentage', get_string('showpercentage', 'grades'), get_string('configshowpercentage', 'grades'), 1, PARAM_INT));
+$settings->add(new admin_setting_configcheckbox('grade_report_user_showpercentage', get_string('showpercentage', 'grades'), get_string('configshowpercentage', 'grades'), 2, PARAM_INT));
$options = array(0 => get_string('shownohidden', 'grades'),
1 => get_string('showhiddenuntilonly', 'grades'),