dmlwriteexception in attforblock

dmlwriteexception in attforblock

by Erin Billy -
Number of replies: 0

I am trying to upgrade my attendance module and block. Whenever I try to do so, however, I get a database error (the entire error is pasted at the end of this message).

If it helps, I have been upgrading from Moodle 1.9 to 2.4 and have never had this module working properly with this installation (it worked fine in  for1.9).

Any thoughts on how to proceed?

And here is the rrror message:

Upgrading to new version

mod_attforblock

Error writing to database

More information about this error

Debug info: 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 'FROM mdl_attforblock AS att WHERE att.course=ses.courseid' at line 1
UPDATE mdl_attendance_sessions AS ses SET attendanceid=att.id FROM mdl_attforblock AS att WHERE att.course=ses.courseid
[array (
)]
Error code: dmlwriteexception
Stack trace:
  • line 429 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 913 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 275 of /mod/attforblock/db/upgrade.php: call to mysqli_native_moodle_database->execute()
  • line 629 of /lib/upgradelib.php: call to xmldb_attforblock_upgrade()
  • line 360 of /lib/upgradelib.php: call to upgrade_plugins_modules()
  • line 1544 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 349 of /admin/index.php: call to upgrade_noncore()
Average of ratings: -