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

Ambiguous column error when editing a quiz under Oracle

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.1.7, 2.2.4
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide

      1. Create a quiz activity in a course (give it a name, choose the 'Save and Display' button).
      2. Choose the 'Edit quiz' button.
      3. Observe a broken page with no quiz page editing controls and an exception in the webserver log.

      Expected result: a properly formed quiz editing page and no exception.

      Show
      1. Create a quiz activity in a course (give it a name, choose the 'Save and Display' button). 2. Choose the 'Edit quiz' button. 3. Observe a broken page with no quiz page editing controls and an exception in the webserver log. Expected result: a properly formed quiz editing page and no exception.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      MDL-32239 introduced a regression where the q.id column is included twice in a query when editing a quiz, which breaks on Oracle. The exception below is thrown. Patch forthcoming.

      Default exception handler: Error reading from database Debug: ORA-00918: column ambiguously defined
      SELECT * FROM (
        SELECT q.hidden, q.category, q.id, q.qtype, q.name, q.questiontext, \
          q.questiontextformat, q.id, q.createdby \
        FROM m_question q  WHERE q.parent = 0 AND q.hidden = 0 AND \
          q.category = :o_cat58 ORDER BY q.qtype ASC, q.name ASC \
      ) WHERE rownum <= :o_oracle_num_rows
      [array (
        'o_cat58' => '2',
        'o_oracle_num_rows' => 20,
      )]
      * line 394 of /lib/dml/moodle_database.php: dml_read_exception thrown
      * line 268 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
      * line 1098 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
      * line 1141 of /question/editlib.php: call to oci_native_moodle_database->get_recordset_sql()
      * line 1336 of /question/editlib.php: call to question_bank_view->load_page_questions()
      * line 1194 of /mod/quiz/editlib.php: call to question_bank_view->display_question_list()
      * line 477 of /mod/quiz/edit.php: call to quiz_question_bank_view->display()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jul/12