[LON-CAPA-cvs] cvs: loncom /interface lonspreadsheet.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Thu, 21 Nov 2002 19:50:50 -0000
matthew Thu Nov 21 14:50:50 2002 EDT
Modified files:
/loncom/interface lonspreadsheet.pm
Log:
Fix - if the student did not have an name information specified the name
output as a link to their student sheet is $sname.'@'.$sdom. This prevents
empty links.
Index: loncom/interface/lonspreadsheet.pm
diff -u loncom/interface/lonspreadsheet.pm:1.147 loncom/interface/lonspreadsheet.pm:1.148
--- loncom/interface/lonspreadsheet.pm:1.147 Thu Nov 21 14:26:34 2002
+++ loncom/interface/lonspreadsheet.pm Thu Nov 21 14:50:49 2002
@@ -1,5 +1,5 @@
#
-# $Id: lonspreadsheet.pm,v 1.147 2002/11/21 19:26:34 matthew Exp $
+# $Id: lonspreadsheet.pm,v 1.148 2002/11/21 19:50:49 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2064,6 +2064,9 @@
'&mapid='.$mapid.'&resid='.$resid.'">'.$title.'</a>';
} elsif ($type eq 'student') {
my ($sname,$sdom,$fullname,$section,$id) = split(':',$labeldata);
+ if ($fullname =~ /^\s*$/) {
+ $fullname = $sname.'@'.$sdom;
+ }
$result ='<a href="/adm/studentcalc?uname='.$sname.
'&udom='.$sdom.'">';
$result.=$section.' '.$id." ".$fullname.'</a>';