[LON-CAPA-cvs] cvs: loncom /interface lonstatistics.pm /interface/statistics lonstudentassessment.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Fri, 25 Feb 2005 19:48:02 -0000
matthew Fri Feb 25 14:48:02 2005 EDT
Modified files:
/loncom/interface lonstatistics.pm
/loncom/interface/statistics lonstudentassessment.pm
Log:
lonstatistics:Changed name of sequences_with_assessments to
selected_sequences_with_assessments AND fixed bug where it returned all the
sequences with assessments instead of just those selected by the user.
lonstudentassessment: Now call selected_sequences_with_assessments
Index: loncom/interface/lonstatistics.pm
diff -u loncom/interface/lonstatistics.pm:1.115 loncom/interface/lonstatistics.pm:1.116
--- loncom/interface/lonstatistics.pm:1.115 Thu Feb 24 21:37:49 2005
+++ loncom/interface/lonstatistics.pm Fri Feb 25 14:48:00 2005
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstatistics.pm,v 1.115 2005/02/25 02:37:49 matthew Exp $
+# $Id: lonstatistics.pm,v 1.116 2005/02/25 19:48:00 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -509,7 +509,7 @@
=pod
-=item &sequences_with_assessments
+=item &selected_sequences_with_assessments
Retrieve the sequences which were selected by the user to show.
@@ -523,7 +523,7 @@
#######################################################
#######################################################
-sub sequences_with_assessments {
+sub selected_sequences_with_assessments {
my ($mode) = @_;
$mode = 'selected' if (! defined($mode));
my $navmap = Apache::lonnavmaps::navmap->new();
@@ -545,7 +545,7 @@
if ($mode eq 'all') {
push (@sequences_to_show,$sequence);
} elsif ($mode eq 'selected') {
- foreach my $map_symb (&get_selected_maps()) {
+ foreach my $map_symb (&get_selected_maps('Maps')) {
if ($sequence->symb eq $map_symb || $map_symb eq 'all'){
push (@sequences_to_show,$sequence);
last; # Only put it in once
@@ -618,7 +618,7 @@
$form .= ">all</option>\n";
#
# Loop through the sequences
- my @sequences = &sequences_with_assessments();
+ my @sequences = &selected_sequences_with_assessments();
my $navmap;
if (!ref($sequences[0])) {
return $sequences[0];
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.113 loncom/interface/statistics/lonstudentassessment.pm:1.114
--- loncom/interface/statistics/lonstudentassessment.pm:1.113 Fri Feb 25 14:17:44 2005
+++ loncom/interface/statistics/lonstudentassessment.pm Fri Feb 25 14:48:01 2005
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentassessment.pm,v 1.113 2005/02/25 19:17:44 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.114 2005/02/25 19:48:01 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -643,7 +643,7 @@
# Compute the column widths and output the sequence titles
my $total_count;
($navmap,@sequences) =
- &Apache::lonstatistics::sequences_with_assessments();
+ &Apache::lonstatistics::selected_sequences_with_assessments();
if (! ref($navmap)) {
# Unable to get data, so bail out
$r->print("<h3>".