MDL-39415 Assign: Fix error on saving settings

When alwaysshowdescription checkbox is unchecked the form cant be saved.

This is a regression from when the element was changed from a
selectyesno to a checkbox.
This commit is contained in:
Damyon Wiese
2013-04-30 11:44:22 +08:00
parent 64bfea3b0e
commit 18de52db64
+2 -2
View File
@@ -516,7 +516,7 @@ class assign {
$update->courseid = $formdata->course;
$update->intro = $formdata->intro;
$update->introformat = $formdata->introformat;
$update->alwaysshowdescription = $formdata->alwaysshowdescription;
$update->alwaysshowdescription = !empty($formdata->alwaysshowdescription);
$update->submissiondrafts = $formdata->submissiondrafts;
$update->requiresubmissionstatement = $formdata->requiresubmissionstatement;
$update->sendnotifications = $formdata->sendnotifications;
@@ -837,7 +837,7 @@ class assign {
$update->course = $formdata->course;
$update->intro = $formdata->intro;
$update->introformat = $formdata->introformat;
$update->alwaysshowdescription = $formdata->alwaysshowdescription;
$update->alwaysshowdescription = !empty($formdata->alwaysshowdescription);
$update->submissiondrafts = $formdata->submissiondrafts;
$update->requiresubmissionstatement = $formdata->requiresubmissionstatement;
$update->sendnotifications = $formdata->sendnotifications;