Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MST-1473] Proctoring Service Launch #32

Merged
merged 1 commit into from
Nov 17, 2022

Conversation

MichaelRoytman
Copy link
Member

@MichaelRoytman MichaelRoytman commented Aug 16, 2022

JIRA: MST-1473

Description:

This pull request updates the sample LTI proctoring integration to use the new LTI launch refactor in xblock-lti-consumer and the proposed Proctoring Services implementation.

As a reminder, this application currently serves as a mock implementation of the proctoring flow to demonstrate how we might use the xblock-lti-consumer library for proctoring. It is not intended to be deployed as-is or to serve as an actual proctoring flow implementation.

Changes:

Here is a digest of important changes.

  • The launch_proctoring, start_assessment, public_keyset, and access_token views are removed.
  • The start_proctoring and end_assessment views are added.
  • A signal handler for the LTI_1P3_PROCTORING_ASSESSMENT_STARTED is added.
  • The lti AppConfig is modified to support the above signal.

Testing Instructions:

  • In your local checkout of edx-exams, set the following settings in edx_exams/settings/local.py.

    • ALLOWED_HOSTS = ['*']
    • ROOT_URL = <NGROK_URL>
    • LMS_ROOT_URL = <NGROK_URL>
    • SESSION_COOKIE_SAMESITE = "None"
    • SESSION_COOKIE_SECURE = True
  • The requirements files should be pointing at the correct branch of xblock-lti-consumer and should install it correctly. If there are problems, check out the xblock-lti-consumer library locally and pip install it. If the proposed Proctoring Services implementation is still on a branch, check out the branch an install it.

  • Log in to the edx-exams service using the ngrok URL - <NGROK_URL>/admin. The reason it's important to log in via the ngrok URL is to ensure that the session cookie is set on the proper domain so that the cookie is included by the browser when the Tool makes requests to the NGROK_URL. If you log in through localhost, then when the Tool makes requests to the NGROK_URL, the user will be the AnonymousUser. This will cause the flow to fail.

  • Set up the Proctoring Certification Suite 1.0.

    • Create a new LtiConfiguration instance in the edx-exams admin panel.

      • Set the "Config store" to "Configuration Stored on this model".
    • The process of setting this testing suite up is very similar to the existing instructions for testing LTI 1.3 launches in the xblock-lti-consumer README. Use that as a reference. Instead of setting the data on the XBlock, set it on the LtiConfiguration in the admin panel. Instead of setting the data in the LTI 1.3 launch testing tool, set it in the Proctoring Certification Suite 1.0.

  • In your browser, hit the following URL to start the LTI proctoring flow: <NGROK_URL>/lti/start_proctoring/1. 1 represents the database ID for the LtiConfiguration, so set it appropriately if you have more than one LtiConfiguration you're testing with.

Description:

This pull request uses the Proctoring Service implementation in a branch of xblock-lti-consumer to demonstrate a proctoring launch using LTI.

Author concerns:

The bulk of the code is in the associated pull request. Most of my concerns are in that repository.

Dependencies:

Merge checklist:

  • All reviewers approved
  • CI build is green
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Commits are squashed

Post merge:

  • Delete working branch (if not needed anymore)

@MichaelRoytman MichaelRoytman force-pushed the mroytman/MST-1473-proctoring-service-launch branch from 0f7f81b to a8140fc Compare August 16, 2022 18:57
@MichaelRoytman MichaelRoytman force-pushed the mroytman/MST-1473-proctoring-service-launch branch 6 times, most recently from 007210c to 1487d6b Compare October 26, 2022 15:37
Copy link
Member

@varshamenon4 varshamenon4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for the detailed description/context.

)

# These claims are optional.
# TODO: This will need to have additional consideration for PII.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: I'm guessing that this todo is addressed below?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We aren't sending over any PII for proctoring in this implementation anymore, so I have removed the TODO. We can add it back in after things are ironed out with product and legal.

lti_config = LtiConfiguration.objects.get(id=lti_config_id)

proctoring_launch_data = Lti1p3ProctoringLaunchData(
# TODO: This is incorrect. It should be an integer starting at 1 and increasing by 1 for each subsequent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: So this still needs to be addressed correct? Just a placeholder I'm assuming?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will replace exam_attempt.id with exam_attempt.attempt_number, per Zach's comment, which will address this. I'll remove the TODO.

@zacharis278
Copy link
Contributor

liking how simple this actually is on the exams side 👍

@MichaelRoytman MichaelRoytman force-pushed the mroytman/MST-1473-proctoring-service-launch branch 6 times, most recently from 1ce4519 to dae276f Compare November 9, 2022 15:50
@MichaelRoytman MichaelRoytman force-pushed the mroytman/MST-1473-proctoring-service-launch branch 4 times, most recently from ca5f4fd to 12a227a Compare November 16, 2022 18:46
This commit updates the sample LTI proctoring integration to use the new LTI launch refactor in xblock-lti-consumer (openedx/xblock-lti-consumer#288) and the Proctoring Services implementation (openedx/xblock-lti-consumer#297).

As a reminder, this application currently serves as a mock implementation of the proctoring flow to demonstrate how we might use the xblock-lti-consumer library for proctoring. It is not intended to be deployed as-is or to serve as an actual proctoring flow implementation.

Here is a digest of important changes.

* The launch_proctoring, start_assessment, public_keyset, and access_token views are removed.
* The start_proctoring and end_assessment views are added.
* A signal handler for the LTI_1P3_PROCTORING_ASSESSMENT_STARTED is added.
* The lti AppConfig is modified to support the above signal.
@MichaelRoytman MichaelRoytman force-pushed the mroytman/MST-1473-proctoring-service-launch branch from 12a227a to 31ac0db Compare November 17, 2022 14:54
@MichaelRoytman MichaelRoytman merged commit 8f6649d into main Nov 17, 2022
@MichaelRoytman MichaelRoytman deleted the mroytman/MST-1473-proctoring-service-launch branch November 17, 2022 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants