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

LTI: support substitution parameter for course history

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      In this test, we're going to create a course and copies of it, and verify the history of the course (i.e. the ancestor course ids) are passed to the test tool.

      pre-requisite

      1. LTI Advantage requires your site to be reachable from the internet. If not, Install ngrok to expose your moodle setup externally. Refer here for additional guidelines
      2. Have a course with an instructor.
      3. As admin install the LTI Robotest test app using the instructions found at https://robotest.theedtech.dev
        1. Make sure to set the custom parameters as indicated, in particular the $Context.id.history since it will be the one we will verify in this test.
      4. Tool configuration usage: Show in activity chooser and as preconfigured tool
      5. Enter a course as instructor
      6. Turn editing on
      7. Add external activity, choose Robotest app
      8. Click Select Content and Select one item (graded or not, does not matter)
      9. Save and Return to Course

      Verify

      1. Launch the newly added link to the test app and verify the $Context.id.history says it's blank
      2. Copy the course as a new course (copy, or backup and restore in new course)
      3. In that new course, click on the same link
      4. Verify the $Context.id.history is now a number (the id of the previous course)
      5. Copy this course as a new course again
      6. Verify the $Context.id.history is now 2 numbers separated by a comma, the highest number first
      Show
      In this test, we're going to create a course and copies of it, and verify the history of the course (i.e. the ancestor course ids) are passed to the test tool. pre-requisite LTI Advantage requires your site to be reachable from the internet. If not, Install ngrok to expose your moodle setup externally. Refer here for additional guidelines Have a course with an instructor. As admin install the LTI Robotest test app using the instructions found at https://robotest.theedtech.dev Make sure to set the custom parameters as indicated, in particular the $Context.id.history since it will be the one we will verify in this test. Tool configuration usage: Show in activity chooser and as preconfigured tool Enter a course as instructor Turn editing on Add external activity, choose Robotest app Click Select Content and Select one item (graded or not, does not matter) Save and Return to Course Verify Launch the newly added link to the test app and verify the $Context.id.history says it's blank Copy the course as a new course (copy, or backup and restore in new course) In that new course, click on the same link Verify the $Context.id.history is now a number (the id of the previous course) Copy this course as a new course again Verify the $Context.id.history is now 2 numbers separated by a comma, the highest number first
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE
    • Pull from Repository:
    • Pull 3.10 Branch:
      MDL-66934-coursehistory-310
    • Pull Master Branch:
      MDL-66934-coursehistory

      Description

      The LTI Core specification specifies the Context.id.history variable. It is used to pass to the tool the history of the context, i.e. of which course this copy is a copy from.

      From the specification: https://www.imsglobal.org/spec/lti/v1p3/#lti-context-variable

      My title

      A comma-separated list of URL-encoded context ID values representing previous copies of the context; the ID of most recent copy should appear first in the list followed by any earlier IDs in reverse chronological order. If the context was created from scratch, not as a copy of an existing context, then this variable should have an empty value.

      This is used by tool to copy any customization done in the parent context and is essential to course copy mechanic, so that when a moodle course is copied, its counterpart in the tool space is also copied from the same source.

      Support for this parameter is becoming ubiquitous across the major LMS vendors and this ticket is to add support in moodle.

      If the course restore happens on another site, the history is not preserved, this is only for same site course copies.

        Attachments

        1. Screenshot_1.jpg
          Screenshot_1.jpg
          63 kB
        2. Screenshot_2.jpg
          Screenshot_2.jpg
          78 kB
        3. Screenshot_3.jpg
          Screenshot_3.jpg
          75 kB

          Issue Links

            Activity

              People

              Assignee:
              claudevervoort Claude Vervoort
              Reporter:
              claudevervoort Claude Vervoort
              Peer reviewer:
              Mathew May
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/20

                  Time Tracking

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