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

insert_record() produces error during the assessment form definition

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

      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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            mudrd8mz David Mudrák 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
            mudrd8mz David Mudrák 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
            mudrd8mz David Mudrák added a comment -

            Fixed in MOODLE_19_STABLE

            Show
            mudrd8mz David Mudrák added a comment - Fixed in MOODLE_19_STABLE

              People

              • Assignee:
                mudrd8mz David Mudrák
                Reporter:
                mudrd8mz David Mudrák
                Tester:
                Nobody
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Mar/10