Skip to content

Commit

Permalink
Bug fix for bug #3613
Browse files Browse the repository at this point in the history
  • Loading branch information
fiedorow committed Jun 23, 2005
1 parent 32855b4 commit b4ddf27
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions grade/lib.php
Expand Up @@ -2406,7 +2406,11 @@ function grade_assign_categories() {
else { else {
$cur_extra_credit = false; $cur_extra_credit = false;
} }

if ($cur_extra_credit) {
$cur_extra_credit = 1;
} else {
$cur_extra_credit = 0;
}
if ($cur_scale_grade == 0 || $cur_scale_grade == '') { if ($cur_scale_grade == 0 || $cur_scale_grade == '') {
$cur_scale_grade = 1.0; $cur_scale_grade = 1.0;
} }
Expand All @@ -2422,13 +2426,8 @@ function grade_assign_categories() {
// scale_grade doesn't match // scale_grade doesn't match
set_field('grade_item', 'scale_grade', ($cur_maxgrade/$cur_scale_grade), 'id', $db_cat->id); set_field('grade_item', 'scale_grade', ($cur_maxgrade/$cur_scale_grade), 'id', $db_cat->id);
} }


if ($cur_extra_credit) { set_field('grade_item', 'extra_credit', $cur_extra_credit, 'id', $db_cat->id);
set_field('grade_item', 'extra_credit', 1, 'id', $db_cat->id);
}
else {
set_field('grade_item', 'extra_credit', 0, 'id', $db_cat->id);
}
} }
else { else {
// add a new record // add a new record
Expand Down

0 comments on commit b4ddf27

Please sign in to comment.