--- loncom/homework/grades.pm 2006/10/24 01:03:54 1.382 +++ loncom/homework/grades.pm 2006/11/03 20:04:08 1.383 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.382 2006/10/24 01:03:54 albertel Exp $ +# $Id: grades.pm,v 1.383 2006/11/03 20:04:08 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3940,7 +3940,7 @@ sub displayPage { my %form = ('CODE' => $env{'form.CODE'},); if ($env{'form.vProb'} eq 'yes' ) { $studentTable.=&show_problem($request,$symbx,$uname,$udom,1, - undef,'both'); + undef,'both',\%form); } else { my $companswer = &Apache::loncommon::get_student_answers($symbx,$uname,$udom,$env{'request.course.id'},%form); $companswer =~ s|||g; @@ -5670,8 +5670,9 @@ SCANTRONFORM 'grade_domain' =>$udom, 'grade_courseid'=>$env{'request.course.id'}, 'grade_symb' =>$resource->symb()); - if (exists($scan_record->{'scantron.CODE'}) && - $scan_record->{'scantron.CODE'}) { + if (exists($scan_record->{'scantron.CODE'}) + && + &Apache::lonnet::validCODE($scan_record->{'scantron.CODE'})) { $form{'CODE'}=$scan_record->{'scantron.CODE'}; } else { $form{'CODE'}='';