Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-51876

Weighted Grades: Default weight for new categories is 0 (zero) and not 1

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.8.7, 2.9.2, 4.0
    • Gradebook
    • MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_400_STABLE
    • MDL-51876-creation-weight
    • Hide

      Prerequisites:

      • Create a blank course, with a clean gradebook. Set all sitewide gradebook settings to default, as if from a fresh install.
      • Set Enabled aggregation methods to Natural and Weighted mean of grades.
      • Enable webservices: Site Admin > Advanced Features > Enable web services, then enable the rest protocol
      • Create a webservices service with the function core_grades_create_gradecategories, then create a token for this service: /admin/category.php?category=webservicesettings

       

      Test default aggregation settings.

      1. Visit the gradebook setup page for the test course at /grade/edit/tree/index.php?id={COURSEID}
      2. Click 'Add category'
      3. Verify checkbox 'Category total > Weight adjusted' exists.
      4. Verify Text field 'Category total > Weight' exists.
      5. Set the name to cat1, and save the category.
      6. Verify gradebook category 'Cat1' has weight '0.0'.
      7. Verify gradebook category 'Cat1' Weight override checkbox is 'Unticked'.
      8. Click edit on the cat1 category
      9. Verify checkbox 'Weight adjusted' exists and is unticked.
      10. Verify checkbox 'Extra credit' exists and is unticked.
      11. Verify text field 'Weight' is  0.000
      12. Verify Parent category is the course name
      13. Verify Parent aggregation is Natural
      14. Click checkbox 'Weight adjusted'
      15. Verify 'Weight' can be edited

      This verifies that the form is performing the same as prior for natural aggregation.

      Test weighted aggregation settings.

      1. Click cancel on edit form.
      2. Click edit on course category.
      3. Set Aggregation to Weighted mean of grades
      4. Click Save
      5. Click Add Category
      6. Verify select Parent category is defaulted to course category.
      7. Verify Weight exists with value 1.
      8. Set Parent category to cat1
      9. Verify checkbox Weight adjusted exists and is unchecked.
      10. Verify text field Weight is disabled
      11. Set select Parent category is to course category.
      12. Set Category name to 'cat2'
      13. Click Save
      14. Verify gradebook category 'cat2' has weight '1'.
      15. Create another category, called 'cat3' under the main parent category, following steps in Test weighted aggregation settings with a weight of 2.1.
      16. Verify gradebook category 'cat3' has weight '1'.

      Test weighted category creation via webservice call.

      1. Note the courseid for use in the webservice call.
      2. From a terminal, execute the following command, substituting in the courseid and webservice token, and verify the created course has a weighting of 1.2 after executing and reloading the gradebook:

      curl "{SITEURL}/webservice/rest/server.php?wstoken={TOKEN}&wsfunction=core_grades_create_gradecategories&moodlewsrestformat=json&courseid={COURSEID}&categories[0][fullname]=cat4&categories[0][options][aggregation]=10&categories[0][options][aggregationcoef]=1.2

      Show
      Prerequisites: Create a blank course, with a clean gradebook. Set all sitewide gradebook settings to default, as if from a fresh install. Set Enabled aggregation methods to Natural and Weighted mean of grades. Enable webservices: Site Admin > Advanced Features > Enable web services, then enable the rest protocol Create a webservices service with the function core_grades_create_gradecategories, then create a token for this service: /admin/category.php?category=webservicesettings   Test default aggregation settings. Visit the gradebook setup page for the test course at /grade/edit/tree/index.php?id={COURSEID} Click ' Add category ' Verify checkbox ' Category total > Weight adjusted ' exists. Verify Text field ' Category total > Weight ' exists. Set the name to cat1 , and save the category. Verify gradebook category ' Cat1 ' has weight ' 0.0 '. Verify gradebook category ' Cat1 ' Weight override checkbox is ' Unticked '. Click edit on the cat1 category Verify checkbox ' W eight adjusted ' exists and is unticked. Verify checkbox ' Extra credit ' exists and is unticked. Verify text field ' Weight ' is   0.000 Verify Parent category is the course name Verify Parent aggregation is Natural Click checkbox 'Weight adjusted ' Verify 'Weight ' can be edited This verifies that the form is performing the same as prior for natural aggregation. Test weighted aggregation settings. Click  cancel on edit form. Click edit on course category. Set Aggregation to Weighted mean of grades Click Save Click Add Category Verify select Parent category is defaulted to course category. Verify Weight exists with value 1. Set Parent category to cat1 Verify checkbox Weight adjusted exists and is unchecked. Verify text field Weight is disabled Set select Parent category is to course category. Set Category name to 'cat2' Click Save Verify gradebook category 'cat2' has weight ' 1 '. Create another category, called 'cat3' under the main parent category, following steps in  Test weighted aggregation settings with a weight of 2.1 . Verify gradebook category ' c at3 ' has weight ' 1 '. Test weighted category creation via webservice call. Note the courseid for use in the webservice call. From a terminal, execute the following command, substituting in the courseid and webservice token, and verify the created course has a weighting of 1.2 after executing and reloading the gradebook: curl "{SITEURL}/webservice/rest/server.php?wstoken={TOKEN}&wsfunction=core_grades_create_gradecategories&moodlewsrestformat=json&courseid={COURSEID}&categories[ 0 ][fullname]=cat4&categories[ 0 ][options][aggregation]= 10 &categories[ 0 ][options][aggregationcoef]= 1.2

      The grade_category creation form only exposes a form element for aggregationcoef2 setting for the grade item. This is correct for natural aggregation, however any aggregation method that relies on the aggregationcoef (not coef2) setting, will get a default value of 0 after creation, which is misleading, as you would expect the entered weight to be applicable to the aggregation method for the parent category.

       

       

      Old Description

      ========================

      Hi,

      About five days ago instructors started noticing that for weighted grades the default weight switched to zero rather than the usual weight of 1.

      This is a big problem and it appears to be site wide.

      Could you please call me immediately with a fix?

      Thanks,


      Brian Brown, MS, MS
      Instructional Systems Administrator - St. Norbert College
      920-403-3052 brian.brown@snc.edu www.snc.edu/it

            peterburnett Peter Burnett
            bbrownsnc Brian Brown
            Kevin Pham Kevin Pham
            Shamim Rezaie Shamim Rezaie
            Votes:
            5 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.