Moodle
  1. Moodle
  2. MDL-31804

Grader report generates SQL error on Oracle

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical 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
    • Rank:
      38426

      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.

        Issue Links

          Activity

          Jonathon Fowler created issue -
          Show
          Jonathon Fowler added a comment - This fixes it for me: https://github.com/jonof/moodle/commit/91b357efc8ec8f154f260bd0f2b746c6042416d9
          Michael de Raadt made changes -
          Field Original Value New Value
          Link This issue is a regression caused by MDL-26647 [ MDL-26647 ]
          Hide
          Michael de Raadt added a comment -

          Hi, Jono.

          Thanks for reporting that and providing a solution.

          Show
          Michael de Raadt added a comment - Hi, Jono. Thanks for reporting that and providing a solution.
          Michael de Raadt made changes -
          Fix Version/s STABLE backlog [ 10463 ]
          Priority Minor [ 4 ] Critical [ 2 ]
          Labels patch triaged
          Hide
          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
          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
          Michael de Raadt added a comment -

          Jono.

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

          Show
          Michael de Raadt added a comment - Jono. You can set yourself as assignee and push this to peer review, if you wish.
          Sam Marshall made changes -
          Status Open [ 1 ] Peer review in progress [ 10013 ]
          Peer reviewer quen
          Hide
          Sam Marshall added a comment -

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

          Show
          Sam Marshall added a comment - The change appears correct to me. Assuming that it works, I suggest it could be submitted for integration.
          Sam Marshall made changes -
          Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
          Hide
          Andrew Davis added a comment -

          Adding branches. This is only master and 2.2 stable.

          Show
          Andrew Davis added a comment - Adding branches. This is only master and 2.2 stable.
          Andrew Davis made changes -
          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
          Andrew Davis added a comment -

          Submitting for integration.

          Show
          Andrew Davis added a comment - Submitting for integration.
          Andrew Davis made changes -
          Status Development in progress [ 3 ] Waiting for integration review [ 10010 ]
          Andrew Davis made changes -
          Link This issue is duplicated by MDL-30776 [ MDL-30776 ]
          Andrew Davis made changes -
          Link This issue is duplicated by MDL-31628 [ MDL-31628 ]
          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.
          Dan Poltawski made changes -
          Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
          Integrator poltawski
          Currently in integration Yes [ 10041 ]
          Hide
          Dan Poltawski added a comment -

          Thanks everyone, i've integrated this now

          Show
          Dan Poltawski added a comment - Thanks everyone, i've integrated this now
          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 ]
          Tim Barker made changes -
          Tester phalacee
          Jason Fowler made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Hide
          Jason Fowler added a comment -

          looks good to me

          Show
          Jason Fowler added a comment - looks good to me
          Jason Fowler made changes -
          Status Testing in progress [ 10011 ] Tested [ 10006 ]
          Hide
          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
          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
          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: