WALMART SCREENSHOT SCRIPT DONEcd ~/Documents/Northpass! And emails from Groups for Wildhealth. Very productive day

This commit is contained in:
Norm Rasmussen
2023-01-31 16:24:35 -05:00
parent ab43ce9d90
commit 55eb10b0f5
17 changed files with 103 additions and 49 deletions

View File

@ -183,7 +183,7 @@ Other Hot topics in the Netherlands:
- Banner Width smaller
- Mobile view search bar becomes too short - Phone view
- Chevron Carousel is okay for many courses
- Embed our Workforce Contact
- Embed our Workforce Contact
- If you click contact, it will send them to a website hosted by Flink
- Soner to send brand guidelines & which buttons should be removed from collapsible menu
- Questions about Preview as Manager vs Learner
@ -238,7 +238,7 @@ Order of operations:
1. Creating the course categories and assigning them correctly. Adding courses to the groups also needs to be done.
2. Begin transfer of templates behind the scene. This may take some time and *could* bring the academy down for a bit of time.
- Considerations: they have this "home quiz" which is due on Friday
- Best time is Friday evening Berlin time.
- Best time is Friday evening Berlin time.
- We need to let Flink know when the transfer is starting and if the site goes down.
- Then let them know when it is finished.
@ -263,7 +263,7 @@ Some Topics from Cami
- Patrycja: a better design understanding of the search.
- Cami - do we need to show courses?
- Soner Front End stuff:
- The search works, but once you search for a course, some cosmetic things need to be changed.
- The search works, but once you search for a course, some cosmetic things need to be changed.
- Search results is slightly covered
- Results are showing courses that they are not enrolled in
- Screen had two handover processors - that's because learners are enrolled in both courses. This is normal functionality.
@ -272,7 +272,7 @@ Some Topics from Cami
- Flink logo should go to categories page. Not the status page.
- Language button isn't working as expected. If they click English, all the courses disappear. If they click German, all courses disappear. On home page, all courses of *both* languages show up.
- Properties, if admin saves property as uppercase, it reverts to lower case. Bug?
- Location and Languages *should* be working as expected.
- Location and Languages *should* be working as expected.
- Soner has also received questions about course completion:
- Some people complete the course in one language, they want to mark the other course as complete.
- Also, they provide a survey at the end of the course which the person can't take because Flink doesn't allow retakes.
@ -339,7 +339,7 @@ Cami & Flow Clean up:
- Question from Norm: is the SAP ID the same as SSO ID?
- Once everything is clean, then they can turn on SSO. The email from Auth0 or Okta will be the main email of the person.
- The main email in Northpass should be the GoFlink
After this, account creations need to be solved and how to avoid duplicates. Currently, there are clean creations from SAP.
Netherlands mentioned that some people were new joiners did not have access to Northpass.
She is very excited about the backfill and this will be super helpful.
@ -363,3 +363,18 @@ She will also send the email with the file and a disclosure. Norm to reply with
Deadline: First week of January, or ideally if it can be done next week.
Include Anna with any questions regarding the clean up and matching.
## 01/31/2023
### Follow up on a few items
Agenda from Email & Responses:
- Is it possible to set up a new open access section in northpass ( as a new "school" section)?
- Do you mean a whole new instance? A new academy with a different authentication type would change your contract, so I get you some details on that. If you just want a page within your academy with different materials, that is not a problem at all.
- SAP webhook, we have some bugs on account creation.
- Do you mind sharing what bugs you are experiencing? If it's shared now, we can explore these before our check in.
- Clean up final steps and backfill, maintenance of profiles updated.
- Sounds good.
- Can we include on our reports the columns staff ID, hub and the information that we shared for the backfill? We will need it to create our dashboards.
- Currently, properties are not available in the extract, but it is on the roadmap for the first half of this year for our enterprise clients. The person who created the custom extract your team is using will add them to your extract whenever they get that done. I will let you know when it becomes available.

View File

@ -254,7 +254,7 @@ DONE: Add total completion percentage column to Group Reports.
### Random w/ Jenna & Kay
TODO: Delays with Webhooks. Upon course completion webhook, wait 11 months, reset or revoke course progress.
DONE: Delays with Webhooks. Upon course completion webhook, wait 11 months, reset or revoke course progress.
Other pressing question: She has a list of selected/approved courses (awaiting feedback from Mary Potter), and wants to make sure all the courses are up to date with the most recent content. She wants to make sure they are setup well.
Jenna to send the list of courses that she wants us to check and make sure they are up to date.
@ -281,3 +281,12 @@ From Molly's Email:
Goal: They need to communicate with the people who have not completed the compliance courses within 30 days.
TODO: Add Column with Date Complete of Getting Started or Managed Care. They would like a single spreadsheet with everyone's completed courses.
## 01/31/2023
### Molly/Jenna
Molly wants to send an auto-email that shares training and support resources as soon as they are done with the course.
Course = 1099 Provider: Getting Started with Talkspace
Molly to send copy and links. These shouldn't be a worry cause its a different course with different content and triggers.
TODO: Set up new Workflow with 1099 Provider Course as the Trigger.

BIN
Scripts/API_Tests/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -1,38 +0,0 @@
<script
type="application/json"
class="js-react-on-rails-component"
data-component-name="TableBox"
data-dom-id="TableBox-react-component-4c1d0baa-eca8-4312-8626-591abf094ee4">
{
"token":"eyJhbGciOiJIUzI1NiJ9.eyJhcGlfa2V5IjoiU2xwUWxqdTIxOVduV29nbjk0ZFFVVDZZdCIsImV4cCI6MTY2NzU2NTg1Nn0.CFD30gpbrwsY1LnddlfvpI1LUojrtK723MTNyeQqixM",
"columns":[
{
"name":"Name",
"field":"name",
"link":"teaching/show",
"sort":true
},
{
"name":"File Name",
"field":"fileName",
"link":"teaching/show",
"sort":true
},
{
"name":"Asset Type",
"field":"assetType",
"as":"i18n",
"sort":"type",
"formatOptions":
{
"scope":"media.asset_type"
}
},
{
"name":"Status",
"field":"status",
"as":"status",
"formatOptions":
{
"errorMessageField":"status_message","i18nScope":"media.asset_status"},"sort":true},{"name":"Date Uploaded","field":"createdAt","as":"date_time","sort":true}],"filterMessage":"","initialHeader":"","initialMessage":"","loadingHeader":"","loadingMessage":"","noDataHeader":"Looks like you haven't uploaded any media assets yet!","noDataMessage":"Start uploading your first asset by clicking the button above.","url":"https://api.northpass.com/v1/media","filters":[{"name":"Asset Type","field":"type","options":[{"label":"Documents","value":"Uploads::Document"},{"label":"Presentations","value":"Uploads::Presentation"},{"label":"Videos","value":"Uploads::Video"},{"label":"SCORM","value":"Uploads::Scorm"}]},{"name":"Asset Status","field":"status","options":[{"label":"Queued","value":"queued"},{"label":"Processing","value":"processing"},{"label":"Ready","value":"ready"},{"label":"Error","value":"error"},{"label":"Replacing","value":"replacing"},{"label":"Error replacing","value":"error_replacing"}]}],"itemActions":[{"action":"delete","behavior":"deprecated_confirm_modal","behaviorOptions":{"disabledCondition":{"status":"replacing"},"hiddenCondition":{"status":"error_replacing"},"confirmButtonOptions":{"classes":["np-button--danger"],"text":"I understand, please delete."},"deleteHeader":"Are you sure you want to delete this file?","modalContent":"delete_media"}},{"action":"edit"},{"action":"replace","behaviorOptions":{"disabledCondition":{"status":"replacing"},"hiddenCondition":{"replaceable":false},"requirement":{"status":"ready"}}},{"action":"download","behaviorOptions":{"disabledCondition":{"status":"replacing"},"hiddenCondition":{"status":"error_replacing"}}},{"action":"Dismiss Error","behavior":"dismiss_error_link","behaviorOptions":{"buttonClassNames":"uk-dropdown-button","disabledCondition":{"status":"replacing"},"hiddenCondition":{"status":"not_error_replacing"}}},{"action":"create_course_from_file","behaviorOptions":{"hiddenCondition":[{"status":"not_ready"},{"assetType":"not_scorm_single"}],"method":"post"}}],"options":{"search":true,"classNames":[]}}</script><div id="TableBox-react-component-4c1d0baa-eca8-4312-8626-591abf094ee4"></div>

View File

@ -1,4 +1,5 @@
import requests
import pandas as pd
apiKey = "HWxj6VTNPwbc3WghFTPzr7SjE"
# Wild Health
@ -8,21 +9,24 @@ groupurl = f"https://api.northpass.com/v2/groups/{groupid}/memberships"
def getemailsfromGroup(apiKey, groupid, groupurl):
x = 0
emails = []
emaillist = []
while True:
x += 1
url = groupurl
url = f"https://api.northpass.com/v2/groups/{groupid}/memberships?page={x}"
headers = {"accept": "application/json", "X-Api-Key": apiKey}
response = requests.get(url, headers=headers)
jsonResponse = response.json()
next = jsonResponse["links"]
for email in jsonResponse["included"][1]["attributes"]["email"]:
emails.append(email)
for emails in jsonResponse["included"]:
email = emails["attributes"]["email"]
print(email)
emaillist.append(email)
if "next" not in next:
break
print(emails)
print(emaillist)
pd.DataFrame(emaillist).to_csv('/Users/normrasmussen/Downloads/emails_in_group.csv')
if __name__ == "__main__":

BIN
Scripts/Walmart_Screenshots/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -0,0 +1,64 @@
const puppeteer = require('puppeteer');
const path = require('path')
// const urls = [...]
/*for (let i=0; i<urls.length; i++){
const url = urls[i];
await page.goto('${url}');
await page.waitForNavigation({ waitUntil: 'networkkidle2' });
}*/
const url = process.argv[2];
if (!url) {
throw "Please provide a URL as the first argument";
}
const activity = new Array();
const activityLinks = new Array();
var num = 0
async function courseOverview() {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({ width:390, height:844 })
await page.goto(url);
await page.title();
const [getXpath] = await page.$x('//*[@id="course-desktop"]/div/div[3]/div[2]/div[2]/div[2]/ol/li/div');
const resourcetitle = await page.evaluate(name => name.innerText, getXpath);
const resource = resourcetitle.trim();
console.log(resource);
await page.screenshot({path: `${resource}.png`, fullPage:true, headless:false});
const hrefs = await page.$$eval('a', as => as.map(a => a.href));
var links = Object.entries(hrefs);
links.forEach(([key, value]) => {
var link = value;
if (link.includes("activities")) {
activity.push(link);
}
});
uniqueLinks = [...new Set(activity)];
for (const link of uniqueLinks) {
num = num+1
let uid = "?uid\=7b84eae4-fb34-4689-9f33-24071c3e5a41"
const newlink = link+uid;
console.log(newlink)
screenshots(newlink, resource, num);
}
await browser.close();
}
async function screenshots(newlink, resource, num) {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({ width: 390, height: 844 })
await page.goto(newlink);
await page.screenshot({path: `${resource}_${num}.png`, fullPage: true, headless: false});
await browser.close();
}
courseOverview();