Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-3930

Error on creating questionnaire with really long name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.3
    • Component/s: Module: Questionnaire
    • Labels:
      None
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE

      Description

      When you create a new questionnaire, if you give it a long name e.g. "a really long title that apparently witll make the system crash if we keep going beyond about 55 characters apparently" then you get the following error

      Debug info: ERROR: value too long for type character varying(64)
      INSERT INTO lab_questionnaire_survey (owner,name,realm,title,subtitle,email,theme,thanks_page,thank_head,thank_body,info) VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11) RETURNING id
      [array (
      'owner' => '64',
      'name' => 'a really long title that apparently witll make the system crash if we keep going beyond about 55 characters apparently',
      'realm' => 'private',
      'title' => 'a really long title that apparently witll make the system crash if we keep going beyond about 55 characters apparently',
      'subtitle' => '',
      'email' => '',
      'theme' => '',
      'thanks_page' => '',
      'thank_head' => '',
      'thank_body' => '',
      'info' => '',
      )]
      Error code: dmlwriteexception
      Stack trace:

      line 410 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 239 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      line 823 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 875 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
      line 927 of /mod/questionnaire/locallib.php: call to pgsql_native_moodle_database->insert_record()
      line 131 of /mod/questionnaire/lib.php: call to questionnaire->survey_update()
      line 458 of /course/modedit.php: call to questionnaire_add_instance()

      Apparently, if you give the questionnaire a really short name, then save it and go back and change the name, everything is fine.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jenny-gray Jenny Gray
              Reporter:
              jenny-gray Jenny Gray
              Participants:
              Component watchers:
              Mike Churchward
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Jun/12