--- loncom/homework/grades.pm	2003/12/05 14:59:51	1.167
+++ loncom/homework/grades.pm	2003/12/05 19:40:56	1.168
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.167 2003/12/05 14:59:51 sakharuk Exp $
+# $Id: grades.pm,v 1.168 2003/12/05 19:40:56 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2248,8 +2248,14 @@ sub viewgrades {
     &viewgrades_js($request);
 
     my ($symb,$url) = ($ENV{'form.symb'},$ENV{'form.url'}); 
-    my $result='<h3><font color="#339933">'.&mt('Manual Grading').'</font></h3>';
+    #need to make sure we have the correct data for later EXT calls, 
+    #thus invalidate the cache
+    &Apache::lonnet::devalidatecourseresdata(
+                 $ENV{'course.'.$ENV{'request.course.id'}.'.num'},
+                 $ENV{'course.'.$ENV{'request.course.id'}.'.domain'});
+    &Apache::lonnet::clear_EXT_cache_status();
 
+    my $result='<h3><font color="#339933">'.&mt('Manual Grading').'</font></h3>';
     $result.='<font size=+1><b>Current Resource: </b>'.$ENV{'form.probTitle'}.'</font>'."\n";
 
     #view individual student submission form - called using Javascript viewOneStudent
@@ -3032,6 +3038,14 @@ sub displayPage {
     my ($classlist,undef,$fullname) = &getclasslist($getsec,'1');
     my ($uname,$udom) = split(/:/,$ENV{'form.student'});
     my $usec=$classlist->{$ENV{'form.student'}}[5];
+
+    #need to make sure we have the correct data for later EXT calls, 
+    #thus invalidate the cache
+    &Apache::lonnet::devalidatecourseresdata(
+                 $ENV{'course.'.$ENV{'request.course.id'}.'.num'},
+                 $ENV{'course.'.$ENV{'request.course.id'}.'.domain'});
+    &Apache::lonnet::clear_EXT_cache_status();
+
     if (!&canview($usec)) {
 	$request->print('<font color="red">Unable to view requested student.('.$ENV{'form.student'}.')</font>');
 	$request->print(&show_grading_menu_form($symb,$url));