Fixing warning message in gradebook

skala
Julio Montoya 13 years ago
parent 3d84549d7e
commit 2ef3f57be7
  1. 18
      main/gradebook/lib/fe/gradebooktable.class.php

@ -328,15 +328,17 @@ class GradebookTable extends SortableTable {
}
} //end looping categories
if (api_is_allowed_to_edit()) {
$main_weight = intval($main_cat[0]->get_weight());
if (intval($total_categories_weight) == $main_weight) {
$total = Display::badge($total_categories_weight.' / '.$main_weight, 'success');
} else {
$total = Display::badge($total_categories_weight.' / '.$main_weight, 'warning');
if (api_is_allowed_to_edit()) {
if (count($main_cat) > 1) {
$main_weight = intval($main_cat[0]->get_weight());
if (intval($total_categories_weight) == $main_weight) {
$total = Display::badge($total_categories_weight.' / '.$main_weight, 'success');
} else {
$total = Display::badge($total_categories_weight.' / '.$main_weight, 'warning');
}
$row = array(null, null, get_lang('Total'), null, $total);
$sortable_data[] = $row;
}
$row = array(null, null, get_lang('Total'), null, $total);
$sortable_data[] = $row;
}
// warning messages

Loading…
Cancel
Save