diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index 1a585272c71..fa274b1f82d 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -407,21 +407,6 @@ class assignment_base { function add_instance($assignment) { $assignment->timemodified = time(); - if (empty($assignment->dueenable)) { - $assignment->timedue = 0; - $assignment->preventlate = 0; - } else { - $assignment->timedue = make_timestamp($assignment->dueyear, $assignment->duemonth, - $assignment->dueday, $assignment->duehour, - $assignment->dueminute); - } - if (empty($assignment->availableenable)) { - $assignment->timeavailable = 0; - } else { - $assignment->timeavailable = make_timestamp($assignment->availableyear, $assignment->availablemonth, - $assignment->availableday, $assignment->availablehour, - $assignment->availableminute); - } if ($returnid = insert_record("assignment", $assignment)) {