[LON-CAPA-cvs] cvs: loncom /interface lonsimplepage.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Mon, 11 Dec 2006 03:49:12 -0000


raeburn		Sun Dec 10 22:49:12 2006 EDT

  Modified files:              
    /loncom/interface	lonsimplepage.pm 
  Log:
  Group homepages not displayed in a course with active block conditions, if 'groups' condirion included, unless user has 'evb' privilege in the course.
  
  
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.48 loncom/interface/lonsimplepage.pm:1.49
--- loncom/interface/lonsimplepage.pm:1.48	Mon Oct 23 14:48:47 2006
+++ loncom/interface/lonsimplepage.pm	Sun Dec 10 22:49:12 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Page Editor
 #
-# $Id: lonsimplepage.pm,v 1.48 2006/10/23 18:48:47 albertel Exp $
+# $Id: lonsimplepage.pm,v 1.49 2006/12/11 03:49:12 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -150,8 +150,13 @@
                 $r->print(&grouppage_breadcrumbs($dom,$crs,$group,$group_desc));
             }
             if ((!$group_home_edit) && (!$group_home_view) && 
-                (!$group_view_perm) && (!$group_edit_perm)) {  
+                (!$group_view_perm) && (!$group_edit_perm)) {
                 &display_group_links($r,$target,$group,'view',$refarg,%groupinfo);
+                if ($env{'form.grade_target'} ne 'tex') {
+                    $r->print(&Apache::loncommon::end_page());
+                } else {
+                    $r->print('\end{document}');
+                }
                 return OK;
             }
         } else {
@@ -165,6 +170,13 @@
             }
 	    return OK;
         }
+        my ($blocked,$blocktext) = 
+             &Apache::loncommon::blocking_status('groups');
+        if ($blocked) {
+            $r->print($blocktext);
+            $r->print(&Apache::loncommon::end_page());
+            return OK;
+        }
     }
 
     my $allowed;