GRADE_AGGREGATE_MAX =>get_string('aggregatemax', 'grades'),
GRADE_AGGREGATE_MODE =>get_string('aggregatemode', 'grades'),
GRADE_AGGREGATE_SUM =>get_string('aggregatesum', 'grades'));
-$defaults = array('value'=>GRADE_AGGREGATE_WEIGHTED_MEAN, 'forced'=>false, 'adv'=>false);
+$defaults = array('value'=>GRADE_AGGREGATE_WEIGHTED_MEAN2, 'forced'=>false, 'adv'=>false);
$temp->add(new admin_setting_gradecat_combo('grade_aggregation', get_string('aggregation', 'grades'), get_string('aggregationhelp', 'grades'), $defaults, $options));
$options = array(0 => get_string('no'), 1 => get_string('yes'));
-$defaults = array('value'=>0, 'forced'=>false, 'adv'=>true);
+$defaults = array('value'=>1, 'forced'=>false, 'adv'=>true);
$temp->add(new admin_setting_gradecat_combo('grade_aggregateonlygraded', get_string('aggregateonlygraded', 'grades'),
get_string('aggregateonlygradedhelp', 'grades'), $defaults, $options));
-$defaults['value'] = 1;
$temp->add(new admin_setting_gradecat_combo('grade_aggregateoutcomes', get_string('aggregateoutcomes', 'grades'),
get_string('aggregateoutcomeshelp', 'grades'), $defaults, $options));
$temp->add(new admin_setting_gradecat_combo('grade_aggregatesubcats', get_string('aggregatesubcats', 'grades'),
$course_category->parent = null;
$course_category->aggregation = GRADE_AGGREGATE_WEIGHTED_MEAN2;
$course_category->timemodified = $course_category->timecreated = time();
+ $course_category->aggregateonlygraded = 0;
if (!$course_category->id = insert_record('grade_categories', $course_category)) {
return false;
}
$course_item->itemtype = 'course';
$course_item->iteminstance = $course_category->id;
$course_item->gradetype = GRADE_TYPE_VALUE;
+ $course_item->display = GRADE_DISPLAY_TYPE_PERCENTAGE;
$course_item->sortorder = $order++;
$course_item->timemodified = $course_item->timecreated = $course_category->timemodified;
$course_item->needsupdate = 1;
$category->droplow = $oldcat->drop_x_lowest;
$category->aggregation = GRADE_AGGREGATE_WEIGHTED_MEAN2;
$category->timemodified = $category->timecreated = time();
+ $category->aggregateonlygraded = 0;
if (!$category->id = insert_record('grade_categories', $category)) {
return false;
}
$item->itemtype = 'category';
$item->iteminstance = $category->id;
$item->gradetype = GRADE_TYPE_VALUE;
+ $item->display = GRADE_DISPLAY_TYPE_PERCENTAGE;
$item->plusfactor = $oldcat->bonus_points;
$item->hidden = $oldcat->hidden;
$item->aggregationcoef = $oldcat->weight;