Quantcast
Channel: DOCU - Foren
Viewing all articles
Browse latest Browse all 6614

ILIAS Developers: DB details for custom query

$
0
0
I guess it depends what you mean by summary, just end status?

Here's some useful tables for you


ut_lp_marks - Most objects with a learning progress have an entry in here.


obj_members - has course member data like their role / if they've passed or not. We base our reports on a combination of ut_lp_marks and obj_members. I'm not 100% sure how correct this is but it works for us.


rbac_ua - a user can be part of a course but not have any input in ut_lp_marks yet so you can tell if someones a member of a course in here.


sahs_user - This is specifically for scorm data information.


object_data - Where all object data is stored.

An example query for course learning progress could be something like



SELECT usr.usr_id,usr.login,usr.active, usr.email, course.title,  
#if there is no status set it to 0 (not attempted)
#usually 1 is in progress, 2 is passed, 3 is failed 0 is not attempted.
IFNULL(ut.status, 0) AS STATUS,
#if the user passed, get the origin_ts from obj_members as the completion date.
IF(ut.status =2, FROM_UNIXTIME(om.origin_ts),NULL) as completion_date
FROM rbac_ua rbac
INNER JOIN usr_data usr ON usr.usr_id = rbac.usr_id
INNER JOIN object_data role ON role.obj_id = rbac.rol_id
#there are better ways of doing this, but just an example
INNER JOIN object_reference course_ref ON course_ref.ref_id = TRIM(LEADING 'il_crs_member_' FROM role.title)
INNER JOIN object_data course ON course.obj_id = course_ref.obj_id
INNER JOIN obj_members om ON om.obj_id = course.obj_id AND om.usr_id = rbac.usr_id
LEFT JOIN  ut_lp_marks ut ON ut.obj_id = course.obj_id AND ut.usr_id = rbac.usr_id
WHERE course_ref.deleted IS NULL


 


Viewing all articles
Browse latest Browse all 6614

Trending Articles