Update WSGC's modal. Some Spark work and Luminate had a translation request. Task to mass delete from keystone.

This commit is contained in:
Norm Rasmussen
2024-10-09 17:04:03 -04:00
parent 9245e67844
commit 34eaf19e68
7 changed files with 117 additions and 55 deletions

View File

@ -0,0 +1,97 @@
<button
type="button"
class="catalog-dialog-trigger"
data-toggle-class-on-target
data-toggle-target="#dialog_catalog"
data-toggle-escape
data-toggle-modal
style="display:none">
Click
</button>
<div class="catalog-dialog" id="dialog_catalog">
<section class="catalog-dialog-container">
<div class="catalog-dialog-content">
<h4>
<strong>Welcome to the WSIU Course Catalog.</strong>
</h4>
<p>Welcome to the future home of WSI University. At this time this area is under construction. If needed, please access WSIU through our Homefront site as usual. Do not access courses here at this time. Thank you.</p>
</div>
<footer class="catalog-dialog-footer">
<button
type="button"
class="np-button"
data-toggle-trigger-off>
I Acknowledge
</button>
</footer>
</section>
</div>
<style>
.catalog-dialog {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 100;
display: flex;
padding: 1em;
background-color: rgba(0, 0, 0, 0.75);
visibility: hidden;
opacity: 0;
pointer-events: none;
transition: 0.25s ease-out;
}
.catalog-dialog.is-active {
visibility: visible;
opacity: 1;
pointer-events: auto;
}
.catalog-dialog-container {
width: 100%;
max-width: 700px;
margin: auto;
transform: translateY(-1em) scale(0.95);
background-color: white;
transition: transform 0.25s ease-out;
}
.catalog-dialog.is-active .catalog-dialog-container {
transform: translateY(0) scale(1);
}
.catalog-dialog-content h4 {
font-family: "Lato"
, sans-serif;
font-size: 20px;
}
.catalog-dialog-content {
line-height: normal;
}
.catalog-dialog-content {
padding: 12px 24px;
}
.catalog-dialog-footer {
padding: 0 24px 24px;
}
.catalog-dialog-footer button {
display: inline-block;
cursor: pointer;
}
</style>
<script>
$(document).ready(function(){
if (window.location.pathname == "/app/catalog" && !sessionStorage.catalogAcknowledged) {
$(".catalog-dialog-trigger").click()
sessionStorage.catalogAcknowledged = true;
}
})
</script>

View File

@ -15,7 +15,7 @@
<h4>
<strong>Welcome to the WSIU Course Catalog.</strong>
</h4>
<p>Please do not complete any courses unless they have been assigned to you, or you have your supervisor's permission. Thank you.</p>
<p>Welcome to the future home of WSI University. At this time this area is under construction. If needed, please access WSIU through our Homefront site as usual. Do not access courses here at this time. Thank you.</p>
</div>
<footer class="catalog-dialog-footer">
<button
@ -89,9 +89,9 @@
<script>
$(document).ready(function(){
if (window.location.pathname == "/app/catalog" && !sessionStorage.catalogAcknowledged) {
$(".catalog-dialog-trigger").click()
$(".catalog-dialog-trigger").click()
sessionStorage.catalogAcknowledged = true;
}
})
</script>
</script>

View File

@ -433,7 +433,7 @@ body > main > div.np-catalog-header-wrapper > div.np-catalog-header > div.np-res
text-indent: 0;
line-height: 0;
display: block;
content: "Catalogar";
content: "Catálogo";
margin-top: -9px;
}

View File

@ -17,7 +17,7 @@
{% assign resource_bundles_to_display = "" %}
{% if features.learning_paths? %}
{% if enrolled_learning_paths.any? %}
{% if enrolled_learning_paths.any? %}
{% if current_person.properties.access_level == "EXPERIENCED" %}
{% assign resource_bundles_to_display = current_school.properties.featured_resource_bundles_experienced | downcase %}
{% elsif current_person.properties.access_level == "BEGINNER" %}
@ -61,7 +61,7 @@
{% for learning_path in enrolled_learning_paths %}
{% assign lp_title_downcase = learning_path.name | downcase | strip | escape_once %}
{% if lp_title_downcase contains bundle_name %}
<div class="course-slide lp-slide">
<div class="course-slide lp-slide">
{% include "cards_learning_path" with learning_path, enrolled_courses: enrolled_courses %}
</div>
{% break %}
@ -105,4 +105,4 @@
hideWelcomeMessage(userData, schoolUuid)
}
})
</script>
</script>

View File

@ -1,4 +1,5 @@
SKUID = "shdX7ht5PZHoOBKOZqZsTMaCJ"
KEYSTONE = "0XsUANu5xoSKODZhiTvTVyMjQ"
UNKNOWN = "SlpQlju219WnWogn94dQUT6Yt"
FORCEMANAGER = "3ia7mWFkdeALYQFYoB51yh6Ov"
TALKSPACE_CORE = "2vfHw6ksqGfT1gUhPM8pXx2wW"

View File

@ -1,72 +1,36 @@
import requests
import Apikeys
import csv
import pandas as pd
UUIDS = [
"4d55519e-23e4-4e85-8031-e68e52f77a46",
"704fea02-273e-4453-a7fe-71a8dc5f1031",
"ef9081d3-df4c-4f55-b3ee-dd20bdc2d1a6",
"5f652fd5-a1f2-4e07-9073-b80b3dfcb9ca",
"bdc88e35-c833-451b-bc67-3ebcd7202ebd",
"47339b19-8299-46f0-b031-b8d45a871b08",
"e1b67f48-2088-460b-9839-ccfb2e115402",
"921b9793-1be8-4fe2-85a3-f36537ae5454",
"bedee723-7265-4c5b-adab-54dc81b436e1",
"5784e5ee-2b18-4aba-8ec1-e72da136c659",
"306659a4-68ff-48b5-b65b-f8159974295c",
"d1f0801a-0f00-4f35-8946-a775e04d039c",
"a57ac5f5-7cb7-4e16-8af9-95f2788909f6",
"3a12eb0f-52f4-481a-9240-7d2c510006a6",
"a74c091f-54b0-4cdb-a798-e22a9547da11",
"9bcfc758-1bb9-427d-bc86-e126b531df90",
"af17da78-8bc8-4965-b178-5834154275bd",
"826190c9-f0e4-4902-b50b-652ba02053b6",
"871d664d-2b2d-4f15-bc6a-bc331f3d1070",
"e615db94-9702-47d5-a22e-9ba7d673da98",
"1ee0f203-1e42-46b4-a119-49fbfa0b5d2b",
"6504557f-12de-4238-a5fd-e18c502bc425",
"c994aec1-81a7-40c7-a340-ab25c9d1bfa4",
"d8c32ae1-4969-4f7f-a1fd-2a394d773d1d",
"cf6ab7e2-1406-4750-992a-220eacdeb747",
"82bf7893-f819-4cc2-b6fc-61d22effed3f",
"f1aab995-fc36-409b-a767-c7c4e1fa5cf1",
"b46f49b3-eee5-4ccb-a749-b2f52dff1c58",
"3e276d00-964a-466d-ad11-ed92b8bc0184",
"2e52dab4-8564-48b7-b720-a7fed15e83d2",
"451333e2-2714-4c25-a915-589594567b39",
"76e09686-56c7-45a1-b804-6941dad72b4a",
"9e5cf6a6-cc03-4c3c-bbee-8e2c60914d1d",
"c42d6024-a2be-4806-a476-a82723b26b6b",
"5f39aa12-94ba-4c9d-8aa4-2e9aff2003ba",
"d14b4156-6f02-4f80-ad86-d6cc62b51d80",
"ccd8a392-e274-4f69-90fc-6f27ca2d5ad2",
"c5a3b866-bf3e-4af2-9b34-d82780b817ee",
"684937da-0672-459b-9d22-c4f350750c80",
"430b5be3-6dff-4798-9faa-4cb134ca3251",
]
BASEURL = "https://api2.northpass.com/v2/"
APIKEY = Apikeys.LUMINATE_US
FILE = "/Users/normrasmussen/Downloads/keystone-never-activated-ppl.csv"
BASEURL = "https://api.northpass.com/v2/"
APIKEY = Apikeys.KEYSTONE
HEADERS = {
"accept": "application/json",
"content-type": "application/json",
"X-Api-Key": APIKEY
}
PAYLOAD = { "payload": UUIDS }
FILE = "/Users/normrasmussen/Downloads/luminate-delete.csv"
def get_peoples_uuid():
uuids = []
with open(FILE, 'r') as csvfile:
file = csv.reader(csvfile, delimiter=',')
for people in file:
input_email = people[0]
input_email = people[1]
print(input_email)
get_ppl_url = f"{BASEURL}people?filter[email][eq]={input_email}"
get_response = requests.get(get_ppl_url, headers=HEADERS)
get_json = get_response.json()
for data in get_json["data"]:
uuid = data["id"]
uuids.append(uuid)
if input_email == "Email":
pass
else:
for data in get_json["data"]:
uuid = data["id"]
uuids.append(uuid)
print(uuid)
delete_everyone(uuids)