--- loncom/homework/grades.pm 2006/08/16 18:06:36 1.371 +++ loncom/homework/grades.pm 2006/09/14 17:52:22 1.374 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.371 2006/08/16 18:06:36 albertel Exp $ +# $Id: grades.pm,v 1.374 2006/09/14 17:52:22 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1579,7 +1579,7 @@ sub show_problem { if ($removeform) { $rendered=~s|||g; $rendered=~s|||g; - $rendered=~s|name="submit"|name="would_have_been_submit"|g; + $rendered=~s|(]*name\s*=\s*"?)(\w+)("?)|$1would_have_been_$2$3|g; } my $companswer; if ($mode eq 'both' or $mode eq 'answer') { @@ -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"}.=','; @@ -4813,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 (<