Added and corrected a number of language strings.
[moodle-pu.git] / admin / settings / grades.php
blobbe3d7edb23e6118ac36515f57d10713a46993e97
1 <?php // $Id$
3 // This file defines settingpages and externalpages under the "grades" section
5 // General settings
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
15 // Reports
17 $first = true;
18 foreach (get_list_of_plugins('grade/report') as $plugin) {
19 // Include all the settings commands for this plugin if there are any
20 if ($first) {
21 $ADMIN->add('grades', new admin_category('gradereports', get_string('reports')));
22 $first = false;
25 if ($plugin == 'outcomes') {
26 $settings = new admin_externalpage('gradereport'.$plugin, get_string('modulename', 'gradereport_'.$plugin), $CFG->wwwroot.'/grade/report/outcomes/settings.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);
36 // Imports
38 $first = true;
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')) {
43 if ($first) {
44 $ADMIN->add('grades', new admin_category('gradeimports', get_string('imports')));
45 $first = false;
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);
57 // Exports
59 $first = true;
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')) {
63 if ($first) {
64 $ADMIN->add('grades', new admin_category('gradeexports', get_string('exports')));
65 $first = false;
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);