Browse Source

allow lti_user_id_field to specify field for LTI uname

pull/75/head
catsoop@introml.odl.mit.edu 1 month ago
parent
commit
61b02b3995
Signed by: hz <hartz@mit.edu> GPG Key ID: 5FDD2840E179AD62
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      catsoop/lti.py

+ 2
- 1
catsoop/lti.py View File

@@ -318,7 +318,8 @@ def serve_lti(context, path_info, environment, params, dispatch_main, return_con
elif l4c is not None:
lti_data = session_data["lti_data"]
lup = context["cs_lti_config"].get("lti_username_prefix", "lti_")
lti_uname = lti_data["user_id"]
lti_user_id_field = context["cs_lti_config"].get("lti_user_id_field", "user_id") # LTI field to use for uname
lti_uname = lti_data[lti_user_id_field]
if not context["cs_lti_config"].get("force_username_from_id"):
lti_uname = lti_data.get(
"lis_person_sourcedid", lti_uname


Loading…
Cancel
Save