Hackerrank moved Sandbox to Production. Chubb upload. Webhook test for Anthology's Workato.

This commit is contained in:
Norm Rasmussen
2024-11-05 16:50:39 -05:00
parent 91834dfcc7
commit 6cd64953bf
8 changed files with 276 additions and 242 deletions

View File

@ -0,0 +1,19 @@
{% if current_school.properties.banner_toggle == true %}
<header class="np-header np-banner-header">
<div class="np-alert">
{{ current_school.properties.banner_text }}
</div>
</header>
{% endif %}
<style>
.np-banner-header {
background-color: green;
color: white;
height: 10%;
font-weight: 800;
padding: 10px 10px 10px 10px;
width: 100%;
}
</style>

View File

@ -10,7 +10,7 @@
<div class="np-sub-navigation-content"> <div class="np-sub-navigation-content">
<div class="np-sub-navigation-content"> <div class="np-sub-navigation-content">
<div class="np-sub-navigation-content-item"> <div class="np-sub-navigation-content-item">
<a class="np-sub-navigation-content-item-link" href="https://hackertest.northpass.com/app/dashboard" style="font-weight: bold;">My courses</a> <a class="np-sub-navigation-content-item-link" href="https://hackerrank.northpass.com/app/dashboard" style="font-weight: bold;">My courses</a>
</div> </div>
</div> </div>
<div class="np-sub-navigation-content"> <div class="np-sub-navigation-content">

View File

@ -1,5 +1,5 @@
{% include "header" %} {% include "header" %}
<main class="np-main np-catalog np-subpage-container np-max-width"> <main class="np-main np-catalog np-subpage-container np-max-width" style="margin-bottom: 0; background-image: url('{{ homepage.artwork_url }}');">
{% include "course_version_outdated_alert", courses: courses.in_catalog %} {% include "course_version_outdated_alert", courses: courses.in_catalog %}
<div class="np-catalog-header-wrapper"> <div class="np-catalog-header-wrapper">
<div class="np-catalog-header"> <div class="np-catalog-header">

View File

@ -1,4 +1,7 @@
<main class="np-main np-homepage"style="margin-bottom: 0; background-image: url('{{ homepage.artwork_url }}');"> <main class="np-main np-homepage"
style="margin-bottom: 0; background-image: url('{{ homepage.artwork_url }}');">
{% include "banner" %}
{% include "header" %} {% include "header" %}
<div class="np-homepage-hero" style="padding: 80px;"> <div class="np-homepage-hero" style="padding: 80px;">
<div class="np-homepage-hero-content"> <div class="np-homepage-hero-content">

View File

@ -9,7 +9,7 @@
{% if current_school.id == staging_school_id %} {% if current_school.id == staging_school_id %}
{% comment %} <link rel="stylesheet" href="https://cdn.northpass.io/walmart/staging/walmart-styles_11092023_v1.min.css" /> {% endcomment %} {% comment %} <link rel="stylesheet" href="https://cdn.northpass.io/walmart/staging/walmart-styles_11092023_v1.min.css" /> {% endcomment %}
{% elsif current_school.id == production_sandbox_school_id %} {% elsif current_school.id == production_sandbox_school_id %}
{% comment %} <link rel="stylesheet" href="https://cdn.northpass.io/walmart/production-sandbox/walmart-styles_11092023_v1.min.css" /> {% endcomment %} <link rel="stylesheet" href="https://cdn.northpass.io/walmart/production-sandbox/walmart-styles_11092023_v1.min.css" />
{% elsif current_school.id == live_school_id %} {% elsif current_school.id == live_school_id %}
<link rel="stylesheet" href="https://cdn.northpass.io/walmart/live/walmart-styles_11092023_v1.min.css" /> <link rel="stylesheet" href="https://cdn.northpass.io/walmart/live/walmart-styles_11092023_v1.min.css" />
{% endif %} {% endif %}
@ -22,8 +22,8 @@
{% comment %} <script src="https://cdn.northpass.io/walmart/staging/walmart-js_11092023_v1.min.js" defer ></script> {% endcomment %} {% comment %} <script src="https://cdn.northpass.io/walmart/staging/walmart-js_11092023_v1.min.js" defer ></script> {% endcomment %}
{% include "js_scripts" %} {% include "js_scripts" %}
{% elsif current_school.id == production_sandbox_school_id %} {% elsif current_school.id == production_sandbox_school_id %}
{% comment %} <script src="https://cdn.northpass.io/walmart/production-sandbox/walmart-js_11092023_v1.min.js" defer ></script> {% endcomment %} <script src="https://cdn.northpass.io/walmart/production-sandbox/walmart-js_01182024_v1.min.js" defer ></script>
{% include "js_scripts" %} {% comment %} {% include "js_scripts" %} {% endcomment %}
{% elsif current_school.id == live_school_id %} {% elsif current_school.id == live_school_id %}
<script src="https://cdn.northpass.io/walmart/live/walmart-js_11092023_v1.min.js" defer ></script> <script src="https://cdn.northpass.io/walmart/live/walmart-js_01182024_v1.min.js" defer ></script>
{% endif %} {% endif %}

View File

@ -30,6 +30,11 @@
{% capture icon %} {% capture icon %}
fa-arrow-left{% endcapture %} fa-arrow-left{% endcapture %}
{% include "mobile_header", title: "Resource Center", back_icon: icon, back_link: "javascript:sendMessage();" %} {% include "mobile_header", title: "Resource Center", back_icon: icon, back_link: "javascript:sendMessage();" %}
{% if current_school.properties.banner_toggle == true %}
<div class="np-alert" style="height: 65px; margin-top: 55px; padding: 0 0 5px 5px; color:#000000; font-size: 16px; background-color:#FFC220" >
{{ current_school.properties.banner_text }}
</div>
{% endif %}
{% include "sub_navigation" %} {% include "sub_navigation" %}
<main class="np-main np-courses np-subpage-container np-max-width"> <main class="np-main np-courses np-subpage-container np-max-width">
{% if current_person.signed_in? %} {% if current_person.signed_in? %}

View File

@ -1,7 +1,5 @@
import requests import requests
import json
import pprint import pprint
import csv
import pandas as pd import pandas as pd
import Apikeys import Apikeys
import time import time
@ -13,7 +11,7 @@ HEADERS = {
"X-Api-Key": APIKEY, "X-Api-Key": APIKEY,
} }
BASEURL = "https://api.northpass.com/v2/" 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(): def bulk_invite_and_group():

View File

@ -1,125 +1,138 @@
import json import json
import requests 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 # DoorDash Quiz Completion
# "https://webhooks.workato.com/webhooks/rest/c98e26af-6fdf-423d-b7ee-899f208956a0/doordash-quiz-completion" # "https://webhooks.workato.com/webhooks/rest/c98e26af-6fdf-423d-b7ee-899f208956a0/doordash-quiz-completion"
#DoorDash Course Completion # DoorDash Course Completion
# #
DATA = anthology_payload = {
DATA = { "domain_to_update": {
"data":{ "domain": "tcl.edu",
"id":"44444444-4444-4444-4444-444444444444", "group_ids": [
"type":"activity_completed_events", "8302b674-c728-42d2-9ba3-908b4d970436",
"links":{}, "2b5267b2-ce87-4e77-ad88-5cfec80496b9",
"included":[ "197da27d-0497-40b5-b2f8-cec4124d32f6",
{ "dc50ca43-5071-45b3-bf42-e1e64416ffd0",
"id":"abcdefghi-1234-jklm-5678-nopqrstuvwxy", ],
"type":"people", },
"links":{ "params": {},
"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 = {
# "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"} HEADERS = {"content-type": "application/json"}
@ -129,121 +142,117 @@ print(response.status_code)
print(response.text) print(response.text)
{ # {
"payload": { # "payload": {
"data": { # "data": {
"id": "324198cf-cab3-444b-bb4d-ffe4d31b4f7f", # "id": "324198cf-cab3-444b-bb4d-ffe4d31b4f7f",
"type": "activity_completed_events", # "type": "activity_completed_events",
"links": {}, # "links": {},
"included": [ # "included": [
{ # {
"id": "a88729f9-92f2-4381-ab28-4035cb4d3592", # "id": "a88729f9-92f2-4381-ab28-4035cb4d3592",
"type": "people", # "type": "people",
"links": { # "links": {
"self": "https://api.northpass.com/v1/people/a88729f9-92f2-4381-ab28-4035cb4d3592", # "self": "https://api.northpass.com/v1/people/a88729f9-92f2-4381-ab28-4035cb4d3592",
"teaching": "https://app.northpass.com/people/a88729f9-92f2-4381-ab28-4035cb4d3592" # "teaching": "https://app.northpass.com/people/a88729f9-92f2-4381-ab28-4035cb4d3592",
}, # },
"attributes": { # "attributes": {
"name": "Gus Parham", # "name": "Gus Parham",
"email": "gupar51@gmail.com", # "email": "gupar51@gmail.com",
"sso_uid": "gupar51@gmail.com", # "sso_uid": "gupar51@gmail.com",
"full_name": "Gus Parham", # "full_name": "Gus Parham",
"last_name": "Parham ", # "last_name": "Parham ",
"created_at": "2024-09-17T19:35:44.000000+00:00", # "created_at": "2024-09-17T19:35:44.000000+00:00",
"first_name": "Gus", # "first_name": "Gus",
"updated_at": "2024-09-17T20:06:26.000000+00:00", # "updated_at": "2024-09-17T20:06:26.000000+00:00",
"activated_at": "2024-09-17T19:35:44.000000+00:00", # "activated_at": "2024-09-17T19:35:44.000000+00:00",
"unsubscribed": false, # "unsubscribed": false,
"last_active_at": "2024-09-17T20:06:26.000000+00:00" # "last_active_at": "2024-09-17T20:06:26.000000+00:00",
}, # },
"relationships": { # "relationships": {
"school": { # "school": {
"data": { # "data": {
"id": "a842c0ec-e681-4bfc-b6df-97075d3ff265", # "id": "a842c0ec-e681-4bfc-b6df-97075d3ff265",
"type": "schools" # "type": "schools",
} # }
} # }
} # },
}, # },
{ # {
"id": "e918a598-a6d8-4dcd-9207-0746d0ee192a", # "id": "e918a598-a6d8-4dcd-9207-0746d0ee192a",
"type": "courses", # "type": "courses",
"links": { # "links": {
"self": "https://api.northpass.com/v1/courses/e918a598-a6d8-4dcd-9207-0746d0ee192a", # "self": "https://api.northpass.com/v1/courses/e918a598-a6d8-4dcd-9207-0746d0ee192a",
"build": { # "build": {
"href": "https://app.northpass.com/courses/nafkkwfx/builder", # "href": "https://app.northpass.com/courses/nafkkwfx/builder",
"methods": [ # "methods": ["get"],
"get" # },
] # "clone": "https://app.northpass.com/courses/nafkkwfx/clone",
}, # "preview": "/previews/courses/nafkkwfx",
"clone": "https://app.northpass.com/courses/nafkkwfx/clone", # "teaching": "https://app.northpass.com/courses/nafkkwfx",
"preview": "/previews/courses/nafkkwfx", # },
"teaching": "https://app.northpass.com/courses/nafkkwfx" # "attributes": {
}, # "name": "DashLink Basics",
"attributes": { # "status": "live",
"name": "DashLink Basics", # "permalink": "nafkkwfx",
"status": "live", # "created_at": "2024-05-24T19:19:00.000000+00:00",
"permalink": "nafkkwfx", # "updated_at": "2024-09-17T20:03:43.000000+00:00",
"created_at": "2024-05-24T19:19:00.000000+00:00", # "list_image_url": "https://cdn.filestackcontent.com/security=policy:eyJ3Ijo4MjAsImgiOjUwMCwiZml0IjoiY3JvcCIsImV4cGlyeSI6MTcyNjY1ODA4NCwiY2FsbCI6WyJyZWFkIiwiY29udmVydCIsInN0b3JlIiwicGljayIsInJlbW92ZSJdfQ==,signature:6bef5fcf0bfd2a796151ede34d792b9b0f6688b80590849cdd94cb17eeaf4ac0/resize=width:820,height:500,fit:crop/G5h4wupUQBqTrP7G78AG",
"updated_at": "2024-09-17T20:03:43.000000+00:00", # "enrollments_count": 5945,
"list_image_url": "https://cdn.filestackcontent.com/security=policy:eyJ3Ijo4MjAsImgiOjUwMCwiZml0IjoiY3JvcCIsImV4cGlyeSI6MTcyNjY1ODA4NCwiY2FsbCI6WyJyZWFkIiwiY29udmVydCIsInN0b3JlIiwicGljayIsInJlbW92ZSJdfQ==,signature:6bef5fcf0bfd2a796151ede34d792b9b0f6688b80590849cdd94cb17eeaf4ac0/resize=width:820,height:500,fit:crop/G5h4wupUQBqTrP7G78AG", # "share_course_link": "https://doordash.northpass.com/app/courses/e918a598-a6d8-4dcd-9207-0746d0ee192a",
"enrollments_count": 5945, # "course_enrollment_link": "https://doordash.northpass.com/c/e378bd4ea246bf537925b49771155a4af4ade5d9",
"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": {
"relationships": { # "data": [
"categories": { # {
"data": [ # "id": "2364d17a-33ac-4652-8c85-5f93afae260c",
{ # "type": "categories",
"id": "2364d17a-33ac-4652-8c85-5f93afae260c", # }
"type": "categories" # ]
} # },
] # "instructor_partnerships": {"data": []},
}, # },
"instructor_partnerships": { # },
"data": [] # {
} # "id": "2073e628-495f-4a8f-a61b-32b19897c1ca",
} # "type": "activities",
}, # "links": {
{ # "teaching": "https://app.northpass.com/courses/nafkkwfx/builder/activities/NjBCUq-W8",
"id": "2073e628-495f-4a8f-a61b-32b19897c1ca", # "course_builder": "https://app.northpass.com/courses/nafkkwfx/builder",
"type": "activities", # },
"links": { # "attributes": {
"teaching": "https://app.northpass.com/courses/nafkkwfx/builder/activities/NjBCUq-W8", # "title": "How to Pickup DashLink Orders?",
"course_builder": "https://app.northpass.com/courses/nafkkwfx/builder" # "course_name": "DashLink Basics",
}, # },
"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,
"attributes": { # },
"value": 60, # "relationships": {
"created_at": "2024-09-17T20:06:26.000000+00:00", # "course": {
"course_attempt_number": 2 # "data": {
}, # "id": "e918a598-a6d8-4dcd-9207-0746d0ee192a",
"relationships": { # "type": "courses",
"course": { # }
"data": { # },
"id": "e918a598-a6d8-4dcd-9207-0746d0ee192a", # "person": {
"type": "courses" # "data": {
} # "id": "a88729f9-92f2-4381-ab28-4035cb4d3592",
}, # "type": "people",
"person": { # }
"data": { # },
"id": "a88729f9-92f2-4381-ab28-4035cb4d3592", # "activity": {
"type": "people" # "data": {
} # "id": "2073e628-495f-4a8f-a61b-32b19897c1ca",
}, # "type": "activities",
"activity": { # }
"data": { # },
"id": "2073e628-495f-4a8f-a61b-32b19897c1ca", # },
"type": "activities" # }
} # },
} # "params": {},
} # }
}
},
"params": {}
}