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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 23 Sep 2005 16:57:45 -0000


albertel		Fri Sep 23 12:57:45 2005 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - BUG#4379, global grades update failing to work
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.288 loncom/homework/grades.pm:1.289
--- loncom/homework/grades.pm:1.288	Fri Sep 23 11:19:05 2005
+++ loncom/homework/grades.pm	Fri Sep 23 12:57:42 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.288 2005/09/23 15:19:05 albertel Exp $
+# $Id: grades.pm,v 1.289 2005/09/23 16:57:42 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2394,6 +2394,7 @@
 	}
 	for (i=0;i<document.classgrade.total.value;i++) {
 	    var user = document.classgrade["ctr"+i].value;
+	    user = user.replace(new RegExp(':', 'g'),"_");
 	    var scorename = document.classgrade["GD_"+user+"_"+partid+"_awarded"];
 	    var saveval   = document.classgrade["GD_"+user+"_"+partid+"_solved_s"].value;
 	    var selname   = document.classgrade["GD_"+user+"_"+partid+"_solved"];
@@ -2421,6 +2422,7 @@
 
 	    for (i=0;i<document.classgrade.total.value;i++) {
 		var user = document.classgrade["ctr"+i].value;
+		user = user.replace(new RegExp(':', 'g'),"_");
 		var scorename = document.classgrade["GD_"+user+"_"+partid+"_awarded"];
 		var saveval   = document.classgrade["GD_"+user+"_"+partid+"_solved_s"].value;
 		var selname   = document.classgrade["GD_"+user+"_"+partid+"_solved"];
@@ -2438,6 +2440,7 @@
 	} else {
 	    for (i=0;i<document.classgrade.total.value;i++) {
 		var user = document.classgrade["ctr"+i].value;
+		user = user.replace(new RegExp(':', 'g'),"_");
 		var scorename = document.classgrade["GD_"+user+"_"+partid+"_awarded"];
 		var saveval   = document.classgrade["GD_"+user+"_"+partid+"_solved_s"].value;
 		var selname   = document.classgrade["GD_"+user+"_"+partid+"_solved"];
@@ -2496,6 +2499,7 @@
 
 	    for (i=0;i<document.classgrade.total.value;i++) {
 		var user = document.classgrade["ctr"+i].value;
+		user = user.replace(new RegExp(':', 'g'),"_");
 		var resetscore = document.classgrade["GD_"+user+"_"+partid+"_awarded"];
 		resetscore.value = document.classgrade["GD_"+user+"_"+partid+"_awarded_s"].value;
 		var resettries = document.classgrade["GD_"+user+"_"+partid+"_tries"];