MDL-37621 assign: Fix php error on create new assign
authorDamyon Wiese <damyon@moodle.com>
Tue, 11 Jun 2013 06:37:23 +0000 (14:37 +0800)
committerMarina Glancy <marina@moodle.com>
Tue, 11 Jun 2013 07:13:00 +0000 (17:13 +1000)
I removed one too many defaults in the previous patch. This patch
puts back the default for teamsubmissiongroupingid.

mod/assign/mod_form.php

index c5489d1..dbabc24 100644 (file)
@@ -153,6 +153,7 @@ class mod_assign_mod_form extends moodleform_mod {
         $mform->addElement('select', 'teamsubmissiongroupingid', $name, $options);
         $mform->addHelpButton('teamsubmissiongroupingid', 'teamsubmissiongroupingid', 'assign');
         $mform->disabledIf('teamsubmissiongroupingid', 'teamsubmission', 'eq', 0);
+        $mform->setDefault('teamsubmissiongroupingid', 0);
 
         $mform->addElement('header', 'notifications', get_string('notifications', 'assign'));