Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-1 Moodle QA testing
  3. MDLQA-16119

Grades can be returned to the remote platform after grading an activity shared using LTI

XMLWordPrintable

      Docs

      The relevant documentation for this feature can be found at Publish as LTI tool

      Prerequisites

      Two sites are required for testing this feature and they must be able to communicate with one another.

      1. LTI platform (formerly known as consumer)
      2. LTI tool (formerly known as provider).

      Important: If you're testing locally, you'll need to disable the 'Blocked hosts' setting in BOTH sites. You can find it in Site administration ► Security ► HTTP security. You'll need to clear the values and save.

      Registration and publication

      1. Following the docs linked above, specifically the section on Enabling the 'Publish as LTI tool' feature, enable the relevant plugins in the tool site.
      2. Following the docs linked above, specifically the section on Dynamic registration, create the tool-platform registration
      3. In the platform site, edit the preconfigured tool settings for the tool you just created
      4. Set "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool"
      5. Change the name of the tool to "QA test tool"
      6. Change "IMS LTI Assignment and Grade Service" to "Use this service for grade sync and column management"
      7. Expand "Privacy" and set "Accept grades from the tool" to "As specified in Deep Linking definition or Delegate to teacher"
      8. Save the tool configuration
      9. In the tool site, login as admin
      10. Create a course with a two assignments: assignment 1 and assignment 2
      11. Edit the settings for assignment 2
      12. Expand "Activity completion" and set "completion tracking" to "Show activity as complete when conditions are met"
      13. Check the box "Student must submit to this activity to complete it"
      14. Enrol a teacher t1 in the course
      15. Log out
      16. Log in to the tool site as a teacher t1
      17. Following the docs linked above, specifically the section on Sharing access to a course or activity, publish assignment 1 over LTI Advantage. When publishing, use the form defaults.
      18. Repeat the publishing process to publish assignment 2 over LTI Advantage also.
      19. Edit the settings of the enrolment instance for assignment 1
      20. Expand "Remote system" and set "Grade synchronisation" to "No"
      21. Save the instance
      22. Edit the settings for the enrolment instance for assignment 2
      23. Expand "Remote system" and set "Require course or activity completion prior to grade synchronisation" to "Yes"
      24. Save the instance
      25. Log out of BOTH the tool and platform sites

      Create the activity links and make submissions

      1. Log in to the platform site as an admin
      2. Create a course and enrol a teacher t1 and student s1
      3. Log out
      4. Log in to the platform as the teacher t1
      5. Go to the course
      6. Enable editing
      7. Click to add an activity or resource
      8. Select "QA test tool"
      9. Click "Select content"
      10. Continue to link your account to the tool site user 't1'
      11. When you see the listing of published activities, select the "Add to course" checkbox for assignment 1
      12. Verify the "Add to gradebook" checkbox is also set automatically at this time
      13. Click "Add content"
      14. Save the activity
      15. Click again to add an activity or resource, selecting again the "QA test tool"
      16. Click "Select content"
      17. This time, check the "Add to course" box for assignment 2
      18. Again, Verify that the "Add to gradebook" checkbox is automatically checked
      19. Click "Add content"
      20. Save the activity
      21. Log out of BOTH the tool and the platform sites (note:you may need to visit TOOLSITE/login/index.php on the tool site to trigger a logout if running in embedded mode, since the site will be shown without navigation)
      22. Log in to the platform as the student s1
      23. Go to the course
      24. Launch assignment 1 activity and make a submission
      25. Launch assignment 2 but DO NOT make a submission
      26. Log out of BOTH the tool and the platform sites

      Grade the submissions

      1. Log in to the platform site as the teacher t1
      2. Go to the course
      3. Launch the assignment 1 activity
      4. Grade the student submission, giving them 70/100
      5. Launch the assignment 2 activity
      6. Grade the student submission, giving them 80/100

      Test synchronisation of grades

      1. Log in to the platform site as the teacher t1
      2. Go to the course gradebook
      3. Verify:
        • There is not yet a grade for the student s1 for the assignment 1 activity
        • There is not yet a grade for the student s1 for the assignment 2 activity
      4. Run the scheduled task which spawns individual grade sync adhoc tasks:

        php admin/cli/scheduled_task.php --execute="enrol_lti\local\ltiadvantage\task\sync_grades"

      5. Now, run the adhoc task script via CLI:

        php admin/cli/adhoc_task.php --execute
        

      6. When the task completes, refresh the grade book page
      7. Verify you still don't see any grades for student s1 for either activity
      8. Now, in another tab, log into the tool site as the teacher t1
      9. Go to the course in which the activity is published
      10. Go to "Published as LTI tools" via course administration
      11. Edit the instance settings for assignment 1
      12. Expand "Remote system" and set "Grade synchronisation" to "Yes"
      13. Save the instance.
      14. Now, go back to the platform gradebook view in the other tab
      15. Again, run the scheduled task which spawns individual grade sync adhoc tasks:

        php admin/cli/scheduled_task.php --execute="enrol_lti\local\ltiadvantage\task\sync_grades"

      16. Again, run the adhoc task script via CLI:

        php admin/cli/adhoc_task.php --execute
        

      17. When the task completes, refresh the gradebook page
      18. Verify:
        • You now see the grade for the student for the assignment 1 activity listed as 70/100.
        • You still don't see a grade for assignment 2
      19. Log out of BOTH the tool and platform sites
      20. Log in to the platform site as student s1
      21. Go to the course
      22. Launch the assignment 2 activity
      23. Now, make a submission (this will trigger activity completion and enable grades to be synced)
      24. Log out
      25. Log in to the platform as teacher t1
      26. Go to the course gradebook
      27. Again, run the scheduled task which spawns individual grade sync adhoc tasks:

        php admin/cli/scheduled_task.php --execute="enrol_lti\local\ltiadvantage\task\sync_grades"

      28. Again, run the adhoc task script via CLI:

        php admin/cli/adhoc_task.php --execute
        

      29. When the task completes, refresh the gradebook page
      30. Verify:
        • You see the grade for the student for the assignment 1 activity listed as 70/100 (as before).
        • You now see a grade of 80/100 for assignment 2 for student s1

            lameze Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

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