MDL-36728: Assignment - submission statement default - Add a langstring fix
[moodle.git] / mod / assign / settings.php
CommitLineData
bbd0e548
DW
1<?php
2// This file is part of Moodle - http://moodle.org/
3//
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.
8//
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.
13//
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/>.
16
17/**
18 * This file adds the settings pages to the navigation menu
19 *
20 * @package mod_assign
21 * @copyright 2012 NetSpot {@link http://www.netspot.com.au}
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23 */
24
25defined('MOODLE_INTERNAL') || die;
26
27require_once($CFG->dirroot . '/mod/assign/adminlib.php');
28
29$ADMIN->add('modules', new admin_category('assignmentplugins',
fde6f79f 30 new lang_string('assignmentplugins', 'assign'), $module->is_enabled() === false));
bbd0e548 31$ADMIN->add('assignmentplugins', new admin_category('assignsubmissionplugins',
fde6f79f 32 new lang_string('submissionplugins', 'assign'), $module->is_enabled() === false));
bbd0e548
DW
33$ADMIN->add('assignsubmissionplugins', new assign_admin_page_manage_assign_plugins('assignsubmission'));
34$ADMIN->add('assignmentplugins', new admin_category('assignfeedbackplugins',
fde6f79f 35 new lang_string('feedbackplugins', 'assign'), $module->is_enabled() === false));
bbd0e548
DW
36$ADMIN->add('assignfeedbackplugins', new assign_admin_page_manage_assign_plugins('assignfeedback'));
37
38
0047693f
DW
39assign_plugin_manager::add_admin_assign_plugin_settings('assignsubmission', $ADMIN, $settings, $module);
40assign_plugin_manager::add_admin_assign_plugin_settings('assignfeedback', $ADMIN, $settings, $module);
41
bbd0e548 42if ($ADMIN->fulltree) {
755bfeca 43 $menu = array();
bbd0e548
DW
44 foreach (get_plugin_list('assignfeedback') as $type => $notused) {
45 $visible = !get_config('assignfeedback_' . $type, 'disabled');
46 if ($visible) {
47 $menu['assignfeedback_' . $type] = new lang_string('pluginname', 'assignfeedback_' . $type);
48 }
49 }
cfc81f03
DW
50
51 // The default here is feedback_comments (if it exists)
52 $settings->add(new admin_setting_configselect('assign/feedback_plugin_for_gradebook',
94f26900
DW
53 new lang_string('feedbackplugin', 'mod_assign'),
54 new lang_string('feedbackpluginforgradebook', 'mod_assign'), 'assignfeedback_comments', $menu));
cfc81f03 55 $settings->add(new admin_setting_configcheckbox('assign/showrecentsubmissions',
94f26900
DW
56 new lang_string('showrecentsubmissions', 'mod_assign'),
57 new lang_string('configshowrecentsubmissions', 'mod_assign'), 0));
75f87a57 58 $settings->add(new admin_setting_configcheckbox('assign/submissionreceipts',
94f26900
DW
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'),
63f57b2b 63 new lang_string('submissionstatement_help', 'mod_assign'), get_string('submissionstatementdefault', 'mod_assign')));
94f26900
DW
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));
67
0047693f 68}