MDL-10888: groupings - make 'jump to...' menu respect groupmembersonly flag
authormattc-catalyst <mattc-catalyst>
Tue, 21 Aug 2007 03:18:19 +0000 (03:18 +0000)
committermattc-catalyst <mattc-catalyst>
Tue, 21 Aug 2007 03:18:19 +0000 (03:18 +0000)
lib/weblib.php

index 70cb08a8039dae8a4f02ea18698466450be8da59..824e9ea5509f1692bb3a26ca49a28cf75c56970a 100644 (file)
@@ -4673,6 +4673,10 @@ function navmenu($course, $cm=NULL, $targetwindow='self') {
         if ($mod->section > $course->numsections) {   /// Don't show excess hidden sections
             break;
         }
+        $mod->id = $mod->cm;
+        if (!groups_course_module_visible($mod)) {
+            continue;
+        }
 
         if ($mod->section > 0 and $section <> $mod->section) {
             $thissection = $sections[$mod->section];