]> git.mjollnir.org Git - moodle.git/commit
datalib: get_my_courses() - add course visibility checks
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:18:54 +0000 (07:18 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:18:54 +0000 (07:18 +0000)
commit82c62d1b17a01303cae55c9ecd9ac252af95573f
treec950c5e3d66794c7d3b9e85d1b0ba5d7dbc3b3ce
parent956b2f102e21f1cd061a37d94c97ec7efe657921
datalib: get_my_courses() - add course visibility checks

Reworked gmc to perform the course visibility checks. These are
very cheap if $CFG->allowvisiblecoursesinhiddencategories is true.

However, where we have to enforce category visibility, it adds a bit
of work. In simple terms, it adds a DB query to read all the categories,
and extra checks to make sure we are doing the right thing WRT

 - course visibility   vs the permission to see hidden courses
 - category visibility vs the permission to see hidden categories

and still do it quickly.
lib/datalib.php