mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
use user_lastaccess table to find inactive time instead of user_students table
This commit is contained in:
parent
94fb6d1d62
commit
cbf0446d8a
@ -209,9 +209,9 @@
|
||||
|
||||
if (!empty($isteacher)) {
|
||||
// get minimum lastaccess for this course and display a dropbox to filter by lastaccess going back this far.
|
||||
$minlastaccess = get_field_sql('SELECT min(timeaccess) FROM '.$CFG->prefix.'user_students WHERE course = '.$course->id.' AND timeaccess != 0');
|
||||
$minlastaccess = get_field_sql('SELECT min(timeaccess) FROM '.$CFG->prefix.'user_lastaccess WHERE courseid = '.$course->id.' AND timeaccess != 0');
|
||||
|
||||
$lastaccess0exists = record_exists('user_students','course',$course->id,'timeaccess',0);
|
||||
$lastaccess0exists = record_exists('user_lastaccess','courseid',$course->id,'timeaccess',0);
|
||||
$now = usergetmidnight(time());
|
||||
$timeaccess = array();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user