--- loncom/homework/grades.pm	2004/09/29 15:04:50	1.219
+++ loncom/homework/grades.pm	2004/10/14 20:39:34	1.221
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.219 2004/09/29 15:04:50 www Exp $
+# $Id: grades.pm,v 1.221 2004/10/14 20:39:34 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3070,8 +3070,6 @@ sub getSymbMap {
 	    $minder++;
 	}
     }
-
-    $navmap->untieHashes();
     return \@titles,\%symbx;
 }
 
@@ -3204,8 +3202,6 @@ sub displayPage {
         $curRes = $iterator->next();
     }
 
-    $navmap->untieHashes();
-
     $studentTable.='</td></tr></table></td></tr></table>'."\n".
 	'<input type="button" value="Save" '.
 	'onClick="javascript:checkSubmitPage(this.form,'.$question.');" TARGET=_self />'.
@@ -3401,8 +3397,6 @@ sub updateGradeByPage {
         $curRes = $iterator->next();
     }
 
-    $navmap->untieHashes();
-
     $studentTable.='</td></tr></table></td></tr></table>';
     $studentTable.=&show_grading_menu_form($ENV{'form.symb'},$ENV{'form.url'});
     my $grademsg=($changeflag == 0 ? 'No score was changed or updated.' :
@@ -4466,7 +4460,8 @@ sub scantron_validate_CODE {
 						 $scan_data);
 	my $CODE=$$scan_record{'scantron.CODE'};
 	my $error=0;
-	if (!exists($allcodes{$CODE}) && !$$scan_record{'scantron.useCODE'}) {
+	if (%allcodes && !exists($allcodes{$CODE}) 
+	    && !$$scan_record{'scantron.useCODE'}) {
 	    &scantron_get_correction($r,$i,$scan_record,
 				     \%scantron_config,
 				     $line,'incorrectCODE',\%allcodes);
@@ -4652,7 +4647,6 @@ SCANTRONFORM
 #    my $lasttime = &Time::HiRes::time()-$start;
 #    $r->print("<p>took $lasttime</p>");
 
-    $navmap->untieHashes();
     $r->print("</form>");
     $r->print(&show_grading_menu_form($symb,$url));
     return '';