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

Duplicate records possible in grade categories table

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.8.3
    • Fix Version/s: None
    • Component/s: Gradebook
    • Affected Branches:
      MOODLE_28_STABLE

      Description

      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?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              poltawski Dan Poltawski
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: