--- loncom/interface/lonprintout.pm 2005/12/13 19:13:51 1.404
+++ loncom/interface/lonprintout.pm 2005/12/15 18:36:23 1.406
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.404 2005/12/13 19:13:51 albertel Exp $
+# $Id: lonprintout.pm,v 1.406 2005/12/15 18:36:23 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2172,16 +2172,16 @@ CHOOSE_STUDENTS
my %all_codes = &Apache::lonnet::get('CODEs',
\@names, $cdom,$cnum);
my %code_values;
- my @all_code_array;
- foreach my $key (keys %all_codes) {
+ my %codes_to_print;
+ foreach my $key (keys(%all_codes)) {
%code_values = &Apache::grades::get_codes($key, $cdom, $cnum);
- foreach my $key (keys %code_values) {
- push (@all_code_array, "$key");
+ foreach my $key (keys(%code_values)) {
+ $codes_to_print{$key} = 1;
}
}
my $code_selection = "\n";
- foreach my $code (sort {uc($a) cmp uc($b)} @all_code_array) {
+ foreach my $code (sort {uc($a) cmp uc($b)} (keys(%codes_to_print))) {
my $choice = $code;
if ($code =~ /^[A-Z]+$/) { # Alpha code
$choice = &letters_to_num($code);
@@ -2397,7 +2397,6 @@ CHOOSE_FROM_SUBDIR
return $urlValue;
return \$res->hasResource(\$res,sub { return !\$_[0]->is_sequence() },0,0);
-