vfremaux / moodle-mod_flashcard

A mpdule providing a memoizong helper activity using Leitner model
5 stars 10 forks source link

Unit test failures detected in CI/CD pipeline. #30

Open niko-hoogeveen opened 5 months ago

niko-hoogeveen commented 5 months ago

Debugging: Error reading from database (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND m.name = 'flashcard' cm.instance = f.id AND ' at line 13

        SELECT DISTINCT u.id
        FROM phpu_user u
        JOIN (
        SELECT
            fc.userid
        FROM
              phpu_course_modules cm,
              phpu_modules m,
              phpu_flashcard f,
              phpu_flashcard_card fc
        WHERE
            cm.module = m.id AND
            AND m.name = ?
            cm.instance = f.id AND
            f.id = fc.flashcardid AND
            cm.id = ?
    ) target ON u.id = target.userid

Typo in SQL query - 'cm.module = m.id AND AND m.name = ?'

Should be: 'cm.module = m.id AND m.name = ? AND ...'