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

Visit grade report get "ORA-00918: column ambiguously defined"

XMLWordPrintable

    • Oracle
    • MOODLE_22_STABLE
    • Hide

      Obviously, the following code caused the error.

      code that cause error

      FROM (SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email, email

      There's "u.email" and "email" , field duplicated.

      Show
      Obviously, the following code caused the error. code that cause error FROM (SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email, email There's "u.email" and "email" , field duplicated.
    • Hide

      Upgrade Moodle to 2.2.1, in course page, click "Grade" in "setting" menu. The backend database is oracle.

      Show
      Upgrade Moodle to 2.2.1, in course page, click "Grade" in "setting" menu. The backend database is oracle.

      After upgraded to 2.2.1, I get "ORA-00918: column ambiguously defined" when I visit grade report in course. The error message shows here:

      "error message"

      Debug info: ORA-00918: column ambiguously defined
      SELECT *
      FROM (SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email, email
      FROM m_user u
      JOIN (SELECT DISTINCT eu1_u.id
      FROM m_user eu1_u
      JOIN m_user_enrolments eu1_ue ON eu1_ue.userid = eu1_u.id
      JOIN m_enrol eu1_e ON (eu1_e.id = eu1_ue.enrolid AND eu1_e.courseid = :o_eu1_courseid)
      WHERE eu1_u.deleted = 0 AND eu1_u.id <> :o_eu1_guestid) je ON je.id = u.id
       
       
      JOIN (
      SELECT DISTINCT ra.userid
      FROM m_role_assignments ra
      WHERE ra.roleid IN (5)
      AND ra.contextid IN (3068,10,1)
      ) rainner ON rainner.userid = u.id
      AND u.deleted = 0
       
      ORDER BY u.lastname ASC, u.firstname ASC)
      WHERE rownum <= :o_oracle_num_rows
      [array (
      'o_eu1_courseid' => '222',
      'o_eu1_guestid' => '1',
      'o_oracle_num_rows' => 100,
      )]
      Stack trace:
       
          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 1096 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
          line 388 of /grade/report/grader/lib.php: call to oci_native_moodle_database->get_records_sql()
          line 137 of /grade/report/grader/index.php: call to grade_report_grader->load_users()

            andyjdavis Andrew Davis
            luyanfei Yanfei Lu
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.