While upgrading a test site on Mahara 21.x that did not have LTI Advantage the upgrade fails.
Tracked this to an upgrade step in htdocs/lib/db/upgrade.php
This version resolved the issue:
if ($oldversion < 2021042718) {
$table = new XMLDBTable('lti_assessment');
if (table_exists($table)) { log_debug("Make sure groups associated with LTI assessment have 'submittableto' set to true"); execute_sql(" UPDATE {group}
SET submittableto = 1 WHERE id IN ( SELECT foo.id FROM ( SELECT g1.id FROM {lti_assessment} l JOIN {group} g1 ON g1.id = l.group WHERE g1.submittableto = 0 ) AS foo )");
}
}
While upgrading a test site on Mahara 21.x that did not have LTI Advantage the upgrade fails.
Tracked this to an upgrade step in htdocs/ lib/db/ upgrade. php
This version resolved the issue:
if ($oldversion < 2021042718) { 'lti_assessment '); exists( $table) ) {
log_ debug(" Make sure groups associated with LTI assessment have 'submittableto' set to true");
execute_ sql("
UPDATE {group}
WHERE id IN (
SELECT foo.id FROM (
SELECT g1.id
FROM {lti_assessment} l
JOIN {group} g1 ON g1.id = l.group
WHERE g1.submittableto = 0
) AS foo
)");
$table = new XMLDBTable(
if (table_
SET submittableto = 1
}
}