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

LTI Backup/Restore: handle tool type 0 on backup



    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3.4, 3.4.1, 3.5
    • Fix Version/s: None
    • Labels:
    • Affected Branches:


      MDL-34161 fixes the external tool association to tool type on backup and restore. Prior to its fix, external tool were always associated to tool type 0 on restore as the backup did not contain the tool type information.

      The fix however does not address the courses restored from backups made to that fix. Those courses have the external tools with a type of 0, which is somewhat mitigated as, on launch, moodle associates those external tool with a tool type dynamically on based on url matching. However, while appearing to be working properly, those links in the backup will still not contain tool type info.

      This ticket proposes to re-use the heuristic around looking type by matching URL as happens on the actual launch of the course to assign the type (locallib#lti_get_tool_by_url_match).

      Question is when should this happen:

      • On backup: so that the backup contains the type id and type data needed to restore the course; this would allow the backup to embed information about the tool type so that it may be restored on other sites.
      • On restore: so that older backups will be restored associated directly with a tool type if a matching tool pre-exists for that external tool url. This will allow pre-existing backup to restore properly given a match tool type exists, but will not be able to create missing course tool types as the information is not in the backup. Those would still be associated to 0. However, since current moodle logic already runs the match at runtime if the tool type is 0, it makes the need to fix on restore less acute.

      This ticket will thus focus on including tool type info based on URL for tool type 0 for the backup case alone.




            Unassigned Unassigned
            claudevervoort Claude Vervoort
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            1 Vote for this issue
            2 Start watching this issue