Browse Source

Expired enrolments can prevent student self-attendance

...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
MOODLE_28_STABLE
Neill Magill 9 years ago
parent
commit
af5a743a2b
  1. 2
      locallib.php

2
locallib.php

@ -1166,7 +1166,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,

Loading…
Cancel
Save