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

raeburn raeburn at source.lon-capa.org
Mon Feb 17 18:32:04 EST 2020


raeburn		Mon Feb 17 23:32:04 2020 EDT

  Modified files:              
    /rat	lonpage.pm 
  Log:
  - "View submissions", "Content Settings" and "Content Grades" icons in 
    resource menu(s) in composite page for sectioned roles with privs.
  - "View submissions" and "Content Settings" icons in resource menu(s) in
     composite page for vgr and vpa privs (e.g., helpdesk "custom roles).
  
  
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.131 rat/lonpage.pm:1.132
--- rat/lonpage.pm:1.131	Mon Feb 17 23:04:24 2020
+++ rat/lonpage.pm	Mon Feb 17 23:32:03 2020
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Page Handler
 #
-# $Id: lonpage.pm,v 1.131 2020/02/17 23:04:24 raeburn Exp $
+# $Id: lonpage.pm,v 1.132 2020/02/17 23:32:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -901,7 +901,6 @@
     my $crs_sec = $env{'request.course.id'} . (($env{'request.course.sec'} ne '')
                                                ? "/$env{'request.course.sec'}"
                                                : '');
-
     if ($hash->{'encrypted_'.$rid}) {
 	$symb=&Apache::lonenc::encrypted($symb);
 	$esrc=&Apache::lonenc::encrypted($esrc);
@@ -931,7 +930,8 @@
     if (($hash->{'src_'.$rid}=~/$LONCAPA::assess_re/) &&
 	($hash->{'src_'.$rid} !~ m-^/uploaded/-)) {
 
-	if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'})) {
+	if ((&Apache::lonnet::allowed('mgr',$crs_sec)) ||
+            (&Apache::lonnet::allowed('vgr',$crs_sec))) {
 	    $metainfo.=
 		'<a href="/adm/grades?symb='.&escape($symb).
 #               '&command=submission" target="LONcatInfo">'.
@@ -939,7 +939,10 @@
                 '<img src="/adm/lonMisc/subm_button.png" class="LC_icon"'.
                 ' alt="'.&mt('View Submissions for a Student or a Group of Students').'"'.
                 ' title="'.&mt('View Submissions for a Student or a Group of Students').'" />'.
-		'</a>'.
+		'</a>';
+        }
+        if (&Apache::lonnet::allowed('mgr',$crs_sec)) {
+            $metainfo.=
 		'<a href="/adm/grades?symb='.&escape($symb).
 #               '&command=gradingmenu" target="LONcatInfo">'.
 		'&command=gradingmenu">'.
@@ -948,7 +951,8 @@
                 ' title="'.&mt('Content Grades').'" />'.
 		'</a>';
 	}
-	if (&Apache::lonnet::allowed('opa',$env{'request.course.id'})) {
+	if ((&Apache::lonnet::allowed('opa',$crs_sec)) ||
+            (&Apache::lonnet::allowed('vpa',$crs_sec))) {
 	    $metainfo.=
 		'<a href="/adm/parmset?symb='.&escape($symb).
 #               '" target="LONcatInfo">'.




More information about the LON-CAPA-cvs mailing list