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

Duplicate records possible in grade categories table

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.8.3
    • Gradebook
    • None
    • MOODLE_28_STABLE

      I am afraid I do not know how exactly to reproduce this - but I know for sure this course was created on 2.8 and without any fancy hacks. An error was experienced by Helen when bulk-deleting courses on learn.moodle.net and then once I had worked out which course was affected - I could reproduce the error by visiting the gradebook of the course in question:

      "Found more than one record in fetch() !"

      Unfortunately that error message provides absolutely no details... But once I hacked the code I found the problematic record.

        id  | courseid | parent | depth |  path  | fullname | aggregation | keephigh | droplow | aggregateonlygraded | aggregateoutcomes | timecreated | timemodified | hidden 
      ------+----------+--------+-------+--------+----------+-------------+----------+---------+---------------------+-------------------+-------------+--------------+--------
       5579 |     5991 |        |     1 | /5579/ | ?        |           0 |        0 |       0 |                   1 |                 0 |  1425284437 |   1425284438 |      0
       5580 |     5991 |        |     1 | /5580/ | ?        |           0 |        0 |       0 |                   1 |                 0 |  1425284437 |   1425284438 |      0
      (2 rows)
      

      The timestamp suggests double click or something??

      Anyway what do:

      1. The gradebook code could at least provide some details in DEBUG_DEVELOPER mode?
      2. Maybe there needs to be some double click prevention in the category creation code?
      3. Maybe the gradebook should be more fault tolerant when deting records?

            Unassigned Unassigned
            poltawski Dan Poltawski
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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