You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote an SQL query that works on all Moodle platforms I support, except one. The strange thing is, that out of 1800 users that are enrolled in a course, only 1200 show up in the report. There is a similar effect with all courses using this report. There is no obvious reason for that discrepancy.
Any idea what may be going on here? What factors could be at play here?
SELECTc.shortnameas"Kurs",
u.lastnameas"Nachname",
u.firstnameas"Vorname",
u.institutionas"Firma",
u.departmentas"Abteilung",
FROM_UNIXTIME(ue.timecreated) as"Eingeschrieben",
(
CASE
WHEN cmp.timecompleted IS NULL THEN 'ungueltig'
ELSE 'gueltig'
END
) as"Zertifikat",
FROM_UNIXTIME(cmp.timecompleted) as"Aktueller Abschluss",
(
SELECT
GROUP_CONCAT(FROM_UNIXTIME(cc_hist.timecompleted) SEPARATOR ', ')
FROM
prefix_local_recompletion_cc cc_hist
WHEREcc_hist.course=cmp.courseANDcc_hist.userid=cmp.userid
) as"Archivierte Abschluesse, Komma-sep."FROM
prefix_user u
LEFT JOIN prefix_user_enrolments ue ONu.id=ue.useridLEFT JOIN prefix_course_completions cmp ONcmp.userid=u.idLEFT JOIN prefix_course c ONc.id=cmp.courseWHEREcmp.course= %%COURSEID%%
ANDu.suspended=0GROUP BYu.id,
cmp.course
It's not the u.suspended = 0, this filters out only very few as intended.
The text was updated successfully, but these errors were encountered:
Any differences between the affected Moodle instance and the others (e.g. Database management system, etc.). Did you check the value of the admin setting block_configurable_reports | reportlimit?
I wrote an SQL query that works on all Moodle platforms I support, except one. The strange thing is, that out of 1800 users that are enrolled in a course, only 1200 show up in the report. There is a similar effect with all courses using this report. There is no obvious reason for that discrepancy.
Any idea what may be going on here? What factors could be at play here?
It's not the u.suspended = 0, this filters out only very few as intended.
The text was updated successfully, but these errors were encountered: