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

LTI Backup/Restore: handle tool type 0 on backup

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              claudevervoort Claude Vervoort
              Participants:
              Component watchers:
              Adrian Greeve, Mihail Geshoski, Peter Dias, Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: