Skip to content

Commit a72c96d

Browse files
committed
Base calculated due date off start date, not current date
This ensures that the due date will be after the start date, in order to prevent TII returning error 2309. Fixes issue danmarsden#59
1 parent f4635d5 commit a72c96d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2188,7 +2188,7 @@ function turnitin_get_module_dates($module, $tii, &$timestart) {
21882188
if (!empty($timedue) && ($timedue > strtotime('+10 minutes')) && $timedue > $timestart) {
21892189
$tii['dtdue'] = rawurlencode(date($turnitindateformat, $timedue));
21902190
} else {
2191-
$dtdue = strtotime('+6 months');
2191+
$dtdue = strtotime('+6 months', $timestart); // Needs to be after the start date, which can be in the far future.
21922192
$tii['dtdue'] = rawurlencode(date($turnitindateformat, $dtdue));
21932193
}
21942194
return $tii;

0 commit comments

Comments
 (0)