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

Toggling Show/Hide grade item can result in visible grade item but hidden grades

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.9.3
    • Fix Version/s: None
    • Component/s: Gradebook
    • Labels:
      None
    • Affected Branches:
      MOODLE_29_STABLE

      Description

      There are two methods by which an instructor can toggle between a grade item being visible or hidden. Both methods are from the Setup > Categories and items page. The first method is to select "Edit settings" from the Edit menu for the grade item. Then selected/un-select the Hidden check box and click Save Changes. The second method is to select Hide/Show directly from the Edit menu for the grade item. When the visibility of the grade item is updated via the second method the state of the hidden property on the grade item is cascaded to any existing grades for the grade item. For example, selecting Hide for the grade item will in turn mark existing grades hidden as well. On the contrary, editing the grade item visibility via the first method does not cascade the hidden value to the grades. Thus using a mixture of the two methods to manage the visibility of the grade item could yield a situation where the grades are flagged as hidden when the grade item is visible. The steps below illustrate this possibility.

      STEPS TO REPLICATE
      At the denoted steps, use this query to monitor the impact of the UI actions on the grade records in the database. Simply replace the courseid value with the mdl_course.id value of the course used in the testing. New activity will be added to the end of the results.

      select from_unixtime(ggh.timemodified) as grademodified, gi.itemname, u.lastname, ggh.finalgrade, ggh.hidden, ggh.action, ggh.source from mdl_grade_items gi
      inner join mdl_grade_grades_history ggh on ggh.itemid = gi.id
      inner join mdl_user u on u.id = ggh.userid
      where gi.courseid = 398 and gi.itemtype = 'manual'
      order by ggh.timemodified, ggh.id;

      1. Create a new course and enroll two students in the course.
      2. Create a manual grade item in the gradebook, Homework1.
      3. Create a manual grade item in the gradebook, Homework2. During creation mark grade item as Hidden.
      4. Create a manual grade item in the gradebook, Homework3. During creation mark grade item as Hidden.
      5. Run the query to observe that there is currently no grade history.
      6. Load Homework1 in the Single view report. Enter a grade for each student and Save.
      7. Run the query and observe that grade records have been created for each of the grade items. Grades for Homework2 and Homework3 are empty and not hidden. step07_illustration.png
      8. Use the single view report to enter grades for each student for Homework2 and Homework3.
      9. Run the query and observe that the grade records for Homework2 and Homework3 have been updated and are still not marked as hidden. step09_illustration.png
      10. Login has one of the students and go to Grades. Observe that as expected, the student can only view the grade for Homework1 as the Homework2 and Homework3 grade items are still hidden. Logout as the student.
      11. As the instructor go to the Setup > Categories and items tab of the gradebook.
      12. From the Edit menu for Homework2 select Show.
      13. Run the query and observe that the grade records for Homework2 were updated though there is no change in the hidden or finalgrade values. step13_illustration.png
      14. From the Edit menu for Homework2 select Hide.
      15. Run the query and observe that the grade records for Homework2 were updated and are now marked as hidden. step15_illustration.png
      16. From the Edit menu for Homework2 select Edit settings. Unselect the Hidden check box and click Save changes.
      17. Run the query and observe that there is no new grade history. The Homework2 grades were not updated and are still marked as hidden.
      18. From the Edit menu for Homework3 select Show.
      19. Run the query and observe that the grade records for Homework3 were updated though there is no change in the hidden or finalgrade values. step19_illustration.png
      20. From the Edit menu for Homework3 select Hide.
      21. Run the query and observe that the grade records for Homework3 where updated and are now marked as hidden. step21_illustration.png
      22. From the Edit menu for Homework3 select Show.
      23. Run the query and observe that the grade records for Homework3 where updated and are no longer marked as hidden. step23_illustration.png
      24. Login as a student and go to Grades. Though none of the grade items are hidden, the student still cannot view the grade for Homework2 because the grade itself remains flagged as hidden.

      ADDITIONAL THOUGHTS

      Both methods of toggling between a grade item being visible or hidden need to be consistent in whether the hidden property is cascaded to the grade records. Based on the observation that newly created grade records for a hidden grade item are not hidden, it would seem that the appropriate change would be to prevent the Edit > Show/Hide actions from cascading the hidden property to grades.

        Attachments

        1. step23_illustration.png
          step23_illustration.png
          38 kB
        2. step21_illustration.png
          step21_illustration.png
          36 kB
        3. step19_illustration.png
          step19_illustration.png
          32 kB
        4. step15_illustration.png
          step15_illustration.png
          29 kB
        5. step13_illustration.png
          step13_illustration.png
          25 kB
        6. step09_illustration.png
          step09_illustration.png
          22 kB
        7. step07_illustration.png
          step07_illustration.png
          13 kB

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              brian.winstead Brian Winstead
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: