Can not see attendance

Can not see attendance

by Kert Männik -
Number of replies: 1
Hello!


I have set up Moodle on my laptop and I am using Python script to add temp users' attendances. I am adding temp users profiles and their attendances by modifying the database.

I know that the logic is that you first have to add 'normal user' to table moodle.mdl_user and then temp user to moodle.mdl_attendance_tempusers then add attendance to moodle.mdl_attendace_log.

My problem is that I do not see those manually added attendances when I open the session page in my browser.


The SQL queries:

1)

"INSERT INTO moodle.mdl_user(auth, confirmed, deleted, email, username, idnumber, mnethostid, lastname) " \
"VALUES('manual', 1, 1, %s, %s, 'tempghost', 1, %s);"
2)
"INSERT INTO moodle.mdl_attendance_tempusers(fullname, courseid, email, created, studentid) " \
"VALUES(%s, %s, %s, %s, %s);"
3)
"INSERT INTO moodle.mdl_attendance_log(sessionid, studentid, statusid, timetaken, takenby) " \
"VALUES(%s, %s, %s, UNIX_TIMESTAMP(), %s);"

Average of ratings: -
In reply to Kert Männik

Re: Can not see attendance

by Kert Männik -

I figured it out: To see that there are some lecture enrolments, I also had to change the sessions' table column lasttaken. That way the plugin's front-end changed and actually showed that there are some logs about this session.