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

In grade_items_history the field 'decimals' is set as NOT NULL, but without a default value, yet the creation of a new course, category, or forum (for example) attempts to insert NULL here

    Details

    • Database:
      MySQL
    • Testing Instructions:
      Hide

      With debug on, Set decimalpoints=NULL at site and course level, in a new course, then add a forum.

      Show
      With debug on, Set decimalpoints=NULL at site and course level, in a new course, then add a forum.
    • Workaround:
      Hide

      Set default for 'decimals' in grade_item_history to 0
      (Alternatively, but perhaps with consequences, set this field to allow NULL value

      Show
      Set default for 'decimals' in grade_item_history to 0 (Alternatively, but perhaps with consequences, set this field to allow NULL value
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-29089_grade_history_missing_columns2

      Description

      The insertion of a new category or course or gradable activity can throw an exception, visible when debug is on.
      Moodle attempts to force a NULL into the decimals field in grade_items_history as shown at http://moodle.org/mod/forum/discuss.php?d=182894
      This likely occurs only if decimalpoints value is NULL at the site and course levels in grade_settings so that the routine only has NULL available.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    5/Dec/11