From c019f139164df4e853b5b349d41117bc8c4c7583 Mon Sep 17 00:00:00 2001 From: Darren Siegel Date: Fri, 4 Oct 2024 11:16:15 -0400 Subject: [PATCH] add session id field (#5167) The xAPI statement for evaluated part attempts is missing the datashop_session_id field, which makes DataShop calculations in the cloud a bit harder to do. This PR adds it in as an extension. --- .../analytics/xapi/events/attempt/part_attempt_evaluated.ex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/oli/analytics/xapi/events/attempt/part_attempt_evaluated.ex b/lib/oli/analytics/xapi/events/attempt/part_attempt_evaluated.ex index b4b23e836d5..706ea6ead03 100644 --- a/lib/oli/analytics/xapi/events/attempt/part_attempt_evaluated.ex +++ b/lib/oli/analytics/xapi/events/attempt/part_attempt_evaluated.ex @@ -20,7 +20,8 @@ defmodule Oli.Analytics.XAPI.Events.Attempt.PartAttemptEvaluated do out_of: out_of, feedback: feedback, date_evaluated: timestamp, - part_id: part_id + part_id: part_id, + datashop_session_id: session_id }, %{ attempt_guid: page_attempt_guid, @@ -95,7 +96,8 @@ defmodule Oli.Analytics.XAPI.Events.Attempt.PartAttemptEvaluated do "http://oli.cmu.edu/extensions/activity_id" => activity_revision.resource_id, "http://oli.cmu.edu/extensions/activity_revision_id" => activity_revision.id, "http://oli.cmu.edu/extensions/part_id" => part_id, - "http://oli.cmu.edu/extensions/attached_objectives" => attached_objectives + "http://oli.cmu.edu/extensions/attached_objectives" => attached_objectives, + "http://oli.cmu.edu/extensions/session_id" => session_id } }, "timestamp" => timestamp