Fixed some more of the Luminate templates for Spanish templates. Wrote a quick addition to get all course IDs.

This commit is contained in:
Norm Rasmussen
2024-05-31 22:32:56 -04:00
parent bf13bb7131
commit 1c28a57244
7 changed files with 170 additions and 108 deletions

View File

@ -14,6 +14,8 @@
.np-resource-subtitle.modules,
.np-resource-title.lp,
.np-resource-subtitle.lp,
.np-resource-title.articles,
.np-resource-subtitle.articles,
.np-card-header-type,
.np-resource-title.events,
.np-resource-subtitle.events,
@ -75,8 +77,8 @@
.Catalog.np-resource-subtitle,
.Learning.Paths.np-resource-title,
.Learning.Paths.np-resource-subtitle,
.Articles.np-resource-title,
.Articles.np-resource-subtitle,
.Article.np-resource-title,
.Article.np-resource-subtitle,
.Certifications.np-resource-title,
.Certifications.np-resource-subtitle,
#desktop_upload_avatar,
@ -91,6 +93,7 @@ body > main > div.np-catalog-header-wrapper > div.np-catalog-header > div.np-res
}
/* CATALOG */
/*
body > main > div.np-catalog-header-wrapper > div.np-catalog-header > div.np-resource-title::after {
text-indent: 0;
line-height: 0;
@ -104,7 +107,7 @@ body > main > div.np-catalog-header-wrapper > div.np-catalog-header > div.np-res
line-height: 0;
display: block;
content: "Grandes cursos desde la comodidad de tu casa u oficina";
}
}*/
/* HEADER */
.np-header-avatar-tooltip-navigation-link::after {
@ -544,7 +547,7 @@ body > main > div.np-catalog-header-wrapper > div.np-catalog-header > div.np-res
/* ARTICLES */
.Articles.np-resource-title::after {
.Article.np-resource-title::after {
/* Articles */
text-indent: 0;
line-height: 1;
@ -552,6 +555,14 @@ body > main > div.np-catalog-header-wrapper > div.np-catalog-header > div.np-res
content: "Artículos";
}
.Article.np-resource-subtitle::after {
/* blank */
text-indent: 0;
line-height: 1;
display: block;
content: "";
}
/* CERTIFICATIONS */
.Certifications.np-resource-title::after {

View File

@ -3,24 +3,31 @@
<main class="np-main np-catalog np-subpage-container np-max-width">
<div class="np-catalog-header-wrapper">
<div class="np-catalog-header">
<div class="Articles np-resource-title">{{ custom_page.headline }}</div>
<div class="Articles np-resource-subtitle">{{ custom_page.subheadline }}</div>
<div class="Article np-resource-title">{{ custom_page.headline }}</div>
<div class="Article np-resource-subtitle">{{ custom_page.subheadline }}</div>
</div>
</div>
{% if courses.in_catalog.any? %}
<div class="np-catalog-courses row row-with-thumbnails">
{% for course in courses.in_catalog %}
{% if course.properties.is_article_course %}
{% if course.properties.is_article_course %}
{% comment %}
{% if course.id == "b3225a47-448d-4988-962a-18d37d6616d0" or course.id == "fdc8acdc-0b7c-4064-a52b-1955379d411b" %}
{% unless course.progress == 100 %}
{% unless course.progress == 100 %}
{% endunless %}
{% endif %};
{% endcomment %}
{% if course.properties.course_language == current_person.properties.language %}
<div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content">
{% include "cards_article" with course %}
</div>
{% endunless %}
{% comment %}
{% else %}
<div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content">
{% include "cards_article" with course %}
</div>
</div>
{% endcomment %}
{% endif %}
{% endif %}
{% endfor %}

View File

@ -4,8 +4,8 @@
<main class="np-main np-catalog np-subpage-container np-max-width">
<div class="np-catalog-header-wrapper">
<div class="np-catalog-header">
<div class="np-resource-title">{{ catalog.headline }}</div>
<div class="np-resource-subtitle">{{ catalog.subheadline }}</div>
<div class="Catalog np-resource-title">{{ catalog.headline }}</div>
<div class="Catalog np-resource-subtitle">{{ catalog.subheadline }}</div>
</div>
{% capture label %}{% t shared.filters.by_category %}{% endcapture %}

View File

@ -24,3 +24,4 @@ CIN7 = "51BNlRsLYKQxSu1q1UQq7F63j"
FULLSTORY = "ePChrDWLegENa2qnfb259O2Ki"
RENAISSANCE = "YFykqX1u0d3HveONc5I9CKnJ1"
SANDATA = "HdZFoXGCFpt8NnTOzIQY0kVDj"
LUMINATE_US = "p5fidpuedHaOlPnd8EcpxzQMG"

View File

@ -4,7 +4,7 @@ import Apikeys
import pprint
pp = pprint.PrettyPrinter(indent=4)
apiKey = Apikeys.WALMARTPROD
apiKey = Apikeys.LUMINATE_US
course_dict = {}
COURSES= [
@ -33,16 +33,17 @@ def get_course():
uuid = response["id"]
name = response["attributes"]["name"]
# build_url = response["links"]["builder"]["href"]
if name in COURSES:
print(uuid)
course_dict = {
"id": uuid,
"name": name,
"status": status,
# "build_url": build_url
# "url": f"https://walmart.northpass.com/app/courses/{uuid}",
}
courses.append(course_dict)
# if name in COURSES:
print(uuid)
course_dict = {
"id": uuid,
"name": name,
"status": status,
# "build_url": build_url
# "url": f"https://walmart.northpass.com/app/courses/{uuid}",
}
courses.append(course_dict)
# print(courses)
# FIX: Up until here, each course gets read to the terminal.
# FIX: After this, something is being overwritten.

View File

@ -8,90 +8,130 @@ const rl =
})
var userEmail= 'nrasmussen@northpass.com';
var userPassword= 'ecx5pmy!MAN2vgh2knc';
var otp = '795885';
var schoolUUID = '52d19519-103f-45e3-9fa8-d21baa0f8aaa'
var otp = '645926';
var schoolUUID = '10183441-2254-4b1e-a9f7-9549ca773257'
var courseUUIDs = [
"6acf3a5b-0f1e-4539-b1e5-697745adfd73",
"bb272b93-0576-458d-8399-7a22998e9cb2",
"5ea1a3e0-5644-4eb8-92ad-1303924860f4",
"692cc6a9-1352-4340-950b-31ecdd642740",
"4b59bd32-547e-4810-9f51-fb13fcf67f46",
"0a6a78fb-07bc-4d79-94c1-a42da0575678",
"80a33d13-0ad7-403c-90ee-e47a2ebfa192",
"db9fde33-98fd-489e-9aff-ef4a542a0366",
"3dddc774-c0d7-4a74-aeea-3b4eb41804a2",
"81ea3e9b-c651-42c3-8c33-639a72ebe66f",
"1d01767d-84c7-42f1-866d-3957eb7e9c25",
"4a24b652-ca60-45f5-bf1e-7fb3b9e66516",
"90f43a00-6a96-4598-8eb8-895fd87cddd1",
"e7da33c8-bb62-485d-b656-c209bf9076b7",
"c9670108-76d1-43fc-aade-056ee37f445f",
"7aed9e24-69a7-4887-b2e2-e6a25bc1dba2",
"aaf1c212-2efb-4813-8444-040b823c6cd1",
"d1fa0a5f-7847-4024-b4c9-0546d8aedaed",
"8f3887a5-8563-45c3-b733-47d85feefaf9",
"1053872b-4258-43fd-bf05-924cf3b29816",
"b8fce53c-0ffb-49e6-8a13-39cb3a4f15a5",
"0fc1fd94-05a5-4fb0-893e-899b61aa5949",
"c86138ea-c3ae-4e28-b2bf-0158b8deb82d",
"ccdafe3b-f7e0-4996-97f6-a230e9b4df2c",
"3ed64380-9242-4be8-b823-846592ca51a4",
"17970997-dddd-420f-bf1c-f456d97cd970",
"7ae2af82-b14e-49cb-a11b-2470b620b308",
"3d2bdd73-6893-481a-8f23-1d6dd6c5a594",
"d59806d8-5176-43a9-95b5-8e44e4802f81",
"c0150694-ae68-4937-9ef3-f484b8c5ff73",
"0d822ece-ab02-45a1-9819-9172a9d8e3e0",
"ebdcc41c-a0ec-4d26-989b-9e359d2c8094",
"78d8a00b-7967-4aef-8c71-b7e443316b65",
"1e3c2163-36b2-4921-997c-de36dcfa0cc2",
"7948f175-40a7-4c22-8c9b-eda3f95052f6",
"cd0dcbad-c730-48ad-8fdc-7fbe2f898788",
"e5b1ab35-ce49-4c81-a5d0-6bb6fd66fdd5",
"e40925c6-3470-489e-8ca9-d845faca0cb9",
"7bcd3d03-69cc-468a-a994-955897c2b452",
"d1085731-b5e4-4522-9926-72e065478547",
"db66fd2d-1cb2-4880-bc99-1f7cb791f157",
"d3afe5e0-8725-49e1-93b7-4b03c68c9e84",
"a2b8fe9e-5cac-4bca-9014-53b792774cea",
"bf584a37-f359-4a92-96ca-a3115caf0f8d",
"ab3c3390-09fc-4c41-b4ab-db2d27f6755b",
"6ba10aee-2ba7-4477-aa52-003075d8a140",
"df1cdcc4-462e-4047-b825-1b057018df37",
"68109cb5-1ff5-4cda-b60c-1d951ed365ac",
"f1090dc1-73ca-4fb7-b346-f1f0912a7be4",
"dd4e8dd7-739c-42ba-9695-eab8b964e527",
"0de67a90-7fae-4ff2-83ce-9f0732368051",
"194d47bf-7f89-4419-87bc-32a703b0685f",
"37981bd7-21c1-4a98-80e1-5d81da6579fd",
"eb8ac193-f990-47ba-ac55-1fb2b8b2bf26",
"8a626c6b-f027-4436-9512-efb69353e298",
"c3575312-2604-4713-b28c-7dedf2a07b39",
"dce30281-16a8-4c5e-bc9d-ecf22fb2f918",
"efe0f39c-0eb5-4610-8d37-2586ad54162a",
"91741b30-013e-44cd-affd-c5a7dfba8522",
"55e10410-aae9-497d-943d-f6c8fcbbb616",
"55106501-672e-43b3-87f9-38fdf8432271",
"67c27506-078a-4a33-b326-e3c66343548e",
"e7206333-cab0-4337-bc2a-f21de2e7caa0",
"bbb33e0a-30df-46a4-bb37-22515df1daf5",
"8c5863e0-d2a3-46b5-ab37-d736d762ea1b",
"3722f052-227f-4cf0-895c-e2957970d03f",
"907f47e2-37f5-4b2a-bb76-9db47efd529a",
"08190025-1317-4c9c-b1fd-266e2c3a2af3",
"13f66991-e186-4982-9912-fc82c846727d",
"f8205d3e-a3a5-4a57-81c2-83f85ef967f2",
"34a82bd6-f276-4ec2-807c-97ab11e32bdd",
"0266ee5b-b90b-4955-b10c-e05188d9e8d7",
"995c997e-b602-48a3-83a3-a9fef08cec7c",
"2c9f7815-3f54-43fc-84c6-8777aee2bc2e",
"a11f9601-15a7-4129-90e5-dfadfcb25434",
"c5958ae5-f135-45de-853b-658b219d8564",
"b5064975-6122-4b1f-aac3-4ecb8fa24cf1",
"28c37e7b-97a6-49ae-af7b-b083c6d9dbe2",
"a0329d9a-06c5-4f68-aa3e-ed06173ab7c3",
"a978f04f-c5d6-46e3-bc28-de4597c43f99",
"aab97526-9327-426b-993f-6f44c6efb377",
"f8c2c89d-ba0e-4e6c-8804-798656d002e1",
"bde3d9c8-90b6-4acb-9e69-b1242bc1d497",
"cfe77bfa-a813-45ff-b4ff-7e3fa0849125",
"ac4fbf2e-ed8f-404d-b995-f0ef73481466",
"76b31e1e-b95f-4d6d-b7c2-3b7922f284d2",
"5fc53f4b-e958-45f8-8538-c6157179149e",
"3ee9994c-2adb-4ed6-b1b1-dfec691f7735",
"d22e589f-bd2d-4eca-b862-f52777f8db50",
"a8cfe0a3-bb11-4023-a7ce-a8e6c8ebcdf5",
"b4268e28-c76f-4278-9ad5-e60f470e388c",
"3f8caa12-77a7-4631-9e3b-928d6fe49bbe",
"aeb99114-9ee6-450f-8621-6da17ebf6a4a",
"02b3e6d6-a01a-4e8c-8a15-587b204e2984",
"88a247d6-3abd-4ea6-aeef-4165552854f0",
"526ee3a8-882a-4fd4-8ff6-6ae29086b206",
"43b1698e-8ee8-43f6-bcf8-86b638547c39",
"f6888fd6-8a68-40b2-8892-02cd8f4e1b19",
"b6e74090-0a63-4195-b705-0890ef494796",
"9e20cffc-3371-47ca-841b-0bdcbee4e98c",
"a10f7795-cac0-4992-9af7-03c9914ec994",
"cc3518f3-3f09-44ea-a907-7c7b98e9d756",
"d6bb33f2-fb6c-424d-b0e4-a42f6f46d240",
"3559bae6-4c88-4c9b-84db-1c444a632e91",
"37349bf5-13ce-4f7d-8672-7da448233325",
"b3225a47-448d-4988-962a-18d37d6616d0",
"0a6ca3bd-9838-4a29-b451-d5d02c525d85",
"3c969988-4641-4877-9d9d-87aeadc171c4",
"27a247c7-eeaa-4233-a081-d224b15d9040",
"fef7be46-530c-4374-8737-7450fa864ed5",
"8c84727d-4aa1-42c0-8170-9b3e2be81d66",
"ea901457-bb1c-4818-8379-dd1f21ad94fb",
"e2e6e38b-228d-40dc-9d0c-dc55cabb8c16",
"69fe4069-8011-40be-846f-3f3956dfdc8a",
"4fa058ed-8499-462e-b978-9918675de110",
"1358a1d2-5d20-4a7b-ab5e-1aaabd8d571f",
"ee2d4f3f-ca7a-49e1-9886-9b67752c5e63",
"9029e20c-bc63-4cc1-b188-d2dc361fa4eb",
"4a79d955-fe02-4075-9146-8dd1975f0a18",
"0a125f9f-6af3-4029-853d-8efc15aefbe5",
"f65031ec-96ba-452f-9a8a-bffe2eca7e85",
"fbd6bff8-bc65-4f17-abe4-567997dee41d",
"ce731ff0-a828-4024-b86b-f6ca4f783102",
"ea9d09d0-2731-446d-b653-2c68ead7cb71",
"2c43fa5a-e443-4762-abd7-e2e284240493",
"3b6dba80-accf-49f3-b193-6cae75f0e944",
"9de38fa7-e178-4c86-af3b-9ca3cc00a967",
"ef650352-9671-487c-b2f3-f2d5459a630f",
"0d7739fb-f4c8-4b72-a007-89d2afa4819c",
"bcdc40ae-c5d4-40c9-acb5-61cf679b5c4f",
"34de9e33-b4a9-4393-bb53-e0a4e421bf73",
"9b95db0c-8537-4578-9b82-bd75f2491c93",
"bd549bd0-7f56-4fee-9e76-463b133effe8",
"8991d47f-4868-4d72-8226-436f39913d77",
"d23c5a9c-9eab-43c7-911c-a4c1ffcf8e8c",
"aeadc2b3-b6c6-427f-89f0-64df35502e5b",
"d0326543-bff6-4dd3-b4d4-351e0761dad7",
"891f4347-abd5-4e41-852e-d3533750315e",
"8922b625-5e07-4bb6-a484-abcb3ce0a266",
"f6ace929-8332-4e4f-b551-abb841e9351a",
"34739495-4376-4019-8a9b-c01e6a0fde48",
"7dfd28f5-86e7-4b79-bcb3-be45567633d6",
"8373757f-2470-4aa1-9605-1d1f184efd19",
"f05feaaf-871d-4b3b-b5ed-a18a16dada4e",
"00aaa9cd-4050-4933-86df-8d717f10ae98",
"7ad9e103-8704-4c7a-b677-d700f15cc18b",
"8ae0812a-8b58-40ac-adf8-5ea774bb9df7",
"38f3fef6-ed0f-4b57-855e-c8e13a71a09b",
"90a6df4b-eb86-4f50-ae4c-a9d6bca619af",
"e870b099-1a10-48f6-9dd3-b94d554dced8",
"cbe8e2c3-d739-4d53-b153-dd7e289b8df3",
"e6ebdb67-98b7-4f08-a8fb-192f9365775c",
"81e5710c-c9a0-44b7-be09-ca27a8139781",
"415ffa35-0e96-4f10-afdc-586f91372aa9",
"b5668f9f-fb0f-49fe-9474-97fb6745b8e2",
"666a7394-a12c-4895-958e-f5e6e1af1687",
"59a3bdda-f269-428d-9a07-5a49fc46b076",
"598d27b2-e675-4b49-bf8a-0ea6f850c12b",
"d5b78f04-3575-4c82-8e75-4e447a109551",
"67276754-8c13-4a4b-839a-a47e8311956a",
"6f98d346-fcce-4d2d-9eb2-526415d44e13",
"fa178f98-05c7-4f65-8e45-d7eb437c5712",
"17fa89d2-c726-4fce-bfde-cf72a92bdeae",
"ecc595ed-8ba6-4790-8222-1b9f1c23f525",
"b303b8ca-281e-400a-982b-04f0868f8199",
"ccf16af6-faaf-403c-8ebf-fbfc5ed4f559",
"c19b07d0-2602-42cc-9c2a-fc291d46af0e",
"c510126e-4152-4369-a26d-8613d829da71",
"2dbd7b86-2be1-44ac-9537-f5bb87d93dd5",
"d1a9086d-4820-4bae-913e-ae1b2af0636b",
"f94334aa-4b0d-4728-853a-7d16a6a20c35",
"00fc99cc-ba92-4d50-9c3a-7591f4ae7ae8",
"a2f17e5d-c958-4fdd-bdbc-49e7a3ef7bd5",
"18dd3b8a-0a28-49fb-9702-11a8dccaddc7",
"b2eadf91-7083-49d5-a3ea-458edff48a40",
"9c8eda62-ae4b-48dd-bafd-696300cdb9b8",
"d741b455-dae0-42c4-9d9f-d04c89cb35f1",
"27665cd0-ecc0-41a8-beaa-db680d836792",
"89f6848b-80a8-4d46-a9fd-9c7bf1c0d923",
"631d621a-5e6d-4ccf-a56e-206fc579e54b",
"8442beb2-6007-4fa2-b37d-816f1e9b741c",
"168df92c-9703-4568-ab56-b17b0dbfc973",
"1cd9c660-de96-4206-a9cf-20f24528f2d5",
"0e2abd4f-6254-4e15-b9a0-e57741f6b3a5",
"29354a1b-501a-4063-96d7-99a179d4ec4d",
"01bbb2af-1079-4359-816f-0265df0c5069",
"872aff52-15d0-4981-aa34-dbc77a7d190c",
"cea30827-8991-460d-b572-6573226cfee3",
"ea0354e7-8ba0-4271-925a-517a3dcc3966",
"9b7febdb-35ea-4709-b4d2-6eca9dbab30e",
"536c6a98-238c-4338-b052-2584614a38d1",
"047052af-07d9-4872-be17-0e78004a6ef3",
"d2fc5758-acb2-4cb6-a8b9-26d4b0e7b9ec",
"144a50f3-ded3-46a8-a269-49e31a396f20",
"32311dd3-e952-422b-aa40-e13607d886c6",
"254c9eaa-cdbf-4361-a937-86a67ea32e52",
"388c18be-2602-4e99-a1f2-fbfd0f89f04c",
]
var schoolNameToCloneTo = "Anthology U";
var schoolNameToCloneTo = "Luminate Mexico";
function wait(ms) {
return new Promise(r => setTimeout(r, ms));
@ -100,19 +140,21 @@ function wait(ms) {
pt.launch({ headless: false }).then(async browser => {
var p = await browser.newPage();
await p.setViewport({ width: 1000, height: 500 })
await p.goto('https://app.northpass.com/admin/sign_in')
await p.goto('https://app2.northpass.com/admin/sign_in')
await wait(500)
console.log("First Wait")
await p.type('#administrator_email', userEmail)
await p.type('#administrator_password', userPassword)
await p.click('input.button');
await wait(500)
await p.goto('https://app.northpass.com/admin/twofactorauth/edit')
console.log("Second Wait")
await p.goto('https://app2.northpass.com/admin/twofactorauth/edit')
await wait(500)
await p.type('#otp_otp_attempt',otp)
await p.click('input.button');
await wait(500)
for (var i = 0; i < courseUUIDs.length;i++) {
await p.goto('https://app.northpass.com/admin/schools/'+ schoolUUID +'/courses/'+ courseUUIDs[i] +'/clone/new')
await p.goto('https://app2.northpass.com/admin/schools/'+ schoolUUID +'/courses/'+ courseUUIDs[i] +'/clone/new')
await p.type('#react-select-2-input',schoolNameToCloneTo)
await p.keyboard.press('Enter');
await wait(100)