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

Oracle Error ORA-00972 trying to update question_multichoice when upgrading Moodle from 1.9.12 to version 2.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: Questions
    • Labels:
      None
    • Environment:
    • Database:
      Oracle
    • Testing Instructions:
      Hide

      Moodle 1.9.12 installed on Linux server, using Oracle 11.2.0.1.0, Apache 2.2.19 and PHP 5.3.6

      Followed all the upgrade steps, logged in as admin on Moodle 2.1 web site to do upgrade and got oracle error.

      Show
      Moodle 1.9.12 installed on Linux server, using Oracle 11.2.0.1.0, Apache 2.2.19 and PHP 5.3.6 Followed all the upgrade steps, logged in as admin on Moodle 2.1 web site to do upgrade and got oracle error.
    • Workaround:
      Hide

      ???

      Show
      ???
    • Affected Branches:
      MOODLE_21_STABLE

      Description

      When upgrading Moodle 1.9.12 instance to version 2.1 I get the following oracle error when upgrading qtype_multichoice:

      Debug info: ORA-00972: identifier is too long
      UPDATE m_question_multichoice SET question = :o_question,layout = :o_layout,answers = :o_answers,single = :o_single,shuffleanswers = :o_shuffleanswers,correctfeedback = :o_correctfeedback,partiallycorrectfeedback = :o_partiallycorrectfeedback,incorrectfeedback = :o_incorrectfeedback,answernumbering = :o_answernumbering,correctfeedbackformat = :o_correctfeedbackformat,partiallycorrectfeedbackformat = :o_partiallycorrectfeedbackformat,incorrectfeedbackformat = :o_incorrectfeedbackformat WHERE id=:o_id
      [array (
      'o_question' => '249',
      'o_layout' => '0',
      'o_answers' => '460,461,462,463,464',
      'o_single' => '0',
      'o_shuffleanswers' => '1',
      'o_correctfeedback' => '',
      'o_partiallycorrectfeedback' => '1',
      'o_incorrectfeedback' => '',
      'o_answernumbering' => 'none',
      'o_correctfeedbackformat' => '1',
      'o_partiallycorrectfeedbackformat' => '0',
      'o_incorrectfeedbackformat' => '1',
      'o_id' => '125',
      )]
      Stack trace:
      line 396 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 268 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
      line 1285 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
      line 1318 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->update_record_raw()
      line 124 of /question/type/multichoice/db/upgrade.php: call to oci_native_moodle_database->update_record()
      line 379 of /lib/upgradelib.php: call to xmldb_qtype_multichoice_upgrade()
      line 1460 of /lib/upgradelib.php: call to upgrade_plugins()
      line 317 of /admin/index.php: call to upgrade_noncore()

      I notice that the bind variable o_partiallycorrectfeedbackformat is too long being more than 30 characters based on table column partiallycorrectfeedbackformat.

      How can I get the upgrade to complete? Every time I log in it tries to continue this step and produces this error.
      Can I fudge or comment out this field in moodle upgrade code so the upgrade completes?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              nsultana Noel Sultana
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: