1574
1595
//weight and extra credit share a column :( Would like a default of 1 for weight and 0 for extra credit
1575
1596
//Flip from the default of 0 to 1 (or vice versa) if ALL items in the category are still set to the old default.
1577
1598
$sql = $defaultaggregationcoef = null;
1580
1601
//if all items in this category have aggregation coefficient of 0 we can change it to 1 ie evenly weighted
1581
1602
$sql = "select count(id) from {grade_items} where categoryid=:categoryid and aggregationcoef!=0";
1582
1603
$defaultaggregationcoef = 1;
1584
1605
//if all items in this category have aggregation coefficient of 1 we can change it to 0 ie no extra credit
1585
1606
$sql = "select count(id) from {grade_items} where categoryid=:categoryid and aggregationcoef!=1";
1586
1607
$defaultaggregationcoef = 0;