[LON-CAPA-cvs] cvs: loncom /homework grades.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 05 Dec 2003 19:40:56 -0000


albertel		Fri Dec  5 14:40:56 2003 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - BUG#2424, need to make sure we always get the correct weight, so invalidata param cache before doing EXT
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.167 loncom/homework/grades.pm:1.168
--- loncom/homework/grades.pm:1.167	Fri Dec  5 09:59:51 2003
+++ loncom/homework/grades.pm	Fri Dec  5 14:40:56 2003
@@ -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 @@
     &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 @@
     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));