diff --git a/Custom_Templates/customer_templates/HackerRank Sandbox/_banner.html.liquid b/Custom_Templates/customer_templates/HackerRank Sandbox/_banner.html.liquid new file mode 100644 index 00000000..738a78aa --- /dev/null +++ b/Custom_Templates/customer_templates/HackerRank Sandbox/_banner.html.liquid @@ -0,0 +1,19 @@ +{% if current_school.properties.banner_toggle == true %} +
+
+ {{ current_school.properties.banner_text }} +
+
+{% endif %} + + diff --git a/Custom_Templates/customer_templates/HackerRank Sandbox/_header.html.liquid b/Custom_Templates/customer_templates/HackerRank Sandbox/_header.html.liquid index 09aa2089..ca245c1d 100644 --- a/Custom_Templates/customer_templates/HackerRank Sandbox/_header.html.liquid +++ b/Custom_Templates/customer_templates/HackerRank Sandbox/_header.html.liquid @@ -7,10 +7,10 @@ style="width: 300px; height: auto;" /> -
+
@@ -24,4 +24,4 @@
- \ No newline at end of file + diff --git a/Custom_Templates/customer_templates/HackerRank Sandbox/catalog.html.liquid b/Custom_Templates/customer_templates/HackerRank Sandbox/catalog.html.liquid index f2b6e7d5..fa59f29b 100644 --- a/Custom_Templates/customer_templates/HackerRank Sandbox/catalog.html.liquid +++ b/Custom_Templates/customer_templates/HackerRank Sandbox/catalog.html.liquid @@ -1,5 +1,5 @@ {% include "header" %} -
+
{% include "course_version_outdated_alert", courses: courses.in_catalog %}
diff --git a/Custom_Templates/customer_templates/HackerRank Sandbox/homepage.html.liquid b/Custom_Templates/customer_templates/HackerRank Sandbox/homepage.html.liquid index bd79ff96..266706e3 100644 --- a/Custom_Templates/customer_templates/HackerRank Sandbox/homepage.html.liquid +++ b/Custom_Templates/customer_templates/HackerRank Sandbox/homepage.html.liquid @@ -1,4 +1,7 @@ -
+
+ +{% include "banner" %} {% include "header" %}
diff --git a/Custom_Templates/customer_templates/Walmart Spark Prod/_head.html.liquid b/Custom_Templates/customer_templates/Walmart Spark Prod/_head.html.liquid index d24a466e..bd8980d7 100644 --- a/Custom_Templates/customer_templates/Walmart Spark Prod/_head.html.liquid +++ b/Custom_Templates/customer_templates/Walmart Spark Prod/_head.html.liquid @@ -9,7 +9,7 @@ {% if current_school.id == staging_school_id %} {% comment %} {% endcomment %} {% elsif current_school.id == production_sandbox_school_id %} - {% comment %} {% endcomment %} + {% elsif current_school.id == live_school_id %} {% endif %} @@ -22,8 +22,8 @@ {% comment %} {% endcomment %} {% include "js_scripts" %} {% elsif current_school.id == production_sandbox_school_id %} - {% comment %} {% endcomment %} - {% include "js_scripts" %} + + {% comment %} {% include "js_scripts" %} {% endcomment %} {% elsif current_school.id == live_school_id %} - + {% endif %} \ No newline at end of file diff --git a/Custom_Templates/customer_templates/Walmart Spark Prod/courses.html.liquid b/Custom_Templates/customer_templates/Walmart Spark Prod/courses.html.liquid index 64dabe9d..0d58c36e 100644 --- a/Custom_Templates/customer_templates/Walmart Spark Prod/courses.html.liquid +++ b/Custom_Templates/customer_templates/Walmart Spark Prod/courses.html.liquid @@ -30,6 +30,11 @@ {% capture icon %} fa-arrow-left{% endcapture %} {% include "mobile_header", title: "Resource Center", back_icon: icon, back_link: "javascript:sendMessage();" %} + {% if current_school.properties.banner_toggle == true %} +
+ {{ current_school.properties.banner_text }} +
+ {% endif %} {% include "sub_navigation" %}
{% if current_person.signed_in? %} diff --git a/Scripts/API_Tests/bulk_invite_and_props.py b/Scripts/API_Tests/bulk_invite_and_props.py index e8d89079..45ffb54b 100644 --- a/Scripts/API_Tests/bulk_invite_and_props.py +++ b/Scripts/API_Tests/bulk_invite_and_props.py @@ -1,7 +1,5 @@ import requests -import json import pprint -import csv import pandas as pd import Apikeys import time @@ -13,7 +11,7 @@ HEADERS = { "X-Api-Key": APIKEY, } BASEURL = "https://api.northpass.com/v2/" -IMPORTFILE = "/Users/normrasmussen/Downloads/cisa-102224.csv" +IMPORTFILE = "/Users/normrasmussen/Downloads/cisa-11524.csv" def bulk_invite_and_group(): diff --git a/Scripts/webhook_test.py b/Scripts/webhook_test.py index 4f1640e1..4582529b 100644 --- a/Scripts/webhook_test.py +++ b/Scripts/webhook_test.py @@ -1,125 +1,138 @@ import json import requests -URL = "https://webhooks.workato.com/webhooks/rest/c98e26af-6fdf-423d-b7ee-899f208956a0/doordash-activity-completion" +# URL = "https://webhooks.workato.com/webhooks/rest/c98e26af-6fdf-423d-b7ee-899f208956a0/doordash-activity-completion" +URL = "https://webhooks.workato.com/webhooks/rest/604b4fc0-fcd9-4f3b-b715-b42d7f740ba6/domains-updated" # DoorDash Quiz Completion # "https://webhooks.workato.com/webhooks/rest/c98e26af-6fdf-423d-b7ee-899f208956a0/doordash-quiz-completion" -#DoorDash Course Completion +# DoorDash Course Completion # - -DATA = { - "data":{ - "id":"44444444-4444-4444-4444-444444444444", - "type":"activity_completed_events", - "links":{}, - "included":[ - { - "id":"abcdefghi-1234-jklm-5678-nopqrstuvwxy", - "type":"people", - "links":{ - "self":"https://api.northpass.com/v2/people/abcdefghi-1234-jklm-5678-nopqrstuvwxy", - "teaching":"https://app.northpass.com/people/abcdefghi-1234-jklm-5678-nopqrstuvwxy" - }, -"attributes":{ - "name":"Jill Smith", - "email":"jillsmith@example.com", - "sso_uid":"jillsmith@example.com", - "full_name":"Jill Smith", - "created_at":"2022-04-08T17:55:42Z", - "first_name":"Jill", - "updated_at":"2022-04-08T17:55:42Z", - "activated_at":"2022-04-08T17:55:42Z", - "unsubscribed":False, - "last_active_at":"2022-04-08T17:58:47Z" - }, - "relationships":{ - "school":{ - "data":{ - "id":"00000000-0000-0000-0000-000000000000", - "type":"schools" - } - } - } - }, - { - "id":"zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzz", - "type":"courses", - "links":{ - "self":"https://api.northpass.com/v2/courses/zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzz", - "build":{ - "href":"https://app.northpass.com/courses/abcdefgh/builder", - "methods":[ - "get" - ] - }, - "clone":"https://app.northpass.com/courses/abcdefgh/clone", - "preview":"/previews/courses/abcdefgh", - "teaching":"https://app.northpass.com/courses/abcdefgh" - }, - "attributes":{ - "name":"Onboarding 101", - "status":"live", - "for_sale":True, - "permalink":"abcdefgh", - "created_at":"2020-09-01T16:36:33Z", - "updated_at":"2022-04-08T17:58:37Z", - "list_image_url":"Image URL here", - "enrollments_count":2215, - "share_course_link":"https://subdomain.northpass.com/outline/abcdefgh/cover", - "course_enrollment_link":"https://subdomain.northpass.com/c/abcdefghijklmnopqrstuvwxyz" - }, - "relationships":{ - "categories":{ - "data":[] - }, - "instructor_partnerships":{ - "data":[] - } - } - }, - { - "id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", - "type":"activities", - "links":{ - "teaching":"https://app.northpass.com/courses/abcdefgh/builder/activities/ijklmnop", - "course_builder":"https://app.northpass.com/courses/abcdefgh/builder" - }, - "attributes":{ - "title":"Getting Started", - "course_name":"Onboarding 101" - } - } - ], - "attributes":{ - "value":12, - "created_at":"2022-04-08T17:58:49Z", - "course_attempt_number":1 - }, - "relationships":{ - "course":{ - "data":{ - "id":"zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzz", - "type":"courses" - } - }, - "person":{ - "data":{ - "id":"abcdefghi-1234-jklm-5678-nopqrstuvwxy", - "type":"people" - } - }, - "activity":{ - "data":{ - "id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", - "type":"activities" - } - } - } - } +DATA = anthology_payload = { + "domain_to_update": { + "domain": "tcl.edu", + "group_ids": [ + "8302b674-c728-42d2-9ba3-908b4d970436", + "2b5267b2-ce87-4e77-ad88-5cfec80496b9", + "197da27d-0497-40b5-b2f8-cec4124d32f6", + "dc50ca43-5071-45b3-bf42-e1e64416ffd0", + ], + }, + "params": {}, } +# DATA = { +# "data":{ +# "id":"44444444-4444-4444-4444-444444444444", +# "type":"activity_completed_events", +# "links":{}, +# "included":[ +# { +# "id":"abcdefghi-1234-jklm-5678-nopqrstuvwxy", +# "type":"people", +# "links":{ +# "self":"https://api.northpass.com/v2/people/abcdefghi-1234-jklm-5678-nopqrstuvwxy", +# "teaching":"https://app.northpass.com/people/abcdefghi-1234-jklm-5678-nopqrstuvwxy" +# }, +# "attributes":{ +# "name":"Jill Smith", +# "email":"jillsmith@example.com", +# "sso_uid":"jillsmith@example.com", +# "full_name":"Jill Smith", +# "created_at":"2022-04-08T17:55:42Z", +# "first_name":"Jill", +# "updated_at":"2022-04-08T17:55:42Z", +# "activated_at":"2022-04-08T17:55:42Z", +# "unsubscribed":False, +# "last_active_at":"2022-04-08T17:58:47Z" +# }, +# "relationships":{ +# "school":{ +# "data":{ +# "id":"00000000-0000-0000-0000-000000000000", +# "type":"schools" +# } +# } +# } +# }, +# { +# "id":"zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzz", +# "type":"courses", +# "links":{ +# "self":"https://api.northpass.com/v2/courses/zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzz", +# "build":{ +# "href":"https://app.northpass.com/courses/abcdefgh/builder", +# "methods":[ +# "get" +# ] +# }, +# "clone":"https://app.northpass.com/courses/abcdefgh/clone", +# "preview":"/previews/courses/abcdefgh", +# "teaching":"https://app.northpass.com/courses/abcdefgh" +# }, +# "attributes":{ +# "name":"Onboarding 101", +# "status":"live", +# "for_sale":True, +# "permalink":"abcdefgh", +# "created_at":"2020-09-01T16:36:33Z", +# "updated_at":"2022-04-08T17:58:37Z", +# "list_image_url":"Image URL here", +# "enrollments_count":2215, +# "share_course_link":"https://subdomain.northpass.com/outline/abcdefgh/cover", +# "course_enrollment_link":"https://subdomain.northpass.com/c/abcdefghijklmnopqrstuvwxyz" +# }, +# "relationships":{ +# "categories":{ +# "data":[] +# }, +# "instructor_partnerships":{ +# "data":[] +# } +# } +# }, +# { +# "id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", +# "type":"activities", +# "links":{ +# "teaching":"https://app.northpass.com/courses/abcdefgh/builder/activities/ijklmnop", +# "course_builder":"https://app.northpass.com/courses/abcdefgh/builder" +# }, +# "attributes":{ +# "title":"Getting Started", +# "course_name":"Onboarding 101" +# } +# } +# ], +# "attributes":{ +# "value":12, +# "created_at":"2022-04-08T17:58:49Z", +# "course_attempt_number":1 +# }, +# "relationships":{ +# "course":{ +# "data":{ +# "id":"zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzz", +# "type":"courses" +# } +# }, +# "person":{ +# "data":{ +# "id":"abcdefghi-1234-jklm-5678-nopqrstuvwxy", +# "type":"people" +# } +# }, +# "activity":{ +# "data":{ +# "id":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", +# "type":"activities" +# } +# } +# } +# } +# } +# HEADERS = {"content-type": "application/json"} @@ -129,121 +142,117 @@ print(response.status_code) print(response.text) -{ - "payload": { - "data": { - "id": "324198cf-cab3-444b-bb4d-ffe4d31b4f7f", - "type": "activity_completed_events", - "links": {}, - "included": [ - { - "id": "a88729f9-92f2-4381-ab28-4035cb4d3592", - "type": "people", - "links": { - "self": "https://api.northpass.com/v1/people/a88729f9-92f2-4381-ab28-4035cb4d3592", - "teaching": "https://app.northpass.com/people/a88729f9-92f2-4381-ab28-4035cb4d3592" - }, - "attributes": { - "name": "Gus Parham", - "email": "gupar51@gmail.com", - "sso_uid": "gupar51@gmail.com", - "full_name": "Gus Parham", - "last_name": "Parham ", - "created_at": "2024-09-17T19:35:44.000000+00:00", - "first_name": "Gus", - "updated_at": "2024-09-17T20:06:26.000000+00:00", - "activated_at": "2024-09-17T19:35:44.000000+00:00", - "unsubscribed": false, - "last_active_at": "2024-09-17T20:06:26.000000+00:00" - }, - "relationships": { - "school": { - "data": { - "id": "a842c0ec-e681-4bfc-b6df-97075d3ff265", - "type": "schools" - } - } - } - }, - { - "id": "e918a598-a6d8-4dcd-9207-0746d0ee192a", - "type": "courses", - "links": { - "self": "https://api.northpass.com/v1/courses/e918a598-a6d8-4dcd-9207-0746d0ee192a", - "build": { - "href": "https://app.northpass.com/courses/nafkkwfx/builder", - "methods": [ - "get" - ] - }, - "clone": "https://app.northpass.com/courses/nafkkwfx/clone", - "preview": "/previews/courses/nafkkwfx", - "teaching": "https://app.northpass.com/courses/nafkkwfx" - }, - "attributes": { - "name": "DashLink Basics", - "status": "live", - "permalink": "nafkkwfx", - "created_at": "2024-05-24T19:19:00.000000+00:00", - "updated_at": "2024-09-17T20:03:43.000000+00:00", - "list_image_url": "https://cdn.filestackcontent.com/security=policy:eyJ3Ijo4MjAsImgiOjUwMCwiZml0IjoiY3JvcCIsImV4cGlyeSI6MTcyNjY1ODA4NCwiY2FsbCI6WyJyZWFkIiwiY29udmVydCIsInN0b3JlIiwicGljayIsInJlbW92ZSJdfQ==,signature:6bef5fcf0bfd2a796151ede34d792b9b0f6688b80590849cdd94cb17eeaf4ac0/resize=width:820,height:500,fit:crop/G5h4wupUQBqTrP7G78AG", - "enrollments_count": 5945, - "share_course_link": "https://doordash.northpass.com/app/courses/e918a598-a6d8-4dcd-9207-0746d0ee192a", - "course_enrollment_link": "https://doordash.northpass.com/c/e378bd4ea246bf537925b49771155a4af4ade5d9" - }, - "relationships": { - "categories": { - "data": [ - { - "id": "2364d17a-33ac-4652-8c85-5f93afae260c", - "type": "categories" - } - ] - }, - "instructor_partnerships": { - "data": [] - } - } - }, - { - "id": "2073e628-495f-4a8f-a61b-32b19897c1ca", - "type": "activities", - "links": { - "teaching": "https://app.northpass.com/courses/nafkkwfx/builder/activities/NjBCUq-W8", - "course_builder": "https://app.northpass.com/courses/nafkkwfx/builder" - }, - "attributes": { - "title": "How to Pickup DashLink Orders?", - "course_name": "DashLink Basics" - } - } - ], - "attributes": { - "value": 60, - "created_at": "2024-09-17T20:06:26.000000+00:00", - "course_attempt_number": 2 - }, - "relationships": { - "course": { - "data": { - "id": "e918a598-a6d8-4dcd-9207-0746d0ee192a", - "type": "courses" - } - }, - "person": { - "data": { - "id": "a88729f9-92f2-4381-ab28-4035cb4d3592", - "type": "people" - } - }, - "activity": { - "data": { - "id": "2073e628-495f-4a8f-a61b-32b19897c1ca", - "type": "activities" - } - } - } - } - }, - "params": {} -} +# { +# "payload": { +# "data": { +# "id": "324198cf-cab3-444b-bb4d-ffe4d31b4f7f", +# "type": "activity_completed_events", +# "links": {}, +# "included": [ +# { +# "id": "a88729f9-92f2-4381-ab28-4035cb4d3592", +# "type": "people", +# "links": { +# "self": "https://api.northpass.com/v1/people/a88729f9-92f2-4381-ab28-4035cb4d3592", +# "teaching": "https://app.northpass.com/people/a88729f9-92f2-4381-ab28-4035cb4d3592", +# }, +# "attributes": { +# "name": "Gus Parham", +# "email": "gupar51@gmail.com", +# "sso_uid": "gupar51@gmail.com", +# "full_name": "Gus Parham", +# "last_name": "Parham ", +# "created_at": "2024-09-17T19:35:44.000000+00:00", +# "first_name": "Gus", +# "updated_at": "2024-09-17T20:06:26.000000+00:00", +# "activated_at": "2024-09-17T19:35:44.000000+00:00", +# "unsubscribed": false, +# "last_active_at": "2024-09-17T20:06:26.000000+00:00", +# }, +# "relationships": { +# "school": { +# "data": { +# "id": "a842c0ec-e681-4bfc-b6df-97075d3ff265", +# "type": "schools", +# } +# } +# }, +# }, +# { +# "id": "e918a598-a6d8-4dcd-9207-0746d0ee192a", +# "type": "courses", +# "links": { +# "self": "https://api.northpass.com/v1/courses/e918a598-a6d8-4dcd-9207-0746d0ee192a", +# "build": { +# "href": "https://app.northpass.com/courses/nafkkwfx/builder", +# "methods": ["get"], +# }, +# "clone": "https://app.northpass.com/courses/nafkkwfx/clone", +# "preview": "/previews/courses/nafkkwfx", +# "teaching": "https://app.northpass.com/courses/nafkkwfx", +# }, +# "attributes": { +# "name": "DashLink Basics", +# "status": "live", +# "permalink": "nafkkwfx", +# "created_at": "2024-05-24T19:19:00.000000+00:00", +# "updated_at": "2024-09-17T20:03:43.000000+00:00", +# "list_image_url": "https://cdn.filestackcontent.com/security=policy:eyJ3Ijo4MjAsImgiOjUwMCwiZml0IjoiY3JvcCIsImV4cGlyeSI6MTcyNjY1ODA4NCwiY2FsbCI6WyJyZWFkIiwiY29udmVydCIsInN0b3JlIiwicGljayIsInJlbW92ZSJdfQ==,signature:6bef5fcf0bfd2a796151ede34d792b9b0f6688b80590849cdd94cb17eeaf4ac0/resize=width:820,height:500,fit:crop/G5h4wupUQBqTrP7G78AG", +# "enrollments_count": 5945, +# "share_course_link": "https://doordash.northpass.com/app/courses/e918a598-a6d8-4dcd-9207-0746d0ee192a", +# "course_enrollment_link": "https://doordash.northpass.com/c/e378bd4ea246bf537925b49771155a4af4ade5d9", +# }, +# "relationships": { +# "categories": { +# "data": [ +# { +# "id": "2364d17a-33ac-4652-8c85-5f93afae260c", +# "type": "categories", +# } +# ] +# }, +# "instructor_partnerships": {"data": []}, +# }, +# }, +# { +# "id": "2073e628-495f-4a8f-a61b-32b19897c1ca", +# "type": "activities", +# "links": { +# "teaching": "https://app.northpass.com/courses/nafkkwfx/builder/activities/NjBCUq-W8", +# "course_builder": "https://app.northpass.com/courses/nafkkwfx/builder", +# }, +# "attributes": { +# "title": "How to Pickup DashLink Orders?", +# "course_name": "DashLink Basics", +# }, +# }, +# ], +# "attributes": { +# "value": 60, +# "created_at": "2024-09-17T20:06:26.000000+00:00", +# "course_attempt_number": 2, +# }, +# "relationships": { +# "course": { +# "data": { +# "id": "e918a598-a6d8-4dcd-9207-0746d0ee192a", +# "type": "courses", +# } +# }, +# "person": { +# "data": { +# "id": "a88729f9-92f2-4381-ab28-4035cb4d3592", +# "type": "people", +# } +# }, +# "activity": { +# "data": { +# "id": "2073e628-495f-4a8f-a61b-32b19897c1ca", +# "type": "activities", +# } +# }, +# }, +# } +# }, +# "params": {}, +# }