-
Improvement
-
Resolution: Fixed
-
Minor
-
2.6.3
-
None
-
MOODLE_26_STABLE
-
MOODLE_26_STABLE
Adding support for calculated grade by fields.
Patterns of the form:
##VALUE:FIELD-PATTERN##
|
Supporting fields must implement interface \mod_dataform\interfaces\grading and the method get_user_values.
A valid pattern returns comma delimited list of values from the referred field.
In the formula, the pattern should be aggregated:
SUM(##VALUE:FIELD-PATTERN##)
|
Example 1
-------------
With an Entry state field called 'State' the following pattern will return the sum of states of the user's entries.
SUM(##:state##)
|
Example 2
-------------
With an Entry state field called 'State' the following pattern will return the number of user's entries which are in the second state (after the initial).
SUM(##2:state##)/2
|