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

raeburn raeburn at source.lon-capa.org
Fri May 30 09:48:40 EDT 2014


raeburn		Fri May 30 13:48:40 2014 EDT

  Modified files:              
    /loncom/interface	lonnavmaps.pm 
  Log:
  - When a user with pav or vgr privs prints his/her own exam, parameter in 
    map for hiddenresource will be ignored when retrieving resources for 
    folder.
    - Supports use case where CC sets hidden for exam folder while printing
      bubblesheet exam, and wants a copy for himself/herself.
  - Fix some typos in comments.
  
  
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.500 loncom/interface/lonnavmaps.pm:1.501
--- loncom/interface/lonnavmaps.pm:1.500	Mon Jan 20 01:39:33 2014
+++ loncom/interface/lonnavmaps.pm	Fri May 30 13:48:39 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Navigate Maps Handler
 #
-# $Id: lonnavmaps.pm,v 1.500 2014/01/20 01:39:33 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.501 2014/05/30 13:48:39 raeburn Exp $
 
 #
 # Copyright Michigan State University Board of Trustees
@@ -2015,7 +2015,7 @@
     my $proto = shift;
     my $class = ref($proto) || $proto;
     my $self = {};
-    bless($self);		# So we can call change_user if neceesary
+    bless($self);		# So we can call change_user if necessary
 
     $self->{USERNAME} = shift || $env{'user.name'};
     $self->{DOMAIN}   = shift || $env{'user.domain'};
@@ -2034,10 +2034,14 @@
 
     # We can only tie the nav hash as done below if the username/domain
     # match the env one. Otherwise change_user does everything we need...since we can't
-    # assume there are course hashes for the specific requested user at domamin:
+    # assume there are course hashes for the specific requested user:domain
+    # Note: change_user is also called if we need the nav hash when printing CODEd 
+    # assignments or printing an exam, in which the enclosing folder for the items in
+    # the exam has hidden set.
     #
 
-    if (($self->{USERNAME} eq $env{'user.name'}) && ($self->{DOMAIN} eq $env{'user.domain'}) && !$self->{CODE}) {
+    if (($self->{USERNAME} eq $env{'user.name'}) && ($self->{DOMAIN} eq $env{'user.domain'}) &&
+         !$self->{CODE} && !$self->{NOHIDE}) {
 	
 	# tie the nav hash
 	




More information about the LON-CAPA-cvs mailing list