-
Notifications
You must be signed in to change notification settings - Fork 139
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
LTI 1.3 #1023
base: master
Are you sure you want to change the base?
LTI 1.3 #1023
Conversation
@@ -68,7 +68,7 @@ def _get_signer(self, app): | |||
|
|||
def open_session(self, app, request): | |||
# Check for cookieless session in the path | |||
path_session = re.match(r"(/@)([a-f0-9A-F_]*)(@)", request.path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to look into the code for other instances of this kind of check by searching for "/@" . I think I found all of them.
@@ -283,7 +289,7 @@ def flask_internalerror(e): | |||
flask_app.register_error_handler(InternalServerError, flask_internalerror) | |||
|
|||
# Insert the needed singletons into the application, to allow pages to call them | |||
flask_app.get_homepath = get_homepath | |||
flask_app.get_path = get_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_path
should now be used in all instances where get_homepath
was used to build an URL. Templates still have access to get_homepath
when a public URL is needed, such that I didn't have to go thru all that code (esp. layout.html) by hand.
3591e25
to
609a552
Compare
Looks like the CI is broken btw. |
Yep, we still have to fix that 😞 |
""" {name: key} for the LTI customers """ | ||
return self._lti_keys if self._is_lti else {} | ||
def lti_config(self): | ||
""" LTI Tool config dictionary. Specs are at https://github.com/dmitry-viskov/pylti1.3/blob/master/README.rst?plain=1#L70-L98 """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will be documentation part of this PR on this.
from pylti1p3.launch_data_storage.base import LaunchDataStorage | ||
|
||
|
||
class MongoLTILaunchDataStorage(LaunchDataStorage): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be used to store only the LTI Launch ID in the user session and retrieve the rest from the database.
This PR updates the LTI support of INGInious to LTI 1.3, along with a couple of internal changes.
The support of LTI 1.1 is dropped by these changes so all integrations must be updated when integrating this code into running instances.
I'll detail the contributions as they are integrated into the PR.
7a3a4d6 has been tested with a test instance of the syllabus and INGInious with the existing LTI code. I tried submitting code to a task and browsing submissions.
9b1d6e5 updates the basic features (i.e. not the Outcome service) to LTI 1.3. This has been tested with an ongoing patch to the syllabus and saLTIre.
11ebad4 implements the LTI Assignment and Grade service to report grades back to the LTI Platform as a modern replacement to the Outcome service. This has been tested with the test tools of IMS Global as I couldn't configure saLTIre properly so the message carrying the grade could be authenticated by the platform. I suppose IMS Global checks this properly.
262f9fd gives a try at making a clear separation between regular Flask sessions and LTI sessions. Both are still backed by the database. The
UserManager
becomes the access point to the session now. Tested with the syllabus, saLTIre and IMS Global.