[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /lonnet/perl lonnet.pm

raeburn raeburn at source.lon-capa.org
Mon Dec 31 09:59:55 EST 2012


raeburn		Mon Dec 31 14:59:55 2012 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - For 2.11
    - Backport 1.1208
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1172.2.14 loncom/lonnet/perl/lonnet.pm:1.1172.2.15
--- loncom/lonnet/perl/lonnet.pm:1.1172.2.14	Fri Dec 21 17:01:04 2012
+++ loncom/lonnet/perl/lonnet.pm	Mon Dec 31 14:59:54 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.1172.2.14 2012/12/21 17:01:04 raeburn Exp $
+# $Id: lonnet.pm,v 1.1172.2.15 2012/12/31 14:59:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2708,10 +2708,14 @@
                 return;
             }
         } else {
+            if ($resurl =~ m{^/?adm/viewclasslist$}) {
+                unless (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) {
+                    return;
+                }
+            } elsif (!$crsedit) {
 #
 # No edit allowed where CC has switched to student role.
 #
-            unless ($crsedit) {
                 return;
             }
         }
@@ -2758,6 +2762,14 @@
                         $forceedit = 1;
                     }
                     $cfile = $resurl;
+                } elsif ($resurl =~ m{^/?adm/viewclasslist$}) {
+                    $incourse = 1;
+                    if ($env{'form.forceedit'}) {
+                        $forceview = 1;
+                    } else {
+                        $forceedit = 1;
+                    }
+                    $cfile = ($resurl =~ m{^/} ? $resurl : "/$resurl");
                 }
             } elsif ($resurl eq '/res/lib/templates/simpleproblem.problem/smpedit') {
                 my $template = '/res/lib/templates/simpleproblem.problem';




More information about the LON-CAPA-cvs mailing list