From 4ccb300e63e98760ecf5ea1d3d565ed44f7c3058 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Tue, 14 Aug 2007 08:30:10 +0000 Subject: [PATCH] MDL-10829 Help page for the calculation field and interface --- grade/edit/tree/calculation_form.php | 1 + lang/en_utf8/help/grade/calculation.html | 56 ++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 lang/en_utf8/help/grade/calculation.html diff --git a/grade/edit/tree/calculation_form.php b/grade/edit/tree/calculation_form.php index 2253eaeb5..e9f290bab 100644 --- a/grade/edit/tree/calculation_form.php +++ b/grade/edit/tree/calculation_form.php @@ -32,6 +32,7 @@ class edit_calculation_form extends moodleform { $mform->addElement('header', 'general', get_string('gradeitem', 'grades')); $mform->addElement('static', 'itemname', get_string('itemname', 'grades')); $mform->addElement('textarea', 'calculation', get_string('calculation', 'grades'), 'cols="60" rows="5"'); + $mform->setHelpButton('calculation', array('calculation', get_string('calculation', 'grades'), 'grade')); /// hidden params $mform->addElement('hidden', 'id', 0); diff --git a/lang/en_utf8/help/grade/calculation.html b/lang/en_utf8/help/grade/calculation.html new file mode 100644 index 000000000..8856eb949 --- /dev/null +++ b/lang/en_utf8/help/grade/calculation.html @@ -0,0 +1,56 @@ +

Calculations

+ + +

Calculations for the gradebook follow the pattern of formulas/functions in popular +spreadsheet programs. They start with an equal (=) sign, and use common mathematical +operators and functions to produce a single numerical output. This output is then +used as the computed value for the grade item you are editing.

+ +

Following is a list of the functions supported by the calculation. The comma (,) +character is used to separate arguments within function brackets.

+ + + +

A number of mathematical functions is also supported:

+ + +

You can include the values of other grade items by using their idnumber as references +in your formulas. The idnumber is surrounded by two matching pairs of angle brackets, +to avoid confusing the calculation parser when the idnumber contains uncommon characters. +For example, if you have a grade item with Quiz.3 as idnumber, you will refer to this +item as [[Quiz.3]] in your calculation.

+ +

Below the calculation field is an arborescence of your course with its grade categories +and grade items. Next to each item or category's total is displayed the idnumber you can +use in your calculation (already surrounded with angle brackets). However, since the +idnumber is optional, some items may not yet have one. These items without an idnumber +have instead a form field which lets you enter the idnumber directly, so that you can use +it in your calculation without having to leave the page. This form doesn't let you edit +existing idnumbers though, you will have to go and edit the grade item directly if you +want to do that.

+ +

As soon as you have assigned the idnumbers you need, you can press "add idnumbers", and +the page will reload and show you the same arborescence with the idnumbers you have just +assigned. You are then free to use these references in your calculation.

+ +

Here is a list of practical examples of calculations you may use in your gradebook:

+ + -- 2.11.4.GIT