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

Update launch workflow to use centrally stored resource_links + API

    • MOODLE_500_STABLE
    • 8
    • Team Alpha - Planning I4-2024, Team Alpha - Sprint 1 I4-2024, Team Alpha - Sprint 2 I4-2024, Team Alpha - Sprint 3 I4-2024, Team Alpha - Planning I1-2025, Team Alpha - Sprint 1 I1-2025, Team Alpha - Sprint 2 I1-2025, Team Alpha - Sprint 3 I1-2025, Team Alpha - Sprint 4 I1-2025, Team Alpha - Planning I2-2025, Team Alpha - Sprint 1 I2-2025, Team Alpha - Sprint 2 I2-2025

      Part of MDL-79973

      Background:
      MDL-82916, MDL-82918 and MDL-84415 deal with the precursors to this issue: moving existing links to core_ltix, and adding a new API for CRUD of resource_links in core_ltix.

      Goals:
      Once those links are stored in core_ltix, the next focus is on updating the launch process + any relevant APIs, to make use these centrally located resource links. The idea is that consumer components (e.g. mod_lti) will store (or have existing stored, in the case of upgrading sites) resource links in core_ltix and then ask core_ltix to do a launch for a given resource link. The entire launch process for resource link should be controlled by core_ltix but easily consumable by other components, like mod_lti.

      Other notes:

      1. Need to migrate the relevant fields from mod_lti's 'lti' table to core_ltix as part of this work. E.g.:

       $sql = "INSERT INTO {lti_resource_link} (typeid, contextid, legacyid, url, title, text, textformat, launchcontainer, 
                                       customparams, icon, servicesalt)
                               SELECT lti.typeid, ctx.id, lti.id, lti.toolurl, lti.name, lti.intro, lti.introformat, 
                                      lti.launchcontainer, lti.instructorcustomparameters, lti.icon, lti.servicesalt
                                 FROM {lti} lti
                                 JOIN {context} ctx ON (ctx.instanceid = lti.course)
                                WHERE ctx.contextlevel = :contextlevel";
                  $DB->execute($sql, ['contextlevel' => CONTEXT_COURSE]);            $ltirs = $DB->get_recordset('lti', null, '', 'id');
                  foreach ($ltirs as $ltirecord) {
                      $DB->set_field('lti_resource_link', 'uuid', \core\uuid::generate(), ['legacyid' => $ltirecord->id]);
                  }
                  $ltirs->close();

      # This task deals only with launch: a separate task will deal with adding deep linking workflows. 

      1. Must consider embed vs new window launches as part of the API

            jaked Jake Dallimore
            jaked Jake Dallimore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 53 minutes
                5h 53m

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