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

Adjusting weights when extra credit item is present causes unexpected behavior

    Details

    • Testing Instructions:
      Hide

      Test 0 (before upgrade)

      1. Copy behat tests from this branch *_20150619.feature and put them into the non-upgraded instance
      2. Remove the step "gradebook calculations for the course ... are frozen at version ..." (it does not exist yet)
      3. Run those tests and make sure they pass

      Test 1 (upgrade)

      1. Create two courses with natural aggregation method, normal and extra credit items
      2. In the second course adjust some weights
      3. Grade some students, leave the grader report and user reports open to compare with after upgrade.
      4. Create backups of both courses (lets call them "backup #1" and "backup #2", you'll use them in test 2)
      5. Upgrade
      6. Compare the grader report and user reports with the ones before upgrade, make sure they are identical
      7. The second course (one with adjusted weights) must show the warning about fixed gradebook calculations, make sure the warning text is understandable
      8. Without accepting remove weights overriddes and make backup (backup #3)

      Test 2 (restore, use the already upgraded Moodle)
      Before testing hack your version.php and set the build number in $release to something in the future (imagine we already released the next weeklies)

      1. Restore backups that you made in test 1 as NEW COURSES
      2. Make sure course from backup #1 does not display a warning in the gradebook and backups #2 and #3 do
      3. Accept changes in the course that was restored from backup #2 and make a backup of this course
      4. Restore this as a new course and make sure the warning is not displayed. What do we test here: if backup was made after the fix, the course will not be marked as freezed when restored

      Test 3 (on the upgraded Moodle)
      watch the video from the first comment and try to do the same - the grades should not jump like crazy. Review the new behat test and make sure it makes sense

      Show
      Test 0 (before upgrade) Copy behat tests from this branch *_20150619.feature and put them into the non-upgraded instance Remove the step "gradebook calculations for the course ... are frozen at version ..." (it does not exist yet) Run those tests and make sure they pass Test 1 (upgrade) Create two courses with natural aggregation method, normal and extra credit items In the second course adjust some weights Grade some students, leave the grader report and user reports open to compare with after upgrade. Create backups of both courses (lets call them "backup #1" and "backup #2", you'll use them in test 2) Upgrade Compare the grader report and user reports with the ones before upgrade, make sure they are identical The second course (one with adjusted weights) must show the warning about fixed gradebook calculations, make sure the warning text is understandable Without accepting remove weights overriddes and make backup (backup #3) Test 2 (restore, use the already upgraded Moodle) Before testing hack your version.php and set the build number in $release to something in the future (imagine we already released the next weeklies) Restore backups that you made in test 1 as NEW COURSES Make sure course from backup #1 does not display a warning in the gradebook and backups #2 and #3 do Accept changes in the course that was restored from backup #2 and make a backup of this course Restore this as a new course and make sure the warning is not displayed. What do we test here: if backup was made after the fix, the course will not be marked as freezed when restored Test 3 (on the upgraded Moodle) watch the video from the first comment and try to do the same - the grades should not jump like crazy. Review the new behat test and make sure it makes sense
    • Affected Branches:
      MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull Master Branch:
      wip-MDL-49257-master

      Description

      Weight for an extra credit item is always a calculated value based on container elements

        Gliffy Diagrams

          Attachments

          1. EricMerrillGradeEC.png
            EricMerrillGradeEC.png
            522 kB
          2. grades1-1.png
            grades1-1.png
            24 kB
          3. grades1-2.png
            grades1-2.png
            24 kB
          4. grades1-3.png
            grades1-3.png
            26 kB
          5. grades2-1.png
            grades2-1.png
            24 kB
          6. grades2-1fixed.png
            grades2-1fixed.png
            24 kB
          7. grades2-2.png
            grades2-2.png
            24 kB
          8. grades2-2fixed.png
            grades2-2fixed.png
            24 kB
          9. grades2-3.png
            grades2-3.png
            26 kB
          10. grades2-3fixed.png
            grades2-3fixed.png
            26 kB
          11. grades3-1.png
            grades3-1.png
            23 kB
          12. grades3-1fixed.png
            grades3-1fixed.png
            24 kB
          13. grades3-2.png
            grades3-2.png
            24 kB
          14. grades3-2fixed.png
            grades3-2fixed.png
            24 kB
          15. grades3-3.png
            grades3-3.png
            26 kB
          16. grades3-3fixed.png
            grades3-3fixed.png
            26 kB
          17. grades5-1.png
            grades5-1.png
            31 kB
          18. grades5-1fixed.png
            grades5-1fixed.png
            24 kB
          19. grades5-2.png
            grades5-2.png
            25 kB
          20. grades5-2fixed.png
            grades5-2fixed.png
            27 kB
          21. grades5-3.png
            grades5-3.png
            27 kB
          22. grades5-3fixed.png
            grades5-3fixed.png
            29 kB
          23. Screen Shot 2015-02-20 at 11.09.21 AM.jpg
            Screen Shot 2015-02-20 at 11.09.21 AM.jpg
            257 kB
          24. Screen Shot 2015-02-20 at 11.10.33 AM.jpg
            Screen Shot 2015-02-20 at 11.10.33 AM.jpg
            259 kB
          25. setup1.png
            setup1.png
            24 kB
          26. setup2.png
            setup2.png
            25 kB
          27. setup2fixed.png
            setup2fixed.png
            25 kB
          28. setup3.png
            setup3.png
            25 kB
          29. setup3fixed.png
            setup3fixed.png
            25 kB
          30. setup5.png
            setup5.png
            26 kB

            Issue Links

              Activity

                People

                • Votes:
                  20 Vote for this issue
                  Watchers:
                  21 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    6/Jul/15