i was recently trying to fetch list of courses for a user.
and found that query users context table.
also query has contextlevel=50
here is the query.
"SELECT c.id, c.category, c.sortorder, c.shortname, c.fullname, c.idnumber, c.teacher, c.teachers, c.student, c.students, c.guest, c.startdate, c.visible, c.newsitems, c.cost, c.enrol, c.groupmode, c.groupmodeforce, ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, cc.path AS categorypath
FROM mdl_course c
JOIN mdl_course_categories cc ON c.category = cc.id
JOIN mdl_context ctx ON ( c.id = ctx.instanceid
AND ctx.contextlevel =50 )
WHERE c.id
IN ( 6, 8, 5 )
LIMIT 0 , 30"
i am just interested to know what is this context thing.
if anybody has any little knowledge about context to help me?
Thanx
_hardik
FROM mdl_course c
JOIN mdl_course_categories cc ON c.category = cc.id
JOIN mdl_context ctx ON ( c.id = ctx.instanceid
AND ctx.contextlevel =50 )
WHERE c.id
IN ( 6, 8, 5 )
LIMIT 0 , 30"
i am just interested to know what is this context thing.
if anybody has any little knowledge about context to help me?

Thanx
_hardik