Moodle
  1. Moodle
  2. MDL-21248

insert_record() produces error during the assessment form definition

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.7
    • Fix Version/s: 1.9.8
    • Component/s: Workshop
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      26518

      Description

      The code in assessments.php - $action == 'insertelements' must produce error because the number of descriptions is one less than the number of grades. The error message is

      ERROR: null value in column "description" violates not-null constraint
      INSERT INTO mdl_workshop_elements ( ID, WORKSHOPID, ELEMENTNO, MAXSCORE ) VALUES ( 136, 38, 3, 5 )

      This is caused by the last grade mapping item which should not be considered as a proper element.

        Activity

        Hide
        David Mudrak added a comment -

        The attached patch fills the empty description with a hardcoded string to mark such element is used for grade mapping purposes only. In Workshop 2.0, these mappings are stored in a separate table.

        Show
        David Mudrak added a comment - The attached patch fills the empty description with a hardcoded string to mark such element is used for grade mapping purposes only. In Workshop 2.0, these mappings are stored in a separate table.
        Hide
        David Mudrak added a comment -

        Fixed in MOODLE_19_STABLE

        Show
        David Mudrak added a comment - Fixed in MOODLE_19_STABLE

          People

          • Assignee:
            David Mudrak
            Reporter:
            David Mudrak
            Tester:
            Nobody
            Participants:
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: