mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
if starttime and endtime are empty, set them to zero
This commit is contained in:
parent
729b2dfad2
commit
abe2308eab
@ -35,12 +35,17 @@
|
||||
$attempt->starttime = optional_param('starttime', NULL, PARAM_ALPHA);
|
||||
$attempt->timefinish = $time;
|
||||
|
||||
if ($attempt->endtime) {
|
||||
$attempt->endtime = strtotime($attempt->endtime);
|
||||
}
|
||||
if ($attempt->starttime) {
|
||||
// convert times, if necessary
|
||||
if (empty($attempt->starttime)) {
|
||||
$attempt->starttime = 0;
|
||||
} else {
|
||||
$attempt->starttime = strtotime($attempt->starttime);
|
||||
}
|
||||
if (empty($attempt->endtime)) {
|
||||
$attempt->endtime = 0;
|
||||
} else {
|
||||
$attempt->endtime = strtotime($attempt->endtime);
|
||||
}
|
||||
|
||||
// set clickreportid, (for click reporting)
|
||||
$attempt->clickreportid = $attempt->id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user