From bec649370853310bfa09e8283706dfdbc6ab3c51 Mon Sep 17 00:00:00 2001 From: Markku Riekkinen Date: Thu, 3 Nov 2022 23:43:02 +0200 Subject: [PATCH] Export LTI settings for MOOC-Grader exercises in the aplus-json Related to https://github.com/apluslms/mooc-grader/pull/137 https://github.com/apluslms/mooc-grader/commit/33f6ec9b6308215cc54773e653045240e7ae1faa --- util/export.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/util/export.py b/util/export.py index 9fdf10c..8b3d89d 100644 --- a/util/export.py +++ b/util/export.py @@ -71,6 +71,17 @@ def exercise( if 'url' in exercise: of['url'] = exercise['url'] + if 'lti' in exercise: + for k in ( + 'lti', + 'lti_context_id', + 'lti_resource_link_id', + 'lti_aplus_get_and_post', + 'lti_open_in_iframe', + ): + if k in exercise: + of[k] = exercise[k] + if 'exercise_info' in exercise: of['exercise_info'] = exercise['exercise_info'] else: