[LON-CAPA-cvs] cvs: loncom /interface lonchart.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 28 Feb 2002 01:49:33 -0000
albertel Wed Feb 27 20:49:33 2002 EDT
Modified files:
/loncom/interface lonchart.pm
Log:
- '*' is a possible character in a student's record, so dont try to join and split on it.
Index: loncom/interface/lonchart.pm
diff -u loncom/interface/lonchart.pm:1.31 loncom/interface/lonchart.pm:1.32
--- loncom/interface/lonchart.pm:1.31 Tue Feb 19 15:22:00 2002
+++ loncom/interface/lonchart.pm Wed Feb 27 20:49:33 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: lonchart.pm,v 1.31 2002/02/19 20:22:00 minaeibi Exp $
+# $Id: lonchart.pm,v 1.32 2002/02/28 01:49:33 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -321,7 +321,7 @@
}
sub CacheChart {
- my @list = ();
+ my %list = ();
my $count=0;
my $Pos = $ENV{'form.sort'};
@@ -332,11 +332,11 @@
foreach my $key( keys %CachData) {
my @Temp=split(/\:/,$key);
my $Use = $Temp[$Pos];
- $list[$count]=$Use.$key.'*'.$CachData{$key};
+ $list{$Use.$key}=$key;
$count++;
}
- @list = sort (@list);
+ my @order = sort(keys(%list));
$r->print('<h3>'.$count.' students</h3>');
&CreateForm();
@@ -344,8 +344,7 @@
$r->print('<p><pre>');
for ( my $n; $n < $count; $n++) {
- my ($dummy, $Line) = split(/\*/,$list[$n]);
- $r->print($Line.'<br>');
+ $r->print($CachData{$list{$order[$n]}}.'<br>');
}
$r->print('</pre>');
}