|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct (workshop $workshop) | |
| update_grading_grades (stdclass $settings, $restrict=null) | |
| get_settings_form (moodle_url $actionurl=null) | |
Static Public Member Functions | |
| static | delete_instance ($workshopid) |
Protected Member Functions | |
| process_assessments (array $assessments, array $diminfo, stdclass $settings) | |
| prepare_data_from_recordset ($assessments) | |
| normalize_grades (array $assessments, array $diminfo) | |
| average_assessment (array $assessments) | |
| weighted_variance (array $assessments) | |
| assessments_distance (stdclass $assessment, stdclass $referential, array $diminfo, stdclass $settings) | |
Protected Attributes | |
| $workshop | |
| $settings | |
Defines the computation login of the grading evaluation subplugin
| __construct | ( | workshop $ | workshop | ) |
| assessments_distance | ( | stdclass $ | assessment, |
| stdclass $ | referential, | ||
| array $ | diminfo, | ||
| stdclass $ | settings | ||
| ) | [protected] |
Measures the distance of the assessment from a referential one
The passed data structures must contain ->dimgrades property. The referential assessment is supposed to be close to the average assessment. All dimension grades are supposed to be normalized to the interval 0 - 100. Returned value is rounded to 4 valid decimals to prevent some rounding issues - see the unit test for an example.
| stdClass | $assessment | the assessment being measured |
| stdClass | $referential | assessment |
| array | $diminfo | of stdclass(->weight ->min ->max ->variance) indexed by dimension id |
| stdClass | $settings |
Reimplemented in testable_workshop_best_evaluation.
Definition at line 381 of file lib.php.

| average_assessment | ( | array $ | assessments | ) | [protected] |
Given a set of a submission's assessments, returns a hypothetical average assessment
The passed structure must be array of assessments objects with ->weight and ->dimgrades properties.
| array | $assessments | as prepared by self::prepare_data_from_recordset() |
Reimplemented in testable_workshop_best_evaluation.
Definition at line 282 of file lib.php.


| static delete_instance | ( | $ | workshopid | ) | [static] |
Delete all data related to a given workshop module instance
| int | $workshopid | id of the workshop module instance being deleted |
Implements workshop_evaluation.
| get_settings_form | ( | moodle_url $ | actionurl = null | ) |
| normalize_grades | ( | array $ | assessments, |
| array $ | diminfo | ||
| ) | [protected] |
Normalizes the dimension grades to the interval 0.00000 - 100.00000
Note: this heavily relies on PHP5 way of handling references in array of stdclasses. Hopefully it will not change again soon.
| array | $assessments | of stdclass as returned by { |
| array | $diminfo | of stdclass |
Reimplemented in testable_workshop_best_evaluation.
Definition at line 259 of file lib.php.


| prepare_data_from_recordset | ( | $ | assessments | ) | [protected] |
| process_assessments | ( | array $ | assessments, |
| array $ | diminfo, | ||
| stdclass $ | settings | ||
| ) | [protected] |
Given a list of all assessments of a single submission, updates the grading grades in database
| array | $assessments | of stdclass (->assessmentid ->assessmentweight ->reviewerid ->gradinggrade ->submissionid ->dimensionid ->grade) |
| array | $diminfo | of stdclass (->id ->weight ->max ->min) |
| stdClass | grading evaluation settings |
Definition at line 153 of file lib.php.


| update_grading_grades | ( | stdclass $ | settings, |
| $ | restrict = null |
||
| ) |
Calculates the grades for assessment and updates 'gradinggrade' fields in 'workshop_assessments' table
This function relies on the grading strategy subplugin providing get_assessments_recordset() method. {
| stdClass | $settings | The settings for this round of evaluation |
| null | int | array | $restrict | If null, update all reviewers, otherwise update just grades for the given reviewers(s) |
Definition at line 67 of file lib.php.

| weighted_variance | ( | array $ | assessments | ) | [protected] |
Given a set of a submission's assessments, returns standard deviations of all their dimensions
The passed structure must be array of assessments objects with at least ->weight and ->dimgrades properties. This implementation uses weighted incremental algorithm as suggested in "D. H. D. West (1979). Communications of the ACM, 22, 9, 532-535: Updating Mean and Variance Estimates: An Improved Method" http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Weighted_incremental_algorithm
| array | $assessments | as prepared by self::prepare_data_from_recordset() |
Reimplemented in testable_workshop_best_evaluation.
Definition at line 322 of file lib.php.
