Hello guys, I administered a quiz for over 1500 students in the past 2 days. When i noticed a few problems with enrolment i adjusted the external db and ran the auth and enrolment syncronisation.
I lost 511 student's grades as i had backed up the previous day. I searched the forum and found suggestions on what to do but nothin has worked.
This is a list of what i have tried so far
1. Enable recovergradesdefault, unenrol the students, synch again ----> didnt work for me
2. Add grade_recover_history_grades function to /enrol/database/lib.php -----> didnt work (gave me a call to undefined function error)
3. Checked the database tables mdl_grade_grades and mdl_grade_grades_history to see if i could write a query, used one i found on this forum as follows " SELECT
u.id AS userid,
u.username AS studentid,
gi.id AS itemid,
c.shortname AS courseshortname,
gi.itemname AS itemname,
gi.grademax AS itemgrademax,
gi.aggregationcoef AS itemaggregation,
g.finalgrade AS finalgrade
FROM mdl_user u
JOIN mdl_grade_grades_history g ON g.userid = u.id
JOIN mdl_grade_items gi ON g.itemid = gi.id
JOIN mdl_course c ON c.id = gi.courseid
WHERE gi.courseid = :courseid AND u.username = :username;"
it doesnt work for me too.
Could someone please help me pull out these scores? i need the scores badly. I checked mdl_grade_grades_history table, the missing grades are labelled "userdelete" in the source field
Moodle Version: 3.1.1+
Thanks