diff --git a/Custom_Templates/customer_templates/Anthology - Production/_cards_training_event.html.liquid b/Custom_Templates/customer_templates/Anthology - Production/_cards_training_event.html.liquid index 3fc91efb..ab91c2a7 100644 --- a/Custom_Templates/customer_templates/Anthology - Production/_cards_training_event.html.liquid +++ b/Custom_Templates/customer_templates/Anthology - Production/_cards_training_event.html.liquid @@ -32,7 +32,7 @@ {% if training_event.sessions.size > 1 %} - Multiple Sessions + Additional Sessions {% else %} {% t .sessions, count: training_event.sessions.size %} {% endif %} diff --git a/Custom_Templates/customer_templates/Sandata Learn/.DS_Store b/Custom_Templates/customer_templates/Sandata Learn/.DS_Store new file mode 100644 index 00000000..5008ddfc Binary files /dev/null and b/Custom_Templates/customer_templates/Sandata Learn/.DS_Store differ diff --git a/Custom_Templates/customer_templates/Sandata Learn/_courses_zero_state.html.liquid b/Custom_Templates/customer_templates/Sandata Learn/_courses_zero_state.html.liquid index 26e371f7..ce714b72 100644 --- a/Custom_Templates/customer_templates/Sandata Learn/_courses_zero_state.html.liquid +++ b/Custom_Templates/customer_templates/Sandata Learn/_courses_zero_state.html.liquid @@ -1,6 +1,6 @@
- {{ message }} + New Courses Coming Soon!
{{ message }}
diff --git a/Custom_Templates/customer_templates/Sandata Learn/_head.html.liquid b/Custom_Templates/customer_templates/Sandata Learn/_head.html.liquid index beab5b4a..d8650b57 100644 --- a/Custom_Templates/customer_templates/Sandata Learn/_head.html.liquid +++ b/Custom_Templates/customer_templates/Sandata Learn/_head.html.liquid @@ -1,3 +1,8 @@ {% styles default %} {% styles colors %} {% styles custom %} + + \ No newline at end of file diff --git a/Custom_Templates/customer_templates/Sandata Learn/_header.html.liquid b/Custom_Templates/customer_templates/Sandata Learn/_header.html.liquid index e59cf9a0..2a93e5c6 100644 --- a/Custom_Templates/customer_templates/Sandata Learn/_header.html.liquid +++ b/Custom_Templates/customer_templates/Sandata Learn/_header.html.liquid @@ -1,3 +1,27 @@ +{% if current_person.signed_in? %} + {% unless current_person.email contains "+preview" %} + {% assign groups_count = 0 %} + + {% for group in current_person.groups %} + {% assign groups_count = groups_count | plus: 1 %} + {% endfor %} + + + {% endunless %} +{% endif %} +
@@ -189,4 +213,4 @@ align-items: baseline; } } - \ No newline at end of file + 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 5ffcd33a..58fab2e6 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 @@ -37,18 +37,21 @@ {% comment %} {% endcomment %} + {% comment %}
Sandata Alt EVV Aggregator
+ onclick="validateForm()">Alternative EVV
@@ -389,7 +392,7 @@ if(Object.keys(revisedPropsObj).length > 0){ let validationFlag = true; - let allRequiredFields = ['agency_name', 'medicaid_id', 'provider_id', 'learner_state', 'learner_role', 'ca_group_name', 'oh_group_name']; + let allRequiredFields = ['agency_name', 'medicaid_id', 'provider_id', 'learner_state', 'learner_role', 'oh_group_name', 'ca_group_name'] for(let i = 0; i < allRequiredFields.length; i++){ if(Object.keys(revisedPropsObj).indexOf(allRequiredFields[i]) == -1){ @@ -404,6 +407,7 @@ } else { document.querySelector('#calEVV-input').style.border = '1px solid light-dark(rgb(118, 118, 118), rgb(133, 133, 133))'; document.querySelector('#calEVV-label').style.display = 'none'; + revisedPropsObj['oh_group_name'] = undefined; } } else if(allRequiredFields[i] == 'learner_state' && revisedPropsObj[allRequiredFields[i]] == 'Ohio'){ if(Object.keys(revisedPropsObj).indexOf('oh_group_name') == -1){ @@ -411,6 +415,9 @@ document.querySelector('#oh-label').style.display = 'block'; } else { document.querySelector('#oh-label').style.display = 'none'; + revisedPropsObj['ca_group_name'] = undefined; + revisedPropsObj['cal_evv_id'] = undefined; + } } } @@ -446,11 +453,12 @@ console.log(userID); if(revisedPropsObj['learner_state'] != 'Ohio'){ - revisedPropsObj['oh_group_name'] = null; + revisedPropsObj['oh_group_name'] = "None"; } if(revisedPropsObj['learner_state'] != 'California'){ - revisedPropsObj['cal_evv_id'] = null; + revisedPropsObj['cal_evv_id'] = "None"; + revisedPropsObj['ca_group_name'] = "None"; } console.log(revisedPropsObj); @@ -459,8 +467,7 @@ function webhookCaller(){ return new Promise(function(res, rej) { let xhr = new XMLHttpRequest(); - url = "https://webhook.site/8fc3650a-7c4b-413a-a6fd-6e3787bc3771" - //url = "https://webhooks.workato.com/webhooks/rest/0a1d61c1-421c-4160-a1ab-d29e79aee50e/secondary-registration-submitted"; + url = "https://webhooks.workato.com/webhooks/rest/0a1d61c1-421c-4160-a1ab-d29e79aee50e/secondary-registration-submitted"; xhr.addEventListener("load", e => { localStorage.setItem('completed-second-registration', true); diff --git a/CustomerNotes/Anthology/Anthology.md b/CustomerNotes/Anthology/Anthology.md index 5acb650e..6a8b327f 100644 --- a/CustomerNotes/Anthology/Anthology.md +++ b/CustomerNotes/Anthology/Anthology.md @@ -434,7 +434,6 @@ Two items from KC: KC Question: When the categories are established in the filters, can we programatically re-assign categories to all 800 courses? Or does it need to be done manually? - KS1: Anthology Academic Economics: Essential, Anthology Academic Economics: Enhanced, Anthology Accreditation: Essential, Anthology Accreditation: Enhanced, Anthology 101: Essential, Anthology Baseline: Essential, Anthology Baseline: Enhanced, Anthology Beacon: Essential, Anthology Course Evaluations: Essential, Anthology Course Evaluations: Enhanced, Anthology Digital Assistant: Essential, Anthology Digital Assistant: Enhanced, Anthology Encompass: Essential, Anthology Encompass: Enhanced, Anthology Encompass: Enhanced+, Anthology Engage: Essential, Anthology Engage: Enhanced, Anthology Engage: Enhanced+, Anthology Evaluate: Essential, Anthology Evaluate: Enhanced, Anthology Finance & HCM: Essential, Anthology Finance & HCM: Enhanced, Anthology Finance & HCM: Enhanced+, Anthology Insight: Essential, Anthology Insight: Enhanced, Blackboard Learn: Essential, Anthology Milestone: Essential, Anthology Milestone: Enhanced, Outcomes: Essential, Outcomes: Enhanced, Anthology Payroll: Essential, Anthology Payroll: Enhanced, Anthology Planning: Essential, Anthology Planning: Enhanced, Anthology Portfolio: Essential, Anthology Portfolio: Enhanced, Power BI: Essential, Power BI: Enhanced, Anthology Program Review: Essential, Anthology Program Review: Enhanced, Anthology Raise: Essential, Anthology Raise: Enhanced, Anthology Raise: Enhanced+, Anthology Reach: Essential, Anthology Reach: Enhanced, Anthology Reach: Enhanced+, Anthology Student: Essential, Anthology Student: Enhanced, Anthology Student: Enhanced+, diff --git a/Scripts/API_Tests/__pycache__/tmp.cpython-310.pyc b/Scripts/API_Tests/__pycache__/tmp.cpython-310.pyc index 3b14ef97..481a6e77 100644 Binary files a/Scripts/API_Tests/__pycache__/tmp.cpython-310.pyc and b/Scripts/API_Tests/__pycache__/tmp.cpython-310.pyc differ diff --git a/Scripts/API_Tests/get_course_ids.py b/Scripts/API_Tests/get_course_ids.py index cfe327b2..4ea5328e 100644 --- a/Scripts/API_Tests/get_course_ids.py +++ b/Scripts/API_Tests/get_course_ids.py @@ -9,7 +9,21 @@ HEADERS = { "accept": "application/json", "X-Api-Key": APIKEY, } - +GROUPS = [ +"Accreditation", +"Anthology 101", +"Baseline", +"Course Evaluations", +"Engage", +"Evaluate", +"Finance & HCM", +"Learn", +"Portfolio", +"Power BI", +"Raise", +"Reach", +"Student", +] def get_courses(): """ diff --git a/Scripts/API_Tests/get_courses_from_groups.py b/Scripts/API_Tests/get_courses_from_groups.py new file mode 100644 index 00000000..57f6ae29 --- /dev/null +++ b/Scripts/API_Tests/get_courses_from_groups.py @@ -0,0 +1,77 @@ +import Apikeys +import requests +import pprint +import csv + +pp= pprint.PrettyPrinter(indent=4) +APIKEY = Apikeys.ANTHOLOGY +HEADERS = { + "accept": "application/json", + "X-Api-Key": APIKEY, +} +BASEURL = "https://api.northpass.com/v2/" +GROUPS = [ +"Accreditation", +"Anthology 101", +"Baseline", +"Course Evaluations", +"Engage", +"Evaluate", +"Finance & HCM", +"Learn", +"Portfolio", +"Power BI", +"Raise", +"Reach", +"Student", +] + +def group_ids(): + """ + Get the group Ids from a list of named groups. + """ + url = "groups" + for group in GROUPS: + filter = f"?filter[name][cont]={group} - (" + urlreq = f"{BASEURL}{url}{filter}" + response = requests.get(urlreq, headers=HEADERS) + response = response.json() + + for data in response['data']: + print(data['attributes']['name']) + id = data['id'] + get_courses_in_groups(id) + +def get_courses_in_groups(id): + """ + From the IDs received above, list out all of the courses. + """ + count = 0 + courses = [] + while True: + # count += 1 + url = f"groups/{id}/courses?limit=100" + courseurl = f"{BASEURL}{url}" + coursereq = requests.get(courseurl, headers=HEADERS) + coursedata = coursereq.json() + # nextlink = coursedata['links'] + print(id) + # print(coursedata) + + for data in coursedata['included']: + if data['attributes']['status'] == 'live': + name = data['attributes']['name'] + id = data['attributes']['share_course_link'].split("/")[5] + enrollments = data['attributes']['enrollments_count'] + created = data['attributes']['created_at'] + updated = data['attributes']['updated_at'] + coursedict = { + "name": name, "id": id, "enrollments": enrollments, + "created at": created, "updated at": updated + } + courses.append(coursedict) + print(courses) + + +if __name__ == "__main__": + group_ids() diff --git a/Scripts/API_Tests/tmp.py b/Scripts/API_Tests/tmp.py index 0ae83552..1dba8e34 100644 --- a/Scripts/API_Tests/tmp.py +++ b/Scripts/API_Tests/tmp.py @@ -15,8 +15,8 @@ REF = [ ("Nevada", "ST - Nevada (DHCFP)", "9fcf4e98-1dfd-441f-8ee4-0131c968867c"), ("North Carolina", "ST - North Carolina (DHHS)", "67a01f25-57ca-49a8-8fed-b7181b020842"), ("North Daktoa", "ST - North Dakota (DHHS)", "62dc0f55-a51d-4acf-90ce-dc10788385af"), - ("Ohio", "ST - OH NON-Agencies", "5d50b3ed-671b-4e97-9d5e-87f8b755dfe2"), - ("Ohio", "ST - OH ODM Agency Provider", "0c8efefc-364b-4971-b376-030493611b0d"), + ("Ohio", "ST - OH EVV Non-Agency", "5d50b3ed-671b-4e97-9d5e-87f8b755dfe2"), + ("Ohio", "ST - OH EVV ODM Agency Provider", "0c8efefc-364b-4971-b376-030493611b0d"), ("Ohio", "ST - OH ODM AGENCY PROVIDER ALT EVV", "838c0923-43b4-48bd-8011-00fd0411c68f"), ("Pennsylvania", "ST - PA DHS", "24c85122-aa00-4ce2-ad9b-70bb9c0f3f2f"), ("Rhode Island", "ST - Rhode Island EOHHS", "e52fd639-bf63-4840-b8bc-2e6a6f11560e"), diff --git a/Scripts/API_Tests/workatotest.py b/Scripts/API_Tests/workatotest.py index 82bd053e..f5b74659 100644 --- a/Scripts/API_Tests/workatotest.py +++ b/Scripts/API_Tests/workatotest.py @@ -1,40 +1,39 @@ import tmp +data = webhook_payload: +[ -webhook_payload = { - "payload": { - "array": [ - { - "id": "e134030d-a2a9-4de2-b4d5-87081feee18a", - "email": "gwalden@sandata.com", - "type": "person_properties", - "attributes": { - "properties": { - "agency_name": "Test 2", - "agency_id": "Test 2", - "medicaid_id": "54321", - "provider_id": "0987654321", - "learner_role": "Agency Billing", - "learner_state": "Tennessee", - "oh_group_name": "ST - OH ODM Agency Provider", - "evv_alt_for_ca_oh": "", - "successfully_completed_secondary_registration": True, - "cal_evv_id": None - } - } - } - ] - }, - "params": {} -} +{ + id: dc9aafe3-eee7-4d50-a480-3bd9831b893a, + email: it, + type: person_properties, + attributes: +{ + properties: +{ + agency_name: 32, + agency_id: 323, + medicaid_id: 22222, + provider_id: 2123231234, + learner_role: Agency Billing, + learner_state: Ohio, + oh_group_name: EVV, + ca_group_name: None, + cal_evv_id: None, + successfully_completed_secondary_registration: true + } + } + } + ] for item in webhook_payload['payload']['array']: - evv = item['attributes']['properties']['evv_alt_for_ca_oh'] + evv = item['attributes']['properties']['oh_group_name'] state = item['attributes']['properties']['learner_state'] group_result = [ref_state for ref_state in tmp.REF if state in ref_state] if len(group_result) > 1: for group in group_result: if evv in group: - print(group) + group_uuid = group[2] + print(group_uuid) else: group_uuid = group_result[0][2] print(group_uuid) diff --git a/Todos.md b/Todos.md index 0a2f5970..902fc8fc 100644 --- a/Todos.md +++ b/Todos.md @@ -219,3 +219,7 @@ message](https://northpasshq.slack.com/archives/C04RER4PH09/p1709147957374999?th ## 04-18-2024 - [X] Chubb - Looker, Learner Full name - what is it pulling? + +## 04-19-2024 + +- [ ] Anthology - Extract CSV of all Courses & UUIDs.