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

Error in MariaDB 10.5.10 in the SQL query to recover course grades

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Waiting for peer review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.10.4, 3.11
    • Fix Version/s: None
    • Component/s: Gradebook
    • Labels:

      Description

      In Workplace we have a unittest that tests re-enrolment and recovering course grades. This test started failing on MariaDB (on ci.moodle.org and in moodle-docker).

      There are no tests for the function grade_recover_history_grades() in Moodle LMS.

      To be honest I don't understand what exactly is happening - why did it suddenly start falling now and why the current SQL query does not work on mariadb (by "does not work" I mean that this query was returning empty array in mariadb)

      But what I can do is to add the same unittest to Moodle LMS and change the SQL query so it works on all dbs.

      To reproduce:

      from the attached solution take only the unittest and run it on different DB engines on ci.moodle.org or in moodle-docker - it will work on postgres/mysql/oracle/mssql but will fail on mariadb.

        Attachments

          Activity

            People

            Assignee:
            marina Marina Glancy
            Reporter:
            marina Marina Glancy
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours
                5h