[LON-CAPA-cvs] cvs: rat / lonpage.pm

raeburn raeburn at source.lon-capa.org
Mon Feb 17 11:12:35 EST 2020


raeburn		Mon Feb 17 16:12:35 2020 EDT

  Modified files:              
    /rat	lonpage.pm 
  Log:
  - "View source" icon/link for published assessment items in a .page in a
    course, where user does not have editing privileges, but does have vxc
    priv in course, and system-level bre priv, and item published source open.
  
  
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.129 rat/lonpage.pm:1.130
--- rat/lonpage.pm:1.129	Sat Jan 18 01:09:11 2020
+++ rat/lonpage.pm	Mon Feb 17 16:12:35 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Page Handler
 #
-# $Id: lonpage.pm,v 1.129 2020/01/18 01:09:11 raeburn Exp $
+# $Id: lonpage.pm,v 1.130 2020/02/17 16:12:35 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -991,6 +991,9 @@
                     if (($env{'request.course.adhocsrcaccess'} ne '') &&
                         (grep(/^\Q$auname\E$/,split(/,/,$env{'request.course.adhocsrcaccess'})))) {
                         $viewsrcbutton = 1;
+                    } elsif ((&Apache::lonnet::metadata($url,'sourceavail') eq 'open') &&
+                             (&Apache::lonnet::allowed('bre','/'))) {
+                        $viewsrcbutton = 1;
                     }
                 }
             }




More information about the LON-CAPA-cvs mailing list