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

sakharuk lon-capa-cvs@mail.lon-capa.org
Fri, 16 Jan 2004 18:36:26 -0000


sakharuk		Fri Jan 16 13:36:26 2004 EDT

  Modified files:              
    /loncom/interface	lonprintout.pm 
  Log:
  Bug 2585 (section number should be printed on exams) is fixed. Ready to change output format for Section information.
  
  
Index: loncom/interface/lonprintout.pm
diff -u loncom/interface/lonprintout.pm:1.270 loncom/interface/lonprintout.pm:1.271
--- loncom/interface/lonprintout.pm:1.270	Thu Jan 15 16:23:22 2004
+++ loncom/interface/lonprintout.pm	Fri Jan 16 13:36:25 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Printout
 #
-# $Id: lonprintout.pm,v 1.270 2004/01/15 21:23:22 sakharuk Exp $
+# $Id: lonprintout.pm,v 1.271 2004/01/16 18:36:25 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -963,8 +963,8 @@
 	 my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,'Print Status','Class Print Status',$#students+1);
 	 foreach my $person (@students) {
 	    my $current_output = ''; 
-#	    my ($usersection,$username,$userdomain) = split /:/,$person;
-	    my ($username,$userdomain) = split /:/,$person;
+	    my ($username,$userdomain,$usersection) = split /:/,$person;
+#	    my ($username,$userdomain) = split /:/,$person;
 	    my $fullname = &get_name($username,$userdomain);
 
 	    if ($parmhash{'anonymous_quiz'}=~/yes/) {$fullname=' ';} #put here something reasonable for anonymous exams or quiz
@@ -1011,6 +1011,7 @@
 	    }
 	    my $courseidinfo = &get_course();
 	    if (defined($courseidinfo)) { $courseidinfo=' - '.$courseidinfo }
+            if ($usersection ne '') {$courseidinfo.=' - Sec. '.$usersection}
 	    my $currentassignment=&Apache::lonxml::latex_special_symbols($helper->{VARS}->{'assignment'},'header');
 	    if ($current_output=~/\\documentclass/) {
 		$current_output =~ s/\\begin{document}/\\setlength{\\topmargin}{1cm} \\begin{document}\\noindent\\lhead{\\textit{\\textbf{$fullname}}$courseidinfo \\hfill \\thepage \\\\ \\textit{$currentassignment}}\\vskip 3 mm /;