Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-4048

Deleted field "deleted" causing issues in 2.4 (but working fine in 2.3) by lib\dml code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • 2.4
    • Module: Certificate
    • None
    • PHP, MYSQL
    • MySQL
    • Hide

      Remove the line "AND c.deleted IS NULL" from the query or update to the latest version of the certificate module.

      Show
      Remove the line "AND c.deleted IS NULL" from the query or update to the latest version of the certificate module.
    • MOODLE_24_STABLE

      • This is with regards to "PukunuiAustralia/moodle-mod_certificate" which was working just fine on Moodle 2.3
      • Upon upgrade to moodle 2.4, we notice that a field named "deleted" from "course_completions" is deleted!
      • Moodle code is trying to access this from lib\dml
      • Upon adding the "deleted" field (tinyint(1)), system works fine (just like it was in Moodle 2.3)
      • Will adding this "deleted" field cause any issues for other modules / code?

      Here is the stack trace
      --------------------------------- Start trace ------------------------------------
      Debug info: Unknown column 'c.deleted' in 'where clause'
      SELECT MAX(c.timecompleted) as timecompleted
      FROM mdl_course_completions c
      WHERE c.userid = ?
      AND c.course = ?
      AND c.deleted IS NULL
      [array (
      0 => '2',
      1 => '6',
      )]
      Error code: dmlreadexception
      Stack trace:
      line 426 of \lib\dml\moodle_database.php: dml_read_exception thrown
      line 1023 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1382 of \lib\dml\moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
      line 1085 of \mod\certificate\lib.php: call to moodle_database->get_record_sql()
      line 73 of \mod\certificate\type\A4_non_embedded\certificate.php: call to certificate_get_date()
      line 65 of \mod\certificate\view.php: call to require()

      -------------------------------------- end trace ------------------------------------

            markn Mark Nelson
            vcub04 vcube
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.