projects
/
moodle-mod_attendance.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fa3265
)
Expired enrolments can prevent student self-attendance
author
Neill Magill
<neill.magill@nottingham.ac.uk>
Mon, 9 Nov 2015 16:18:04 +0000
(16:18 +0000)
committer
Neill Magill
<neill.magill@nottingham.ac.uk>
Tue, 10 Nov 2015 14:15:20 +0000
(14:15 +0000)
...even when their is another enrolemnt that means they are still active on the course.
This fixes issue #178 and is similar to issue #81
locallib.php
patch
|
blob
|
history
diff --git
a/locallib.php
b/locallib.php
index
6b3b264
..
082c1ac
100644
(file)
--- a/
locallib.php
+++ b/
locallib.php
@@
-1071,7
+1071,7
@@
class attendance {
// CONTRIB-4868
$mintime = 'MIN(CASE WHEN (ue.timestart > :zerotime) THEN ue.timestart ELSE ue.timecreated END)';
- $maxtime = '
MAX(ue.timeend)
';
+ $maxtime = '
CASE WHEN MIN(ue.timeend) = 0 THEN 0 ELSE MAX(ue.timeend) END
';
$sql = "SELECT ue.userid, ue.status,
$mintime AS mintime,