From 072901a9eb4a9ac6a709f705abd0a35ba8cb72d7 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Fri, 21 Mar 2008 15:05:51 +0000 Subject: [PATCH] MDL-13789 Fixed the index file issue (with a hack) and also documented extra credits properly. --- grade/edit/tree/item_form.php | 4 ++-- help.php | 4 ++++ lang/en_utf8/grades.php | 7 ++----- lang/en_utf8/help/grade/aggregationcoefextra.html | 13 +++++++++++-- .../help/grade/aggregationcoefextrasum.html | 14 ++++++++++++-- lang/en_utf8/help/grade/index.html | 4 ++-- 6 files changed, 33 insertions(+), 13 deletions(-) diff --git a/grade/edit/tree/item_form.php b/grade/edit/tree/item_form.php index 67ed53f12a..f43a707ef5 100644 --- a/grade/edit/tree/item_form.php +++ b/grade/edit/tree/item_form.php @@ -153,7 +153,7 @@ class edit_item_form extends moodleform { $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextra') ? 'aggregationcoefextra' : 'aggregationcoef'; } else if ($cat->aggregation == GRADE_AGGREGATE_SUM) { - $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextrasump') ? 'aggregationcoefextrasum' : 'aggregationcoef'; + $coefstring = ($coefstring=='' or $coefstring=='aggregationcoefextrasum') ? 'aggregationcoefextrasum' : 'aggregationcoef'; } else { $coefstring = 'aggregationcoef'; @@ -280,7 +280,7 @@ class edit_item_form extends moodleform { if ($aggcoef !== '') { $agg_el->setLabel(get_string($aggcoef, 'grades')); - $mform->setHelpButton('aggregationcoef', array('aggregationcoef', get_string('aggregationcoef', 'grades'), 'grade'), true); + $mform->setHelpButton('aggregationcoef', array($aggcoef, get_string($aggcoef, 'grades'), 'grade'), true); } } } diff --git a/help.php b/help.php index 62363ec85b..fb45f49f3d 100644 --- a/help.php +++ b/help.php @@ -146,6 +146,10 @@ function include_help_for_each_module($file, $langs, $helpdir) { if (!$modules = get_records('modules', 'visible', 1)) { error('No modules found!!'); // Should never happen } + + $grade = new stdClass(); + $grade->name = 'grade'; + $modules[] = $grade; foreach ($modules as $mod) { $strmodulename = get_string('modulename', $mod->name); diff --git a/lang/en_utf8/grades.php b/lang/en_utf8/grades.php index 1ecff99884..8b22667af4 100644 --- a/lang/en_utf8/grades.php +++ b/lang/en_utf8/grades.php @@ -28,12 +28,9 @@ $string['aggregateweightedmean'] = 'Weighted mean of grades'; $string['aggregateweightedmean2'] = 'Simple weighted mean of grades'; $string['aggregation'] = 'Aggregation'; $string['aggregationcoef'] = 'Aggregation coefficient'; -$string['aggregationcoefextra'] = 'Extra credit'; -$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['aggregationcoefextra'] = 'Extra credit coefficient'; +$string['aggregationcoefextrasum'] = 'Act as extra credit'; $string['aggregationcoefweight'] = 'Item weight'; -$string['aggregationcoefweighthelp'] = 'Weight applied to all grades in this grade item during aggregation with other grade items.'; $string['aggregationhelp'] = 'Strategy used to aggregate grades across all students in a course.'; $string['aggregationposition'] = 'Aggregation position'; $string['aggregationview'] = 'Aggregation view'; diff --git a/lang/en_utf8/help/grade/aggregationcoefextra.html b/lang/en_utf8/help/grade/aggregationcoefextra.html index 74d77d5292..831e5fabdb 100644 --- a/lang/en_utf8/help/grade/aggregationcoefextra.html +++ b/lang/en_utf8/help/grade/aggregationcoefextra.html @@ -1,2 +1,11 @@ -

Extra credit

-

Extra credit for this grade item during aggregation.

+

Extra credit coefficient

+

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:

+ + diff --git a/lang/en_utf8/help/grade/aggregationcoefextrasum.html b/lang/en_utf8/help/grade/aggregationcoefextrasum.html index 74d77d5292..6c96778b65 100644 --- a/lang/en_utf8/help/grade/aggregationcoefextrasum.html +++ b/lang/en_utf8/help/grade/aggregationcoefextrasum.html @@ -1,2 +1,12 @@ -

Extra credit

-

Extra credit for this grade item during aggregation.

+

Act as extra credit

+

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:

+ + diff --git a/lang/en_utf8/help/grade/index.html b/lang/en_utf8/help/grade/index.html index 450410edc4..07d8dca992 100644 --- a/lang/en_utf8/help/grade/index.html +++ b/lang/en_utf8/help/grade/index.html @@ -4,8 +4,8 @@
  • Include outcomes in aggregation
  • Aggregate including subcategories
  • Category aggregation
  • -
  • Extra credit
  • -
  • Extra credit
  • +
  • Extra credit coefficient
  • +
  • Act as extra credit
  • Item weight
  • Aggregation position
  • Aggregation view
  • -- 2.39.5