Luminate Sandbox updates. Todos. Updated cloning courses for Anthology. New Bulk Delete script. Just need to add some functions.
This commit is contained in:
@ -28,21 +28,27 @@
|
||||
<div class="course-length">{{course.properties.course_length}}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
{% else %}
|
||||
<div></div>
|
||||
{% endif %}
|
||||
<div class="np-card-content-footer">
|
||||
<div class="np-card-content-footer">
|
||||
<div class="np-card-content-progress np-button-color">
|
||||
{% t shared.progress, count: course.progress %}
|
||||
{% if course.enrolled? == false and course.properties.course_cost > 0 %}
|
||||
Course for Purchase
|
||||
{% else %}
|
||||
{% t shared.progress, count: course.progress %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% capture course_path %}{% route course, id: course.id %}{% endcapture %}
|
||||
{% if course.has_to_restart? %}
|
||||
{% include "course_version_outdated_popup", path: course_path %}
|
||||
{% endif %}
|
||||
<a class="np-button np-button-wide" href="{{ course_path }}">
|
||||
{% if course.progress > 0 and course.progress < 100 %}
|
||||
Continue
|
||||
{% if course.enrolled? == false and course.properties.course_cost > 0 %}
|
||||
${{ course.properties.course_cost }}
|
||||
{% elsif course.progress > 0 and course.progress < 100 %}
|
||||
Continue
|
||||
{% elsif course.progress == 100 %}
|
||||
Retake
|
||||
{% else %}
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
<div class="np-top-cta">
|
||||
{% include "course_progress_and_cta" %}
|
||||
</div>
|
||||
<div class="np-alert" id="fiveserv-alert" style="background-color: red; color: white; display:none;">
|
||||
<div class="np-alert" id="fiveserv-alert" style="background-color: red; color: white; display:none; font-weight: 500;">
|
||||
</div>
|
||||
{% include "course_outline" %}
|
||||
</div>
|
||||
|
||||
@ -111,14 +111,12 @@
|
||||
|
||||
var error_code = JSON.parse(sessionStorage.getItem('stringside')).pgreturncode
|
||||
var error_desc = JSON.parse(sessionStorage.getItem('stringside')).pgreturndescription
|
||||
console.log(error_code)
|
||||
console.log(error_desc)
|
||||
if(error_code != 000 ) {
|
||||
console.log("If statement has run")
|
||||
var alert = document.getElementById("fiveserv-alert")
|
||||
document.getElementById("fiveserv-alert").style.display = 'grid';
|
||||
var error_text = document.createTextNode(error_desc);
|
||||
var error_text = document.createTextNode(error_desc + ". Please try again.");
|
||||
alert.appendChild(error_text)
|
||||
sessionStorage.clear()
|
||||
} else {
|
||||
window.location.replace('https://luminatesandbox.northpass.com/c/{{ course.enrollment_code }}')
|
||||
sessionStorage.clear()
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
|
||||
{% assign survey_courses = "" %}
|
||||
{% assign survey_course_completed = false %}
|
||||
{% if current_school.id == "10183441-2254-4b1e-a9f7-9549ca773257" %}
|
||||
{% if current_school.id == "10183441-2254-4b1e-a9f7-9549ca773257" %}
|
||||
{% comment %} LIVE SCHOOL {% endcomment %}
|
||||
{% assign survey_course = catalog_courses | where: "id", "b3225a47-448d-4988-962a-18d37d6616d0" %}
|
||||
{% elsif current_school.id == "804edb32-c300-42f3-82b7-e5d55fcbc2a6" %}
|
||||
@ -86,7 +86,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% include "sub_navigation" %}
|
||||
|
||||
|
||||
{% include "homepage_featured", items: catalog_courses %}
|
||||
|
||||
<div class="np-max-width np-homepage-row-wrapper">
|
||||
@ -105,11 +105,11 @@
|
||||
<div class="col-xs-12 col-md-4">
|
||||
{% include "cards_learning_path_progress" %}
|
||||
</div>
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% if lps_in_progress > 0 %}
|
||||
<div class="see-more-wrapper">
|
||||
<a href="/app/dashboard" style="margin-top:24px;">See more</a>
|
||||
@ -124,10 +124,10 @@
|
||||
<img class="np-zero-state-learning-paths" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% comment %} {% if features.training_events? %}
|
||||
@ -153,7 +153,7 @@
|
||||
</div>
|
||||
|
||||
{% include "homepage_ongoing_training", items: catalog_courses %}
|
||||
|
||||
|
||||
{% include "homepage_topics" %}
|
||||
<button
|
||||
type="button"
|
||||
@ -190,14 +190,14 @@
|
||||
<div class="modal-links">
|
||||
<a href="javascript:setPopupSeenProperty('/app/dashboard')" class="secondary" data-toggle-trigger-off>No thanks! I can figure it out.</a>
|
||||
|
||||
{% if current_school.id == "10183441-2254-4b1e-a9f7-9549ca773257" %}
|
||||
{% if current_school.id == "10183441-2254-4b1e-a9f7-9549ca773257" %}
|
||||
{% comment %} LIVE SCHOOL {% endcomment %}
|
||||
<a href="javascript:setPopupSeenProperty('/app')" data-redirect="/app">Sure! Show me around.</a>
|
||||
{% elsif current_school.id == "804edb32-c300-42f3-82b7-e5d55fcbc2a6" %}
|
||||
{% comment %} SANDBOX SCHOOL {% endcomment %}
|
||||
<a href="javascript:setPopupSeenProperty('https://luminatesandbox.northpass.com/c/0e61b8e5ced6f6093816fed850226ac828853eaf')" data-redirect="/app">Sure! Show me around.</a>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -214,7 +214,7 @@
|
||||
<div id="dialogContent" class="survey-popup-content">
|
||||
<div class="modal-headline">Please take a moment to tell us more about you!</div>
|
||||
<div class="modal-links">
|
||||
{% if current_school.id == "10183441-2254-4b1e-a9f7-9549ca773257" %}
|
||||
{% if current_school.id == "10183441-2254-4b1e-a9f7-9549ca773257" %}
|
||||
{% comment %} LIVE SCHOOL {% endcomment %}
|
||||
{% comment %} <a href="javascript:setPopupSeenProperty('/app')" data-redirect="/app">Sure! Show me around.</a> {% endcomment %}
|
||||
{% elsif current_school.id == "804edb32-c300-42f3-82b7-e5d55fcbc2a6" %}
|
||||
@ -295,11 +295,11 @@
|
||||
|
||||
if (currentDateSeconds > (popupSeenSeconds + 1209600) && currentDateSeconds) {
|
||||
console.log("more than 2 weeks after first popup")
|
||||
|
||||
|
||||
const surveyCourseCompleted = {{survey_course_completed}}
|
||||
|
||||
if (surveyCourseCompleted == false) {
|
||||
if (localStorage.getItem("survey_modal_clicked") == null) {
|
||||
if (localStorage.getItem("survey_modal_clicked") == null) {
|
||||
showSurveyPopup()
|
||||
} else {
|
||||
const lastClickedDateSeconds = new Date(localStorage.getItem("survey_modal_clicked")).getTime() / 1000
|
||||
@ -307,7 +307,7 @@
|
||||
showSurveyPopup()
|
||||
} else {
|
||||
console.log(`dont show survey popup again until 2 weeks after ${localStorage.getItem("survey_modal_clicked")} or course completed`)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
localStorage.removeItem("survey_modal_clicked");
|
||||
@ -351,13 +351,13 @@
|
||||
console.log("percent: ", percent)
|
||||
setProgress(percent, circle)
|
||||
}
|
||||
|
||||
|
||||
function setProgress(percent, circle) {
|
||||
const offset = circumference - percent * circumference;
|
||||
circle.style.strokeDashoffset = offset;
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
function setPopupSeenProperty(redirectUrl) {
|
||||
localStorage.setItem("modal_clicked", true);
|
||||
@ -384,7 +384,7 @@
|
||||
setTimeout(function() {
|
||||
window.location.href = redirectUrl;
|
||||
}, 250)
|
||||
|
||||
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
setTimeout(function() {
|
||||
|
||||
Reference in New Issue
Block a user