--- loncom/interface/lonquickgrades.pm 2011/03/19 02:22:18 1.76
+++ loncom/interface/lonquickgrades.pm 2011/03/21 00:56:58 1.77
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Quick Student Grades Display
#
-# $Id: lonquickgrades.pm,v 1.76 2011/03/19 02:22:18 www Exp $
+# $Id: lonquickgrades.pm,v 1.77 2011/03/21 00:56:58 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -495,6 +495,8 @@ sub process_category_edits {
%categories=&add_category_content($1,$cangrade,$env{'form.addcont_'.$1.'_symb'},%categories);
} elsif ($cmd=~/^delcont\_(.+)\_\_\_\_\_\_(.+)$/) {
%categories=&del_category_content($1,$cangrade,$2,%categories);
+ } elsif ($cmd=~/^newrule\_(.+)$/) {
+ %categories=&add_calculation_rule($1,$cangrade,':',%categories);
}
# Move to a new position
my $moveid=$env{'form.storemove'};
@@ -618,8 +620,7 @@ ENDMOVE
}
$r->print('');
if ($cangrade) {
- $r->print('
'.&mt('Add Calculation Rule').'
'.
- &new_calc_rule_form('addcalc_'.$id.'_','this.form.cmd.value="addcalc_'.$id.'";this.form.submit();'));
+ $r->print('
'.&new_calc_rule_form($id));
}
$r->print('');
@@ -694,7 +695,8 @@ sub pretty_prt_rule {
}
sub new_calc_rule_form {
- return "New Rule";
+ my ($id)=@_;
+ return ''.&mt('New Calculation Rule').'';
}
#