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

SQL error with ambiguous column definition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.9.9
    • 1.9.7
    • Questions
    • None
    • Any
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Easy

      There is an invalid query in the ./lib/question.php file with a reference to an ambiguous column definition which appears twice in the select. Oracle will not accept this as a valid query and errors with :

      SQL ORA-00918: column ambiguously defined in /usr/local/moodle-src/rel-20100113-4/lib/dmllib.php on line 481. STATEMENT: SELECT n.questionid as question, s.*, n.sumpenalty FROM m_question_states s, m_question_sessions n WHERE s.id = n.newgraded AND n.attemptid = '67706' AND n.questionid = '31777' with limits (-1, 1), referer: http://moodle.cqu.edu.au/mod/quiz/view.php?id=47336

      I have fixed this in the two places within that file by removing the reference to the duplicated column and have included a patch.

      Also, i have not submitted a patch before so i would be willing to have any comments about format of patch....etc??

        1. patch_ambiguous_col_2.0.patch
          2 kB
          Tim Hunt
        2. patch_ambiguous_col.patch
          2 kB
          Tim Hunt
        3. patch_ambiguous_col.patch
          2 kB
          David Binney
        4. patch_lib_questionlib.php
          1 kB
          David Binney

            timhunt Tim Hunt
            donkeyx David Binney (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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