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

Grader report generates SQL error on Oracle

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.4
    • Component/s: Gradebook
    • Labels:
    • Database:
      Oracle
    • Testing Instructions:
      Hide

      This requires Oracle to really test it properly. Testing in any other DB will at least check nothing was broken.

      Check that the site setting "showuseridentity" has email address ticked.

      Go to the grader report and check that no warnings or errors are displayed.

      Show
      This requires Oracle to really test it properly. Testing in any other DB will at least check nothing was broken. Check that the site setting "showuseridentity" has email address ticked. Go to the grader report and check that no warnings or errors are displayed.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-31804_ambiguous_sql

      Description

      With an Oracle database, when the 'Show user identity' setting (User policies) is set to 'Email address' and a teacher views the Grader report, an SQL error is thrown when the 'email' field is included twice:

      Debug info: ORA-00918: column ambiguously defined
      SELECT *
      FROM (SELECT u.id,u.picture,u.firstname,u.lastname,u.imagealt,u.email, email
      FROM z_user u
      JOIN (SELECT DISTINCT eu1_u.id
      ...

      It seems to have been introduced in MDL-26647. Patch to come shortly.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Show
              jonof Jonathon Fowler added a comment - This fixes it for me: https://github.com/jonof/moodle/commit/91b357efc8ec8f154f260bd0f2b746c6042416d9
              Hide
              salvetore Michael de Raadt added a comment -

              Hi, Jono.

              Thanks for reporting that and providing a solution.

              Show
              salvetore Michael de Raadt added a comment - Hi, Jono. Thanks for reporting that and providing a solution.
              Hide
              salvetore Michael de Raadt added a comment -

              Hi, Sam.

              I've just added you as a watcher as you were involved in the original issue.

              Show
              salvetore Michael de Raadt added a comment - Hi, Sam. I've just added you as a watcher as you were involved in the original issue.
              Hide
              salvetore Michael de Raadt added a comment -

              Jono.

              You can set yourself as assignee and push this to peer review, if you wish.

              Show
              salvetore Michael de Raadt added a comment - Jono. You can set yourself as assignee and push this to peer review, if you wish.
              Hide
              quen Sam Marshall added a comment -

              The change appears correct to me. Assuming that it works, I suggest it could be submitted for integration.

              Show
              quen Sam Marshall added a comment - The change appears correct to me. Assuming that it works, I suggest it could be submitted for integration.
              Hide
              andyjdavis Andrew Davis added a comment -

              Adding branches. This is only master and 2.2 stable.

              Show
              andyjdavis Andrew Davis added a comment - Adding branches. This is only master and 2.2 stable.
              Hide
              andyjdavis Andrew Davis added a comment -

              Submitting for integration.

              Show
              andyjdavis Andrew Davis added a comment - Submitting for integration.
              Hide
              poltawski Dan Poltawski added a comment -

              Thanks everyone, i've integrated this now

              Show
              poltawski Dan Poltawski added a comment - Thanks everyone, i've integrated this now
              Hide
              phalacee Jason Fowler added a comment -

              looks good to me

              Show
              phalacee Jason Fowler added a comment - looks good to me
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              U P S T R E A M I Z E D !

              Many thanks for the hard work, closing this as fixed.

              Ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - U P S T R E A M I Z E D ! Many thanks for the hard work, closing this as fixed. Ciao

                People

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

                  Dates

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