Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-16759 Moodle 4.1 QA
  3. MDLQA-17347

CLONE - 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. When prompted, open a new tab in the same browser session and log in to the tool site as the teacher, relaunching the Select content workflow when done (i.e. just close the modal and click "Select content" again)
      11. Continue to link your account
      12. When you see the listing of published activities, select the "Add to course" checkbox for assignment 1
      13. Verify the "Add to gradebook" checkbox is also set automatically at this time
      14. Click "Add content"
      15. Save the activity
      16. Click again to add an activity or resource, selecting again the "QA test tool"
      17. Click "Select content"
      18. This time, check the "Add to course" box for assignment 2
      19. Again, Verify that the "Add to gradebook" checkbox is automatically checked
      20. Click "Add content"
      21. Save the activity
      22. 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)
      23. Log in to the platform as the student s1
      24. Go to the course
      25. Launch assignment 1 activity and make a submission
      26. Launch assignment 2 but DO NOT make a submission
      27. 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. Now, run the grade sync scheduled task on the tool site, via CLI:

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

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

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

      15. When the task completes, refresh the gradebook page
      16. 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
      17. Log out of BOTH the tool and platform sites
      18. Log in to the platform site as student s1
      19. Go to the course
      20. Launch the assignment 2 activity
      21. Now, make a submission (this will trigger activity completion and enable grades to be synced)
      22. Log out
      23. Log in to the platform as teacher t1
      24. Go to the course gradebook
      25. Again, run the grade sync scheduled task on the tool site, via CLI:

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

      26. When the task completes, refresh the gradebook page
      27. 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

            johnedwardg.pedregosa John Edward Pedregosa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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