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

Grades exist in database with no grade and are marked as "hidden", but when a student takes the quiz, grade remains hidden in gradebook, despite grade item settings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.8
    • Fix Version/s: None
    • Component/s: Gradebook, Quiz
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      A quiz was hidden with a start and end date. Students took the quiz when it became available. The quiz grades remain hidden, though. The item is listed in the gradebook, but in the user report it is displayed simply as a grayed-out hyphen. The grade is visible in the grader report to the teacher, but it is grayed-out as well.

      The grade_grades records for all students exist in the database, and they are already marked as hidden, even if the rawgrade value is "null" (i.e., student has not taken the quiz yet). So, even when the quiz is reenabled (i.e., the dates extended), when the student takes the quiz and gets an actual grade value for the quiz grade item, the grade_grades record is just updated and the grade visibility is not changed, because the record is only updated, and not created. The hidden parameter is not updated in this case.

      I believe the pertinent function is grade_update() inside of gradelib.php. The segment of code (my line numberings are off because I've done a lot of debugging) ~224 through ~300, starting from the recordset creation until the call to "$grade_item->update_raw_grade".

      Please let me know what else I can do to help with this bug or what I can do to resolve the issue we're having with this. Thanks!

        Attachments

          Activity

            People

            Assignee:
            moodle.com moodle.com
            Reporter:
            bazzymg Basil Mohamed Gohar
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: