From 59707596c21e7f25978b9316c24f479e698e8574 Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Wed, 7 May 2025 16:38:56 -0400 Subject: [PATCH] Scintilla templates for new launch. Trying to clean up Zenjob's workflow. --- .../_basic_group_homepage.html.liquid | 11 +- .../_header.html.liquid | 2 + ...learning_path_completed_banner.html.liquid | 6 +- Scripts/Zenjob/sample_payload.json | 156 ++++++++++++++++++ Scripts/Zenjob/workato-webhook-gsheets.py | 21 +++ 5 files changed, 183 insertions(+), 13 deletions(-) create mode 100644 Scripts/Zenjob/sample_payload.json create mode 100644 Scripts/Zenjob/workato-webhook-gsheets.py diff --git a/Custom_Templates/customer_templates/Walmart Scintilla Prod/_basic_group_homepage.html.liquid b/Custom_Templates/customer_templates/Walmart Scintilla Prod/_basic_group_homepage.html.liquid index 047fa9a1..f081b187 100644 --- a/Custom_Templates/customer_templates/Walmart Scintilla Prod/_basic_group_homepage.html.liquid +++ b/Custom_Templates/customer_templates/Walmart Scintilla Prod/_basic_group_homepage.html.liquid @@ -26,9 +26,6 @@ {% if new_courses_count > 0 %} -
- See more -
{% else %} {% if ongoing_courses_count > 0 %} -
- {% comment %} See more {% endcomment %} -
{% else %} {% endif %} -
+
Progress Tracker
@@ -132,9 +126,6 @@ {% endfor %} {% if lps_in_progress > 0 %} -
- See more -
{% endif %} {% if lps_in_progress == 0 %}
diff --git a/Custom_Templates/customer_templates/Walmart Scintilla Prod/_header.html.liquid b/Custom_Templates/customer_templates/Walmart Scintilla Prod/_header.html.liquid index 11a59e53..7c4f41ff 100644 --- a/Custom_Templates/customer_templates/Walmart Scintilla Prod/_header.html.liquid +++ b/Custom_Templates/customer_templates/Walmart Scintilla Prod/_header.html.liquid @@ -103,6 +103,7 @@ Basic Sandbox Group UUID = 9f5c51a3-8e02-4b81-9e48-7ec3adff7c70
{% if current_person.signed_in? %} + {% unless basic_3p_user %} + {% endunless %}
@@ -46,7 +46,7 @@

Congratulations, you're Scintilla Customer Insights Certified. Click the button below to add your accomplishment to LinkedIn!

diff --git a/Scripts/Zenjob/sample_payload.json b/Scripts/Zenjob/sample_payload.json new file mode 100644 index 00000000..757bad00 --- /dev/null +++ b/Scripts/Zenjob/sample_payload.json @@ -0,0 +1,156 @@ +{ + "payload": { + "data": { + "id": "8bb0dd29-60a5-44b8-8f09-fe1c7086e2d9", + "type": "quiz_completed_events", + "included": [ + { + "id": "a663b26b-a42f-4877-9d99-044c60ecd079", + "type": "people", + "links": { + "self": "https://api.northpass.com/v1/people/a663b26b-a42f-4877-9d99-044c60ecd079", + "teaching": "https://app.northpass.com/people/a663b26b-a42f-4877-9d99-044c60ecd079" + }, + "attributes": { + "name": "Taksh Hiteshbhai Vadaliya", + "sso_uid": "c7ecd68f-7a1f-40c3-ad5d-e5f23373c57b", + "created_at": "2024-08-01T17:26:50.000000+00:00", + "updated_at": "2025-05-07T16:57:00.000000+00:00", + "activated_at": "2024-08-01T17:26:56.000000+00:00", + "unsubscribed": false, + "last_active_at": "2025-05-07T16:57:00.000000+00:00" + }, + "relationships": { + "school": { + "data": { + "id": "6e96bbdd-7818-4920-b79c-e46132939929", + "type": "schools" + } + } + } + }, + { + "id": "6721c62c-b11b-4af9-92a3-a6d788845099", + "type": "courses", + "links": { + "self": "https://api.northpass.com/v1/courses/6721c62c-b11b-4af9-92a3-a6d788845099", + "build": { + "href": "https://app.northpass.com/courses/jqgjlapg/builder", + "methods": [ + "get" + ] + }, + "clone": "https://app.northpass.com/courses/jqgjlapg/clone", + "preview": "/previews/courses/jqgjlapg", + "teaching": "https://app.northpass.com/courses/jqgjlapg" + }, + "attributes": { + "name": "Health certificate - Follow up instruction", + "status": "live", + "for_sale": false, + "permalink": "jqgjlapg", + "created_at": "2024-11-19T15:37:43.000000+00:00", + "updated_at": "2025-05-07T16:47:42.000000+00:00", + "list_image_url": "https://cdn.filepicker.io/security=policy:eyJ3Ijo4MjAsImgiOjUwMCwiZml0IjoiY3JvcCIsImV4cGlyeSI6MTc0NjY4OTIzOSwiY2FsbCI6WyJyZWFkIiwiY29udmVydCIsInN0b3JlIiwicGljayIsInJlbW92ZSJdfQ==,signature:be84cd26ac634980e9e20f39d46ab61fbdb4325224db6efd18a329eeab818278/resize=width:820,height:500,fit:crop/oZkkVDDS9GcrrZ8igDY7", + "enrollments_count": 199738, + "share_course_link": "https://zenjob.northpass.com/app/courses/6721c62c-b11b-4af9-92a3-a6d788845099", + "course_enrollment_link": "https://zenjob.northpass.com/c/9e4e5be7e3b89b5ae518e6343d24e5324a94a3fd" + }, + "relationships": { + "instructor_partnerships": { + "data": [] + } + } + }, + { + "id": "ef6c7e84-17f2-4d3c-a799-0792287a84d8", + "type": "activities", + "links": { + "teaching": "https://app.northpass.com/courses/jqgjlapg/builder/activities/bic8i3ea", + "course_builder": "https://app.northpass.com/courses/jqgjlapg/builder" + }, + "attributes": { + "title": "Quiz", + "course_name": "Health certificate - Follow up instruction" + } + }, + { + "id": "2d52bd9a-c840-426f-8982-5686e8610ee7", + "type": "quizzes", + "links": { + "self": { + "href": "https://api.northpass.com/v1/quizzes/2d52bd9a-c840-426f-8982-5686e8610ee7", + "methods": [ + "delete" + ] + }, + "build": "https://app.northpass.com/quizzes/10976737/builder", + "analytics": "https://app.northpass.com/analytics/single_quiz_results/2d52bd9a-c840-426f-8982-5686e8610ee7" + }, + "attributes": { + "name": "Follow-up instruction", + "quiz_type": "Quizzes::Static", + "created_at": "2023-09-15T10:09:25.000000+00:00" + }, + "relationships": { + "person": { + "data": { + "id": "9aaa69d6-e590-4d21-8cf3-292f483f079e", + "type": "people" + } + }, + "activities": { + "data": [ + { + "id": "b909314d-f04d-4f7f-9a9b-f570b60dfa89", + "type": "activities" + }, + { + "id": "ef6c7e84-17f2-4d3c-a799-0792287a84d8", + "type": "activities" + }, + { + "id": "dce9fa04-48dc-45da-902f-234a74f8d600", + "type": "activities" + } + ] + } + } + } + ], + "attributes": { + "value": 100, + "created_at": "2025-05-07T16:57:04.000000+00:00", + "quiz_attempt_uuid": "40a7c1ab-8c76-47d3-b716-3a4c790d5965", + "minimum_passing_score": 100 + }, + "relationships": { + "quiz": { + "data": { + "id": "2d52bd9a-c840-426f-8982-5686e8610ee7", + "type": "activities" + } + }, + "course": { + "data": { + "id": "6721c62c-b11b-4af9-92a3-a6d788845099", + "type": "courses" + } + }, + "person": { + "data": { + "id": "a663b26b-a42f-4877-9d99-044c60ecd079", + "type": "people" + } + }, + "activity": { + "data": { + "id": "ef6c7e84-17f2-4d3c-a799-0792287a84d8", + "type": "activities" + } + } + } + } + }, + "params": {} +} diff --git a/Scripts/Zenjob/workato-webhook-gsheets.py b/Scripts/Zenjob/workato-webhook-gsheets.py new file mode 100644 index 00000000..ef529704 --- /dev/null +++ b/Scripts/Zenjob/workato-webhook-gsheets.py @@ -0,0 +1,21 @@ +import requests +import json + +with open('./sample_payload.json', 'r') as file: + input = json.load(file) + +def main(input): + # input = input['input'] + for items in input['payload']['data']['included']: + if items['type'] == 'quizzes': + try: + if items['name'] == 'Deutsch Einstufungstest': + print('quiz!') + except TypeError as h: + print(h) + + elif items['type'] == 'people': + print('people') + +if __name__ == "__main__": + main(input)