[LON-CAPA-cvs] cvs: loncom /interface lonquickgrades.pm

www www@source.lon-capa.org
Fri, 25 Mar 2011 22:06:34 -0000


www		Fri Mar 25 22:06:34 2011 EDT

  Modified files:              
    /loncom/interface	lonquickgrades.pm 
  Log:
  Delete calculation rule
  
  
Index: loncom/interface/lonquickgrades.pm
diff -u loncom/interface/lonquickgrades.pm:1.78 loncom/interface/lonquickgrades.pm:1.79
--- loncom/interface/lonquickgrades.pm:1.78	Fri Mar 25 01:34:49 2011
+++ loncom/interface/lonquickgrades.pm	Fri Mar 25 22:06:34 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Quick Student Grades Display
 #
-# $Id: lonquickgrades.pm,v 1.78 2011/03/25 01:34:49 www Exp $
+# $Id: lonquickgrades.pm,v 1.79 2011/03/25 22:06:34 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -497,6 +497,8 @@
         %categories=&del_category_content($1,$cangrade,$2,%categories);
     } elsif ($cmd=~/^newrule\_(.+)$/) {
         %categories=&add_calculation_rule($1,$cangrade,':',%categories);
+    } elsif ($cmd=~/^delrule\_(.+)\_\_\_\_\_\_(.*)$/) {
+        %categories=&del_calculation_rule($1,$cangrade,$2,%categories);
     }
 # Move to a new position
     my $moveid=$env{'form.storemove'};
@@ -615,7 +617,7 @@
         my ($code,$value)=split(/\:/,$calcrule);
         $r->print(&pretty_prt_rule($cangrade,$id,$code,$value));
         if ($cangrade) {
-           $r->print(' <a href="javascript:storecmd(\'delcalc_'.$id.'______'.$code.'\');">'.&mt('Delete').'</a>');
+           $r->print(' <a href="javascript:storecmd(\'delrule_'.$id.'______'.$code.'\');">'.&mt('Delete').'</a>');
         }
         $r->print('</li>');
     }