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

Max Grade of Aspects with Calculation Formula is always 100

XMLWordPrintable

    • MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE
    • MOODLE_28_STABLE, MOODLE_29_STABLE
    • wip-MDL-48239-master
    • Hide

      Until this fix is integrated, or if you are still using an old version of Moodle without this fix, there is a work-around:

      Change your calculation, and the max value for the column, so that the max value is 100. Then the bug does not cause problems.

      For example, if you had a calculated column where the max was 30, and the calculation was [[x]] + [[y]], change the max to 100 and the calculation to ([[x]] + [[y]])/30*100.

      Show
      Until this fix is integrated, or if you are still using an old version of Moodle without this fix, there is a work-around: Change your calculation, and the max value for the column, so that the max value is 100. Then the bug does not cause problems. For example, if you had a calculated column where the max was 30, and the calculation was [ [x] ] + [ [y] ], change the max to 100 and the calculation to ([ [x] ] + [ [y] ])/30*100.
    • Hide

      Before upgrade

      1. Create two courses.
      2. Enrol a few students in both.
      3. Go to the gradebook
      4. Go to "categories and items"
      5. Create a category.
      6. Create a grade item in the new category. Leave the max grade as 100.
      7. Edit the category total calculation and make it something easy (or hard, it's your choice).
      8. Go to the "grader report"
      9. Turn editing on and give one student a mark for the grade item.
      10. Go to "categories and items"
      11. Edit the grade item (not the category)
      12. Change the maximum grade to be out of 70.
      13. Go to the "grader report" and give a different student a grade.
      14. Time to create a gradebook in the second course.
      15. Go to the gradebook
      16. Go to "Course grade settings"
      17. Change "Min and max grades used in calculation" to "Initial min and max grades"
      18. Go to "categories and items"
      19. Create a grade item.
      20. Create a second grade item make the maximum something different to 100 and make the minimum something different to 0.
      21. Edit the calculation on the second item and make it something easy (or hard, it's your choice).
      22. Go to the "grader report"
      23. Turn editing on and give one student a mark for the grade item.
      24. backup both courses.

      Upgrade!

      1. Please restore both backed up courses.
      2. Both courses should show the warning about grade book problems.
      3. Course one covers one problem and course two covers another problem, both which are related to calculated grade items.
      4. Back up one of the courses.
      5. Restore the course and check that the warning is still present in the gradebook.
      6. Accept the gradebook changes in the original course
      7. You now need to make sure that the build number in version.php is greater than 21050627. If it isn't update it so it is.
      8. Back up the course.
      9. Restore the course and check that the warning is now gone in the gradebook.

      General testing that calculated grade items are working as they should.

      1. Create a course with some students enrolled.
      2. Go to the gradebook.
      3. Go to 'Categories and items' (Should be in the select box near the top).
      4. Add a category.
      5. Add a grade item and put it in the category.
      6. Edit the calculation for the category.
      7. Add an id number to the grade item and then create a simple calculation so that you know what the total should be.
      8. Edit the category and change the maximum grade to the total of the calculation if the student recieved 100%.
      9. Go to the 'Grader report' and enter in a grade for a student.
      10. Check the 'User report' and make sure that the range for all the grade items is correct.
      11. Go back to 'Categories and items'
      12. Change the maximum grade of the category again.
      13. Enter grades for a different student.
      14. Have another look at the 'User report'
      15. Check that the ranges have changed and are the same for both students.
      16. Go to 'Course grade settings' and change 'Min and max grades used in calculation' to 'Initial min and max grades'
      17. Go back to the 'User report'. Observe that the ranges have now changed between the two students.
      18. Try adding a calculated grade item (not a calculated category total) and changing the maximum grade total, giving students different grades before and after, and switching the 'min and max grades used in the calculation'.

      Unit tests

      1. Please run lib/tests/upgradelib_test.php on all databases.
      Show
      Before upgrade Create two courses. Enrol a few students in both. Go to the gradebook Go to "categories and items" Create a category. Create a grade item in the new category. Leave the max grade as 100. Edit the category total calculation and make it something easy (or hard, it's your choice). Go to the "grader report" Turn editing on and give one student a mark for the grade item. Go to "categories and items" Edit the grade item (not the category) Change the maximum grade to be out of 70. Go to the "grader report" and give a different student a grade. Time to create a gradebook in the second course. Go to the gradebook Go to "Course grade settings" Change "Min and max grades used in calculation" to "Initial min and max grades" Go to "categories and items" Create a grade item. Create a second grade item make the maximum something different to 100 and make the minimum something different to 0. Edit the calculation on the second item and make it something easy (or hard, it's your choice). Go to the "grader report" Turn editing on and give one student a mark for the grade item. backup both courses. Upgrade! Please restore both backed up courses. Both courses should show the warning about grade book problems. Course one covers one problem and course two covers another problem, both which are related to calculated grade items. Back up one of the courses. Restore the course and check that the warning is still present in the gradebook. Accept the gradebook changes in the original course You now need to make sure that the build number in version.php is greater than 21050627. If it isn't update it so it is. Back up the course. Restore the course and check that the warning is now gone in the gradebook. General testing that calculated grade items are working as they should. Create a course with some students enrolled. Go to the gradebook. Go to 'Categories and items' (Should be in the select box near the top). Add a category. Add a grade item and put it in the category. Edit the calculation for the category. Add an id number to the grade item and then create a simple calculation so that you know what the total should be. Edit the category and change the maximum grade to the total of the calculation if the student recieved 100%. Go to the 'Grader report' and enter in a grade for a student. Check the 'User report' and make sure that the range for all the grade items is correct. Go back to 'Categories and items' Change the maximum grade of the category again. Enter grades for a different student. Have another look at the 'User report' Check that the ranges have changed and are the same for both students. Go to 'Course grade settings' and change 'Min and max grades used in calculation' to 'Initial min and max grades' Go back to the 'User report'. Observe that the ranges have now changed between the two students. Try adding a calculated grade item (not a calculated category total) and changing the maximum grade total, giving students different grades before and after, and switching the 'min and max grades used in the calculation'. Unit tests Please run lib/tests/upgradelib_test.php on all databases.
    • Team '; drop tables Sprint 7

      Despite of entered value in max grade field of aspect the value in grade overview is always 100.
      Steps: make a grading aspect with formula
      see the difference in config tab and overview tab

        1. backup-moodle2-course-4-testkurs-20141121-0144.mbz
          187 kB
          Hofbauer Sepp
        2. capture_20141216_151002.png
          22 kB
          Hofbauer Sepp
        3. capture_20141216_151039.png
          21 kB
          Hofbauer Sepp
        4. capture_20141216_151059.png
          19 kB
          Hofbauer Sepp
        5. capture_20141216_151121.png
          20 kB
          Hofbauer Sepp
        6. config.png
          8 kB
          Hofbauer Sepp
        7. overview1.png
          4 kB
          Hofbauer Sepp
        8. overview2.png
          5 kB
          Hofbauer Sepp
        9. Restored from master backup(with both warnings).png
          104 kB
          Rajesh Taneja
        10. Upgrade from 2.7 to master.png
          182 kB
          Rajesh Taneja

            abgreeve Adrian Greeve
            hofbauer.sepp Hofbauer Sepp
            Damyon Wiese Damyon Wiese
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Rajesh Taneja Rajesh Taneja
            Votes:
            5 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved:

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