diff --git a/Custom_Templates/customer_templates/Sandata Learn/dashboard.html.liquid b/Custom_Templates/customer_templates/Sandata Learn/dashboard.html.liquid index 643c4713..526ba7cf 100644 --- a/Custom_Templates/customer_templates/Sandata Learn/dashboard.html.liquid +++ b/Custom_Templates/customer_templates/Sandata Learn/dashboard.html.liquid @@ -1,6 +1,11 @@ {% include "header" %} {% include "course_version_outdated_alert", courses: courses.enrolled %} {% include "sub_navigation" %} +
diff --git a/Custom_Templates/customer_templates/Sandata Learn/sign-up-follow-up.html.liquid b/Custom_Templates/customer_templates/Sandata Learn/sign-up-follow-up.html.liquid index 6f6d5e55..8ec2c1a3 100644 --- a/Custom_Templates/customer_templates/Sandata Learn/sign-up-follow-up.html.liquid +++ b/Custom_Templates/customer_templates/Sandata Learn/sign-up-follow-up.html.liquid @@ -25,7 +25,7 @@ - + {% comment %}

Role:

{% endcomment %} {% include "sign_up_follow_up_roles_dropdown" %} @@ -234,7 +234,7 @@ let splitID = event.target.value.split(''); let valid = true; - if(splitID.length == 10){ + if(splitID.length >= 1 && splitID.length <= 10){ for(let i = 0; i < splitID.length; i++){ if(digits[splitID[i]] != splitID[i]){ valid = false; diff --git a/Custom_Templates/customer_templates/Sandata Learn/styles.css.liquid b/Custom_Templates/customer_templates/Sandata Learn/styles.css.liquid index cd081c8b..f66378f9 100644 --- a/Custom_Templates/customer_templates/Sandata Learn/styles.css.liquid +++ b/Custom_Templates/customer_templates/Sandata Learn/styles.css.liquid @@ -22,4 +22,8 @@ .np-box-header{ background: #FFF !important; } -} \ No newline at end of file +} + +.np-sub-navigation { + margin-bottom: 0px; +} diff --git a/Scripts/API_Tests/add-pgaids.py b/Scripts/API_Tests/add-pgaids.py index b73a00d3..a5fb8f86 100644 --- a/Scripts/API_Tests/add-pgaids.py +++ b/Scripts/API_Tests/add-pgaids.py @@ -4,7 +4,7 @@ from pathlib import Path import Apikeys import os -basefile = "/Users/normrasmussen/Downloads/mizuno-april-completions.csv" +basefile = "/Users/normrasmussen/Downloads/mizuno-may-completions.csv" api_key = Apikeys.MIZUNO uuid_url = "https://api.northpass.com/v2/people?filter[email][eq]=" prop_url = "https://api.northpass.com/v2/properties/people/" @@ -26,7 +26,8 @@ def load_file(basefile): for email in completions.itertuples(): row_num = email[0] row_dict = {"row_num": row_num} - email = email[2] + email = email[3] + print(email) url = uuid_url + f"{email}" response = requests.get(url, headers=headers) if response.status_code == 200: @@ -50,7 +51,7 @@ def load_file(basefile): completions = completions[completions["userid"] != "0"] # completions = completions.iloc[:, 0:] completions.to_csv( - "/Users/normrasmussen/Downloads/Mizuno-April2024-with-PGAID.csv", + "/Users/normrasmussen/Downloads/Mizuno-May2024-with-PGAID.csv", index=False, ) diff --git a/Scripts/API_Tests/get_course_ids.py b/Scripts/API_Tests/get_course_ids.py index 4ea5328e..4f078e01 100644 --- a/Scripts/API_Tests/get_course_ids.py +++ b/Scripts/API_Tests/get_course_ids.py @@ -55,7 +55,7 @@ def get_courses(): pp.pprint(list_of_ids) # print(len(list_of_ids)) with open( - "/Users/normrasmussen/Downloads/Walmart-Live-Courses.csv", "a+", newline='\n' + "/Users/normrasmussen/Downloads/Anthology-Courses.csv", "a+", newline='\n' ) as csvfile: for group in list_of_ids: for key, value in group.items(): diff --git a/Scripts/API_Tests/get_courses_from_groups.py b/Scripts/API_Tests/get_courses_from_groups.py index 10825d3c..08191b32 100644 --- a/Scripts/API_Tests/get_courses_from_groups.py +++ b/Scripts/API_Tests/get_courses_from_groups.py @@ -80,28 +80,35 @@ def group_ids(): def get_courses(ids): df = pd.DataFrame() courses = [] + error_groups = [] for tupe in ids: id = tupe[0] group = tupe[1] - print(f"Get Courses Function. Group:{ group } and id: {id}") for count in range(1, 10): + print(f"Get Courses For Loop. Group:{ group } and count: {count}") url2 = f"groups/{id}/courses?limit=100&page={count}" courseurl = f"{BASEURL}{url2}" coursereq = requests.get(courseurl, headers=HEADERS) - coursedata = coursereq.json() - print(coursedata) - nextlink = coursedata["links"] - for cdata in coursedata["included"]: - # if cdata["attributes"]["status"] == "archived": - coursedict = parse_data(cdata, group) - print(f"Coursedict --> {coursedict} for page {count}") - if coursedict is not None: - courses.append(coursedict) - if "next" not in nextlink: - break + try: + coursedata = coursereq.json() + nextlink = coursedata["links"] + for cdata in coursedata["included"]: + # if cdata["attributes"]["status"] == "archived": + coursedict = parse_data(cdata, group) + print(f"Coursedict --> {coursedict} for page {count}") + if coursedict is not None: + courses.append(coursedict) + except JSONDecodeError as e: + print("JSON Error! {e}") + error_groups.append(group) - pddata = df.from_records(courses) - pddata.to_csv("~/Downloads/ARCHIVED-Anthology_Course_IDs_Names.csv") + finally: + if "next" not in nextlink: + break + + pddata = df.from_records(courses) + pddata.to_csv("/Users/normrasmussen/Downloads/ALL-Anthology_Course_IDs_Names.csv") + print(error_groups) def parse_data(cdata, group):