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

Accessing assignment via LTI provider only shows heading

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Requirements
      1. Two sites.
      • One for your LTI consumer.
      • One for your LTI provider.
      On your LTI provider site.
      1. Visit 'Site administration' > 'Plugins' > 'Authentication' > 'Manage authentication'.
      2. Enable 'LTI'.
      3. Visit 'Site administration' > 'Plugins' > 'Enrolments' > 'Manage enrol plugins'.
      4. Enable 'Shared external tool'.
      5. Visit a course and create an assignment.
      6. Visit 'Course administration' > 'Users' > 'Enrolment methods'.
      7. Add a shared external tool with 'Tool to be provided' selected to your assignment.
      8. Visit 'Course administration' > 'Shared external tools'.
      9. Make note of the URL and secret.
      On your LTI consumer site.
      1. Visit a course.
      2. Add a LTI activity and use the URL and secret from your LTI provider site and enter any consumer key you want.
      3. Log in as a student.
      4. Visit the course and click on the LTI activity.
      5. Check the assignment displays as expected.
      Show
      Requirements Two sites. One for your LTI consumer. One for your LTI provider. On your LTI provider site. Visit 'Site administration' > 'Plugins' > 'Authentication' > 'Manage authentication'. Enable 'LTI'. Visit 'Site administration' > 'Plugins' > 'Enrolments' > 'Manage enrol plugins'. Enable 'Shared external tool'. Visit a course and create an assignment. Visit 'Course administration' > 'Users' > 'Enrolment methods'. Add a shared external tool with 'Tool to be provided' selected to your assignment. Visit 'Course administration' > 'Shared external tools'. Make note of the URL and secret. On your LTI consumer site. Visit a course. Add a LTI activity and use the URL and secret from your LTI provider site and enter any consumer key you want. Log in as a student. Visit the course and click on the LTI activity. Check the assignment displays as expected.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-53977_master

      Description

      This happens because of MDL-21782 where the user is not returned by get_enrolled_sql because of the round(time(), -2) hack to utilise DB caching. The user is instantly enrolled in the course when accessing the LTI activity but the round(time(), -2) hack means the it's possible that the time used in the query is less than the current time, meaning they are not returned until X seconds has passed.

      Steps to replicate
      Requirements
      1. Two sites.
      • One for your LTI consumer.
      • One for your LTI provider.
      On your LTI provider site.
      1. Visit 'Site administration' > 'Plugins' > 'Authentication' > 'Manage authentication'.
      2. Enable 'LTI'.
      3. Visit 'Site administration' > 'Plugins' > 'Enrolments' > 'Manage enrol plugins'.
      4. Enable 'Shared external tool'.
      5. Visit a course and create an assignment.
      6. Visit 'Course administration' > 'Users' > 'Enrolment methods'.
      7. Add a shared external tool with 'Tool to be provided' selected to your assignment.
      8. Visit 'Course administration' > 'Shared external tools'.
      9. Make note of the URL and secret.
      On your LTI consumer site.
      1. Visit a course.
      2. Add a LTI activity and use the URL and secret from your LTI provider site.
      3. Log in as a student.
      4. Visit the course and click on the LTI activity.
      5. Notice the assignment header is only shown.
      6. Wait for 2 minutes and refresh the page.
      7. Note the assignment displays as expected.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                markn Mark Nelson
                Reporter:
                markn Mark Nelson
                Peer reviewer:
                cameron1729
                Integrator:
                David Monllaó
                Tester:
                John Okely
                Participants:
                Component watchers:
                Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón, Adrian Greeve, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  23/May/16