[LON-CAPA-cvs] cvs: loncom /interface printout.pl

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 16 Feb 2004 22:32:59 -0000


albertel		Mon Feb 16 17:32:59 2004 EDT

  Modified files:              
    /loncom/interface	printout.pl 
  Log:
  - if the uses doesn't have a name, use the login name 
  
  
Index: loncom/interface/printout.pl
diff -u loncom/interface/printout.pl:1.47 loncom/interface/printout.pl:1.48
--- loncom/interface/printout.pl:1.47	Fri Feb 13 16:17:50 2004
+++ loncom/interface/printout.pl	Mon Feb 16 17:32:59 2004
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 # CGI-script to run LaTeX, dvips, ps2ps, ps2pdf etc.
 #
-# $Id: printout.pl,v 1.47 2004/02/13 21:17:50 sakharuk Exp $
+# $Id: printout.pl,v 1.48 2004/02/16 22:32:59 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -145,12 +145,23 @@
       $ind++;
       my @stud_info=split(/_END_/,$names_pack[$ind]);
       my @tempo_array=split(/:/,$stud_info[0]);
-      $final_statement='Link to PDF document for <b>'.$tempo_array[3].'</b> ';
-      $status_statement.=$tempo_array[3];
+      my $name;
+      if ($tempo_array[3]) {
+	  $name=$tempo_array[3];
+      } else {
+	  $name=$tempo_array[0].'@'.$tempo_array[1];
+      }
+      $final_statement='Link to PDF document for <b>'.$name.'</b> ';
+      $status_statement.=$name;
       if ($#stud_info>0) {
 	  @tempo_array=split(/:/,$stud_info[-1]);
-	  $final_statement.='- <b>'.$tempo_array[3].':</b>  ';
-	  $status_statement.=' -  '.$tempo_array[3];
+	  if ($tempo_array[3]) {
+	      $name=$tempo_array[3];
+	  } else {
+	      $name=$tempo_array[0].'@'.$tempo_array[1];
+	  }
+	  $final_statement.='- <b>'.$name.':</b>  ';
+	  $status_statement.=' -  '.$name;
       } 
   }
 &Apache::lonhtmlcommon::Update_PrgWin('',\%prog_state,'last PDF file '.$status_statement);