Upgrade fails when LTI not installed

Bug #1970680 reported by Gold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Critical
Gold
20.10
Fix Released
Critical
Unassigned
21.04
Fix Released
Critical
Unassigned
21.10
Fix Released
Critical
Unassigned
22.04
Fix Released
Critical
Gold
22.10
Fix Released
Critical
Unassigned

Bug Description

While upgrading a test site on Mahara 21.x that did not have LTI (1.1) 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
                )");
        }
    }

Mitigation, if someone is in the middle of an update: Install the LTI module.

Tags: bite-sized
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review
description: updated
description: updated
Robert Lyon (robertl-9)
summary: - Upgrade fails when LTI Advantage not installed
+ Upgrade fails when LTI not installed
description: updated
description: updated
Revision history for this message
Robert Lyon (robertl-9) wrote :

This problem is actually related to the LTI module and not the LTI Advantage module as previously mentioned.

To replicate this problem one has have a site that began life before Mahara 17.04, has upgraded in the past to a newer version, and have not installed the module LTI via Extensions page

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/c/mahara/+/12669
Committed: https://git.mahara.org/mahara/mahara/commit/22c544745f0443ec6e2dc3d63251b4b8d14feedc
Submitter: "Robert Lyon <email address hidden>"
Branch: main

commit 22c544745f0443ec6e2dc3d63251b4b8d14feedc
Author: Gold <email address hidden>
Date: Thu Apr 28 13:11:52 2022 +1200

Bug 1970680: Only update if lti_assessment table exists

Testing:

Install an older Mahara without LTI 1.1, the 'lti' module installed.
Update to the latest version with this patchset included.

Change-Id: Ib08878373eba41c238d60b2718c44bd3cb6fd8a6
Signed-off-by: Gold <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "22.04_DEV" branch: https://reviews.mahara.org/c/mahara/+/12671

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "21.10_DEV" branch: https://reviews.mahara.org/c/mahara/+/12672

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "21.04_DEV" branch: https://reviews.mahara.org/c/mahara/+/12673

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "20.10_DEV" branch: https://reviews.mahara.org/c/mahara/+/12674

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/c/mahara/+/12671
Committed: https://git.mahara.org/mahara/mahara/commit/9c286ff4c0b8eb261b0872d8f501aa8557fab18a
Submitter: "Robert Lyon <email address hidden>"
Branch: 22.04_DEV

commit 9c286ff4c0b8eb261b0872d8f501aa8557fab18a
Author: Gold <email address hidden>
Date: Thu Apr 28 13:11:52 2022 +1200

Bug 1970680: Only update if lti_assessment table exists

Testing:

Install an older Mahara without LTI 1.1, the 'lti' module installed.
Update to the latest version with this patchset included.

Change-Id: Ib08878373eba41c238d60b2718c44bd3cb6fd8a6
Signed-off-by: Gold <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/c/mahara/+/12672
Committed: https://git.mahara.org/mahara/mahara/commit/018c3f1d61ef0b16791f9007fa2a48c73171e831
Submitter: "Robert Lyon <email address hidden>"
Branch: 21.10_DEV

commit 018c3f1d61ef0b16791f9007fa2a48c73171e831
Author: Gold <email address hidden>
Date: Thu Apr 28 13:11:52 2022 +1200

Bug 1970680: Only update if lti_assessment table exists

Testing:

Install an older Mahara without LTI 1.1, the 'lti' module installed.
Update to the latest version with this patchset included.

Change-Id: Ib08878373eba41c238d60b2718c44bd3cb6fd8a6
Signed-off-by: Gold <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/c/mahara/+/12674
Committed: https://git.mahara.org/mahara/mahara/commit/12a389edffd435517db97f0aeafe529973aed34b
Submitter: "Robert Lyon <email address hidden>"
Branch: 20.10_DEV

commit 12a389edffd435517db97f0aeafe529973aed34b
Author: Gold <email address hidden>
Date: Thu Apr 28 13:11:52 2022 +1200

Bug 1970680: Only update if lti_assessment table exists

Testing:

Install an older Mahara without LTI 1.1, the 'lti' module installed.
Update to the latest version with this patchset included.

Change-Id: Ib08878373eba41c238d60b2718c44bd3cb6fd8a6
Signed-off-by: Gold <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/c/mahara/+/12673
Committed: https://git.mahara.org/mahara/mahara/commit/6e6738f5c4d9b57381615e3f9f0374b69c74b8de
Submitter: "Robert Lyon <email address hidden>"
Branch: 21.04_DEV

commit 6e6738f5c4d9b57381615e3f9f0374b69c74b8de
Author: Gold <email address hidden>
Date: Thu Apr 28 13:11:52 2022 +1200

Bug 1970680: Only update if lti_assessment table exists

Testing:

Install an older Mahara without LTI 1.1, the 'lti' module installed.
Update to the latest version with this patchset included.

Change-Id: Ib08878373eba41c238d60b2718c44bd3cb6fd8a6
Signed-off-by: Gold <email address hidden>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.