[svn r17290] minor - style changes - eliminated error : division by zero - (partial FS#3249)

skala
Isaac Flores 16 years ago
parent 8b30a7db27
commit 848b9b7544
  1. 5
      main/gradebook/lib/be/category.class.php

@ -24,7 +24,7 @@
*/
/**
* Defines a gradebook Category object
* @author Bert Steppé, Stijn Konings
* @author Bert Stepp<EFBFBD>, Stijn Konings
* @package dokeos.gradebook
*/
class Category implements GradebookItem
@ -484,9 +484,10 @@ class Category implements GradebookItem
$linkres = $link->calc_score ($stud_id);
if (isset($linkres) && $link->get_weight() != 0) {
$linkweight = $link->get_weight();
$link_res_denom = ($linkres[1]==0) ? 1 : $linkres[1];
$rescount++;
$weightsum += $linkweight;
$ressum += (($linkres[0]/$linkres[1]) * $linkweight);
$ressum += (($linkres[0]/$link_res_denom) * $linkweight);
}
}

Loading…
Cancel
Save