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

Duplicate "course" ITEMTYPE in the GRADE_ITEMS table

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0.3
    • Fix Version/s: STABLE backlog
    • Component/s: Backup, Gradebook
    • Labels:
    • Environment:
      2.0.3
    • Database:
      Oracle
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      On our development server, I tried to click some quiz, but it gave me the following error message:

      Found more than one record in fetch() !

      More information about this error

      Stack trace:
      line 429 of /lib/setuplib.php: moodle_exception thrown
      line 146 of /lib/grade/grade_object.php: call to print_error()
      line 316 of /lib/grade/grade_item.php: call to grade_object::fetch_helper()
      line 947 of /lib/grade/grade_item.php: call to grade_item::fetch()
      line 352 of /lib/gradelib.php: call to grade_item::fetch_course_item()
      line 146 of /mod/quiz/view.php: call to grade_get_grades()

      After the investigation, I found, there are duplicate "course" in the ITEMTYPE field in the GRADE_ITEM table. I know for each course, there should be only one "course" ITEMTYPE in this table. I am not sure what's the reason to create multiple ones, maybe by quiz backup/import, course backup/import, etc. I would like to attach those records, and let me know if you can find anything useful.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: