Index: lib/accesslib.php =================================================================== RCS file: /cvsroot/moodle/moodle/lib/accesslib.php,v retrieving revision 1.524 diff -u -r1.524 accesslib.php --- lib/accesslib.php 20 Oct 2008 13:47:08 -0000 1.524 +++ lib/accesslib.php 22 Oct 2008 07:59:13 -0000 @@ -1332,6 +1332,11 @@ $rs->close(); } + // MDL-16963 in the COURSE case, role-assigments were being duplicated. + if (isset($accessdata['ra'][$ra->path])) { + $accessdata['ra'][$context->path] = array_unique($accessdata['ra'][$context->path]); + } + // // Walk up and down the tree to grab all the roledefs // of interest to our user...