Moodle
  1. Moodle
  2. MDL-37165

Assignment summary wont display on Oracle

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.3, 2.4
    • Fix Version/s: 2.3.4, 2.4.1
    • Component/s: Assignment
    • Labels:

      Description

      Viewing the assignment summary page with Oracle gives exception:

      ORA-00905: missing keyword
      SELECT COUNT(s.userid)
      FROM m_assign_submission s
      JOIN(SELECT DISTINCT eu2_u.id
      FROM m_user eu2_u
      JOIN m_role_assignments eu2_ra3 ON (eu2_ra3.userid = eu2_u.id AND eu2_ra3.roleid IN (5) AND eu2_ra3.contextid IN (1,3,21,1027))
      JOIN m_user_enrolments eu2_ue ON eu2_ue.userid = eu2_u.id
      JOIN m_enrol eu2_e ON (eu2_e.id = eu2_ue.enrolid AND eu2_e.courseid = :o_eu2_courseid)
      WHERE eu2_u.deleted = 0 AND eu2_u.id <> :o_eu2_guestid) AS e ON e.id = s.userid
      WHERE
      s.assignment = :o_assignid AND
      s.timemodified IS NOT NULL AND
      s.status = :o_submissionstatus
      [array (
      'o_eu2_courseid' => '2',
      'o_eu2_guestid' => '1',
      'o_assignid' => '1',
      'o_submissionstatus' => 'draft',
      )]

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Damyon Wiese added a comment -

            Because the Oracle bug was due to some incompatible join syntax I though it would be best to check the fix in all databases just to be sure.

            I have tested this on 23 and master for oracle, postgres, mssql and mysql. Oracle is the only database that showed the problem before the patch and all databases work fine after the patch. The root cause was the use of AS for a join alias (which I guess falls into the same category as a table alias).

            Show
            Damyon Wiese added a comment - Because the Oracle bug was due to some incompatible join syntax I though it would be best to check the fix in all databases just to be sure. I have tested this on 23 and master for oracle, postgres, mssql and mysql. Oracle is the only database that showed the problem before the patch and all databases work fine after the patch. The root cause was the use of AS for a join alias (which I guess falls into the same category as a table alias).
            Hide
            Dan Poltawski added a comment -

            Thanks Damyon, integrated to 23, 24 and master.

            Show
            Dan Poltawski added a comment - Thanks Damyon, integrated to 23, 24 and master.
            Hide
            Dan Poltawski added a comment -

            Tested on mssql + oracle and looks good. David is doing the rest.

            Show
            Dan Poltawski added a comment - Tested on mssql + oracle and looks good. David is doing the rest.
            Hide
            David Monllaó added a comment -

            Tested in mysql and pgsql in 23 and master. It passes

            Show
            David Monllaó added a comment - Tested in mysql and pgsql in 23 and master. It passes
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Changes are now upstream, thanks for your collaboration!

            If you are going to have any celebration next days, enjoy with your gang, if not, too!

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Changes are now upstream, thanks for your collaboration! If you are going to have any celebration next days, enjoy with your gang, if not, too! Ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: