diff --git a/grade/edit/tree/category_form.php b/grade/edit/tree/category_form.php index a932abeb6be..d975678793b 100644 --- a/grade/edit/tree/category_form.php +++ b/grade/edit/tree/category_form.php @@ -439,7 +439,7 @@ class edit_category_form extends moodleform { $element =& $mform->createElement('text', 'grade_item_aggregationcoef', get_string($coefstring, 'grades')); } $mform->insertElementBefore($element, 'parentcategory'); - $mform->setHelpButton('grade_item_aggregationcoef', array($coefstring, get_string($coefstring, 'grades'), 'grade'), true); + $mform->addHelpButton('grade_item_aggregationcoef', $coefstring, 'grades'); } } } diff --git a/grade/edit/tree/item_form.php b/grade/edit/tree/item_form.php index 90edb86dff8..1a8858ed0ec 100644 --- a/grade/edit/tree/item_form.php +++ b/grade/edit/tree/item_form.php @@ -257,7 +257,7 @@ class edit_item_form extends moodleform { } else { $mform->insertElementBefore($element, 'id'); } - $mform->setHelpButton('aggregationcoef', array($coefstring, get_string($coefstring, 'grades'), 'grade'), true); + $mform->addHelpButton('aggregationcoef', $coefstring, 'grades'); } $mform->disabledIf('aggregationcoef', 'parentcategory', 'eq', $parent_category->id); diff --git a/grade/edit/tree/lib.php b/grade/edit/tree/lib.php index 7fde54f5070..699ef0f6977 100755 --- a/grade/edit/tree/lib.php +++ b/grade/edit/tree/lib.php @@ -365,7 +365,7 @@ class grade_edit_tree { $aggcoef = $item->get_coefstring(); if ((($aggcoef == 'aggregationcoefweight' || $aggcoef == 'aggregationcoef') && $type == 'weight') || - ($aggcoef == 'aggregationcoefextra' && $type == 'extra')) { + ($aggcoef == 'aggregationcoefextraweight' && $type == 'extra')) { return ''; } elseif ($aggcoef == 'aggregationcoefextrasum' && $type == 'extra') { @@ -460,7 +460,7 @@ class grade_edit_tree { if ($element['type'] == 'category') { if ($coefstring == 'aggregationcoefweight') { $this->uses_weight = true; - } elseif ($coefstring == 'aggregationcoefextra' || $coefstring == 'aggregationcoefextrasum') { + } elseif ($coefstring == 'aggregationcoefextraweight' || $coefstring == 'aggregationcoefextrasum') { $this->uses_extra_credit = true; } @@ -679,7 +679,7 @@ class grade_edit_tree_column_extracredit extends grade_edit_tree_column { public function get_header_cell() { global $OUTPUT; $headercell = clone($this->headercell); - $headercell->text = get_string('extracredit', 'grades').$OUTPUT->old_help_icon('aggregationcoefcombo', 'aggregationcoefcombo', 'grade'); + $headercell->text = get_string('aggregationcoefextra', 'grades').$OUTPUT->help_icon('aggregationcoefextra', 'grades'); return $headercell; } @@ -721,7 +721,7 @@ class grade_edit_tree_column_weight extends grade_edit_tree_column { public function get_header_cell() { global $OUTPUT; $headercell = clone($this->headercell); - $headercell->text = get_string('weightuc', 'grades').$OUTPUT->old_help_icon('aggregationcoefweight', 'aggregationcoefweight', 'grade'); + $headercell->text = get_string('weightuc', 'grades').$OUTPUT->help_icon('aggregationcoefweight', 'grades'); return $headercell; } diff --git a/grade/edit/tree/outcomeitem_form.php b/grade/edit/tree/outcomeitem_form.php index 691bd587d52..bf56023d9b7 100644 --- a/grade/edit/tree/outcomeitem_form.php +++ b/grade/edit/tree/outcomeitem_form.php @@ -102,7 +102,7 @@ class edit_outcomeitem_form extends moodleform { $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextrasum') ? 'aggregationcoefextrasum' : 'aggregationcoef'; } else if ($cat->aggregation == GRADE_AGGREGATE_EXTRACREDIT_MEAN) { - $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextra') ? 'aggregationcoefextra' : 'aggregationcoef'; + $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextraweight') ? 'aggregationcoefextraweight' : 'aggregationcoef'; } else if ($cat->aggregation == GRADE_AGGREGATE_SUM) { $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextrasum') ? 'aggregationcoefextrasum' : 'aggregationcoef'; @@ -204,7 +204,7 @@ class edit_outcomeitem_form extends moodleform { $aggcoef = 'aggregationcoefextrasum'; } else if ($parent_category->aggregation == GRADE_AGGREGATE_EXTRACREDIT_MEAN) { - $aggcoef = 'aggregationcoefextra'; + $aggcoef = 'aggregationcoefextraweight'; } else if ($parent_category->aggregation == GRADE_AGGREGATE_SUM) { $aggcoef = 'aggregationcoefextrasum'; diff --git a/lang/en/grades.php b/lang/en/grades.php index 3ba502613fc..8ec33e612ad 100755 --- a/lang/en/grades.php +++ b/lang/en/grades.php @@ -63,14 +63,17 @@ $string['aggregation_help'] = 'The aggregation determines how grades in a catego * Sum of grades - The sum of all grade values, with scale grades being ignored'; $string['aggregation_link'] = 'grade/aggregation'; $string['aggregationcoef'] = 'Aggregation coefficient'; -$string['aggregationcoefextra'] = 'Extra credit'; -$string['aggregationcoefextra_help'] = 'If the aggregation is Sum of grades and the extra credit checkbox is ticked, the grade item\'s maximum grade is not added to the category\'s maximum grade, resulting in the possibility of achieving the maximum grade (or grades over the maximum if enabled by the site administrator) in the category without having the maximum grade in all the grade items. +$string['aggregationcoefextra'] = 'Extra credit'; // for the header of the table at Edit categories and items page +$string['aggregationcoefextra_help'] = 'If the aggregation is Sum of grades or Simple weighted mean and the extra credit checkbox is ticked, the grade item\'s maximum grade is not added to the category\'s maximum grade, resulting in the possibility of achieving the maximum grade (or grades over the maximum if enabled by the site administrator) in the category without having the maximum grade in all the grade items. If the aggregation is Mean of grades (with extra credits) and the extra credit is set to a value greater than zero, the extra credit is the factor by which the grade is multiplied before adding it to the total after the computation of the mean.'; $string['aggregationcoefextra_link'] = 'grade/aggregation'; -$string['aggregationcoefextrahelp'] = 'Extra credit for this grade item during aggregation.'; -$string['aggregationcoefextrasum'] = 'Extra credit'; -$string['aggregationcoefextrasumhelp'] = 'Extra credit for this grade item during aggregation.'; +$string['aggregationcoefextrasum'] = 'Extra credit'; // for the form with checkboxes: Sum of grades or Simple weighted mean +$string['aggregationcoefextrasum_help'] = 'If the extra credit checkbox is ticked, the grade item\'s maximum grade is not added to the category\'s maximum grade, resulting in the possibility of achieving the maximum grade (or grades over the maximum if enabled by the site administrator) in the category without having the maximum grade in all the grade items.'; +$string['aggregationcoefextrasum_link'] = 'grade/aggregation'; +$string['aggregationcoefextraweight'] = 'Extra credit weight'; // for the form with input: Mean of grades (with extra credits) only +$string['aggregationcoefextraweight_help'] = 'If the extra credit weight is set to a value greater than zero, the grade acts as extra credit during aggregation. The number is the factor by which the grade is multiplied before adding it to the total for the computation of the mean.'; +$string['aggregationcoefextraweight_link'] = 'grade/aggregation'; $string['aggregationcoefweight'] = 'Item weight'; $string['aggregationcoefweight_help'] = 'The item weight is used in the category aggregation to influence the importance of the item compared with other grade items in the same category.'; $string['aggregationcoefweight_link'] = 'grade/aggregation'; @@ -235,7 +238,6 @@ $string['exportfeedback'] = 'Include feedback in export'; $string['exportplugins'] = 'Export plugins'; $string['exportsettings'] = 'Export settings'; $string['exportto'] = 'Export to'; -$string['extracredit'] = 'Extra Credit'; $string['extracreditwarning'] = 'Note: Setting all items for a category to extra credit will effectively remove them from the grade calculation. Since there will be no point total'; $string['feedback'] = 'Feedback'; $string['feedback_help'] = 'This box enables any comments about the grade to be added.'; diff --git a/lang/en/help/grade/aggregationcoefcombo.html b/lang/en/help/grade/aggregationcoefcombo.html deleted file mode 100644 index 51deddbb767..00000000000 --- a/lang/en/help/grade/aggregationcoefcombo.html +++ /dev/null @@ -1,25 +0,0 @@ -
When the "Sum of grades" aggregation strategy is used, a grade item can act as Extra credit for the category. This means that the grade item's maximum grade will not be added to the category total's maximum grade, but the item's grade will. Following is an example:
- -A value greater than 0 treats this grade item's grades as Extra credit during aggregation. The number is a factor by which the grade value will be multiplied before it is added to the sum of all grades, but the item itself will not be counted in the division. For example:
- -A value greater than 0 treats this grade item's grades as Extra credit during aggregation. The number is a factor by which the grade value will be multiplied before it is added to the sum of all grades, but the item itself will not be counted in the division. For example:
- -When the "Sum of grades" aggregation strategy is used, a grade item can act as Extra credit for the category. This means that the grade item's maximum grade will not be added to the category total's maximum grade, but the item's grade will. Following is an example:
- -