--- loncom/interface/lonprintout.pm 2005/08/22 22:21:48 1.388
+++ loncom/interface/lonprintout.pm 2005/09/01 18:35:15 1.390
@@ -1,7 +1,7 @@
-# The LearningOnline Network
+# The LearningOnline Network
# Printout
#
-# $Id: lonprintout.pm,v 1.388 2005/08/22 22:21:48 foxr Exp $
+# $Id: lonprintout.pm,v 1.390 2005/09/01 18:35:15 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -508,6 +508,7 @@ sub character_chart {
$result =~ s/&(prod|\#8719);/\\ensuremath\{\\prod\}/g;
$result =~ s/&(sum|\#8721);/\\ensuremath\{\\sum\}/g;
$result =~ s/&(minus|\#8722);/\\ensuremath\{-\}/g;
+ $result =~ s/–/\\ensuremath\{-\}/g;
$result =~ s/&(lowast|\#8727);/\\ensuremath\{*\}/g;
$result =~ s/&(radic|\#8730);/\\ensuremath\{\\surd\}/g;
$result =~ s/&(prop|\#8733);/\\ensuremath\{\\propto\}/g;
@@ -1386,11 +1387,8 @@ ENDPART
$code_type=$result{"type\0$old_name"};
@allcodes=split(',',$result{$old_name});
$num_todo=scalar(@allcodes);
- } elsif ($selected_code) {
+ } elsif ($selected_code) { # Selection value is always numeric.
$num_todo = 1;
- my ($alpha, $numeric) = split(/:/, $selected_code);
- $selected_code = $numeric; # Always use numeric, converted if need be.
- $selected_code =~ s/\s+//g;
@allcodes = ($selected_code);
} elsif ($single_code) {
@@ -2096,20 +2094,26 @@ CHOOSE_STUDENTS
if ($name =~ /^type\0/) { next; }
$namechoice.=''.$name.'';
}
+
+
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 = $all_codes{$key};
- my @numeric_codes = split(/,/,$codes);
- foreach my $numeric (sort {uc($a) cmp uc($b)} @numeric_codes) {
- my $alpha_code = &num_to_letters($numeric);
- push (@all_code_array, "$alpha_code : $numeric");
+ %code_values = &Apache::grades::get_codes($key, $cdom, $cnum);
+ foreach my $key (keys %code_values) {
+ push (@all_code_array, "$key");
}
}
+
my $code_selection = "\n";
- foreach my $code (@all_code_array) {
- $code_selection .= ' '.$code."\n";
+ foreach my $code (sort {uc($a) cmp uc($b)} @all_code_array) {
+ my $choice = $code;
+ if ($code =~ /^[A-Z]+$/) { # Alpha code
+ $choice = &letters_to_num($code);
+ }
+ $code_selection .= ' '.$code."\n";
}
open(FH,$Apache::lonnet::perlvar{'lonTabDir'}.'/scantronformat.tab');
my $codechoice='';