MDL-36728: Assignment - Improve usability of require submission statement setting.
authorDamyon Wiese <damyon@moodle.com>
Thu, 22 Nov 2012 05:03:56 +0000 (13:03 +0800)
committerSam Hemelryk <sam@moodle.com>
Mon, 26 Nov 2012 02:06:22 +0000 (15:06 +1300)
This change will hide the setting "Require that students accept the submission statement" at
the assignment level if no submission statement has been configured for a site. It also includes a
change to the help text to separate the assignment level setting from the site level setting. This
change also sets a default assignment submission statement.

AMOS BEGIN
 CPY [requiresubmissionstatement,mod_assign],[requiresubmissionstatementassignment,mod_assign]
AMOS END

mod/assign/lang/en/assign.php
mod/assign/mod_form.php
mod/assign/settings.php

index c7b041c..91a8957 100644 (file)
@@ -223,6 +223,8 @@ $string['quickgradingchangessaved'] = 'The grade changes were saved';
 $string['quickgrading_help'] = 'Quick grading allows you to assign grades (and outcomes) directly in the submissions table. Quick grading is not compatible with advanced grading and is not recommended when there are multiple markers.';
 $string['requiresubmissionstatement'] = 'Require that students accept the submission statement';
 $string['requiresubmissionstatement_help'] = 'Require that students accept the submission statement for all assignment submissions for this entire Moodle installation. If this setting is not enabled, then submission statements can be enabled or disabled in the settings for each assignment.';
+$string['requiresubmissionstatementassignment'] = 'Require that students accept the submission statement';
+$string['requiresubmissionstatementassignment_help'] = 'Require that students accept the submission statement for all submissions to this assignment.';
 $string['requireallteammemberssubmit'] = 'Require all group members submit';
 $string['requireallteammemberssubmit_help'] = 'If enabled, all members of the student group must click the submit button for this assignment before the group submission will be considered as submitted. If disabled, the group submission will be considered as submitted as soon as any member of the student group clicks the submit button.';
 $string['recordid'] = 'Identifier';
@@ -271,6 +273,7 @@ $string['submissionsclosed'] = 'Submissions closed';
 $string['submissionsettings'] = 'Submission settings';
 $string['submissionstatement'] = 'Submission statement';
 $string['submissionstatement_help'] = 'Assignment submission confirmation statement';
+$string['submissionstatementdefault'] = 'This assignment is my own work, except where I have acknowledged the use of the works of other people.';
 $string['submissionstatementacceptedlog'] = 'Submission statement accepted by user {$a}';
 $string['submissionstatus_draft'] = 'Draft (not submitted)';
 $string['submissionstatusheading'] = 'Submission status';
index a1f177d..45d6c6d 100644 (file)
@@ -92,10 +92,12 @@ class mod_assign_mod_form extends moodleform_mod {
         $mform->addHelpButton('submissiondrafts', 'submissiondrafts', 'assign');
         $mform->setDefault('submissiondrafts', 0);
         // submission statement
-        if (empty($config->requiresubmissionstatement)) {
+        if (empty($config->submissionstatement)) {
+            $mform->addElement('hidden', 'requiresubmissionstatement', 0);
+        } else if (empty($config->requiresubmissionstatement)) {
             $mform->addElement('selectyesno', 'requiresubmissionstatement', get_string('requiresubmissionstatement', 'assign'));
             $mform->setDefault('requiresubmissionstatement', 0);
-            $mform->addHelpButton('requiresubmissionstatement', 'requiresubmissionstatement', 'assign');
+            $mform->addHelpButton('requiresubmissionstatement', 'requiresubmissionstatementassignment', 'assign');
         } else {
             $mform->addElement('hidden', 'requiresubmissionstatement', 1);
         }
index fd29d76..f332123 100644 (file)
@@ -60,7 +60,7 @@ if ($ADMIN->fulltree) {
                        new lang_string('sendsubmissionreceipts_help', 'mod_assign'), 1));
     $settings->add(new admin_setting_configtextarea('assign/submissionstatement',
                        new lang_string('submissionstatement', 'mod_assign'),
-                       new lang_string('submissionstatement_help', 'mod_assign'), ''));
+                       new lang_string('submissionstatement_help', 'mod_assign'), get_string('submissionstatement_default', 'mod_assign')));
     $settings->add(new admin_setting_configcheckbox('assign/requiresubmissionstatement',
                        new lang_string('requiresubmissionstatement', 'mod_assign'),
                        new lang_string('requiresubmissionstatement_help', 'mod_assign'), 0));