diff --git a/Custom_Templates/customer_templates/Anthology - Production/_course_desktop_view.html.liquid b/Custom_Templates/customer_templates/Anthology - Production/_course_desktop_view.html.liquid index eaa26612..f2e12542 100644 --- a/Custom_Templates/customer_templates/Anthology - Production/_course_desktop_view.html.liquid +++ b/Custom_Templates/customer_templates/Anthology - Production/_course_desktop_view.html.liquid @@ -257,4 +257,4 @@ height: 25em; justify-content: center; } - \ No newline at end of file + diff --git a/Custom_Templates/customer_templates/Norm_sandbox_1/homepage.html.liquid b/Custom_Templates/customer_templates/Norm_sandbox_1/homepage.html.liquid index 35683583..88733252 100644 --- a/Custom_Templates/customer_templates/Norm_sandbox_1/homepage.html.liquid +++ b/Custom_Templates/customer_templates/Norm_sandbox_1/homepage.html.liquid @@ -13,7 +13,7 @@
- {{ nothing.subheadline }} + {{ current_school.name }}
@@ -22,10 +22,10 @@ {% endif %} +{% comment %} {% include "section_popular_topics" %} {% include "section_professionals" %} @@ -57,6 +58,7 @@ {% include "section_faqs" %} {% include "section_instructors" %} +{% endcomment %} {% include "footer" %} diff --git a/Custom_Templates/customer_templates/Norm_sandbox_2/_header.html.liquid b/Custom_Templates/customer_templates/Norm_sandbox_2/_header.html.liquid index 7ba1587a..3fb70999 100644 --- a/Custom_Templates/customer_templates/Norm_sandbox_2/_header.html.liquid +++ b/Custom_Templates/customer_templates/Norm_sandbox_2/_header.html.liquid @@ -35,6 +35,7 @@ {% else %} {{ current_school.name }} + {{ current_school.url }} {% endif %} diff --git a/Custom_Templates/customer_templates/Norm_sandbox_2/homepage.html.liquid b/Custom_Templates/customer_templates/Norm_sandbox_2/homepage.html.liquid new file mode 100644 index 00000000..73ea3232 --- /dev/null +++ b/Custom_Templates/customer_templates/Norm_sandbox_2/homepage.html.liquid @@ -0,0 +1,52 @@ +{% include "header" %} +{% include "course_version_outdated_alert", courses: courses.featured %} +
+
+ {{ homepage.headline }} +
+
+ {{ current_school.request_access_link }} +
+
+ {{ homepage.subheadline }} +
+ + {% t .discover %} + +
+
+ {% include "sub_navigation" %} + +
+{% include "footer" %} diff --git a/Scripts/API_Tests/multi_group_reduce_to_one.py b/Scripts/API_Tests/multi_group_reduce_to_one.py index 53d0dfc4..378357a2 100644 --- a/Scripts/API_Tests/multi_group_reduce_to_one.py +++ b/Scripts/API_Tests/multi_group_reduce_to_one.py @@ -4,12 +4,14 @@ import requests APIKEY = Apikeys.DATASNIPPER BASEURL = "https://api.northpass.com/v2" -HEADERS = { "content-type": "appliation/json", "X-Api-Key": APIKEY } +HEADERS = {"content-type": "application/json", "X-Api-Key": APIKEY} PP = pprint.PrettyPrinter(indent=4) ALL_LEARNERS_GROUP = "2e274dc7-3abe-4575-8b3d-0c8e73a09f44" + def grab_people(): count = 0 + emptylist = [] while True: count += 1 url = f"{BASEURL}/people?page={count}" @@ -18,18 +20,26 @@ def grab_people(): nextlink = resp["links"] for peeps in resp["data"]: - id = peeps["id"] + learner_id = peeps["id"] email = peeps["attributes"]["email"] groups = peeps["relationships"]["groups"] - if len(groups['data']) >= 2: - for y in groups['data']: - if ALL_LEARNERS_GROUP in y['id']: - print(email, id) - # if 'ecb95453-7196-4392-8a24-392bf14b0480' in y: - + if len(groups["data"]) >= 2: + for y in groups["data"]: + if ALL_LEARNERS_GROUP in y["id"]: + group_uuid = y["id"] + remove_person_from_group(learner_id, group_uuid) if "next" not in nextlink: break +def remove_person_from_group(learner_id, group_id): + remove_url = f"{BASEURL}/people/{learner_id}/relationships/groups" + print(remove_url) + group_payload = {"data": [{"id": group_id, "type": "membership-groups"}]} + print(group_payload) + remove_call = requests.delete(remove_url, headers=HEADERS, json=group_payload) + print(remove_call.status_code) + + if __name__ == "__main__": grab_people() diff --git a/Todos.md b/Todos.md index 12118aed..ebbf03a2 100644 --- a/Todos.md +++ b/Todos.md @@ -372,7 +372,7 @@ message](https://northpasshq.slack.com/archives/C04RER4PH09/p1709147957374999?th ## 07-17-2024 - [X] Chubb - Send Steve Google App Script & ask Kim what report she needs -- [ ] Chubb - Ask SE for Delivery Log export from db. They are trying to find the best way to reminder agents who haven't started anything to actually start the path. Include all the data. +- [X] Chubb - Ask SE for Delivery Log export from db. They are trying to find the best way to reminder agents who haven't started anything to actually start the path. Include all the data. - [X] Volt - They would like an Archive Webhook. "It's necessary for the whole equation of getting everything up to enterprise level standards." No rush but it would help fill in the whole circle. - [X] HH - Looker: Course Completion, only yes, last 24 hours, scheduled for "results are changed" and 8am every day. @@ -398,7 +398,7 @@ message](https://northpasshq.slack.com/archives/C04RER4PH09/p1709147957374999?th - [ ] REVIEW - VOs: - [ ] Quantitative - 80%, Qualitative - 100% - Mid-year Baselines 3 VOs out of 18 current customers -- [ ] Williams-Sonoma - Big Wishlist item is native survey tool. +- [X] Williams-Sonoma - Big Wishlist item is native survey tool. ## 08-14-2024