mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
fixed insert_instance so that it complys with the formslib form
This commit is contained in:
parent
8509c33345
commit
343e683453
@ -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)) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user