Designing a techer course attendance report

Designing a techer course attendance report

by Samuel Mora -
Number of replies: 0

Greetings estimated developers, I am a recently contracted developer intern at an Venezuelan University and they are giving online courses using the moodle ver.3.3


Years back, they developed a web application that gave a teacher attendance list in a selected week, so they would know if a teacher gave or not a class, yes, once in a while a teacher will be absent and the administrative personal needs to account it, 


that application used the moodle 2.5, the moodle was updated drastically last year, and now the reports are being generated in blank, I was given the task to resolve the problem and tracing back I found out, it was that the mdl_log change to be mdl_logstore_standard_log


The query used in the application takes the first and last log in a course and use it as a way to know if the teacher was active at classes.

Given this information, I changed the query of the app from:

Select us.idnumber, course.idnumber, FROM_UNIXTIME(log.time)
From mdl_log_log log, mdl_course course, mdl_user us
WHERE FROM_UNIXTIME(log.time)>= ' InitialDate.ToString("yyyy-MM-dd HH:mm") '
AND FROM_UNIXTIME(log.time) <= ' FinalDate.AddHours(23).ToString("yyyy-MM-dd HH:mm") '
AND us.id=log.userid
AND course.id=log.course
AND course.idnumber != " "
ORDER BY 1,2,3;

--to:

Select us.idnumber, course.idnumber, FROM_UNIXTIME(log.timecreated)
From mdl_logstore_standard_log log, mdl_course course, mdl_user us
WHERE FROM_UNIXTIME(log.timecreated)>= ' InitialDate.ToString("yyyy-MM-dd HH:mm") '
AND FROM_UNIXTIME(log.timecreated) <= ' FinalDate.AddHours(23).ToString("yyyy-MM-dd HH:mm") '
AND us.id=log.userid
AND course.id=log.course
AND course.idnumber != " "
AND us.idnumber != ''
ORDER BY 1,2,3;

I changed the table and of course the time field, because this table have different field names, but it turns out that timecreated wont be the best to take account of the first and last time there was an activity log, and I am uncertain on how to proceed, I have to find a way to know the first and last time a teacher made an action during a course so the administrative personal can proceed.

all your advice will be appreciate.

Average of ratings: -