Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
    • Environment:
      oracle
    • Database:
      Oracle
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      While testing PULL-423 (see http://tracker.moodle.org/browse/PULL-423?focusedCommentId=106553&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-106553), oracle/mod/quiz/report.php errored with:

      Debug info: ORA-00918: column ambiguously defined
      SELECT u.id || '#' || COALESCE(qa.attempt, 0) AS concattedid, (CASE WHEN qa.sumgrades = (SELECT MAX(qa2.sumgrades) FROM m_quiz_attempts qa2 WHERE qa2.quiz = qa.quiz AND qa2.userid = qa.userid) AND qa.timestart = (SELECT MIN(qa3.timestart) FROM m_quiz_attempts qa3 WHERE qa3.quiz = qa.quiz AND qa3.userid = qa.userid AND qa3.sumgrades = qa.sumgrades) THEN 1 ELSE 0 END) AS gradedattempt, qa.uniqueid,
      qa.id AS attempt,
      u.id AS userid,
      u.idnumber,
      u.firstname,
      u.lastname,
      u.picture,
      u.imagealt,
      u.email,
      u.institution,
      u.department,
      qa.sumgrades,
      qa.timefinish,
      qa.timestart,
      qa.timefinish - qa.timestart AS duration,
      CASE WHEN qa.timefinish = 0 THEN null
      WHEN qa.timefinish > qa.timestart THEN qa.timefinish - qa.timestart
      ELSE 0 END AS duration FROM m_user u LEFT JOIN m_quiz_attempts qa ON qa.userid = u.id AND qa.quiz = :quizid WHERE qa.id IS NOT NULL AND qa.preview = 0 ORDER BY concattedid ASC
      [array (
      'quizid' => '21',
      'oracle_num_rows' => 30,
      )]
      Stack trace:
      line 391 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 1042 of \lib\dml\oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
      line 1354 of \lib\tablelib.php: call to oci_native_moodle_database->get_records_sql()
      line 244 of \mod\quiz\report\responses\responses_table.php: call to table_sql->query_db()
      line 1375 of \lib\tablelib.php: call to quiz_report_responses_table->query_db()
      line 348 of \mod\quiz\report\responses\report.php: call to table_sql->out()
      line 90 of \mod\quiz\report.php: call to quiz_responses_report->display()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: