I'm reaching out to see if anyone has a query that pulls grade book data from across multiple courses. Any help is greatly appreciated!
I have this one that looks for a specific column across multiple courses... you can comment out stuff.
from ATTEMPT A
INNER JOIN gradebook_grade gg ON a.gradebook_grade_pk1 = gg.pk1
INNER JOIN gradebook_main gm ON gg.gradebook_main_pk1 = gm.pk1
INNER JOIN course_users cu ON gg.course_users_pk1 = cu.pk1
INNER JOIN course_main cm on cu.crsmain_pk1 = cm.pk1
INNER JOIN users u ON cu.users_pk1 = u.pk1
INNER JOIN course_main cm on gm.CRSMAIN_PK1 = CM.PK1
INNER JOIN ATTEMPT a ON gg.LAST_ATTEMPT_PK1 = A.PK1
WHERE cm.COURSE_ID LIKE '1179-THEUA-WCOB-1111%'
AND gm.TITLE LIKE 'Business Brief%'
-- and U.USER_ID = 'USER_ID_HERE'
ORDER BY U.USER_ID, CM.COURSE_ID, GM.PK1, GM.TITLE
Thank you, Chris!
Glad to hear from you.
Note that the database may not always hold the most up to date grade for calculated items. Since those items are computed on the fly, you need to use API to ensure you always get the correct value.
Thanks for your feedback, Jeff!
Would you please direct me to some kind of resource in that regard?
General information about working with the REST API is here:Getting Started With REST
While not exactly what you are looking to do, there is a useful thread on getting grades via API here:
REST APIs for Student Grades & Assignments Due
Thank you, Jeff.
We're in the process of doing that via SQL!
Do you mind sharing the SQL query? I would appreciate the help.
Sure, the meat-and-potatoes of the query is
use bb_bb60 (or bblearn);
, gm.pk1 as gradebook_main_pk1
, isnull(gg.manual_score, attempt.score) as score
from course_main as cm
join gradebook_main as gm on gm.crsmain_pk1 = cm.pk1
join gradebook_grade as gg on gg.gradebook_main_pk1 = gm.pk1
join course_users cu on cu.pk1 = gg.course_users_pk1
join users on users.pk1 = cu.users_pk1
join attempt on attempt.pk1 = gg.highest_attempt_pk1
-- insert your conditions, e.g., which cm.course_id(s), which user(s)
We just tried the query - very helpful.
I cannot thank you enough.
Kindly, could you please tell me what's the name of the weighted total column field in the database, and how can I include it in the query?
Greatly appreciate your help!
Please note that you should use the API for calculated grades. The values in the DB may not be the latest calculation.
Retrieving data ...