Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-76258

Restoring mod_lti course modules with LTI 1.3 produces database errors when using preconfigured tools

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-76258-MOODLE_401_STABLE
    • MDL-76258-master
    • Hide
      1. Ensure that your site is running over SSL and publicy available (e.g. using ngrok)
      2. Navigate to Site admin -> Plugins -> External tool -> Manage tools
      3. Enter https://saltire.lti.app/tool into the "Tool URL..." textbox and press "Add LTI Advantage"
      4. Press Continue, and hit the "Continue" button
      5. Press the Activate button
      6. Create a course and turn editing on
      7. Add a new "External tool"
      8. Under "Preconfigured tool" choose "saLTIre"
      9. Save and return to the course
      10. Backup the course:
        1. From the "More" menu, choose "Course reuse"
        2. From the navigation dropdown, choose "Backup"
        3. Jump to the final step
        4. Press continue
      11. Press the "Restore" link and "Continue"
      12. Choose a course to restore into
      13. Press next a few times and then "Perform restore"
      14. From within the restored course, open the activity
        1. Confirm that the "Verification" field says "Passed"
      Show
      Ensure that your site is running over SSL and publicy available (e.g. using ngrok) Navigate to Site admin -> Plugins -> External tool -> Manage tools Enter https://saltire.lti.app/tool into the "Tool URL..." textbox and press "Add LTI Advantage" Press Continue, and hit the "Continue" button Press the Activate button Create a course and turn editing on Add a new "External tool" Under "Preconfigured tool" choose "saLTIre" Save and return to the course Backup the course: From the "More" menu, choose "Course reuse" From the navigation dropdown, choose "Backup" Jump to the final step Press continue Press the "Restore" link and "Continue" Choose a course to restore into Press next a few times and then "Perform restore" From within the restored course, open the activity Confirm that the "Verification" field says "Passed"

      When you create a preconfigured LTI 1.3 tool in course context, do a backup of this activity and restore it in another course of the same instance (or restore it twice in different courses of another instance), restore process breaks with dml_exception ("Duplicate entry 'RKWPPLtg4mn9ppC' for key 'mdl_ltitype_cli_uix' ").

      This happens because restore keeps the original clientid (which has to be unique) when it inserts the new ltitype that is attached to the course.

      Steps to reproduce:

      1. Create a course
      2. Create an activity of type "External Tool" and add a preconfigured tool using LTI 1.3 for this activity.
      3. Do a backup of this activity
      4. Restore the backup to another course - it will fail.

      Care: This issue affects all preconfigured tools which have been configured at least ONCE with LTI 1.3, even if the LTI version is being changed back to LTI 1.0/1.1 afterwards, because the client id will be kept anyway.

            stefan.hanauska Stefan Hanauska
            stefan.hanauska Stefan Hanauska
            PhMemmel PhMemmel
            Andrew Lyons Andrew Lyons
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            11 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 1 minute
                2h 1m

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