2 // This file is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 * This file adds the settings pages to the navigation menu
21 * @copyright 2012 NetSpot {@link http://www.netspot.com.au}
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25 defined('MOODLE_INTERNAL') || die;
27 require_once($CFG->dirroot . '/mod/assign/adminlib.php');
29 $ADMIN->add('modules', new admin_category('assignmentplugins',
30 new lang_string('assignmentplugins', 'assign'), $module->is_enabled() === false));
31 $ADMIN->add('assignmentplugins', new admin_category('assignsubmissionplugins',
32 new lang_string('submissionplugins', 'assign'), $module->is_enabled() === false));
33 $ADMIN->add('assignsubmissionplugins', new assign_admin_page_manage_assign_plugins('assignsubmission'));
34 $ADMIN->add('assignmentplugins', new admin_category('assignfeedbackplugins',
35 new lang_string('feedbackplugins', 'assign'), $module->is_enabled() === false));
36 $ADMIN->add('assignfeedbackplugins', new assign_admin_page_manage_assign_plugins('assignfeedback'));
39 assign_plugin_manager::add_admin_assign_plugin_settings('assignsubmission', $ADMIN, $settings, $module);
40 assign_plugin_manager::add_admin_assign_plugin_settings('assignfeedback', $ADMIN, $settings, $module);
42 if ($ADMIN->fulltree) {
44 foreach (get_plugin_list('assignfeedback') as $type => $notused) {
45 $visible = !get_config('assignfeedback_' . $type, 'disabled');
47 $menu['assignfeedback_' . $type] = new lang_string('pluginname', 'assignfeedback_' . $type);
51 // The default here is feedback_comments (if it exists)
52 $settings->add(new admin_setting_configselect('assign/feedback_plugin_for_gradebook',
53 new lang_string('feedbackplugin', 'mod_assign'),
54 new lang_string('feedbackpluginforgradebook', 'mod_assign'), 'assignfeedback_comments', $menu));
55 $settings->add(new admin_setting_configcheckbox('assign/showrecentsubmissions',
56 new lang_string('showrecentsubmissions', 'mod_assign'),
57 new lang_string('configshowrecentsubmissions', 'mod_assign'), 0));
58 $settings->add(new admin_setting_configcheckbox('assign/submissionreceipts',
59 new lang_string('sendsubmissionreceipts', 'mod_assign'),
60 new lang_string('sendsubmissionreceipts_help', 'mod_assign'), 1));
61 $settings->add(new admin_setting_configtextarea('assign/submissionstatement',
62 new lang_string('submissionstatement', 'mod_assign'),
63 new lang_string('submissionstatement_help', 'mod_assign'), get_string('submissionstatementdefault', 'mod_assign')));
64 $settings->add(new admin_setting_configcheckbox('assign/requiresubmissionstatement',
65 new lang_string('requiresubmissionstatement', 'mod_assign'),
66 new lang_string('requiresubmissionstatement_help', 'mod_assign'), 0));