--- loncom/homework/grades.pm 2006/07/02 01:03:04 1.369
+++ loncom/homework/grades.pm 2006/08/31 20:52:48 1.373
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.369 2006/07/02 01:03:04 banghart Exp $
+# $Id: grades.pm,v 1.373 2006/08/31 20:52:48 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2466,7 +2466,7 @@ sub handback_files {
} else {
# mark the file as read only
my @files = ($save_file_name);
- my @what = ($symb,'handback');
+ my @what = ($symb,$env{'request.course.id'},'handback');
&Apache::lonnet::mark_as_readonly($domain,$stuname,\@files,\@what);
if (exists($$newrecord{"resource.$new_part.$resp_id.handback"})) {
$$newrecord{"resource.$new_part.$resp_id.handback"}.=',';
@@ -3442,9 +3442,10 @@ sub upcsvScores_form {
$result.=$table;
$result.='
'."\n";
$result.=''."\n";
+ $result.=&Apache::loncommon::help_open_topic("Course_Convert_To_CSV",
+ &mt("How do I create a CSV file from a spreadsheet"))
+ .' |
'."\n";
$result.='
'."\n";
$result.=&show_grading_menu_form($symb);
return $result;
@@ -4605,7 +4608,8 @@ sub scantron_parse_scanline {
substr($questions,0,$$scantron_config{'Qlength'})='';
if (length($currentquest) < $$scantron_config{'Qlength'}) { next; }
if ($$scantron_config{'Qon'} eq 'letter') {
- if ($currentquest eq '?') {
+ if ($currentquest eq '?'
+ || $currentquest eq '*') {
push(@{$record{'scantron.doubleerror'}},$questnum);
$record{"scantron.$questnum.answer"}='';
} elsif (!$currentquest
@@ -4619,7 +4623,8 @@ sub scantron_parse_scanline {
$record{"scantron.$questnum.answer"}=$currentquest;
}
} elsif ($$scantron_config{'Qon'} eq 'number') {
- if ($currentquest eq '?') {
+ if ($currentquest eq '?'
+ || $currentquest eq '*') {
push(@{$record{'scantron.doubleerror'}},$questnum);
$record{"scantron.$questnum.answer"}='';
} elsif (!$currentquest
@@ -4630,8 +4635,14 @@ sub scantron_parse_scanline {
push(@{$record{"scantron.missingerror"}},$questnum);
}
} else {
- $record{"scantron.$questnum.answer"}=
- $alphabet[$currentquest-1];
+ # wrap zero back to J
+ if ($currentquest eq '0') {
+ $record{"scantron.$questnum.answer"}=
+ $alphabet[9];
+ } else {
+ $record{"scantron.$questnum.answer"}=
+ $alphabet[$currentquest-1];
+ }
}
} else {
my @array=split($$scantron_config{'Qon'},$currentquest,-1);
@@ -4802,15 +4813,15 @@ sub scantron_warning_screen {
my ($button_text)=@_;
my $title=&Apache::lonnet::gettitle($env{'form.selectpage'});
my %scantron_config=&get_scantron_config($env{'form.scantron_format'});
- my $CODElist="a";
+ my $CODElist;
if ($scantron_config{'CODElocation'} &&
$scantron_config{'CODEstart'} &&
$scantron_config{'CODElength'}) {
$CODElist=$env{'form.scantron_CODElist'};
- if ($CODElist eq '') { $CODElist='None'; }
+ if ($env{'form.scantron_CODElist'} eq '') { $CODElist='None'; }
$CODElist=
'List of CODES to validate against: | '.
- $CODElist.' |
';
+ $env{'form.scantron_CODElist'}.'';
}
return (<