MDL-31288 Assignment : fixed requiresubmission setting states
authorAparup Banerjee <aparup@moodle.com>
Wed, 1 Aug 2012 09:09:54 +0000 (17:09 +0800)
committerAparup Banerjee <aparup@moodle.com>
Wed, 1 Aug 2012 09:09:54 +0000 (17:09 +0800)
mod/assign/mod_form.php

index aef0d91..afc9484 100644 (file)
@@ -92,9 +92,9 @@ 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->requiresubmissionstatement)) {
             $mform->addElement('selectyesno', 'requiresubmissionstatement', get_string('requiresubmissionstatement', 'assign'));
-            $mform->setDefault('requiresubmissionstatement', !empty($config->submissionstatement));
+            $mform->setDefault('requiresubmissionstatement', 0);
             $mform->addHelpButton('requiresubmissionstatement', 'requiresubmissionstatement', 'assign');
         } else {
             $mform->addElement('hidden', 'requiresubmissionstatement', 1);