[LON-CAPA-cvs] cvs: loncom(version_0_5_1) /interface lonspreadsheet.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Tue, 10 Sep 2002 21:11:23 -0000
matthew Tue Sep 10 17:11:23 2002 EDT
Modified files: (Branch: version_0_5_1)
/loncom/interface lonspreadsheet.pm
Log:
Backport of changes to deal with sections eq '-1' not indicating a lack of
enrollment but instead indicating a lack of a section number.
Index: loncom/interface/lonspreadsheet.pm
diff -u loncom/interface/lonspreadsheet.pm:1.100.2.1 loncom/interface/lonspreadsheet.pm:1.100.2.2
--- loncom/interface/lonspreadsheet.pm:1.100.2.1 Mon Sep 9 14:28:02 2002
+++ loncom/interface/lonspreadsheet.pm Tue Sep 10 17:11:23 2002
@@ -1,5 +1,5 @@
#
-# $Id: lonspreadsheet.pm,v 1.100.2.1 2002/09/09 18:28:02 albertel Exp $
+# $Id: lonspreadsheet.pm,v 1.100.2.2 2002/09/10 21:11:23 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1667,15 +1667,15 @@
$name=&Apache::lonnet::unescape($name);
my ($sname,$sdom)=split(/\:/,$name);
my $ssec=&Apache::lonnet::usection($sdom,$sname,$cid);
- if ($ssec==-1) {
- unless ($ENV{'form.showcsv'}) {
- $rowlabel='<font color=red>Data not available: '.$name.
- '</font>';
- } else {
- $rowlabel='ERROR","'.$name.
- '","Data not available","","","';
- }
- } else {
+# if ($ssec==-1) {
+# unless ($ENV{'form.showcsv'}) {
+# $rowlabel='<font color=red>Data not available: '.$name.
+# '</font>';
+# } else {
+# $rowlabel='ERROR","'.$name.
+# '","Data not available","","","';
+# }
+# } else {
my %reply=&Apache::lonnet::idrget($sdom,$sname);
my $reply=&Apache::lonnet::reply('get:'.$sdom.':'.$sname.
':environment:firstname&middlename&lastname&generation',
@@ -1698,7 +1698,7 @@
unless ($ncount==4) { $rowlabel.=',""'; }
$rowlabel=~s/\"$//;
}
- }
+# }
$currentlist{&Apache::lonnet::unescape($name)}=$rowlabel;
}
} # end of foreach (split(/\&/,$classlst))
@@ -2587,12 +2587,12 @@
unless (&gettype($asheet) eq 'classcalc') {
$r->print('<p><b>User:</b> '.&getuname($asheet).
'<br><b>Domain:</b> '.&getudom($asheet));
- if (&getcsec($asheet) eq '-1') {
- $r->print('<h3><font color=red>'.
- 'Not a student in this course</font></h3>');
- } else {
+# if (&getcsec($asheet) eq '-1') {
+# $r->print('<h3><font color=red>'.
+# 'Not a student in this course</font></h3>');
+# } else {
$r->print('<br><b>Section/Group:</b> '.&getcsec($asheet));
- }
+# }
if ($ENV{'form.usymb'}) {
$r->print('<br><b>Assessment:</b> <tt>'.$ENV{'form.usymb'}.'</tt>');
}