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

assignment_submissions->data1 and data2 are NOT NULL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.2, 1.8.2, 1.9
    • Fix Version/s: 1.7.3, 1.8.3, 1.9
    • Component/s: Assignment (2.2)
    • Labels:
      None
    • Environment:
      any
    • Database:
      Any
    • Affected Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      Both assignment_submission->data1 and data2 are declared as NOT NULL.

      This, obviously, means that, for each record, one meaningful value must be provided for both them. But it seems that, we are fulfilling them with:

      1) empty values under normal grading (online assignments, for example).
      2) NULL values under quick grading, because there is one insert where those fields are not set.

      So, I will do one of this:

      1) OR change both fields to nullable stopping them to default to empty where they are currently defaulting to empty.
      2) OR leave both fields as not null, adding their empty values in the quick grading.

      Final note: Only tested under 1.9 but I guess the same problem is there in older branches.
      Sincerely, I think that, if the fields haven't a meaningful default and that, in fact, they can be empty, then 1) above is the correct solution and both fields should be redefined as NULLable.

      Ciao

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Oct/07