Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Natural weighting: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 8: Line 8:
{{Work in progress|forumurl=https://moodle.org/mod/forum/discuss.php?d=245442}}
{{Work in progress|forumurl=https://moodle.org/mod/forum/discuss.php?d=245442}}


==Overview==
==Description==
 
Natural weighting is a modification to how grades are combined.
 
When 'Sum of Grades' aggregation is chosen (and natural weighting is active), there will be a weight column with form fields, looking exactly like "Weighted mean" is now.  By default, the weight column shows the natural weights given to all categories and items based on gradebook structure (exactly as Simple weighted mean does now).
 
Weights can be overridden by modifying the values in the form fields.  All the numbers in a category will be automatically normalised (on save) to add up to 100%.
 
A "Reset weights" button in each category resets the weights to their defaults.


==Rationale==
==Rationale==


This interface is expected to suit the needs of most teachers, and will allow them to avoid using other aggregations.  Admins can therefore hide the aggregation menu and simplify the interface.  If it turns out that this is enough for everyone then we can potentially remove quite a lot of aggregation code from the gradebook at a later stage, improving speed and readability.
(Bob, we need a description here of how each of the old aggregations can be implemented, or not, in this new interface:).
Sum of grades -
Mean of grades -
Weighted mean of grades -
Simple weighted mean of grades -
Mean of grades (with extra credits) -
Median of grades - no change
Lowest grade - no change
Highest grade - no change
Mode of grades - no change
==Implementation stages==
==Implementation stages==
To be safe, we plan to implement this in stages:
STAGE 1) Implement natural weighting as part of the Sum of Grades aggregation type, with admin settings that allow them to disable all other aggregations if they choose. (Moodle 2.8)
STAGE 2) Once people have been using this for a while, explore the possibility of removing other aggregation code or making them into optional plugins. (Moodle 3.0 perhaps)


==Interfaces==
==Interfaces==
Line 18: Line 47:
=== Category editing ===
=== Category editing ===


(We need mockups here)
(We need a full mockup here)


=== Admin settings ===
=== Admin settings ===
New setting to "Force Natural Weighting" - this will hide the aggregation menu and all new categories will default to "Sum of grades" and natural weights.  It will not affect existing gradebooks with other aggregations set, so we probably need some sort of upgrade script that can detect, display and optionally convert any other aggregations to this one as required.
==Upgrade changes==
None


==Database changes==
==Database changes==


== Notes ==
None?
 
# Sum of Grades aggregation fixed to respect hidden items setting and Exclude non-graded items (new terminology)
==Logic changes==
# Natural Weighting setting controlling aggregation and weight override behavior. (for 2.9 this could invert to make Optional Natural Weighting the default, and in 3.0, deprecate aggregation methods completely)
 
## Default: Disable Natural Weighting - legacy Cats and items behavior.  
# Sum of Grades aggregation must be fixed to respect hidden items setting and to Exclude non-graded items (new terminology)
## Optional Natural Weighting - natural weights invoked if course has all categories set to Sum of grades
 
## Forced Natural Weighting - all categories forced to Sum of grades (aggregations dropdown disappears).
# Natural weights must be saved and applied to the form.
# Screen display for Natural Weighting (not available when Natural Weighting disabled)
 
## Weight column shows the natural weights accorded to all categories and items based on gradebook setup (same as Simple weighted mean)
# Results are stored directly into grade_grades table.
## ‘Adjust weights’ button allows natural weights to be overridden (same as Weighted mean)
 
## ‘Reset weights’ button resets all adjusted weights to natural weights
## Aggregation method pulldown not available in Disabled Natural Weighting
# Special processing
## Special branching of code when using Natural Weighting saves execution of over 650 lines of code (much repeatedly executed). This code path is called 35 times from inside Moodle
# Will be storing the values generated from Natural Weighting into the grade_grades table
# Additional benefits
## Orients teachers to understanding gradebook math, recognizing natural weights, and the implication of the maximum points per item and its relation to other items in the same container. They begin to actually understand what’s going on in the calculations and can form a coherent strategy for how they want to implement grading in their courses
## Fully a third of the gradebook code could be removed, greatly simplifying the codebase
## Numerous issues mentioned in the gradebook forum would be resolved.


This would handle all but the utter-most edge cases
== See also ==

Revision as of 13:19, 12 July 2014

Natural Weighting
Project state Specification
Tracker issue https://tracker.moodle.org/browse/MDL-43378
Discussion https://moodle.org/mod/forum/discuss.php?d=245442
Assignee Moodle HQ

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.


Description

Natural weighting is a modification to how grades are combined.

When 'Sum of Grades' aggregation is chosen (and natural weighting is active), there will be a weight column with form fields, looking exactly like "Weighted mean" is now. By default, the weight column shows the natural weights given to all categories and items based on gradebook structure (exactly as Simple weighted mean does now).

Weights can be overridden by modifying the values in the form fields. All the numbers in a category will be automatically normalised (on save) to add up to 100%.

A "Reset weights" button in each category resets the weights to their defaults.

Rationale

This interface is expected to suit the needs of most teachers, and will allow them to avoid using other aggregations. Admins can therefore hide the aggregation menu and simplify the interface. If it turns out that this is enough for everyone then we can potentially remove quite a lot of aggregation code from the gradebook at a later stage, improving speed and readability.

(Bob, we need a description here of how each of the old aggregations can be implemented, or not, in this new interface:).

Sum of grades - Mean of grades - Weighted mean of grades - Simple weighted mean of grades - Mean of grades (with extra credits) - Median of grades - no change Lowest grade - no change Highest grade - no change Mode of grades - no change

Implementation stages

To be safe, we plan to implement this in stages:

STAGE 1) Implement natural weighting as part of the Sum of Grades aggregation type, with admin settings that allow them to disable all other aggregations if they choose. (Moodle 2.8)

STAGE 2) Once people have been using this for a while, explore the possibility of removing other aggregation code or making them into optional plugins. (Moodle 3.0 perhaps)


Interfaces

Category editing

(We need a full mockup here)

Admin settings

New setting to "Force Natural Weighting" - this will hide the aggregation menu and all new categories will default to "Sum of grades" and natural weights. It will not affect existing gradebooks with other aggregations set, so we probably need some sort of upgrade script that can detect, display and optionally convert any other aggregations to this one as required.

Upgrade changes

None

Database changes

None?

Logic changes

  1. Sum of Grades aggregation must be fixed to respect hidden items setting and to Exclude non-graded items (new terminology)
  1. Natural weights must be saved and applied to the form.
  1. Results are stored directly into grade_grades table.


See also