From 9fb46017a41962ede9ed2f8afd965ef0ce806133 Mon Sep 17 00:00:00 2001 From: Zhen Qian Date: Wed, 6 Dec 2023 11:28:51 -0500 Subject: [PATCH] =?UTF-8?q?issue=5F1551=20added=20mivideo/kaltura=20video?= =?UTF-8?q?=20resources=20access=20query=20into=20en=E2=80=A6=20(#1552)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/env_sample.hjson | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/config/env_sample.hjson b/config/env_sample.hjson index 2f4494d4..cf33dbc3 100644 --- a/config/env_sample.hjson +++ b/config/env_sample.hjson @@ -289,6 +289,31 @@ "postfix": "" } }, + # replace "mivideo" with Kaltura brand name inside your institution + "mivideo": { + "query": + ''' + SELECT 'mivideo' AS resource_type, + replace(object.id, 'https://aakaf.mivideo.it.umich.edu/caliper/info/media/' , '') AS resource_id, + cast(-1 as INT64) AS user_id, + replace( + replace(actor.id, 'https://aakaf.mivideo.it.umich.edu/caliper/info/user/' , ''), '+', '@' + ) AS user_login_name, + @canvas_data_id_increment + CAST(JSON_EXTRACT_SCALAR(object.extensions, '$.kaf:course_id') AS INT64) AS course_id, + object.name AS name, + datetime(EVENT_TIME) AS access_time + FROM event_store.expanded + WHERE + ed_app.id = 'https://aakaf.mivideo.it.umich.edu/caliper/info/app/KafEdApp' + AND TYPE = 'MediaEvent' + AND action = 'Started' + AND JSON_EXTRACT_SCALAR(object.extensions, '$.kaf:course_id') IN UNNEST(@course_ids_short) + ''', + "app_display_name": "MiVideo", + "/* mention if the caliper event data is providing long or short canvas id and change the query to store long id as in this case": "*/", + "canvas_course_id_format": "SHORT", + "urls": {"prefix": "https://aakaf.mivideo.it.umich.edu/caliper/info/media/" , "postfix": ""} + } }, # Disable/Enable courses_enabled api "COURSES_ENABLED": false,