3 // This file defines settingpages and externalpages under the "grades" section
7 $temp = new admin_settingpage('gradessettings', get_string('gradessettings', 'grades'));
8 $temp->add(new admin_setting_special_gradeexport());
9 // enable outcomes checkbox
10 $temp->add(new admin_setting_configcheckbox('enableoutcomes', get_string('enableoutcomes', 'grades'), get_string('configenableoutcomes', 'grades'), 0, PARAM_INT
));
11 $ADMIN->add('grades', $temp);
13 // The plugins must implement a settings.php file that adds their admin settings to the $settings object
18 foreach (get_list_of_plugins('grade/report') as $plugin) {
19 // Include all the settings commands for this plugin if there are any
21 $ADMIN->add('grades', new admin_category('gradereports', get_string('reports')));
25 if ($plugin == 'outcomes') {
26 $settings = new admin_externalpage('gradereport'.$plugin, get_string('modulename', 'gradereport_'.$plugin), $CFG->wwwroot
.'/grade/report/outcomes/site.php');
27 $ADMIN->add('gradereports', $settings);
28 } else if (file_exists($CFG->dirroot
.'/grade/report/'.$plugin.'/settings.php')) {
30 $settings = new admin_settingpage('gradereport'.$plugin, get_string('modulename', 'gradereport_'.$plugin));
31 include_once($CFG->dirroot
.'/grade/report/'.$plugin.'/settings.php');
32 $ADMIN->add('gradereports', $settings);
39 foreach (get_list_of_plugins('grade/import') as $plugin) {
41 // Include all the settings commands for this plugin if there are any
42 if (file_exists($CFG->dirroot
.'/grade/import/'.$plugin.'/settings.php')) {
44 $ADMIN->add('grades', new admin_category('gradeimports', get_string('imports')));
48 $settings = new admin_settingpage('gradeimport'.$plugin, get_string('modulename', 'gradeimport_'.$plugin));
50 include_once($CFG->dirroot
.'/grade/import/'.$plugin.'/settings.php');
52 $ADMIN->add('gradeimports', $settings);
60 foreach (get_list_of_plugins('grade/export') as $plugin) {
61 // Include all the settings commands for this plugin if there are any
62 if (file_exists($CFG->dirroot
.'/grade/export/'.$plugin.'/settings.php')) {
64 $ADMIN->add('grades', new admin_category('gradeexports', get_string('exports')));
68 $settings = new admin_settingpage('gradeexport'.$plugin, get_string('modulename', 'gradeexport_'.$plugin));
70 include_once($CFG->dirroot
.'/grade/export/'.$plugin.'/settings.php');
72 $ADMIN->add('gradeexports', $settings);