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

              jonof Jonathon Fowler created issue -
              Show
              jonof Jonathon Fowler added a comment - This fixes it for me: https://github.com/jonof/moodle/commit/91b357efc8ec8f154f260bd0f2b746c6042416d9
              salvetore Michael de Raadt made changes -
              Field Original Value New Value
              Link This issue is a regression caused by MDL-26647 [ MDL-26647 ]
              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.
              salvetore Michael de Raadt made changes -
              Fix Version/s STABLE backlog [ 10463 ]
              Priority Minor [ 4 ] Critical [ 2 ]
              Labels patch triaged
              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.
              quen Sam Marshall made changes -
              Status Open [ 1 ] Peer review in progress [ 10013 ]
              Peer reviewer quen
              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.
              quen Sam Marshall made changes -
              Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
              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.
              andyjdavis Andrew Davis made changes -
              andyjdavis Andrew Davis made changes -
              Testing Instructions This requires Oracle to really test it properly. Testing in any other DB will at least check nothing was broken.

              Go to the grader report and check that no warnings or errors are displayed.
              Hide
              andyjdavis Andrew Davis added a comment -

              Submitting for integration.

              Show
              andyjdavis Andrew Davis added a comment - Submitting for integration.
              andyjdavis Andrew Davis made changes -
              Status Development in progress [ 3 ] Waiting for integration review [ 10010 ]
              andyjdavis Andrew Davis made changes -
              Link This issue is duplicated by MDL-30776 [ MDL-30776 ]
              andyjdavis Andrew Davis made changes -
              Link This issue is duplicated by MDL-31628 [ MDL-31628 ]
              andyjdavis Andrew Davis made changes -
              Testing Instructions This requires Oracle to really test it properly. Testing in any other DB will at least check nothing was broken.

              Go to the grader report and check that no warnings or errors are displayed.
              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.
              poltawski Dan Poltawski made changes -
              Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
              Integrator poltawski
              Currently in integration Yes [ 10041 ]
              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
              poltawski Dan Poltawski made changes -
              Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
              Fix Version/s 2.2.4 [ 12162 ]
              Fix Version/s STABLE backlog [ 10463 ]
              timb Tim Barker made changes -
              Tester phalacee
              phalacee Jason Fowler made changes -
              Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
              Hide
              phalacee Jason Fowler added a comment -

              looks good to me

              Show
              phalacee Jason Fowler added a comment - looks good to me
              phalacee Jason Fowler made changes -
              Status Testing in progress [ 10011 ] Tested [ 10006 ]
              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
              stronk7 Eloy Lafuente (stronk7) made changes -
              Status Tested [ 10006 ] Closed [ 6 ]
              Resolution Fixed [ 1 ]
              Currently in integration Yes [ 10041 ]
              Integration date 19/May/12

                People

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

                  Dates

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