version 1.76, 2011/03/19 02:22:18
|
version 1.77, 2011/03/21 00:56:58
|
Line 495 sub process_category_edits {
|
Line 495 sub process_category_edits {
|
%categories=&add_category_content($1,$cangrade,$env{'form.addcont_'.$1.'_symb'},%categories); |
%categories=&add_category_content($1,$cangrade,$env{'form.addcont_'.$1.'_symb'},%categories); |
} elsif ($cmd=~/^delcont\_(.+)\_\_\_\_\_\_(.+)$/) { |
} elsif ($cmd=~/^delcont\_(.+)\_\_\_\_\_\_(.+)$/) { |
%categories=&del_category_content($1,$cangrade,$2,%categories); |
%categories=&del_category_content($1,$cangrade,$2,%categories); |
|
} elsif ($cmd=~/^newrule\_(.+)$/) { |
|
%categories=&add_calculation_rule($1,$cangrade,':',%categories); |
} |
} |
# Move to a new position |
# Move to a new position |
my $moveid=$env{'form.storemove'}; |
my $moveid=$env{'form.storemove'}; |
Line 618 ENDMOVE
|
Line 620 ENDMOVE
|
} |
} |
$r->print('</ul>'); |
$r->print('</ul>'); |
if ($cangrade) { |
if ($cangrade) { |
$r->print('<br />'.&mt('Add Calculation Rule').'<br />'. |
$r->print('<br />'.&new_calc_rule_form($id)); |
&new_calc_rule_form('addcalc_'.$id.'_','this.form.cmd.value="addcalc_'.$id.'";this.form.submit();')); |
|
} |
} |
$r->print('</td>'); |
$r->print('</td>'); |
|
|
Line 694 sub pretty_prt_rule {
|
Line 695 sub pretty_prt_rule {
|
} |
} |
|
|
sub new_calc_rule_form { |
sub new_calc_rule_form { |
return "New Rule"; |
my ($id)=@_; |
|
return '<a href="javascript:storecmd(\'newrule_'.$id.'\');">'.&mt('New Calculation Rule').'</a>'; |
} |
} |
|
|
# |
# |