From 1c28a572448b88736ef7c8f41c18dc2e762cfa85 Mon Sep 17 00:00:00 2001 From: Norm Rasmussen Date: Fri, 31 May 2024 22:32:56 -0400 Subject: [PATCH] Fixed some more of the Luminate templates for Spanish templates. Wrote a quick addition to get all course IDs. --- .../_spanish_lang.html.liquid | 19 +- .../articles.html.liquid | 19 +- .../catalog.html.liquid | 4 +- Scripts/API_Tests/Apikeys.py | 1 + .../__pycache__/Apikeys.cpython-310.pyc | Bin 1285 -> 1331 bytes .../API_Tests/get_courses_and_categories.py | 23 +- Scripts/clone_courses.js | 212 +++++++++++------- 7 files changed, 170 insertions(+), 108 deletions(-) diff --git a/Custom_Templates/customer_templates/Walmart Luminate Mexico/_spanish_lang.html.liquid b/Custom_Templates/customer_templates/Walmart Luminate Mexico/_spanish_lang.html.liquid index 8e2392d6..af304a5a 100644 --- a/Custom_Templates/customer_templates/Walmart Luminate Mexico/_spanish_lang.html.liquid +++ b/Custom_Templates/customer_templates/Walmart Luminate Mexico/_spanish_lang.html.liquid @@ -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 { diff --git a/Custom_Templates/customer_templates/Walmart Luminate Mexico/articles.html.liquid b/Custom_Templates/customer_templates/Walmart Luminate Mexico/articles.html.liquid index 494e2dfe..363ac26f 100644 --- a/Custom_Templates/customer_templates/Walmart Luminate Mexico/articles.html.liquid +++ b/Custom_Templates/customer_templates/Walmart Luminate Mexico/articles.html.liquid @@ -3,24 +3,31 @@
-
{{ custom_page.headline }}
-
{{ custom_page.subheadline }}
+
{{ custom_page.headline }}
+
{{ custom_page.subheadline }}
{% if courses.in_catalog.any? %}
{% 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 %}
{% include "cards_article" with course %}
- {% endunless %} + {% comment %} {% else %}
{% include "cards_article" with course %} -
+
+ {% endcomment %} {% endif %} {% endif %} {% endfor %} diff --git a/Custom_Templates/customer_templates/Walmart Luminate Mexico/catalog.html.liquid b/Custom_Templates/customer_templates/Walmart Luminate Mexico/catalog.html.liquid index d7b380b8..e85af73b 100644 --- a/Custom_Templates/customer_templates/Walmart Luminate Mexico/catalog.html.liquid +++ b/Custom_Templates/customer_templates/Walmart Luminate Mexico/catalog.html.liquid @@ -4,8 +4,8 @@
-
{{ catalog.headline }}
-
{{ catalog.subheadline }}
+
{{ catalog.headline }}
+
{{ catalog.subheadline }}
{% capture label %}{% t shared.filters.by_category %}{% endcapture %} diff --git a/Scripts/API_Tests/Apikeys.py b/Scripts/API_Tests/Apikeys.py index 4ae8c9ce..a9dfb542 100644 --- a/Scripts/API_Tests/Apikeys.py +++ b/Scripts/API_Tests/Apikeys.py @@ -24,3 +24,4 @@ CIN7 = "51BNlRsLYKQxSu1q1UQq7F63j" FULLSTORY = "ePChrDWLegENa2qnfb259O2Ki" RENAISSANCE = "YFykqX1u0d3HveONc5I9CKnJ1" SANDATA = "HdZFoXGCFpt8NnTOzIQY0kVDj" +LUMINATE_US = "p5fidpuedHaOlPnd8EcpxzQMG" diff --git a/Scripts/API_Tests/__pycache__/Apikeys.cpython-310.pyc b/Scripts/API_Tests/__pycache__/Apikeys.cpython-310.pyc index 6b2fc37a5ea9e28efd61c6a33636ff17004c2f9c..a492f7482baf67ab77320e6be6d4c7521a3ec2e5 100644 GIT binary patch delta 113 zcmZqW+RVk9&&$ij00g_@qtd)4^2#z6Ow`Whh>}W?3TDuh-Z*CglU$T!foWQ1NxYuJNJ4lM7g4 Q8O 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)