Closed arthurian closed 2 years ago
After digging a bit, looks like we can get the raw response code and content (if any), which might be useful since the outcome.description
is being logged as None
, which means the XML parsing is throwing an exception somewhere.
This PR updates the info logging for grade passback so that if an error occurs, we can more quickly locate the course/user that is experiencing the issue and start debugging.
Changes:
lti_grade_passback()
method so that all info log statements follow the general format ofLTI grade request ... lti_log_data=DICT
.StoreBackend
,CatchStoreBackend
,WebAnnotationStoreBackend
. It's unclear why the method is duplicated in all 3 classes, but that should be revisited (out of scope to refactor in this PR).Launch parameters included for debugging:
context_id
: maps to theLTICourse.course_id
Django model, so we can use this to identify the specific course that is using the tool.user_id
: maps to theLTIProfile.anon_id
Django model, so we can use this to identify the specific user initiating the request, or at the very least tell if it's the same user or a different user.lis_outcome_service_url
andlis_result_sourcedid
: these are specific to the outcome request and show where the tool is POSTing the grade to. Not sure how useful they will be.launch_presentation_return_url
: this is not strictly necessary, but may be useful to identify the originating canvas course without using a canvas-specific launch parameter (since this tool is used in edX too). Per the LTI v1.1 spec this is the Fully qualified URL where the TP can redirect the user back to the TC interface. In Canvas, this will look something like this:https://canvas.harvard.edu/courses/:COURSE_ID/external_content/success/external_tool_redirect
.Outcome response data:
OutcomeResponse
object which is returned from thetool_provider.post_replace_result(score)
call.lti.outcome_request.OutcomeRequest
.