--- loncom/interface/Attic/lonchart.pm 2002/07/02 22:06:53 1.53
+++ loncom/interface/Attic/lonchart.pm 2002/07/03 14:11:14 1.54
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: lonchart.pm,v 1.53 2002/07/02 22:06:53 stredwic Exp $
+# $Id: lonchart.pm,v 1.54 2002/07/03 14:11:14 stredwic Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -258,7 +258,7 @@ sub CreateTableHeadings {
$Str .= '';
}
- $Str .= '
Total Solved/Total Problems | ';
+ $Str .= 'Total Solved/Total Problems | ';
$Str .= '';
return $Str;
@@ -307,16 +307,19 @@ sub CreateColumnSelectors {
my $found=0;
my ($name, $length, $position);
- my $present='';
- $present .= '';
+
+ my $present='Note: Uncheck the boxes above a column to ';
+ $present .= 'remove that column from the display.
'."\n";
+
+ $present .= '';
+ $present .= '';
for(my $index=0; $index<(scalar @$headings); $index++) {
if(!&ShouldShowColumn($CacheData, 'heading'.$index)) {
next;
}
- $present .= '';
- $name = $headings->[$index];
+ $present .= ' | ';
$present .= '';
+ $present .= 'name="heading'.$index.'" />';
$present .= ' | ';
$found++;
}
@@ -325,21 +328,18 @@ sub CreateColumnSelectors {
if(!&ShouldShowColumn($CacheData, 'sequence'.$sequence)) {
next;
}
- $present .= '';
- $name = $CacheData->{$sequence.':title'};
+ $present .= ' | ';
$present .= '';
+ $present .= 'name="sequence'.$sequence.'" />';
$present .= ' | ';
$found++;
}
- if($found) {
- $present = $present;
- } else {
- $present = ' | ';
+ if(!$found) {
+ $present = '';
}
- return $present.'
'."\n";;
+ return $present.' | '."\n";;
}
sub CreateForm {
@@ -407,7 +407,6 @@ sub StartDocument {
$Str .= '';
$Str .= '';
$Str .= 'Assessment Chart
';
- $Str .= ''.localtime().'
';
$Str .= ''.$ENV{'course.'.$ENV{'request.course.id'}.'.description'};
$Str .= '
';
@@ -769,6 +768,8 @@ sub ProcessClassList {
$name,$courseID,$c);
}
+ # Time of download
+ $CacheData{'time'}=localtime();
untie(%CacheData);
}
@@ -1104,6 +1105,10 @@ sub BuildChart {
# Sort students and print out table desciptive data
if(tie(%CacheData,'GDBM_File',$ChartDB,&GDBM_READER,0640)) {
if(!$c->aborted()) { @students=&SortStudents(\@students,\%CacheData); }
+ my $downloadTime=0;
+ if(defined($CacheData{'time'})) { $downloadTime=$CacheData{'time'}; }
+ else { $downloadTime=localtime(); }
+ if(!$c->aborted()) { $r->print(''.$downloadTime.'
'); }
if(!$c->aborted()) { $r->print(''.(scalar @students).
' students
'); }
if(!$c->aborted()) { $r->rflush(); }