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

raeburn raeburn at source.lon-capa.org
Fri Jan 5 14:10:30 EST 2024


raeburn		Fri Jan  5 19:10:30 2024 EDT

  Modified files:              
    /loncom/interface	lonquickgrades.pm 
  Log:
  - It's $env{'request.course.sec'} not %env{'request.user.section'} and
    apparently $uname and $udom are only set when user has mgr priv.
  
  
Index: loncom/interface/lonquickgrades.pm
diff -u loncom/interface/lonquickgrades.pm:1.126 loncom/interface/lonquickgrades.pm:1.127
--- loncom/interface/lonquickgrades.pm:1.126	Sun Sep 24 03:31:18 2023
+++ loncom/interface/lonquickgrades.pm	Fri Jan  5 19:10:30 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Quick Student Grades Display
 #
-# $Id: lonquickgrades.pm,v 1.126 2023/09/24 03:31:18 raeburn Exp $
+# $Id: lonquickgrades.pm,v 1.127 2024/01/05 19:10:30 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -278,10 +278,14 @@
                         $nostdtotals = 1;
                     } elsif ($hidetotals ne '') {
                         my $usec;
-                        if (($uname eq $env{'user.name'}) && ($env{'user.domain'})) {
-                            $usec = $env{'request.user.section'};
-                        } elsif ($cangrade) {
-                            $usec = &Apache::lonnet::getsection($udom,$uname,$env{'request.course.id'});
+                        if ($cangrade) {
+                            if (($uname eq $env{'user.name'}) && ($udom eq $env{'user.domain'})) {
+                                $usec = $env{'request.course.sec'};
+                            } else {
+                                $usec = &Apache::lonnet::getsection($udom,$uname,$env{'request.course.id'});
+                            }
+                        } else {
+                            $usec = $env{'request.course.sec'};
                         }
                         if ($usec ne '') {
                             my %secnototals;




More information about the LON-CAPA-cvs mailing list