Version Description
~ Fixed: Page profile not show login/register form ~ Fixed: translated text on js function "Quiz" ~ Fixed: js scroll to item viewing ~ Fixed: show html title question ~ Fixed: Order change status from "completed" to "pending" => user can't learn courses in this order ~ Added: Option "Logout Redirect" ~ Fixed: Set default sidebar curriculumn will be hide on mobile ~ Modify: Remove course on Overview tab when enable "Publish Profile" ~ Fixed: Elementor pro make archive course show wrong
Download this release
Release Info
Developer | ThimPress |
Plugin | LearnPress – WordPress LMS Plugin |
Version | 4.0.6 |
Comparing to | |
See all releases |
Code changes from version 4.0.5 to 4.0.6
- assets/css/learnpress.css +72 -23
- assets/js/dist/admin/pages/tools.js +4 -3
- assets/js/dist/admin/pages/tools.min.js +1 -1
- assets/js/dist/frontend/config.min.js +1 -1
- assets/js/dist/frontend/custom.min.js +1 -1
- assets/js/dist/frontend/lesson.min.js +1 -1
- assets/js/dist/frontend/modal.js +2 -2
- assets/js/dist/frontend/modal.min.js +1 -1
- assets/js/dist/frontend/question-types.js +1 -1
- assets/js/dist/frontend/question-types.min.js +1 -1
- assets/js/dist/frontend/quiz.js +22 -8
- assets/js/dist/frontend/quiz.min.js +2 -2
- assets/js/dist/frontend/single-course.js +25 -27
- assets/js/dist/frontend/single-course.min.js +1 -1
- assets/js/dist/frontend/single-curriculum.js +35 -37
- assets/js/dist/frontend/single-curriculum.min.js +1 -1
- assets/js/dist/js/data-controls.min.js +1 -1
- assets/src/apps/js/admin/pages/tools/database/create_indexs.js +4 -4
- assets/src/apps/js/frontend/modal/index.js +3 -15
- assets/src/apps/js/frontend/question-types/components/question-base/index.js +1 -1
- assets/src/apps/js/frontend/quiz/components/attempts/index.js +1 -1
- assets/src/apps/js/frontend/quiz/components/buttons/button-check.js +2 -2
- assets/src/apps/js/frontend/quiz/components/buttons/index.js +3 -3
- assets/src/apps/js/frontend/quiz/components/questions/question.js +1 -1
- assets/src/apps/js/frontend/quiz/components/result/index.js +11 -3
- assets/src/apps/js/frontend/single-course/index.js +1 -1
- assets/src/apps/js/frontend/single-curriculum/components/items-progress.js +4 -0
- assets/src/apps/js/frontend/single-curriculum/components/sidebar.js +22 -27
- assets/src/apps/js/frontend/single-curriculum/index.js +1 -1
- assets/src/apps/js/frontend/single-curriculum/scrolltoitem.js +7 -8
- inc/abstracts/abstract-object-data.php +4 -6
- inc/admin/settings/class-lp-settings-general.php +13 -5
- inc/admin/views/meta-boxes/course/settings.php +1 -6
- inc/admin/views/meta-boxes/order/details.php +9 -0
- inc/admin/views/meta-boxes/order/exports-invoice.php +61 -61
- inc/class-lp-assets.php +9 -1
- inc/class-lp-session-handler.php +7 -0
- inc/curds/class-lp-course-curd.php +1 -2
- inc/lp-core-functions.php +13 -4
- inc/lp-template-functions.php +21 -2
- inc/lp-template-hooks.php +13 -1
- inc/order/lp-order-functions.php +8 -8
- inc/question/class-lp-question.php +1 -1
- inc/templates/class-lp-template-profile.php +24 -0
- inc/user/class-lp-profile.php +16 -4
- inc/user/class-lp-user-factory.php +56 -8
- languages/learnpress.pot +599 -536
- learnpress.php +22 -26
- readme.txt +15 -4
- templates/content-single-item.php +6 -7
- templates/pages/profile.php +3 -8
- templates/profile/sidebar.php +6 -0
assets/css/learnpress.css
CHANGED
@@ -3591,6 +3591,10 @@ body .lp-quiz-buttons .form-button-finish-course {
|
|
3591 |
background: var(--lp-secondary-color);
|
3592 |
}
|
3593 |
|
|
|
|
|
|
|
|
|
3594 |
/***********/
|
3595 |
.course-meta {
|
3596 |
display: flex;
|
@@ -4342,8 +4346,8 @@ button[data-counter]::after {
|
|
4342 |
.quiz-status > div {
|
4343 |
display: flex;
|
4344 |
box-sizing: border-box;
|
4345 |
-
width:
|
4346 |
-
max-width:
|
4347 |
height: 60px;
|
4348 |
margin: 0 auto;
|
4349 |
padding: 5px 10px 5px 30px;
|
@@ -4353,6 +4357,14 @@ button[data-counter]::after {
|
|
4353 |
align-items: center;
|
4354 |
}
|
4355 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4356 |
.quiz-status > div > div {
|
4357 |
display: flex;
|
4358 |
flex-direction: row-reverse;
|
@@ -4380,8 +4392,8 @@ button[data-counter]::after {
|
|
4380 |
.quiz-status .countdown {
|
4381 |
position: relative;
|
4382 |
min-width: 120px;
|
4383 |
-
padding: 12px 29px;
|
4384 |
margin-right: 5px;
|
|
|
4385 |
color: #333;
|
4386 |
background: #fff;
|
4387 |
font-size: 14px;
|
@@ -4437,9 +4449,9 @@ button[data-counter]::after {
|
|
4437 |
|
4438 |
.quiz-status .submit-quiz button {
|
4439 |
margin: 0 0 0 10px;
|
4440 |
-
background: #fff;
|
4441 |
border: none;
|
4442 |
border-radius: 0;
|
|
|
4443 |
text-transform: uppercase;
|
4444 |
}
|
4445 |
|
@@ -4530,6 +4542,15 @@ button[data-counter]::after {
|
|
4530 |
margin: 0 0 20px;
|
4531 |
padding: 0;
|
4532 |
list-style: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4533 |
}
|
4534 |
|
4535 |
.quiz-intro-item {
|
@@ -4538,6 +4559,12 @@ button[data-counter]::after {
|
|
4538 |
align-items: center;
|
4539 |
}
|
4540 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4541 |
.quiz-intro-item::before {
|
4542 |
position: relative;
|
4543 |
top: -2px;
|
@@ -4839,6 +4866,11 @@ button[data-counter]::after {
|
|
4839 |
line-height: 26px;
|
4840 |
}
|
4841 |
|
|
|
|
|
|
|
|
|
|
|
4842 |
.question .question-response {
|
4843 |
margin-bottom: 10px;
|
4844 |
font-size: 14px;
|
@@ -7745,6 +7777,11 @@ input[type="radio"]:nth-child(19):checked ~ .switch-btn:nth-child(20)::before {
|
|
7745 |
cursor: pointer;
|
7746 |
transition: 0.25s;
|
7747 |
-webkit-appearance: none;
|
|
|
|
|
|
|
|
|
|
|
7748 |
}
|
7749 |
|
7750 |
#popup-course #sidebar-toggle::before {
|
@@ -7766,25 +7803,6 @@ input[type="radio"]:nth-child(19):checked ~ .switch-btn:nth-child(20)::before {
|
|
7766 |
outline: 0;
|
7767 |
}
|
7768 |
|
7769 |
-
#popup-course #sidebar-toggle:checked {
|
7770 |
-
left: 0;
|
7771 |
-
/*background: #5383f7;
|
7772 |
-
border-color: #5383f7;*/
|
7773 |
-
}
|
7774 |
-
|
7775 |
-
#popup-course #sidebar-toggle:checked::before {
|
7776 |
-
content: "\f0da";
|
7777 |
-
}
|
7778 |
-
|
7779 |
-
#popup-course #sidebar-toggle:checked ~ #popup-sidebar {
|
7780 |
-
flex: 0 0 0;
|
7781 |
-
}
|
7782 |
-
|
7783 |
-
#popup-course #sidebar-toggle:checked ~ #popup-footer,
|
7784 |
-
#popup-course #sidebar-toggle:checked ~ #popup-header {
|
7785 |
-
left: 0;
|
7786 |
-
}
|
7787 |
-
|
7788 |
#popup-course .lp-quiz-buttons .complete-quiz,
|
7789 |
#popup-course .lp-quiz-buttons .back-quiz,
|
7790 |
#popup-course .lp-quiz-buttons .review-quiz {
|
@@ -8178,6 +8196,37 @@ body.admin-bar #popup-course {
|
|
8178 |
top: 32px;
|
8179 |
}
|
8180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8181 |
.course-curriculum .section-header .section-meta {
|
8182 |
position: relative;
|
8183 |
}
|
3591 |
background: var(--lp-secondary-color);
|
3592 |
}
|
3593 |
|
3594 |
+
.viewing-course-item #learn-press-course-curriculum .section-header .section-desc {
|
3595 |
+
display: none;
|
3596 |
+
}
|
3597 |
+
|
3598 |
/***********/
|
3599 |
.course-meta {
|
3600 |
display: flex;
|
4346 |
.quiz-status > div {
|
4347 |
display: flex;
|
4348 |
box-sizing: border-box;
|
4349 |
+
width: 100%;
|
4350 |
+
max-width: 792px;
|
4351 |
height: 60px;
|
4352 |
margin: 0 auto;
|
4353 |
padding: 5px 10px 5px 30px;
|
4357 |
align-items: center;
|
4358 |
}
|
4359 |
|
4360 |
+
@media (max-width: 480px) {
|
4361 |
+
.quiz-status > div {
|
4362 |
+
display: block;
|
4363 |
+
height: auto;
|
4364 |
+
text-align: center;
|
4365 |
+
}
|
4366 |
+
}
|
4367 |
+
|
4368 |
.quiz-status > div > div {
|
4369 |
display: flex;
|
4370 |
flex-direction: row-reverse;
|
4392 |
.quiz-status .countdown {
|
4393 |
position: relative;
|
4394 |
min-width: 120px;
|
|
|
4395 |
margin-right: 5px;
|
4396 |
+
padding: 12px 29px;
|
4397 |
color: #333;
|
4398 |
background: #fff;
|
4399 |
font-size: 14px;
|
4449 |
|
4450 |
.quiz-status .submit-quiz button {
|
4451 |
margin: 0 0 0 10px;
|
|
|
4452 |
border: none;
|
4453 |
border-radius: 0;
|
4454 |
+
background: #fff;
|
4455 |
text-transform: uppercase;
|
4456 |
}
|
4457 |
|
4542 |
margin: 0 0 20px;
|
4543 |
padding: 0;
|
4544 |
list-style: none;
|
4545 |
+
flex-flow: row wrap;
|
4546 |
+
}
|
4547 |
+
|
4548 |
+
@media (max-width: 768px) {
|
4549 |
+
.quiz-intro {
|
4550 |
+
padding-right: 10px;
|
4551 |
+
padding-left: 10px;
|
4552 |
+
justify-content: space-between;
|
4553 |
+
}
|
4554 |
}
|
4555 |
|
4556 |
.quiz-intro-item {
|
4559 |
align-items: center;
|
4560 |
}
|
4561 |
|
4562 |
+
@media (max-width: 768px) {
|
4563 |
+
.quiz-intro-item {
|
4564 |
+
margin: 0 20px 0 0;
|
4565 |
+
}
|
4566 |
+
}
|
4567 |
+
|
4568 |
.quiz-intro-item::before {
|
4569 |
position: relative;
|
4570 |
top: -2px;
|
4866 |
line-height: 26px;
|
4867 |
}
|
4868 |
|
4869 |
+
.question .question-content img {
|
4870 |
+
width: 100%;
|
4871 |
+
max-width: 100%;
|
4872 |
+
}
|
4873 |
+
|
4874 |
.question .question-response {
|
4875 |
margin-bottom: 10px;
|
4876 |
font-size: 14px;
|
7777 |
cursor: pointer;
|
7778 |
transition: 0.25s;
|
7779 |
-webkit-appearance: none;
|
7780 |
+
border: none;
|
7781 |
+
}
|
7782 |
+
|
7783 |
+
#popup-course #sidebar-toggle:after {
|
7784 |
+
display: none;
|
7785 |
}
|
7786 |
|
7787 |
#popup-course #sidebar-toggle::before {
|
7803 |
outline: 0;
|
7804 |
}
|
7805 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7806 |
#popup-course .lp-quiz-buttons .complete-quiz,
|
7807 |
#popup-course .lp-quiz-buttons .back-quiz,
|
7808 |
#popup-course .lp-quiz-buttons .review-quiz {
|
8196 |
top: 32px;
|
8197 |
}
|
8198 |
|
8199 |
+
body.lp-sidebar-toggle__close #popup-course > #sidebar-toggle {
|
8200 |
+
left: 0;
|
8201 |
+
}
|
8202 |
+
|
8203 |
+
body.lp-sidebar-toggle__close #popup-course > #sidebar-toggle::before {
|
8204 |
+
content: "\f0da";
|
8205 |
+
}
|
8206 |
+
|
8207 |
+
body.lp-sidebar-toggle__close #popup-course #popup-sidebar {
|
8208 |
+
flex: 0 0 0;
|
8209 |
+
}
|
8210 |
+
|
8211 |
+
body.lp-sidebar-toggle__close #popup-course #popup-header, body.lp-sidebar-toggle__close #popup-course #popup-footer {
|
8212 |
+
left: 0;
|
8213 |
+
}
|
8214 |
+
|
8215 |
+
@media (max-width: 768px) {
|
8216 |
+
body:not(.lp-sidebar-toggle__open) #popup-course > #sidebar-toggle {
|
8217 |
+
left: 0;
|
8218 |
+
}
|
8219 |
+
body:not(.lp-sidebar-toggle__open) #popup-course > #sidebar-toggle::before {
|
8220 |
+
content: "\f0da";
|
8221 |
+
}
|
8222 |
+
body:not(.lp-sidebar-toggle__open) #popup-course #popup-sidebar {
|
8223 |
+
flex: 0 0 0;
|
8224 |
+
}
|
8225 |
+
body:not(.lp-sidebar-toggle__open) #popup-course #popup-header, body:not(.lp-sidebar-toggle__open) #popup-course #popup-footer {
|
8226 |
+
left: 0;
|
8227 |
+
}
|
8228 |
+
}
|
8229 |
+
|
8230 |
.course-curriculum .section-header .section-meta {
|
8231 |
position: relative;
|
8232 |
}
|
assets/js/dist/admin/pages/tools.js
CHANGED
@@ -281,7 +281,6 @@ var createIndexes = function createIndexes() {
|
|
281 |
|
282 |
var scrollToStepCurrent = function scrollToStepCurrent(stepCurrent) {
|
283 |
var elItemStepCurrent = elGroupStep.querySelector('input[value=' + stepCurrent + ']').closest('.lp-item-step');
|
284 |
-
console.log(elItemStepCurrent.offsetTop, _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent[0].offsetTop);
|
285 |
var offset = elItemStepCurrent.offsetTop - _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent[0].offsetTop + _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent[0].scrollTop;
|
286 |
_utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.stop().animate({
|
287 |
scrollTop: offset
|
@@ -298,7 +297,7 @@ var createIndexes = function createIndexes() {
|
|
298 |
}
|
299 |
|
300 |
_utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].callBackYes = function () {
|
301 |
-
var url = '/lp/v1/tools/
|
302 |
var params = {
|
303 |
tables: tables,
|
304 |
table: table
|
@@ -325,7 +324,9 @@ var createIndexes = function createIndexes() {
|
|
325 |
}
|
326 |
|
327 |
if ('success' === status) {
|
328 |
-
|
|
|
|
|
329 |
} else if ('finished' === status) {
|
330 |
console.log('finished');
|
331 |
_utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elBtnNo[0].style.display = 'inline-block';
|
281 |
|
282 |
var scrollToStepCurrent = function scrollToStepCurrent(stepCurrent) {
|
283 |
var elItemStepCurrent = elGroupStep.querySelector('input[value=' + stepCurrent + ']').closest('.lp-item-step');
|
|
|
284 |
var offset = elItemStepCurrent.offsetTop - _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent[0].offsetTop + _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent[0].scrollTop;
|
285 |
_utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.stop().animate({
|
286 |
scrollTop: offset
|
297 |
}
|
298 |
|
299 |
_utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].callBackYes = function () {
|
300 |
+
var url = '/lp/v1/admin/tools/create-indexs';
|
301 |
var params = {
|
302 |
tables: tables,
|
303 |
table: table
|
324 |
}
|
325 |
|
326 |
if ('success' === status) {
|
327 |
+
setTimeout(function () {
|
328 |
+
Object(_utils_handle_ajax_api__WEBPACK_IMPORTED_MODULE_1__["default"])(url, params, functions);
|
329 |
+
}, 2000);
|
330 |
} else if ('finished' === status) {
|
331 |
console.log('finished');
|
332 |
_utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elBtnNo[0].style.display = 'inline-block';
|
assets/js/dist/admin/pages/tools.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=13)}({13:function(e,t,n){"use strict";n.r(t);var r=jQuery,a=null,l={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(a=this.elLPOverlay,this.elMainContent=a.find(".main-content"),this.elTitle=a.find(".modal-title"),this.elBtnYes=a.find(".btn-yes"),this.elBtnNo=a.find(".btn-no"),this.elFooter=a.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){a.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof l.callBackYes&&l.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}},s=l,o=function(e,t,n){wp.apiFetch({path:e,method:"POST",data:t}).then((function(e){"function"==typeof n.success&&n.success(e)})).catch((function(e){"function"==typeof n.error&&n.error(e)})).then((function(){"function"==typeof n.completed&&n.completed()}))},i=jQuery,c=i("#lp-tool-upgrade-db"),u=function(){var e=0,t=c.find(".wrapper-terms-upgrade"),n=c.find(".wrapper-lp-status-upgrade"),r=c.find(".wrapper-lp-upgrade-message"),a=null;if(t.length){s.setContentModal(t.html());var l=s.elLPOverlay.find(".terms-upgrade"),u=l.find("input[name=lp-agree-term]"),d=l.find(".error"),p=i("input[name=message-when-upgrading]").val();a=function(){return d.hide(),d.removeClass("learn-press-message"),u.is(":checked")?(o("/lp/v1/database/agree_terms",{agree_terms:1},{}),s.elFooter.find(".learn-press-notice").remove(),s.elFooter.prepend('<span class="learn-press-notice">'+p+"</span>"),s.setContentModal(n.html()),!0):(d.show(),d.addClass("learn-press-message"),s.elMainContent.animate({scrollTop:d.offset().top}),!1)}}else s.setContentModal(n.html()),a=function(){return!0};s.setTitleModal(c.find("h2").html()),s.elBtnYes.text("Upgrade"),s.elBtnYes.show(),s.elBtnNo.text("close"),s.callBackYes=function(){if(a()){e=1,s.elBtnYes.hide(),s.elBtnNo.hide();var t=s.elLPOverlay.find(".lp-group-step"),n=c.find(".lp-item-step"),l=[];i.each(n,(function(e,t){var n=i(t);if(!n.hasClass("completed")){var r=n.find("input").val();l.push(r)}}));var u={steps:l,step:l[0]},d=null,p=function(e,n){(d=t.find("input[value="+e+"]").closest(".lp-item-step")).addClass("running"),100===n&&d.removeClass("running").addClass("completed"),d.find(".progress-bar").css("width",n+"%"),d.find(".percent").text(n+"%")};p(l[0],.1);var f={success:function(n){var a,l;p(u.step,n.percent),u.step!==n.name&&p(n.name,.1),a=u.step,l=(d=t.find("input[value="+a+"]").closest(".lp-item-step")).offset().top-s.elMainContent.offset().top+s.elMainContent.scrollTop(),s.elMainContent.stop().animate({scrollTop:l},600),"success"===n.status?(u.step=n.name,u.data=n.data,setTimeout((function(){o("/lp/v1/database/upgrade",u,f)}),800)):"finished"===n.status?(e=0,d.removeClass("running").addClass("completed"),setTimeout((function(){s.setContentModal(r.html())}),1e3),s.elFooter.find(".learn-press-notice").remove(),s.elBtnNo.show(),s.elBtnNo.on("click",(function(){window.location.reload()}))):(e=0,s.elFooter.find(".learn-press-notice").remove(),d.removeClass("running").addClass("error"),s.setContentModal(r.html(),(function(){s.elBtnYes.text("Retry").show(),s.callBackYes=function(){window.location.href="wp-admin/admin.php?page=learn-press-tools&tab=database&action=upgrade-db"},s.elBtnNo.show(),n.message||(n.message="Upgrade not success! Please clear cache, restart sever then retry or contact to LP to help"),s.elMainContent.find(".learn-press-message").addClass("error").html(n.message)})))},error:function(t){e=0,s.setContentModal(r.html(),(function(){s.elBtnYes.text("Retry").show(),s.callBackYes=function(){window.location.location="wp-admin/admin.php?page=learn-press-tools&tab=database&action=upgrade-db"},s.elBtnNo.show(),t.message||(t.message="Upgrade not success! Something wrong. Please clear cache, restart sever then retry or contact to LP to help"),s.elMainContent.find(".learn-press-message").addClass("error").html(t.message)}))},completed:function(){}};o("/lp/v1/database/upgrade",u,f)}},window.onbeforeunload=function(){if(e)return"LP is upgrading Database. Are you want to reload page?"},window.onclose=function(){if(e)return"LP is upgrading Database. Are you want to close page?"}},d=function(){if(c.length&&s.init()){var e=i(".wrapper-lp-status-upgrade"),t=window.location.search,n=new URLSearchParams(t).get("action");"upgrade-db"===n&&(s.elLPOverlay.show(),s.setTitleModal(c.find("h2").html()),s.setContentModal(i(".wrapper-lp-loading").html())),o("/lp/v1/database/get_steps",{},{success:function(t){var r=t.steps_completed,a=t.steps_default;if(void 0===r||void 0===a)return console.log("invalid steps_completed and steps_default"),!1;var l="";for(var o in a){var c=a[o],d=c.steps;for(var p in l='<div class="lp-group-step">',l+="<h3>"+c.label+"</h3>",d){var f=d[p],m="";void 0!==r[p]&&(m="completed"),l+='<div class="lp-item-step '+m+'">',l+='<div class="lp-item-step-left"><input type="hidden" name="lp_steps_upgrade_db[]" value="'+f.name+'" /></div>',l+='<div class="lp-item-step-right">',l+='<label for=""><strong></strong>'+f.label+"</label>",l+='<div class="description">'+f.description+"</div>",l+='<div class="percent"></div>',l+='<span class="progress-bar"></span>',l+="</div>",l+="</div>"}l+="</div>",e.append(l);var v=i(".lp-btn-upgrade-db");"upgrade-db"===n&&u(),v.on("click",(function(){s.elLPOverlay.show(),u()}))}},error:function(e){},completed:function(){}})}},p=function(){var e=document.querySelector("#lp-tool-create-indexes-tables");e&&e.querySelector(".lp-btn-create-indexes").addEventListener("click",(function(t){t.preventDefault();var n=e.querySelector(".wrapper-lp-loading");if(s.init()){s.elLPOverlay.show(),s.setContentModal(n.innerHTML),s.setTitleModal(e.querySelector("h2").textContent),s.elBtnYes[0].style.display="inline-block",s.elBtnYes[0].textContent="Run",s.elBtnNo[0].textContent="Close";var r={success:function(e){e.status,e.message;var t=e.data,n=t.tables,r=t.table,a=document.querySelector(".example-lp-group-step");s.setContentModal(a.innerHTML);var l=s.elLPOverlay[0].querySelector(".lp-group-step "),i=function(e,t){var n=l.querySelector("input[value="+e+"]").closest(".lp-item-step");n.classList.add("running"),100===t&&(n.classList.remove("running"),n.classList.add("completed")),n.querySelector(".progress-bar").style.width=t};for(var c in n){var u=s.elLPOverlay[0].querySelector(".lp-item-step").cloneNode(!0),d=u.querySelector("input");u.querySelector("label").textContent="Table: ".concat(c),d.value=c,l.append(u)}s.callBackYes=function(){var e="/lp/v1/tools/admin/create-indexs",t={tables:n,table:r};s.elBtnNo[0].style.display="none",s.elBtnYes[0].style.display="none",i(r,.1);var a={success:function(n){var r=n.status,c=n.message,u=n.data,d=u.table,p=u.percent;i(t.table,p),void 0!==d&&(t.table!==d&&(i(d,.1),function(e){var t=l.querySelector("input[value="+e+"]").closest(".lp-item-step");console.log(t.offsetTop,s.elMainContent[0].offsetTop);var n=t.offsetTop-s.elMainContent[0].offsetTop+s.elMainContent[0].scrollTop;s.elMainContent.stop().animate({scrollTop:n},600)}(d)),t.table=d),"success"===r?o(e,t,a):"finished"===r?(console.log("finished"),s.elBtnNo[0].style.display="inline-block",s.elBtnNo[0].textContent="Finish"):console.log(c)},error:function(e){console.log(e)},completed:function(){}};o(e,t,a)}},error:function(e){},completed:function(){}};o("/lp/v1/admin/tools/list-tables-indexs",{},r)}}))},f=function(){var e=document.querySelector("#lp-tool-re-upgrade-db");if(e){var t="lp/v1/database/check-db-valid-re-upgrade";o(t,{},{success:function(n){if(n.data.can_re_upgrade){e.style.display="block";var r=e.querySelector(".lp-btn-re-upgrade-db"),a=e.querySelector(".learn-press-message");r.addEventListener("click",(function(){confirm("Are want Re Upgrade!")&&o(t="lp/v1/database/del-tb-lp-upgrade-db",{},{success:function(e){var t=e.status,n=(e.message,e.data.url);"success"===t&&void 0!==n&&(window.location.href=n)},error:function(e){a.classList.add("error"),a.textContent=e.message,a.style.display="block"}})}))}},error:function(e){}})}};function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=b(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,l=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw l}}}}function v(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t,n,r,a,l,s){try{var o=e[l](s),i=o.value}catch(e){return void n(e)}o.done?t(i):Promise.resolve(i).then(r,a)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var l=e.apply(t,n);function s(e){h(l,r,a,s,o,"next",e)}function o(e){h(l,r,a,s,o,"throw",e)}s(void 0)}))}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,a,l=[],s=!0,o=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);s=!0);}catch(e){o=!0,a=e}finally{try{s||null==n.return||n.return()}finally{if(o)throw a}}return l}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var C=wp.i18n.__,x=wp.components,S=x.TextControl,_=x.Button,k=x.Spinner,R=x.CheckboxControl,E=x.Notice,M=wp.element,B=M.useState,T=M.useEffect,P=wp.url.addQueryArgs,L=function(){var e=y(B(!1),2),t=e[0],n=e[1],r=y(B(""),2),a=r[0],l=r[1],s=y(B([]),2),o=s[0],i=s[1],c=y(B([]),2),u=c[0],d=c[1],p=y(B([]),2),f=p[0],h=p[1],b=y(B(!1),2),w=b[0],x=b[1];T((function(){M(a)}),[a]);var M=function(){var e=g(regeneratorRuntime.mark((function e(r){var a,l,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,r&&!t){e.next=5;break}return h([]),i([]),e.abrupt("return");case 5:if(!(r.length<3)){e.next=9;break}return h([{status:"error",message:"Please enter at least 3 characters to searching course."}]),i([]),e.abrupt("return");case 9:return n(!0),e.next=12,wp.apiFetch({path:P("lp/v1/admin/tools/reset-data/search-courses",{s:r}),method:"GET"});case 12:a=e.sent,l=a.status,s=a.data,n(!1),"success"===l?(i(s),h([])):(h([{status:"error",message:a.message||"LearnPress: Search Course Fail!"}]),i([])),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),console.log(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[0,18]])})));return function(t){return e.apply(this,arguments)}}();var L=function(){var e=g(regeneratorRuntime.mark((function e(){var t,n,r,a,l,s,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==u.length){e.next=3;break}return h([{status:"error",message:"Please chooce Course for reset data!"}]),e.abrupt("return");case 3:if(confirm("Are you sure to reset course progress of all users enrolled this course?")){e.next=5;break}return e.abrupt("return");case 5:t=[],e.prev=6,x(!0),n=m(u),e.prev=9,n.s();case 11:if((r=n.n()).done){e.next=20;break}return a=r.value,e.next=15,wp.apiFetch({path:P("lp/v1/admin/tools/reset-data/reset-courses",{courseId:a}),method:"GET"});case 15:l=e.sent,s=l.status,l.data,o=l.message,t.push({status:s,message:o||"Course #".concat(a," reset successfully!")});case 18:e.next=11;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(9),n.e(e.t0);case 25:return e.prev=25,n.f(),e.finish(25);case 28:x(!1),e.next=34;break;case 31:e.prev=31,e.t1=e.catch(6),t.push({status:"error",message:e.t1.message||"LearnPress Error: Reset Course Data."});case 34:h(t);case 35:case"end":return e.stop()}}),e,null,[[6,31],[9,22,25,28]])})));return function(){return e.apply(this,arguments)}}();return React.createElement(React.Fragment,null,React.createElement("h2",null,C("Reset course progress","learnpress")),React.createElement("div",{className:"description"},React.createElement("p",null,C("This action will reset progress of a course for all users have enrolled.","learnpress")),React.createElement("p",null,C("Search results only show course have user data.","learnpress")),React.createElement("div",null,React.createElement(S,{placeholder:C("Search course by name","learnpress"),value:a,onChange:function(e){return l(e)},style:{width:300}}))),t&&React.createElement(k,null),o.length>0&&React.createElement(React.Fragment,null,React.createElement("div",{className:"lp-reset-course_progress",style:{border:"1px solid #eee"}},React.createElement("div",null,React.createElement("div",{style:{background:"#eee"}},React.createElement("div",null,React.createElement(R,{checked:u.length===o.length,onChange:function(){u.length===o.length?d([]):d(o.map((function(e){return e.id})))},style:{margin:0}})),React.createElement("div",null,C("ID","learnpress")),React.createElement("div",null,C("Name","learnpress")),React.createElement("div",null,C("Students","learnpress")))),React.createElement("div",{style:{height:"100%",maxHeight:200,overflow:"auto"}},o.map((function(e){return React.createElement("div",{style:{borderTop:"1px solid #eee"},key:e.id},React.createElement("div",null,React.createElement(R,{checked:u.includes(e.id),onChange:function(){return function(e){var t=v(u);if(t.includes(e)){var n=t.indexOf(e);n>-1&&t.splice(n,1)}else t.push(e);d(t)}(e.id)}})),React.createElement("div",null,"#",e.id),React.createElement("div",null,e.title),React.createElement("div",null,e.students))})))),w?React.createElement(k,null):React.createElement(_,{isPrimary:!0,onClick:function(){return L()},style:{marginTop:10,height:30}},C("Reset now","learnpress"))),f.length>0&&f.map((function(e,t){return React.createElement(E,{status:e.status,key:t,isDismissible:!1},e.message)})),React.createElement("style",null,"\t\t\t\t.lp-reset-course_progress .components-base-control__field {\t\t\t\t\tmargin: 0;\t\t\t\t}\t\t\t\t.components-notice{\t\t\t\t\tmargin-left: 0;\t\t\t\t}\t\t\t\t.lp-reset-course_progress > div > div{\t\t\t\t\tdisplay: grid;\t\t\t\t\tgrid-template-columns: 80px 50px 1fr 80px;\t\t\t\t\talign-items: center;\t\t\t\t}\t\t\t\t.lp-reset-course_progress > div > div > div{\t\t\t\t\tmaegin: 0;\t\t\t\t\tpadding: 8px 10px;\t\t\t\t}\t\t\t\t"))};function A(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var j,N,q,Y,F,I,D,U,G=function(){document.querySelectorAll("#learn-press-reset-course-users").length>0&&wp.element.render(React.createElement(L,null),A(document.querySelectorAll("#learn-press-reset-course-users"))[0])};j=jQuery,N=j(document),q=!1,Y=function(e){e.preventDefault();var t=j(this);q||confirm(lpGlobalSettings.i18n.confirm_install_sample_data)&&(t.addClass("disabled").html(t.data("installing-text")),j(".lp-install-sample__response").remove(),q=!0,j.ajax({url:t.attr("href"),data:j(".lp-install-sample__options").serializeJSON(),success:function(e){t.removeClass("disabled").html(t.data("text")),q=!1,j(e).insertBefore(t.parent())},error:function(){t.removeClass("disabled").html(t.data("text")),q=!1,j(response).insertBefore(t.parent())}}))},F=function(e){e.preventDefault();var t=j(this);q||confirm(lpGlobalSettings.i18n.confirm_uninstall_sample_data)&&(t.addClass("disabled").html(t.data("uninstalling-text")),q=!0,j.ajax({url:t.attr("href"),success:function(e){t.removeClass("disabled").html(t.data("text")),q=!1,j(e).insertBefore(t.parent())},error:function(){t.removeClass("disabled").html(t.data("text")),q=!1,j(response).insertBefore(t.parent())}}))},I=function(e){e.preventDefault();var t=j(this);t.hasClass("disabled")||(t.addClass("disabled").html(t.data("cleaning-text")),j.ajax({url:t.attr("href"),data:{},success:function(e){t.removeClass("disabled").html(t.data("text"))},error:function(){t.removeClass("disabled").html(t.data("text"))}}))},D=function(){j.ajax({url:"admin.php?page=lp-toggle-hard-cache-option",data:{v:this.checked?"yes":"no"},success:function(e){},error:function(){}})},U=function(e){e.preventDefault(),j(".lp-install-sample__options").toggleClass("hide-if-js")},j((function(){d(),p(),f(),G(),N.on("click",".lp-install-sample__install",Y).on("click",".lp-install-sample__uninstall",F).on("click","#learn-press-clear-cache",I).on("click",'input[name="enable_hard_cache"]',D).on("click",".lp-install-sample__toggle-options",U)}))}});
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=13)}({13:function(e,t,n){"use strict";n.r(t);var r=jQuery,a=null,l={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(a=this.elLPOverlay,this.elMainContent=a.find(".main-content"),this.elTitle=a.find(".modal-title"),this.elBtnYes=a.find(".btn-yes"),this.elBtnNo=a.find(".btn-no"),this.elFooter=a.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){a.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof l.callBackYes&&l.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}},s=l,o=function(e,t,n){wp.apiFetch({path:e,method:"POST",data:t}).then((function(e){"function"==typeof n.success&&n.success(e)})).catch((function(e){"function"==typeof n.error&&n.error(e)})).then((function(){"function"==typeof n.completed&&n.completed()}))},i=jQuery,c=i("#lp-tool-upgrade-db"),u=function(){var e=0,t=c.find(".wrapper-terms-upgrade"),n=c.find(".wrapper-lp-status-upgrade"),r=c.find(".wrapper-lp-upgrade-message"),a=null;if(t.length){s.setContentModal(t.html());var l=s.elLPOverlay.find(".terms-upgrade"),u=l.find("input[name=lp-agree-term]"),d=l.find(".error"),p=i("input[name=message-when-upgrading]").val();a=function(){return d.hide(),d.removeClass("learn-press-message"),u.is(":checked")?(o("/lp/v1/database/agree_terms",{agree_terms:1},{}),s.elFooter.find(".learn-press-notice").remove(),s.elFooter.prepend('<span class="learn-press-notice">'+p+"</span>"),s.setContentModal(n.html()),!0):(d.show(),d.addClass("learn-press-message"),s.elMainContent.animate({scrollTop:d.offset().top}),!1)}}else s.setContentModal(n.html()),a=function(){return!0};s.setTitleModal(c.find("h2").html()),s.elBtnYes.text("Upgrade"),s.elBtnYes.show(),s.elBtnNo.text("close"),s.callBackYes=function(){if(a()){e=1,s.elBtnYes.hide(),s.elBtnNo.hide();var t=s.elLPOverlay.find(".lp-group-step"),n=c.find(".lp-item-step"),l=[];i.each(n,(function(e,t){var n=i(t);if(!n.hasClass("completed")){var r=n.find("input").val();l.push(r)}}));var u={steps:l,step:l[0]},d=null,p=function(e,n){(d=t.find("input[value="+e+"]").closest(".lp-item-step")).addClass("running"),100===n&&d.removeClass("running").addClass("completed"),d.find(".progress-bar").css("width",n+"%"),d.find(".percent").text(n+"%")};p(l[0],.1);var f={success:function(n){var a,l;p(u.step,n.percent),u.step!==n.name&&p(n.name,.1),a=u.step,l=(d=t.find("input[value="+a+"]").closest(".lp-item-step")).offset().top-s.elMainContent.offset().top+s.elMainContent.scrollTop(),s.elMainContent.stop().animate({scrollTop:l},600),"success"===n.status?(u.step=n.name,u.data=n.data,setTimeout((function(){o("/lp/v1/database/upgrade",u,f)}),800)):"finished"===n.status?(e=0,d.removeClass("running").addClass("completed"),setTimeout((function(){s.setContentModal(r.html())}),1e3),s.elFooter.find(".learn-press-notice").remove(),s.elBtnNo.show(),s.elBtnNo.on("click",(function(){window.location.reload()}))):(e=0,s.elFooter.find(".learn-press-notice").remove(),d.removeClass("running").addClass("error"),s.setContentModal(r.html(),(function(){s.elBtnYes.text("Retry").show(),s.callBackYes=function(){window.location.href="wp-admin/admin.php?page=learn-press-tools&tab=database&action=upgrade-db"},s.elBtnNo.show(),n.message||(n.message="Upgrade not success! Please clear cache, restart sever then retry or contact to LP to help"),s.elMainContent.find(".learn-press-message").addClass("error").html(n.message)})))},error:function(t){e=0,s.setContentModal(r.html(),(function(){s.elBtnYes.text("Retry").show(),s.callBackYes=function(){window.location.location="wp-admin/admin.php?page=learn-press-tools&tab=database&action=upgrade-db"},s.elBtnNo.show(),t.message||(t.message="Upgrade not success! Something wrong. Please clear cache, restart sever then retry or contact to LP to help"),s.elMainContent.find(".learn-press-message").addClass("error").html(t.message)}))},completed:function(){}};o("/lp/v1/database/upgrade",u,f)}},window.onbeforeunload=function(){if(e)return"LP is upgrading Database. Are you want to reload page?"},window.onclose=function(){if(e)return"LP is upgrading Database. Are you want to close page?"}},d=function(){if(c.length&&s.init()){var e=i(".wrapper-lp-status-upgrade"),t=window.location.search,n=new URLSearchParams(t).get("action");"upgrade-db"===n&&(s.elLPOverlay.show(),s.setTitleModal(c.find("h2").html()),s.setContentModal(i(".wrapper-lp-loading").html())),o("/lp/v1/database/get_steps",{},{success:function(t){var r=t.steps_completed,a=t.steps_default;if(void 0===r||void 0===a)return console.log("invalid steps_completed and steps_default"),!1;var l="";for(var o in a){var c=a[o],d=c.steps;for(var p in l='<div class="lp-group-step">',l+="<h3>"+c.label+"</h3>",d){var f=d[p],m="";void 0!==r[p]&&(m="completed"),l+='<div class="lp-item-step '+m+'">',l+='<div class="lp-item-step-left"><input type="hidden" name="lp_steps_upgrade_db[]" value="'+f.name+'" /></div>',l+='<div class="lp-item-step-right">',l+='<label for=""><strong></strong>'+f.label+"</label>",l+='<div class="description">'+f.description+"</div>",l+='<div class="percent"></div>',l+='<span class="progress-bar"></span>',l+="</div>",l+="</div>"}l+="</div>",e.append(l);var v=i(".lp-btn-upgrade-db");"upgrade-db"===n&&u(),v.on("click",(function(){s.elLPOverlay.show(),u()}))}},error:function(e){},completed:function(){}})}},p=function(){var e=document.querySelector("#lp-tool-create-indexes-tables");e&&e.querySelector(".lp-btn-create-indexes").addEventListener("click",(function(t){t.preventDefault();var n=e.querySelector(".wrapper-lp-loading");if(s.init()){s.elLPOverlay.show(),s.setContentModal(n.innerHTML),s.setTitleModal(e.querySelector("h2").textContent),s.elBtnYes[0].style.display="inline-block",s.elBtnYes[0].textContent="Run",s.elBtnNo[0].textContent="Close";var r={success:function(e){e.status,e.message;var t=e.data,n=t.tables,r=t.table,a=document.querySelector(".example-lp-group-step");s.setContentModal(a.innerHTML);var l=s.elLPOverlay[0].querySelector(".lp-group-step "),i=function(e,t){var n=l.querySelector("input[value="+e+"]").closest(".lp-item-step");n.classList.add("running"),100===t&&(n.classList.remove("running"),n.classList.add("completed")),n.querySelector(".progress-bar").style.width=t};for(var c in n){var u=s.elLPOverlay[0].querySelector(".lp-item-step").cloneNode(!0),d=u.querySelector("input");u.querySelector("label").textContent="Table: ".concat(c),d.value=c,l.append(u)}s.callBackYes=function(){var e="/lp/v1/admin/tools/create-indexs",t={tables:n,table:r};s.elBtnNo[0].style.display="none",s.elBtnYes[0].style.display="none",i(r,.1);var a={success:function(n){var r,c,u=n.status,d=n.message,p=n.data,f=p.table,m=p.percent;i(t.table,m),void 0!==f&&(t.table!==f&&(i(f,.1),r=f,c=l.querySelector("input[value="+r+"]").closest(".lp-item-step").offsetTop-s.elMainContent[0].offsetTop+s.elMainContent[0].scrollTop,s.elMainContent.stop().animate({scrollTop:c},600)),t.table=f),"success"===u?setTimeout((function(){o(e,t,a)}),2e3):"finished"===u?(console.log("finished"),s.elBtnNo[0].style.display="inline-block",s.elBtnNo[0].textContent="Finish"):console.log(d)},error:function(e){console.log(e)},completed:function(){}};o(e,t,a)}},error:function(e){},completed:function(){}};o("/lp/v1/admin/tools/list-tables-indexs",{},r)}}))},f=function(){var e=document.querySelector("#lp-tool-re-upgrade-db");if(e){var t="lp/v1/database/check-db-valid-re-upgrade";o(t,{},{success:function(n){if(n.data.can_re_upgrade){e.style.display="block";var r=e.querySelector(".lp-btn-re-upgrade-db"),a=e.querySelector(".learn-press-message");r.addEventListener("click",(function(){confirm("Are want Re Upgrade!")&&o(t="lp/v1/database/del-tb-lp-upgrade-db",{},{success:function(e){var t=e.status,n=(e.message,e.data.url);"success"===t&&void 0!==n&&(window.location.href=n)},error:function(e){a.classList.add("error"),a.textContent=e.message,a.style.display="block"}})}))}},error:function(e){}})}};function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=b(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,l=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw l}}}}function v(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t,n,r,a,l,s){try{var o=e[l](s),i=o.value}catch(e){return void n(e)}o.done?t(i):Promise.resolve(i).then(r,a)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var l=e.apply(t,n);function s(e){h(l,r,a,s,o,"next",e)}function o(e){h(l,r,a,s,o,"throw",e)}s(void 0)}))}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,a,l=[],s=!0,o=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);s=!0);}catch(e){o=!0,a=e}finally{try{s||null==n.return||n.return()}finally{if(o)throw a}}return l}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var C=wp.i18n.__,x=wp.components,S=x.TextControl,_=x.Button,k=x.Spinner,R=x.CheckboxControl,E=x.Notice,M=wp.element,B=M.useState,T=M.useEffect,P=wp.url.addQueryArgs,L=function(){var e=y(B(!1),2),t=e[0],n=e[1],r=y(B(""),2),a=r[0],l=r[1],s=y(B([]),2),o=s[0],i=s[1],c=y(B([]),2),u=c[0],d=c[1],p=y(B([]),2),f=p[0],h=p[1],b=y(B(!1),2),w=b[0],x=b[1];T((function(){M(a)}),[a]);var M=function(){var e=g(regeneratorRuntime.mark((function e(r){var a,l,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,r&&!t){e.next=5;break}return h([]),i([]),e.abrupt("return");case 5:if(!(r.length<3)){e.next=9;break}return h([{status:"error",message:"Please enter at least 3 characters to searching course."}]),i([]),e.abrupt("return");case 9:return n(!0),e.next=12,wp.apiFetch({path:P("lp/v1/admin/tools/reset-data/search-courses",{s:r}),method:"GET"});case 12:a=e.sent,l=a.status,s=a.data,n(!1),"success"===l?(i(s),h([])):(h([{status:"error",message:a.message||"LearnPress: Search Course Fail!"}]),i([])),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),console.log(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[0,18]])})));return function(t){return e.apply(this,arguments)}}();var L=function(){var e=g(regeneratorRuntime.mark((function e(){var t,n,r,a,l,s,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==u.length){e.next=3;break}return h([{status:"error",message:"Please chooce Course for reset data!"}]),e.abrupt("return");case 3:if(confirm("Are you sure to reset course progress of all users enrolled this course?")){e.next=5;break}return e.abrupt("return");case 5:t=[],e.prev=6,x(!0),n=m(u),e.prev=9,n.s();case 11:if((r=n.n()).done){e.next=20;break}return a=r.value,e.next=15,wp.apiFetch({path:P("lp/v1/admin/tools/reset-data/reset-courses",{courseId:a}),method:"GET"});case 15:l=e.sent,s=l.status,l.data,o=l.message,t.push({status:s,message:o||"Course #".concat(a," reset successfully!")});case 18:e.next=11;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(9),n.e(e.t0);case 25:return e.prev=25,n.f(),e.finish(25);case 28:x(!1),e.next=34;break;case 31:e.prev=31,e.t1=e.catch(6),t.push({status:"error",message:e.t1.message||"LearnPress Error: Reset Course Data."});case 34:h(t);case 35:case"end":return e.stop()}}),e,null,[[6,31],[9,22,25,28]])})));return function(){return e.apply(this,arguments)}}();return React.createElement(React.Fragment,null,React.createElement("h2",null,C("Reset course progress","learnpress")),React.createElement("div",{className:"description"},React.createElement("p",null,C("This action will reset progress of a course for all users have enrolled.","learnpress")),React.createElement("p",null,C("Search results only show course have user data.","learnpress")),React.createElement("div",null,React.createElement(S,{placeholder:C("Search course by name","learnpress"),value:a,onChange:function(e){return l(e)},style:{width:300}}))),t&&React.createElement(k,null),o.length>0&&React.createElement(React.Fragment,null,React.createElement("div",{className:"lp-reset-course_progress",style:{border:"1px solid #eee"}},React.createElement("div",null,React.createElement("div",{style:{background:"#eee"}},React.createElement("div",null,React.createElement(R,{checked:u.length===o.length,onChange:function(){u.length===o.length?d([]):d(o.map((function(e){return e.id})))},style:{margin:0}})),React.createElement("div",null,C("ID","learnpress")),React.createElement("div",null,C("Name","learnpress")),React.createElement("div",null,C("Students","learnpress")))),React.createElement("div",{style:{height:"100%",maxHeight:200,overflow:"auto"}},o.map((function(e){return React.createElement("div",{style:{borderTop:"1px solid #eee"},key:e.id},React.createElement("div",null,React.createElement(R,{checked:u.includes(e.id),onChange:function(){return function(e){var t=v(u);if(t.includes(e)){var n=t.indexOf(e);n>-1&&t.splice(n,1)}else t.push(e);d(t)}(e.id)}})),React.createElement("div",null,"#",e.id),React.createElement("div",null,e.title),React.createElement("div",null,e.students))})))),w?React.createElement(k,null):React.createElement(_,{isPrimary:!0,onClick:function(){return L()},style:{marginTop:10,height:30}},C("Reset now","learnpress"))),f.length>0&&f.map((function(e,t){return React.createElement(E,{status:e.status,key:t,isDismissible:!1},e.message)})),React.createElement("style",null,"\t\t\t\t.lp-reset-course_progress .components-base-control__field {\t\t\t\t\tmargin: 0;\t\t\t\t}\t\t\t\t.components-notice{\t\t\t\t\tmargin-left: 0;\t\t\t\t}\t\t\t\t.lp-reset-course_progress > div > div{\t\t\t\t\tdisplay: grid;\t\t\t\t\tgrid-template-columns: 80px 50px 1fr 80px;\t\t\t\t\talign-items: center;\t\t\t\t}\t\t\t\t.lp-reset-course_progress > div > div > div{\t\t\t\t\tmaegin: 0;\t\t\t\t\tpadding: 8px 10px;\t\t\t\t}\t\t\t\t"))};function A(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var j,N,q,Y,F,I,D,U,G=function(){document.querySelectorAll("#learn-press-reset-course-users").length>0&&wp.element.render(React.createElement(L,null),A(document.querySelectorAll("#learn-press-reset-course-users"))[0])};j=jQuery,N=j(document),q=!1,Y=function(e){e.preventDefault();var t=j(this);q||confirm(lpGlobalSettings.i18n.confirm_install_sample_data)&&(t.addClass("disabled").html(t.data("installing-text")),j(".lp-install-sample__response").remove(),q=!0,j.ajax({url:t.attr("href"),data:j(".lp-install-sample__options").serializeJSON(),success:function(e){t.removeClass("disabled").html(t.data("text")),q=!1,j(e).insertBefore(t.parent())},error:function(){t.removeClass("disabled").html(t.data("text")),q=!1,j(response).insertBefore(t.parent())}}))},F=function(e){e.preventDefault();var t=j(this);q||confirm(lpGlobalSettings.i18n.confirm_uninstall_sample_data)&&(t.addClass("disabled").html(t.data("uninstalling-text")),q=!0,j.ajax({url:t.attr("href"),success:function(e){t.removeClass("disabled").html(t.data("text")),q=!1,j(e).insertBefore(t.parent())},error:function(){t.removeClass("disabled").html(t.data("text")),q=!1,j(response).insertBefore(t.parent())}}))},I=function(e){e.preventDefault();var t=j(this);t.hasClass("disabled")||(t.addClass("disabled").html(t.data("cleaning-text")),j.ajax({url:t.attr("href"),data:{},success:function(e){t.removeClass("disabled").html(t.data("text"))},error:function(){t.removeClass("disabled").html(t.data("text"))}}))},D=function(){j.ajax({url:"admin.php?page=lp-toggle-hard-cache-option",data:{v:this.checked?"yes":"no"},success:function(e){},error:function(){}})},U=function(e){e.preventDefault(),j(".lp-install-sample__options").toggleClass("hide-if-js")},j((function(){d(),p(),f(),G(),N.on("click",".lp-install-sample__install",Y).on("click",".lp-install-sample__uninstall",F).on("click","#learn-press-clear-cache",I).on("click",'input[name="enable_hard_cache"]',D).on("click",".lp-install-sample__toggle-options",U)}))}});
|
assets/js/dist/frontend/config.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.LP=this.LP||{},this.LP.config=function(t){var n={};function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(o,r,function(n){return t[n]}.bind(null,r));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=
|
1 |
+
this.LP=this.LP||{},this.LP.config=function(t){var n={};function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(o,r,function(n){return t[n]}.bind(null,r));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=18)}({18:function(t,n,e){"use strict";e.r(n),e.d(n,"classNames",(function(){return r})),e.d(n,"isQuestionCorrect",(function(){return i})),e.d(n,"questionBlocks",(function(){return s})),e.d(n,"questionFooterButtons",(function(){return c})),e.d(n,"questionTitleParts",(function(){return l})),e.d(n,"questionChecker",(function(){return f})),e.d(n,"quizStartBlocks",(function(){return a}));var o=LP.Hook,r={Quiz:{Result:["quiz-result"],Content:["quiz-content"],Questions:["quiz-questions"],Buttons:["quiz-buttons"],Attempts:["quiz-attempts"]}},u={single_choice:function(){},multi_choice:function(){},true_or_false:function(){}},i={fill_in_blank:function(){return!0}},s=function(){return LP.Hook.applyFilters("question-blocks",["title","content","answer-options","explanation","hint","buttons"])},c=function(){return LP.Hook.applyFilters("question-footer-buttons",["instant-check"])},l=function(){return LP.Hook.applyFilters("question-title-parts",["index","title","hint","edit-permalink"])},f=function(t){var n=LP.Hook.applyFilters("question-checkers",u);return t&&n[t]?n[t]:function(){return{}}},a=function(){o.applyFilters("quiz-start-blocks",{meta:!0,description:!0,custom:"Hello"})}}});
|
assets/js/dist/frontend/custom.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.LP=this.LP||{},this.LP.custom=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=
|
1 |
+
this.LP=this.LP||{},this.LP.custom=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=19)}({19:function(t,e){var n=LP.Hook,r=window.jQuery||jQuery;n.addFilter("question-blocks",(function(t){return t})),n.addAction("before-start-quiz",(function(){})),n.addAction("quiz-started",(function(t,e){r(".course-item-".concat(e)).removeClass("status-completed failed passed").addClass("has-status status-started"),window.onbeforeunload=function(){return"Warning!"}})),n.addAction("quiz-submitted",(function(t,e){r(".course-item-".concat(e)).removeClass("status-started passed failed").addClass("has-status status-completed ".concat(t.results.graduation)),window.onbeforeunload=null}))}});
|
assets/js/dist/frontend/lesson.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.LP=this.LP||{},this.LP.lesson=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=
|
1 |
+
this.LP=this.LP||{},this.LP.lesson=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=17)}({17:function(e,t){}});
|
assets/js/dist/frontend/modal.js
CHANGED
@@ -168,10 +168,10 @@ var Modal = function Modal(_ref) {
|
|
168 |
}, /*#__PURE__*/React.createElement("button", {
|
169 |
className: "lp-button modal-button-ok",
|
170 |
onClick: dataConfirm('yes')
|
171 |
-
}, /*#__PURE__*/React.createElement("span", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["
|
172 |
className: "lp-button modal-button-cancel",
|
173 |
onClick: dataConfirm('no')
|
174 |
-
}, /*#__PURE__*/React.createElement("span", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["
|
175 |
};
|
176 |
|
177 |
/* harmony default export */ __webpack_exports__["default"] = (Modal);
|
168 |
}, /*#__PURE__*/React.createElement("button", {
|
169 |
className: "lp-button modal-button-ok",
|
170 |
onClick: dataConfirm('yes')
|
171 |
+
}, /*#__PURE__*/React.createElement("span", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('OK', 'learnpress'))), /*#__PURE__*/React.createElement("button", {
|
172 |
className: "lp-button modal-button-cancel",
|
173 |
onClick: dataConfirm('no')
|
174 |
+
}, /*#__PURE__*/React.createElement("span", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Cancel', 'learnpress')))))), children);
|
175 |
};
|
176 |
|
177 |
/* harmony default export */ __webpack_exports__["default"] = (Modal);
|
assets/js/dist/frontend/modal.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.LP=this.LP||{},this.LP.modal=function(e){var t={};function n
|
1 |
+
this.LP=this.LP||{},this.LP.modal=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=22)}({0:function(e,t){e.exports=window.wp.i18n},1:function(e,t){e.exports=window.wp.data},22:function(e,t,r){"use strict";r.r(t);var n={};r.r(n),r.d(n,"show",(function(){return f})),r.d(n,"hide",(function(){return p})),r.d(n,"confirm",(function(){return d}));var o={};r.r(o),r.d(o,"isOpen",(function(){return b})),r.d(o,"getMessage",(function(){return O})),r.d(o,"confirm",(function(){return m}));var c=r(1);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l={},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SHOW_MODAL":return u(u({},e),{},{isOpen:!0,message:t.message,cb:t.cb});case"HIDE_MODAL":return u(u({},e),{},{isOpen:!1,message:!1,cb:null});case"CONFIRM":return e.cb&&setTimeout((function(){e.cb()}),10),u(u({},e),{},{confirm:t.value})}return e};function f(e,t){return{type:"SHOW_MODAL",message:e,cb:t}}function p(){return{type:"HIDE_MODAL"}}function d(e){return{type:"CONFIRM",value:e}}function b(e){return e.isOpen}function O(e){return e.message}function m(e,t,r){var n=Object(c.dispatch)("learnpress/modal"),o=n.show,i=n.hide;return e.message?(i(),e.confirm):(o(t,r),"no")}var y=r(7),v=r.n(y),g={ENROLL_COURSE_X:function(e,t){}};var j=function(e){var t=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r={getState:e.getState,dispatch:function(){return t.apply(void 0,arguments)}};return t=v()(g)(r)(e.dispatch),e.dispatch=t,e};function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var P=LP.dataControls.controls,E=Object(c.registerStore)("learnpress/modal",{reducer:s,selectors:o,actions:n,controls:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){w(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},P)});j(E);var S=r(0),_=function(e){var t=e.children,r=Object(c.dispatch)("learnpress/modal"),n=(r.show,r.hide,r.confirm),o=Object(c.useSelect)((function(e){return e("learnpress/modal").isOpen()})),i=Object(c.useSelect)((function(e){return e("learnpress/modal").getMessage()})),u=function(e){return function(t){n(e)}},a={display:o?"block":"none"};return React.createElement(React.Fragment,null,React.createElement("div",null,React.createElement("div",{id:"lp-modal-overlay",style:a}),React.createElement("div",{id:"lp-modal-window",style:a},React.createElement("div",{id:"lp-modal-content",dangerouslySetInnerHTML:{__html:i}}),React.createElement("div",{id:"lp-modal-buttons"},React.createElement("button",{className:"lp-button modal-button-ok",onClick:u("yes")},React.createElement("span",null,Object(S.__)("OK","learnpress"))),React.createElement("button",{className:"lp-button modal-button-cancel",onClick:u("no")},React.createElement("span",null,Object(S.__)("Cancel","learnpress")))))),t)};t.default=_},7:function(e,t,r){"use strict";e.exports=function(e){var t,r={};return function e(t,r){var n;if(Array.isArray(r))for(n=0;n<r.length;n++)e(t,r[n]);else for(n in r)t[n]=(t[n]||[]).concat(r[n])}(r,e),(t=function(e){return function(t){return function(n){var o,c,i=r[n.type],u=t(n);if(i)for(o=0;o<i.length;o++)(c=i[o](n,e))&&e.dispatch(c);return u}}}).effects=r,t}}});
|
assets/js/dist/frontend/question-types.js
CHANGED
@@ -256,7 +256,7 @@ var QuestionBase = /*#__PURE__*/function (_Component) {
|
|
256 |
status = _this$props3.status;
|
257 |
|
258 |
if (status !== 'started') {
|
259 |
-
return 'LP Error: can not set answers';
|
260 |
}
|
261 |
|
262 |
var $options = _this.$wrap.find('.option-check');
|
256 |
status = _this$props3.status;
|
257 |
|
258 |
if (status !== 'started') {
|
259 |
+
return Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('LP Error: can not set answers', 'learnpress');
|
260 |
}
|
261 |
|
262 |
var $options = _this.$wrap.find('.option-check');
|
assets/js/dist/frontend/question-types.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.LP=this.LP||{},this.LP.questionTypes=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}({0:function(e,t){e.exports=window.wp.i18n},1:function(e,t){e.exports=window.wp.data},2:function(e,t){e.exports=window.wp.element},20:function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionBase",(function(){return v})),n.d(t,"SingleChoice",(function(){return E})),n.d(t,"MultipleChoices",(function(){return U})),n.d(t,"TrueOrFalse",(function(){return Y})),n.d(t,"FillInBlanks",(function(){return le})),n.d(t,"SortingChoice",(function(){return je}));var r=n(2),o=n(3),i=n(1),c=n(0);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=lodash,d=h.isArray,v=(h.get,h.set,function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(u,e);var t,n,r,o=f(u);function u(e){var t;a(this,u),m(y(t=o.apply(this,arguments)),"prepare",(function(e,t){var n=e.question;return n&&n.id!==t.questionId?{options:t.self.parseOptions(n.options)}:null})),m(y(t),"setInputRef",(function(e,n){t.inputs||(t.inputs={}),t.inputs[n]=e})),m(y(t),"maybeShowCorrectAnswer",(function(){var e=t.props,n=e.status,r=e.isCheckedAnswer,o=e.showCorrectReview,i=e.isReviewing;return"completed"===n&&o||r&&!i})),m(y(t),"maybeDisabledOption",(function(e){var n=t.props,r=(n.answered,n.status);return n.isCheckedAnswer||"started"!==r})),m(y(t),"setAnswerChecked",(function(){return function(e){var n=t.props,r=n.updateUserQuestionAnswers,o=n.question;if("started"!==n.status)return"LP Error: can not set answers";var i=t.$wrap.find(".option-check"),c=[],u="multi_choice"!==o.type;i.each((function(e,t){if(t.checked&&(c.push(t.value),u))return!1})),r(o.id,u?c[0]:c)}})),m(y(t),"maybeCheckedAnswer",(function(e){var n=t.props.answered;return d(n)?!!n.find((function(t){return t==e})):e==n})),m(y(t),"getOptionType",(function(e,t){var n="radio";switch(e){case"multi_choice":n="checkbox"}return n})),m(y(t),"isDefaultType",(function(){return t.props.supportOptions})),m(y(t),"getWarningMessage",(function(){return React.createElement(React.Fragment,null,Object(c.__)("Render function should be overwritten from base.","learnpress"))})),m(y(t),"getOptionClass",(function(e){t.props.answered;return["answer-option"]})),m(y(t),"parseOptions",(function(e){return e&&(e=d(e)?e:JSON.parse(CryptoJS.AES.decrypt(e.data,e.key,{format:CryptoJSAesJson}).toString(CryptoJS.enc.Utf8)),e=d(e)?e:JSON.parse(e)),e||[]})),m(y(t),"getOptions",(function(){return t.state.options||[]})),m(y(t),"isCorrect",(function(){var e,n,r,o=t.props.answered;if(!o)return!1;for(e=0,r=t.getOptions();e<r.length;e++)if("yes"===(n=r[e]).isTrue&&o==n.value)return!0;return!1})),m(y(t),"isChecked",(function(){var e=t.props.question;return Object(i.select)("learnpress/quiz").isCheckedAnswer(e.id)})),m(y(t),"getCorrectLabel",(function(){var e=t.props,n=(e.status,e.answered,e.question),r=(LP.config.isQuestionCorrect[n.type]||t.isCorrect).call(y(t));return t.maybeShowCorrectAnswer()&&React.createElement("div",{className:"question-response"+(r?" correct":" incorrect")},React.createElement("span",{className:"label"},r?Object(c.__)("Correct","learnpress"):Object(c.__)("Incorrect","learnpress")),React.createElement("span",{className:"point"},sprintf(Object(c.__)("%d/%d point","learnpress"),r?n.point:0,n.point)))}));var n=e.question;return t.state={optionClass:["answer-option"],questionId:0,options:n?t.parseOptions(n.options):[],self:y(t)},e.$wrap&&(t.$wrap=e.$wrap),t}return t=u,r=[{key:"getDerivedStateFromProps",value:function(e,t){return t.self.prepare(e,t)}}],(n=[{key:"componentDidMount",value:function(){var e=this.prepare(this.props,this.state);e&&this.setState(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.question,r=t.status;return React.createElement("div",{className:"question-answers"},this.isDefaultType()&&React.createElement("ul",{id:"answer-options-".concat(n.id),className:"answer-options"},this.getOptions().map((function(t){var o="learn-press-answer-option-".concat(t.uid);return React.createElement("li",{className:e.getOptionClass(t).join(" "),key:"answer-option-".concat(t.uid)},React.createElement("input",{type:e.getOptionType(n.type,t),className:"option-check",name:"started"===r?"learn-press-question-".concat(n.id):"",id:o,ref:function(n){e.setInputRef(n,t.value)},onChange:e.setAnswerChecked(),disabled:e.maybeDisabledOption(t),checked:e.maybeCheckedAnswer(t.value),value:"started"===r?t.value:""}),React.createElement("label",{htmlFor:o,className:"option-title",dangerouslySetInnerHTML:{__html:t.title||t.value}}))}))),!this.isDefaultType()&&this.getWarningMessage(),this.getCorrectLabel())}}])&&s(t.prototype,n),r&&s(t,r),u}(r.Component));function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return R(this,n)}}function R(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?P(e):t}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(n,e);var t=_(n);function n(){var e;j(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return C(P(e=t.call.apply(t,[this].concat(o))),"getOptionClass",(function(t){var n=e.props.answered,r=g(e.state.optionClass);return e.maybeShowCorrectAnswer()&&("yes"===t.isTrue&&r.push("answer-correct"),n&&("yes"===t.isTrue?n===t.value&&r.push("answered-correct"):n===t.value&&r.push("answered-wrong"))),r})),e}return n}(v);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return q(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var o=B(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?M(e):t}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var F=lodash.isBoolean,U=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&I(e,t)}(n,e);var t=N(n);function n(){var e;x(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return D(M(e=t.call.apply(t,[this].concat(o))),"isCorrect",(function(){var t,n,r,o=e.props.answered;if(F(o)||!o)return!1;for(t=0,r=e.getOptions();t<r.length;t++)if("yes"===(n=r[t]).isTrue){if(-1===o.indexOf(n.value))return!1}else if(-1!==o.indexOf(n.value))return!1;return!0})),D(M(e),"getOptionClass",(function(t){var n=e.props.answered,r=k(e.state.optionClass);return e.maybeShowCorrectAnswer()&&("yes"===t.isTrue&&r.push("answer-correct"),n&&("yes"===t.isTrue?-1!==n.indexOf(t.value)&&r.push("answered-correct"):-1!==n.indexOf(t.value)&&r.push("answered-wrong"))),r})),e}return n}(v);function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Q(e){return function(e){if(Array.isArray(e))return $(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){return(J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=K(e);if(t){var o=K(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return V(this,n)}}function V(e,t){return!t||"object"!==H(t)&&"function"!=typeof t?G(e):t}function G(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&J(e,t)}(n,e);var t=W(n);function n(){var e;z(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return X(G(e=t.call.apply(t,[this].concat(o))),"getOptionClass",(function(t){var n=e.props.answered,r=Q(e.state.optionClass);return e.maybeShowCorrectAnswer()&&("yes"===t.isTrue&&r.push("answer-correct"),n&&("yes"===t.isTrue?n===t.value&&r.push("answered-correct"):n===t.value&&r.push("answered-wrong"))),r})),e}return n}(v);function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return te(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ae(e);if(t){var o=ae(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ce(this,n)}}function ce(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?ue(e):t}function ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oe(e,t)}(i,e);var t,n,r,o=ie(i);function i(){var e;ne(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return se(ue(e=o.call.apply(o,[this].concat(n))),"updateFibAnswer",(function(){var t=document.querySelectorAll(".lp-fib-input > input"),n={};ee(t).map((function(t){t.addEventListener("input",(function(r){e.setAnswered(n,t.dataset.id,r.target.value)})),t.addEventListener("paste",(function(r){e.setAnswered(n,t.dataset.id,r.target.value)}))}))})),se(ue(e),"setAnswered",(function(t,n,r){var o=e.props,i=o.updateUserQuestionAnswers,c=o.question;if("started"!==o.status)return"LP Error: can not set answers";var u=Object.assign(t,se({},n,r));i(c.id,u)})),se(ue(e),"getCorrectLabel",(function(){var t=e.props,n=t.question,r=t.mark,o=r||0;return r&&(Number.isInteger(r)||(o=r.toFixed(2))),e.maybeShowCorrectAnswer()&&React.createElement("div",{className:"question-response correct"},React.createElement("span",{className:"label"},Object(c.__)("Points","learnpress")),React.createElement("span",{className:"point"},"".concat(o,"/").concat(n.point," ").concat(Object(c.__)("point","learnpress"))),React.createElement("span",{className:"lp-fib-note"},React.createElement("span",{style:{background:"#00adff"}}),Object(c.__)("Correct","learnpress")),React.createElement("span",{className:"lp-fib-note"},React.createElement("span",{style:{background:"#d85554"}}),Object(c.__)("Incorrect","learnpress")))})),e}return t=i,(n=[{key:"componentDidMount",value:function(){this.updateFibAnswer()}},{key:"componentDidUpdate",value:function(e){e.answered||this.updateFibAnswer()}},{key:"render",value:function(){return React.createElement(React.Fragment,null,React.createElement("div",{className:"lp-fib-content"},this.getOptions().map((function(e){return React.createElement("div",{key:"blank-".concat(e.uid),dangerouslySetInnerHTML:{__html:e.title||e.value}})}))),!this.isDefaultType()&&this.getWarningMessage(),this.getCorrectLabel())}}])&&re(t.prototype,n),r&&re(t,r),i}(v);function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pe(e){return function(e){if(Array.isArray(e))return ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ye(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function de(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ge(e);if(t){var o=ge(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ve(this,n)}}function ve(e,t){return!t||"object"!==fe(t)&&"function"!=typeof t?we(e):t}function we(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var je=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(i,e);var t,n,r,o=de(i);function i(){var e;be(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Oe(we(e=o.call.apply(o,[this].concat(n))),"isCorrect",(function(){var t,n,r,o=e.props.answered;if(!o)return!1;for(t=0,r=e.getOptions();t<r.length;t++)if(o[(n=r[t]).sorting]!==n.value)return!1;return!0})),Oe(we(e),"getCorrectLabel",(function(){var t=e.props.question,n=e.isCorrect.call(we(e));return e.maybeShowCorrectAnswer()&&React.createElement(React.Fragment,null,React.createElement("div",{className:"question-response"+(n?" correct":" incorrect")},React.createElement("span",{className:"label"},n?Object(c.__)("Correct","learnpress"):Object(c.__)("Incorrect","learnpress")),React.createElement("span",{className:"point"},sprintf(Object(c.__)("%d/%d point","learnpress"),n?t.point:0,t.point))))})),Oe(we(e),"getAnswerSortingChoice",(function(){var t=e.props.question.options||[],n=e.isCorrect.call(we(e)),r=[];return!n&&t.length>0&&t.map((function(e){var t=e.sorting;if(void 0!==t)return r[t]=e.title})),r})),e}return t=i,(n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.updateUserQuestionAnswers,n=e.question,r=document.querySelector("#answer-options-".concat(n.id));return jQuery(r).sortable({items:".answer-option",cursor:"move",axis:"y",handle:".option-drag",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,update:function(e,o){var i=r.querySelectorAll(".answer-option"),c=[];pe(i).map((function(e){return c.push(e.dataset.value)})),c.length>0&&t(n.id,c)}})}},{key:"render",value:function(){var e=this,t=this.props.question,n=this.getAnswerSortingChoice();return React.createElement("div",{className:"question-answers"},this.isDefaultType()&&React.createElement("ul",{id:"answer-options-".concat(t.id),className:"answer-options lp-sorting-choice-ul"},this.getOptions().map((function(t,r){return React.createElement(React.Fragment,null,React.createElement("li",{className:e.getOptionClass(t).join(" "),key:"answer-option-".concat(t.value),"data-value":t.value},React.createElement("span",{className:"option-drag",style:{display:"flex",alignItems:"center",position:"absolute",height:"100%",left:14}},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24"},React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.createElement("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}))),React.createElement("label",{htmlFor:"learn-press-answer-option-".concat(t.value),className:"option-title",dangerouslySetInnerHTML:{__html:t.title||t.value}})),n.length>0&&void 0!==n[r]&&React.createElement("div",{className:"lp-sorting-choice__check-answer",key:"lp-checked-answer-".concat(r),style:{marginBottom:10}},n[r]))}))),!this.isDefaultType()&&this.getWarningMessage(),this.getCorrectLabel())}}])&&me(t.prototype,n),r&&me(t,r),i}(v);function Se(e){return(Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ae(e,t){return(Ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ke(e);if(t){var o=ke(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ee(this,n)}}function Ee(e,t){return!t||"object"!==Se(t)&&"function"!=typeof t?Te(e):t}function Te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ae(e,t)}(i,e);var t,n,r,o=Ce(i);function i(){var e;Re(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qe(Te(e=o.call.apply(o,[this].concat(n))),"getQuestion",(function(){var t=e.props.question;return LP.Hook.applyFilters("question-types",{single_choice:LP.questionTypes.SingleChoice,multi_choice:LP.questionTypes.MultipleChoices,true_or_false:LP.questionTypes.TrueOrFalse,fill_in_blanks:LP.questionTypes.FillInBlanks,sorting_choice:LP.questionTypes.SortingChoice})[t.type]})),e}return t=i,(n=[{key:"render",value:function(){var e=this.props,t=e.question,n=e.supportOptions,r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){qe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.props);r.supportOptions=-1!==n.indexOf(t.type);var o=this.getQuestion()||function(){return React.createElement("div",{className:"question-types",dangerouslySetInnerHTML:{__html:Object(c.sprintf)(Object(c.__)("Question <code>%s</code> invalid!","learnpress"),t.type)}})};return React.createElement(React.Fragment,null,React.createElement(o,r))}}])&&Pe(t.prototype,n),r&&Pe(t,r),i}(r.Component),Ie=Object(o.compose)(Object(i.withSelect)((function(e,t){var n=t.question.id,r=e("learnpress/quiz"),o=r.getData,i=r.isCheckedAnswer;return{supportOptions:o("supportOptions"),isCheckedAnswer:i(n),keyPressed:o("keyPressed"),showCorrectReview:o("showCorrectReview"),isReviewing:"reviewing"===o("mode")}})),Object(i.withDispatch)((function(){return{}})))(xe);t.default=Ie},3:function(e,t){e.exports=window.wp.compose}});
|
1 |
+
this.LP=this.LP||{},this.LP.questionTypes=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=21)}({0:function(e,t){e.exports=window.wp.i18n},1:function(e,t){e.exports=window.wp.data},2:function(e,t){e.exports=window.wp.element},21:function(e,t,r){"use strict";r.r(t),r.d(t,"QuestionBase",(function(){return v})),r.d(t,"SingleChoice",(function(){return E})),r.d(t,"MultipleChoices",(function(){return U})),r.d(t,"TrueOrFalse",(function(){return Y})),r.d(t,"FillInBlanks",(function(){return le})),r.d(t,"SortingChoice",(function(){return je}));var n=r(2),o=r(4),i=r(1),c=r(0);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=b(e);if(t){var o=b(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function p(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var h=lodash,d=h.isArray,v=(h.get,h.set,function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(u,e);var t,r,n,o=f(u);function u(e){var t;a(this,u),m(y(t=o.apply(this,arguments)),"prepare",(function(e,t){var r=e.question;return r&&r.id!==t.questionId?{options:t.self.parseOptions(r.options)}:null})),m(y(t),"setInputRef",(function(e,r){t.inputs||(t.inputs={}),t.inputs[r]=e})),m(y(t),"maybeShowCorrectAnswer",(function(){var e=t.props,r=e.status,n=e.isCheckedAnswer,o=e.showCorrectReview,i=e.isReviewing;return"completed"===r&&o||n&&!i})),m(y(t),"maybeDisabledOption",(function(e){var r=t.props,n=(r.answered,r.status);return r.isCheckedAnswer||"started"!==n})),m(y(t),"setAnswerChecked",(function(){return function(e){var r=t.props,n=r.updateUserQuestionAnswers,o=r.question;if("started"!==r.status)return Object(c.__)("LP Error: can not set answers","learnpress");var i=t.$wrap.find(".option-check"),u=[],a="multi_choice"!==o.type;i.each((function(e,t){if(t.checked&&(u.push(t.value),a))return!1})),n(o.id,a?u[0]:u)}})),m(y(t),"maybeCheckedAnswer",(function(e){var r=t.props.answered;return d(r)?!!r.find((function(t){return t==e})):e==r})),m(y(t),"getOptionType",(function(e,t){var r="radio";switch(e){case"multi_choice":r="checkbox"}return r})),m(y(t),"isDefaultType",(function(){return t.props.supportOptions})),m(y(t),"getWarningMessage",(function(){return React.createElement(React.Fragment,null,Object(c.__)("Render function should be overwritten from base.","learnpress"))})),m(y(t),"getOptionClass",(function(e){t.props.answered;return["answer-option"]})),m(y(t),"parseOptions",(function(e){return e&&(e=d(e)?e:JSON.parse(CryptoJS.AES.decrypt(e.data,e.key,{format:CryptoJSAesJson}).toString(CryptoJS.enc.Utf8)),e=d(e)?e:JSON.parse(e)),e||[]})),m(y(t),"getOptions",(function(){return t.state.options||[]})),m(y(t),"isCorrect",(function(){var e,r,n,o=t.props.answered;if(!o)return!1;for(e=0,n=t.getOptions();e<n.length;e++)if("yes"===(r=n[e]).isTrue&&o==r.value)return!0;return!1})),m(y(t),"isChecked",(function(){var e=t.props.question;return Object(i.select)("learnpress/quiz").isCheckedAnswer(e.id)})),m(y(t),"getCorrectLabel",(function(){var e=t.props,r=(e.status,e.answered,e.question),n=(LP.config.isQuestionCorrect[r.type]||t.isCorrect).call(y(t));return t.maybeShowCorrectAnswer()&&React.createElement("div",{className:"question-response"+(n?" correct":" incorrect")},React.createElement("span",{className:"label"},n?Object(c.__)("Correct","learnpress"):Object(c.__)("Incorrect","learnpress")),React.createElement("span",{className:"point"},sprintf(Object(c.__)("%d/%d point","learnpress"),n?r.point:0,r.point)))}));var r=e.question;return t.state={optionClass:["answer-option"],questionId:0,options:r?t.parseOptions(r.options):[],self:y(t)},e.$wrap&&(t.$wrap=e.$wrap),t}return t=u,n=[{key:"getDerivedStateFromProps",value:function(e,t){return t.self.prepare(e,t)}}],(r=[{key:"componentDidMount",value:function(){var e=this.prepare(this.props,this.state);e&&this.setState(e)}},{key:"render",value:function(){var e=this,t=this.props,r=t.question,n=t.status;return React.createElement("div",{className:"question-answers"},this.isDefaultType()&&React.createElement("ul",{id:"answer-options-".concat(r.id),className:"answer-options"},this.getOptions().map((function(t){var o="learn-press-answer-option-".concat(t.uid);return React.createElement("li",{className:e.getOptionClass(t).join(" "),key:"answer-option-".concat(t.uid)},React.createElement("input",{type:e.getOptionType(r.type,t),className:"option-check",name:"started"===n?"learn-press-question-".concat(r.id):"",id:o,ref:function(r){e.setInputRef(r,t.value)},onChange:e.setAnswerChecked(),disabled:e.maybeDisabledOption(t),checked:e.maybeCheckedAnswer(t.value),value:"started"===n?t.value:""}),React.createElement("label",{htmlFor:o,className:"option-title",dangerouslySetInnerHTML:{__html:t.title||t.value}}))}))),!this.isDefaultType()&&this.getWarningMessage(),this.getCorrectLabel())}}])&&s(t.prototype,r),n&&s(t,n),u}(n.Component));function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return O(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=A(e);if(t){var o=A(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return R(this,r)}}function R(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?P(e):t}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}(r,e);var t=S(r);function r(){var e;j(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return C(P(e=t.call.apply(t,[this].concat(o))),"getOptionClass",(function(t){var r=e.props.answered,n=g(e.state.optionClass);return e.maybeShowCorrectAnswer()&&("yes"===t.isTrue&&n.push("answer-correct"),r&&("yes"===t.isTrue?r===t.value&&n.push("answered-correct"):r===t.value&&n.push("answered-wrong"))),n})),e}return r}(v);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return q(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=B(e);if(t){var o=B(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return L(this,r)}}function L(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?M(e):t}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function D(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var F=lodash.isBoolean,U=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&I(e,t)}(r,e);var t=N(r);function r(){var e;x(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return D(M(e=t.call.apply(t,[this].concat(o))),"isCorrect",(function(){var t,r,n,o=e.props.answered;if(F(o)||!o)return!1;for(t=0,n=e.getOptions();t<n.length;t++)if("yes"===(r=n[t]).isTrue){if(-1===o.indexOf(r.value))return!1}else if(-1!==o.indexOf(r.value))return!1;return!0})),D(M(e),"getOptionClass",(function(t){var r=e.props.answered,n=k(e.state.optionClass);return e.maybeShowCorrectAnswer()&&("yes"===t.isTrue&&n.push("answer-correct"),r&&("yes"===t.isTrue?-1!==r.indexOf(t.value)&&n.push("answered-correct"):-1!==r.indexOf(t.value)&&n.push("answered-wrong"))),n})),e}return r}(v);function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Q(e){return function(e){if(Array.isArray(e))return $(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return $(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){return(J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=K(e);if(t){var o=K(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return V(this,r)}}function V(e,t){return!t||"object"!==H(t)&&"function"!=typeof t?G(e):t}function G(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function X(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&J(e,t)}(r,e);var t=W(r);function r(){var e;z(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return X(G(e=t.call.apply(t,[this].concat(o))),"getOptionClass",(function(t){var r=e.props.answered,n=Q(e.state.optionClass);return e.maybeShowCorrectAnswer()&&("yes"===t.isTrue&&n.push("answer-correct"),r&&("yes"===t.isTrue?r===t.value&&n.push("answered-correct"):r===t.value&&n.push("answered-wrong"))),n})),e}return r}(v);function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return te(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return te(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ne(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ae(e);if(t){var o=ae(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ce(this,r)}}function ce(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?ue(e):t}function ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function se(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oe(e,t)}(i,e);var t,r,n,o=ie(i);function i(){var e;re(this,i);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return se(ue(e=o.call.apply(o,[this].concat(r))),"updateFibAnswer",(function(){var t=document.querySelectorAll(".lp-fib-input > input"),r={};ee(t).map((function(t){t.addEventListener("input",(function(n){e.setAnswered(r,t.dataset.id,n.target.value)})),t.addEventListener("paste",(function(n){e.setAnswered(r,t.dataset.id,n.target.value)}))}))})),se(ue(e),"setAnswered",(function(t,r,n){var o=e.props,i=o.updateUserQuestionAnswers,c=o.question;if("started"!==o.status)return"LP Error: can not set answers";var u=Object.assign(t,se({},r,n));i(c.id,u)})),se(ue(e),"getCorrectLabel",(function(){var t=e.props,r=t.question,n=t.mark,o=n||0;return n&&(Number.isInteger(n)||(o=n.toFixed(2))),e.maybeShowCorrectAnswer()&&React.createElement("div",{className:"question-response correct"},React.createElement("span",{className:"label"},Object(c.__)("Points","learnpress")),React.createElement("span",{className:"point"},"".concat(o,"/").concat(r.point," ").concat(Object(c.__)("point","learnpress"))),React.createElement("span",{className:"lp-fib-note"},React.createElement("span",{style:{background:"#00adff"}}),Object(c.__)("Correct","learnpress")),React.createElement("span",{className:"lp-fib-note"},React.createElement("span",{style:{background:"#d85554"}}),Object(c.__)("Incorrect","learnpress")))})),e}return t=i,(r=[{key:"componentDidMount",value:function(){this.updateFibAnswer()}},{key:"componentDidUpdate",value:function(e){e.answered||this.updateFibAnswer()}},{key:"render",value:function(){return React.createElement(React.Fragment,null,React.createElement("div",{className:"lp-fib-content"},this.getOptions().map((function(e){return React.createElement("div",{key:"blank-".concat(e.uid),dangerouslySetInnerHTML:{__html:e.title||e.value}})}))),!this.isDefaultType()&&this.getWarningMessage(),this.getCorrectLabel())}}])&&ne(t.prototype,r),n&&ne(t,n),i}(v);function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pe(e){return function(e){if(Array.isArray(e))return ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ye(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ye(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function me(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function de(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ge(e);if(t){var o=ge(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ve(this,r)}}function ve(e,t){return!t||"object"!==fe(t)&&"function"!=typeof t?we(e):t}function we(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Oe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var je=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(i,e);var t,r,n,o=de(i);function i(){var e;be(this,i);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Oe(we(e=o.call.apply(o,[this].concat(r))),"isCorrect",(function(){var t,r,n,o=e.props.answered;if(!o)return!1;for(t=0,n=e.getOptions();t<n.length;t++)if(o[(r=n[t]).sorting]!==r.value)return!1;return!0})),Oe(we(e),"getCorrectLabel",(function(){var t=e.props.question,r=e.isCorrect.call(we(e));return e.maybeShowCorrectAnswer()&&React.createElement(React.Fragment,null,React.createElement("div",{className:"question-response"+(r?" correct":" incorrect")},React.createElement("span",{className:"label"},r?Object(c.__)("Correct","learnpress"):Object(c.__)("Incorrect","learnpress")),React.createElement("span",{className:"point"},sprintf(Object(c.__)("%d/%d point","learnpress"),r?t.point:0,t.point))))})),Oe(we(e),"getAnswerSortingChoice",(function(){var t=e.props.question.options||[],r=e.isCorrect.call(we(e)),n=[];return!r&&t.length>0&&t.map((function(e){var t=e.sorting;if(void 0!==t)return n[t]=e.title})),n})),e}return t=i,(r=[{key:"componentDidMount",value:function(){var e=this.props,t=e.updateUserQuestionAnswers,r=e.question,n=document.querySelector("#answer-options-".concat(r.id));return jQuery(n).sortable({items:".answer-option",cursor:"move",axis:"y",handle:".option-drag",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,update:function(e,o){var i=n.querySelectorAll(".answer-option"),c=[];pe(i).map((function(e){return c.push(e.dataset.value)})),c.length>0&&t(r.id,c)}})}},{key:"render",value:function(){var e=this,t=this.props.question,r=this.getAnswerSortingChoice();return React.createElement("div",{className:"question-answers"},this.isDefaultType()&&React.createElement("ul",{id:"answer-options-".concat(t.id),className:"answer-options lp-sorting-choice-ul"},this.getOptions().map((function(t,n){return React.createElement(React.Fragment,null,React.createElement("li",{className:e.getOptionClass(t).join(" "),key:"answer-option-".concat(t.value),"data-value":t.value},React.createElement("span",{className:"option-drag",style:{display:"flex",alignItems:"center",position:"absolute",height:"100%",left:14}},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24"},React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.createElement("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}))),React.createElement("label",{htmlFor:"learn-press-answer-option-".concat(t.value),className:"option-title",dangerouslySetInnerHTML:{__html:t.title||t.value}})),r.length>0&&void 0!==r[n]&&React.createElement("div",{className:"lp-sorting-choice__check-answer",key:"lp-checked-answer-".concat(n),style:{marginBottom:10}},r[n]))}))),!this.isDefaultType()&&this.getWarningMessage(),this.getCorrectLabel())}}])&&me(t.prototype,r),n&&me(t,n),i}(v);function _e(e){return(_e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ae(e,t){return(Ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ke(e);if(t){var o=ke(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ee(this,r)}}function Ee(e,t){return!t||"object"!==_e(t)&&"function"!=typeof t?Te(e):t}function Te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var xe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ae(e,t)}(i,e);var t,r,n,o=Ce(i);function i(){var e;Re(this,i);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qe(Te(e=o.call.apply(o,[this].concat(r))),"getQuestion",(function(){var t=e.props.question;return LP.Hook.applyFilters("question-types",{single_choice:LP.questionTypes.SingleChoice,multi_choice:LP.questionTypes.MultipleChoices,true_or_false:LP.questionTypes.TrueOrFalse,fill_in_blanks:LP.questionTypes.FillInBlanks,sorting_choice:LP.questionTypes.SortingChoice})[t.type]})),e}return t=i,(r=[{key:"render",value:function(){var e=this.props,t=e.question,r=e.supportOptions,n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(r),!0).forEach((function(t){qe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},this.props);n.supportOptions=-1!==r.indexOf(t.type);var o=this.getQuestion()||function(){return React.createElement("div",{className:"question-types",dangerouslySetInnerHTML:{__html:Object(c.sprintf)(Object(c.__)("Question <code>%s</code> invalid!","learnpress"),t.type)}})};return React.createElement(React.Fragment,null,React.createElement(o,n))}}])&&Pe(t.prototype,r),n&&Pe(t,n),i}(n.Component),Ie=Object(o.compose)(Object(i.withSelect)((function(e,t){var r=t.question.id,n=e("learnpress/quiz"),o=n.getData,i=n.isCheckedAnswer;return{supportOptions:o("supportOptions"),isCheckedAnswer:i(r),keyPressed:o("keyPressed"),showCorrectReview:o("showCorrectReview"),isReviewing:"reviewing"===o("mode")}})),Object(i.withDispatch)((function(){return{}})))(xe);t.default=Ie},4:function(e,t){e.exports=window.wp.compose}});
|
assets/js/dist/frontend/quiz.js
CHANGED
@@ -175,7 +175,7 @@ var Attempts = function Attempts() {
|
|
175 |
className: "quiz-attempts__marks"
|
176 |
}, "".concat(row.userMark, " / ").concat(row.mark)), /*#__PURE__*/React.createElement("td", {
|
177 |
className: "quiz-attempts__grade"
|
178 |
-
}, row.passingGrade ||
|
179 |
className: "quiz-attempts__result"
|
180 |
}, "".concat(parseFloat(row.result).toFixed(2), "%"), " ", /*#__PURE__*/React.createElement("span", null, row.graduationText)));
|
181 |
})))));
|
@@ -279,7 +279,7 @@ var ButtonCheck = /*#__PURE__*/function (_Component) {
|
|
279 |
onClick: this.checkAnswer
|
280 |
}, /*#__PURE__*/React.createElement("span", {
|
281 |
className: "instant-check__icon"
|
282 |
-
}), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["
|
283 |
className: "instant-check__info",
|
284 |
dangerouslySetInnerHTML: {
|
285 |
__html: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('You need to answer the question before check answer.', 'learnpress')
|
@@ -508,7 +508,7 @@ var Buttons = /*#__PURE__*/function (_Component) {
|
|
508 |
confirm = _select.confirm,
|
509 |
isOpen = _select.isOpen;
|
510 |
|
511 |
-
if ('no' === confirm('Are you sure you want to
|
512 |
!isOpen() && btn && btn.removeAttribute('disabled');
|
513 |
return;
|
514 |
}
|
@@ -730,7 +730,7 @@ var Buttons = /*#__PURE__*/function (_Component) {
|
|
730 |
}, (status === 'completed' && canRetry || -1 !== ['', 'viewed'].indexOf(status)) && !isReviewing && /*#__PURE__*/React.createElement("button", {
|
731 |
className: "lp-button start",
|
732 |
onClick: this.startQuiz
|
733 |
-
}, status === 'completed' ? "".concat(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["
|
734 |
className: "questions-pagination"
|
735 |
}, this.pageNumbers()))), /*#__PURE__*/React.createElement("div", {
|
736 |
className: "button-right"
|
@@ -1508,7 +1508,11 @@ var Question = /*#__PURE__*/function (_Component) {
|
|
1508 |
}, isShowIndex, ".") : '';
|
1509 |
},
|
1510 |
title: function title() {
|
1511 |
-
return
|
|
|
|
|
|
|
|
|
1512 |
},
|
1513 |
hint: function hint() {
|
1514 |
return /*#__PURE__*/React.createElement(_buttons_button_hint__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
@@ -1693,6 +1697,9 @@ var Result = function Result() {
|
|
1693 |
var QuizID = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["useSelect"])(function (select) {
|
1694 |
return select('learnpress/quiz').getData('id');
|
1695 |
}, []);
|
|
|
|
|
|
|
1696 |
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
|
1697 |
animate();
|
1698 |
var graduation = '';
|
@@ -1725,9 +1732,12 @@ var Result = function Result() {
|
|
1725 |
itemCompleted.textContent = parseInt(allItemCompleted.length);
|
1726 |
}
|
1727 |
}
|
1728 |
-
|
1729 |
-
updateItemsProgress();
|
1730 |
}, [results]);
|
|
|
|
|
|
|
|
|
|
|
1731 |
|
1732 |
var updateItemsProgress = function updateItemsProgress() {
|
1733 |
var elements = document.querySelectorAll('.popup-header__inner');
|
@@ -1842,7 +1852,7 @@ var Result = function Result() {
|
|
1842 |
className: "result-achieved"
|
1843 |
}, "".concat(percentResult, "%")), /*#__PURE__*/React.createElement("span", {
|
1844 |
className: "result-require"
|
1845 |
-
}, passingGradeValue ||
|
1846 |
className: "result-message"
|
1847 |
}, message), /*#__PURE__*/React.createElement("ul", {
|
1848 |
className: "result-statistic"
|
@@ -3414,6 +3424,10 @@ var itemsProgress = function itemsProgress() {
|
|
3414 |
return;
|
3415 |
}
|
3416 |
|
|
|
|
|
|
|
|
|
3417 |
if ('IntersectionObserver' in window) {
|
3418 |
var eleObserver = new IntersectionObserver(function (entries, observer) {
|
3419 |
entries.forEach(function (entry) {
|
175 |
className: "quiz-attempts__marks"
|
176 |
}, "".concat(row.userMark, " / ").concat(row.mark)), /*#__PURE__*/React.createElement("td", {
|
177 |
className: "quiz-attempts__grade"
|
178 |
+
}, row.passingGrade || _x('-', 'unknown passing grade value', 'learnpress')), /*#__PURE__*/React.createElement("td", {
|
179 |
className: "quiz-attempts__result"
|
180 |
}, "".concat(parseFloat(row.result).toFixed(2), "%"), " ", /*#__PURE__*/React.createElement("span", null, row.graduationText)));
|
181 |
})))));
|
279 |
onClick: this.checkAnswer
|
280 |
}, /*#__PURE__*/React.createElement("span", {
|
281 |
className: "instant-check__icon"
|
282 |
+
}), Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Check answer', 'learnpress'), !answered && /*#__PURE__*/React.createElement("div", {
|
283 |
className: "instant-check__info",
|
284 |
dangerouslySetInnerHTML: {
|
285 |
__html: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('You need to answer the question before check answer.', 'learnpress')
|
508 |
confirm = _select.confirm,
|
509 |
isOpen = _select.isOpen;
|
510 |
|
511 |
+
if ('no' === confirm(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Are you sure you want to retake quiz?', 'learnpress'), _this.startQuiz)) {
|
512 |
!isOpen() && btn && btn.removeAttribute('disabled');
|
513 |
return;
|
514 |
}
|
730 |
}, (status === 'completed' && canRetry || -1 !== ['', 'viewed'].indexOf(status)) && !isReviewing && /*#__PURE__*/React.createElement("button", {
|
731 |
className: "lp-button start",
|
732 |
onClick: this.startQuiz
|
733 |
+
}, status === 'completed' ? "".concat(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Retake', 'learnpress')).concat(retakeNumber ? " (".concat(retakeNumber, ")") : '') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__["__"])('Start', 'learnpress')), ('started' === status || isReviewing) && numPages > 1 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
734 |
className: "questions-pagination"
|
735 |
}, this.pageNumbers()))), /*#__PURE__*/React.createElement("div", {
|
736 |
className: "button-right"
|
1508 |
}, isShowIndex, ".") : '';
|
1509 |
},
|
1510 |
title: function title() {
|
1511 |
+
return /*#__PURE__*/React.createElement("span", {
|
1512 |
+
dangerouslySetInnerHTML: {
|
1513 |
+
__html: question.title
|
1514 |
+
}
|
1515 |
+
});
|
1516 |
},
|
1517 |
hint: function hint() {
|
1518 |
return /*#__PURE__*/React.createElement(_buttons_button_hint__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
1697 |
var QuizID = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["useSelect"])(function (select) {
|
1698 |
return select('learnpress/quiz').getData('id');
|
1699 |
}, []);
|
1700 |
+
var submitting = Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__["useSelect"])(function (select) {
|
1701 |
+
return select('learnpress/quiz').getData('submitting');
|
1702 |
+
}, []);
|
1703 |
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
|
1704 |
animate();
|
1705 |
var graduation = '';
|
1732 |
itemCompleted.textContent = parseInt(allItemCompleted.length);
|
1733 |
}
|
1734 |
}
|
|
|
|
|
1735 |
}, [results]);
|
1736 |
+
Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
|
1737 |
+
if (submitting !== undefined) {
|
1738 |
+
updateItemsProgress();
|
1739 |
+
}
|
1740 |
+
}, [submitting]);
|
1741 |
|
1742 |
var updateItemsProgress = function updateItemsProgress() {
|
1743 |
var elements = document.querySelectorAll('.popup-header__inner');
|
1852 |
className: "result-achieved"
|
1853 |
}, "".concat(percentResult, "%")), /*#__PURE__*/React.createElement("span", {
|
1854 |
className: "result-require"
|
1855 |
+
}, passingGradeValue || _x('-', 'unknown passing grade value', 'learnpress'))), done && /*#__PURE__*/React.createElement("p", {
|
1856 |
className: "result-message"
|
1857 |
}, message), /*#__PURE__*/React.createElement("ul", {
|
1858 |
className: "result-statistic"
|
3424 |
return;
|
3425 |
}
|
3426 |
|
3427 |
+
if (elements[0].querySelectorAll('form.form-button-finish-course').length !== 0) {
|
3428 |
+
return;
|
3429 |
+
}
|
3430 |
+
|
3431 |
if ('IntersectionObserver' in window) {
|
3432 |
var eleObserver = new IntersectionObserver(function (entries, observer) {
|
3433 |
entries.forEach(function (entry) {
|
assets/js/dist/frontend/quiz.min.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
this.LP=this.LP||{},this.LP.quiz=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=
|
2 |
/*!
|
3 |
Copyright (c) 2018 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&e.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var u in r)n.call(r,u)&&r[u]&&e.push(u);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return Sn}));var r={};n.r(r),n.d(r,"setQuizData",(function(){return Ot})),n.d(r,"setCurrentQuestion",(function(){return wt})),n.d(r,"setCurrentPage",(function(){return _t})),n.d(r,"__requestBeforeStartQuiz",(function(){return jt})),n.d(r,"__requestStartQuizSuccess",(function(){return Rt})),n.d(r,"startQuiz",(function(){return qt})),n.d(r,"__requestSubmitQuiz",(function(){return St})),n.d(r,"__requestSubmitQuizSuccess",(function(){return Pt})),n.d(r,"submitQuiz",(function(){return Et})),n.d(r,"updateUserQuestionAnswers",(function(){return kt})),n.d(r,"__requestShowHintSuccess",(function(){return zt})),n.d(r,"showHint",(function(){return Qt})),n.d(r,"__requestCheckAnswerSuccess",(function(){return At})),n.d(r,"checkAnswer",(function(){return It})),n.d(r,"markQuestionRendered",(function(){return Ct})),n.d(r,"setQuizMode",(function(){return Nt})),n.d(r,"sendKey",(function(){return Tt}));var o={};n.r(o),n.d(o,"getQuestionOptions",(function(){return Lt})),n.d(o,"getItemStatus",(function(){return Ut})),n.d(o,"getProp",(function(){return Ft})),n.d(o,"getQuizAttempts",(function(){return Ht})),n.d(o,"getQuizAnswered",(function(){return Bt})),n.d(o,"getQuestions",(function(){return Gt})),n.d(o,"getData",(function(){return Kt})),n.d(o,"getDefaultRestArgs",(function(){return Wt})),n.d(o,"getQuestionAnswered",(function(){return $t})),n.d(o,"getQuestionMark",(function(){return Jt})),n.d(o,"getCurrentQuestion",(function(){return Zt})),n.d(o,"getQuestion",(function(){return Yt})),n.d(o,"isCheckedAnswer",(function(){return Vt})),n.d(o,"isCorrect",(function(){return Xt})),n.d(o,"getQuestionsSelectedAnswers",(function(){return en})),n.d(o,"getUserMark",(function(){return tn}));var i=n(2),a=n(3),u=n(1),s=function(){var e=Object(u.select)("learnpress/quiz").getData("content");return React.createElement("div",{className:"quiz-content",dangerouslySetInnerHTML:{__html:e}})},c=n(0),l=function(e){var t;if(e>86400)t=(e-e%86400)/86400,e%=86400;else if(86400==e)return"24:00";var n=new Date(1e3*e).toUTCString().match(/\d{2}:\d{2}:\d{2}/)[0].split(":");return t&&(n[0]=parseInt(n[0])+24*t),n.join(":")},f=LP.Hook,p=function(){var e=function(e){return Object(u.select)("learnpress/quiz").getData(e)},t=f.applyFilters("quiz-meta-fields",{duration:{title:Object(c.__)("Duration:","learnpress"),name:"duration",content:l(e("duration"))||"--"},passingGrade:{title:Object(c.__)("Passing grade:","learnpress"),name:"passing-grade",content:e("passingGrade")||"--"},questionsCount:{title:Object(c.__)("Questions:","learnpress"),name:"questions-count",content:e("questionIds")?e("questionIds").length:0}});return t&&React.createElement(React.Fragment,null,React.createElement("ul",{className:"quiz-intro"},Object.values(t).map((function(e,t){var n=e.name||t;return React.createElement("li",{key:"quiz-intro-field-".concat(t),className:"quiz-intro-item quiz-intro-item--".concat(n)},React.createElement("div",{className:"quiz-intro-item__title",dangerouslySetInnerHTML:{__html:e.title}}),React.createElement("span",{className:"quiz-intro-item__content",dangerouslySetInnerHTML:{__html:e.content}}))}))))};function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?_(e):t}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(i,e);var t,n,r,o=O(i);function i(){var e;h(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return R(_(e=o.call.apply(o,[this].concat(n))),"startQuiz",(function(t){t&&t.preventDefault();var n=document.querySelector(".lp-button.start");n&&n.setAttribute("disabled","disabled");var r=e.props,o=r.startQuiz;if("completed"===r.status){var i=Object(u.select)("learnpress/modal"),a=i.confirm,s=i.isOpen;if("no"===a("Are you sure you want to retry quiz?",e.startQuiz))return void(!s()&&n&&n.removeAttribute("disabled"))}o()})),R(_(e),"nav",(function(t){return function(n){var r=e.props,o=r.questionNav,i=r.currentPage,a=r.numPages,u=r.setCurrentPage;switch(t){case"prev":i>1?i-=1:i="infinity"===o?a:1;break;default:i<a?i+=1:i="infinity"===o?1:a}u(i)}})),R(_(e),"moveTo",(function(t){return function(n){n.preventDefault();var r=e.props,o=r.numPages,i=r.setCurrentPage;t<1||t>o||i(t)}})),R(_(e),"isLast",(function(){var t=e.props;return t.currentPage===t.numPages})),R(_(e),"isFirst",(function(){return 1===e.props.currentPage})),R(_(e),"submit",(function(){var t=e.props.submitQuiz;"no"!==(0,Object(u.select)("learnpress/modal").confirm)(Object(c.__)("Are you sure to submit quiz?","learnpress"),e.submit)&&t()})),R(_(e),"setQuizMode",(function(t){return function(){(0,e.props.setQuizMode)(t)}})),R(_(e),"isReviewing",(function(){return e.props.isReviewing})),e}return t=i,(n=[{key:"pageNumbers",value:function(e){var t=this,n=this.props,r=n.numPages,o=n.currentPage;if(r<2)return"";(e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({numPages:r,currentPage:o,midSize:1,endSize:1,prevNext:!0},e||{})).endSize<1&&(e.endSize=1),e.midSize<0&&(e.midSize=1);var i=m(Array(r).keys()),a=!1;return React.createElement("div",{className:"nav-links"},e.prevNext&&!this.isFirst()&&React.createElement("button",{className:"page-numbers prev","data-type":"question-navx",onClick:this.nav("prev")},Object(c.__)("Prev","learnpress")),i.map((function(n){return(n+=1)===e.currentPage?(a=!0,React.createElement("span",{key:"page-number-".concat(n),className:"page-numbers current"},n)):n<=e.endSize||e.currentPage&&n>=e.currentPage-e.midSize&&n<=e.currentPage+e.midSize||n>e.numPages-e.endSize?(a=!0,React.createElement("button",{key:"page-number-".concat(n),className:"page-numbers",onClick:t.moveTo(n)},n)):a?(a=!1,React.createElement("span",{key:"page-number-".concat(n),className:"page-numbers dots"},"…")):""})),e.prevNext&&!this.isLast()&&React.createElement("button",{className:"page-numbers next","data-type":"question-navx",onClick:this.nav("next")},Object(c.__)("Next","learnpress")))}},{key:"render",value:function(){var e=this.props,t=e.status,n=e.questionNav,r=e.isReviewing,o=e.showReview,i=e.numPages,a=(e.question,e.questionsPerPage,e.canRetry),u=e.retakeNumber,s=["quiz-buttons"];("started"===t||r)&&s.push("align-center"),"questionNav"===n&&s.push("infinity"),this.isFirst()&&s.push("is-first"),this.isLast()&&s.push("is-last");var l=document.querySelector("#popup-sidebar"),f=document.querySelector("#learn-press-quiz-app"),p="";return p="started"===t||r?{marginLeft:l&&l.offsetWidth/2,width:f&&f.offsetWidth}:null,React.createElement(React.Fragment,null,React.createElement("div",{className:s.join(" ")},React.createElement("div",{className:"button-left"+("started"===t||r?" fixed":""),style:p},("completed"===t&&a||-1!==["","viewed"].indexOf(t))&&!r&&React.createElement("button",{className:"lp-button start",onClick:this.startQuiz},"completed"===t?"".concat(Object(c._x)("Retake","label button retry quiz","learnpress")).concat(u?" (".concat(u,")"):""):Object(c._x)("Start","label button start quiz","learnpress")),("started"===t||r)&&i>1&&React.createElement(React.Fragment,null,React.createElement("div",{className:"questions-pagination"},this.pageNumbers()))),React.createElement("div",{className:"button-right"},"started"===t&&React.createElement(React.Fragment,null,("infinity"===n||this.isLast())&&!r&&React.createElement("button",{className:"lp-button submit-quiz",onClick:this.submit},Object(c.__)("Finish Quiz","learnpress"))),r&&o&&React.createElement("button",{className:"lp-button back-quiz",onClick:this.setQuizMode("")},Object(c.__)("Result","learnpress")),"completed"===t&&o&&!r&&React.createElement("button",{className:"lp-button review-quiz",onClick:this.setQuizMode("reviewing")},Object(c.__)("Review","learnpress")))),this.props.message&&!0!==this.props.success&&React.createElement("div",{className:"learn-press-message error"},this.props.message))}}])&&v(t.prototype,n),r&&v(t,r),i}(i.Component),S=Object(a.compose)(Object(u.withSelect)((function(e){var t=e("learnpress/quiz").getData;return{status:t("status"),showCheck:t("instantCheck"),checkedQuestions:t("checkedQuestions"),hintedQuestions:t("hintedQuestions"),questionsPerPage:t("questionsPerPage")}})))((function(e){var t=e.showCheck,n=e.checkedQuestions,r=e.hintedQuestions,o=e.question,i=e.status,a=e.type,u=e.Button;if("started"!==i)return!1;var s=React.createElement(u,{question:o});switch(a){case"hint":return r?!!o.hasHint&&(-1===r.indexOf(o.id)&&s):s;case"check":return!!t&&(n?-1===n.indexOf(o.id)&&s:s)}})),P=Object(a.compose)([Object(u.withSelect)((function(e){var t=e("learnpress/quiz"),n=t.getData,r=t.getCurrentQuestion,o={id:n("id"),status:n("status"),questionIds:n("questionIds"),questionNav:n("questionNav"),isReviewing:n("reviewQuestions")&&"reviewing"===n("mode"),showReview:n("reviewQuestions"),showCheck:n("instantCheck"),checkedQuestions:n("checkedQuestions"),hintedQuestions:n("hintedQuestions"),numPages:n("numPages"),pages:n("pages"),currentPage:n("currentPage"),questionsPerPage:n("questionsPerPage"),pageNumbers:n("pageNumbers"),keyPressed:n("keyPressed"),canRetry:n("retakeCount")>0&&n("retaken")<n("retakeCount"),retakeNumber:n("retakeCount")>0&&n("retaken")<n("retakeCount")?n("retakeCount")-n("retaken"):null,message:n("messageResponse")||!1,success:void 0===n("successResponse")||n("successResponse")};return 1===o.questionsPerPage&&(o.question=r("object")),o})),Object(u.withDispatch)((function(e,t){t.id;var n=e("learnpress/quiz"),r=n.startQuiz,o=n.setCurrentQuestion,i=n.submitQuiz,a=n.setQuizMode,u=n.showHint,s=n.checkAnswer;return{startQuiz:r,setCurrentQuestion:o,setQuizMode:a,setCurrentPage:n.setCurrentPage,submitQuiz:function(e){i(e)},showHint:function(e){u(e)},checkAnswer:function(e){s(e)}}}))])(q);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Q(e,t){return(Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=N(e);if(t){var o=N(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?C(e):t}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q(e,t)}(i,e);var t,n,r,o=A(i);function i(){var e;k(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return T(C(e=o.call.apply(o,[this].concat(n))),"showHint",(function(){var t=e.props,n=t.showHint,r=t.question;n(r.id,!r.showHint)})),e}return t=i,(n=[{key:"render",value:function(){return this.props.question.hint?React.createElement("button",{className:"btn-show-hint",onClick:this.showHint},React.createElement("span",null,Object(c.__)("Hint","learnpress"))):""}}])&&z(t.prototype,n),r&&z(t,r),i}(i.Component),D=Object(a.compose)(Object(u.withDispatch)((function(e,t){t.id;var n=e("learnpress/quiz").showHint;return{showHint:function(e,t){n(e,t)}}})))(x),M=n(12),L=n.n(M);function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$(e);if(t){var o=$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return K(this,n)}}function K(e,t){return!t||"object"!==U(t)&&"function"!=typeof t?W(e):t}function W(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return($=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&B(e,t)}(i,e);var t,n,r,o=G(i);function i(){var e;return F(this,i),J(W(e=o.apply(this,arguments)),"checkAnswer",(function(){var t=e.props,n=t.checkAnswer,r=t.question;t.answered&&(n(r.id),e.setState({loading:!0}))})),e.state={loading:!1},e}return t=i,(n=[{key:"render",value:function(){var e=this.props.answered;return React.createElement(React.Fragment,null,React.createElement("button",{className:L()("lp-button","instant-check",{loading:this.state.loading,disable:!e}),onClick:this.checkAnswer},React.createElement("span",{className:"instant-check__icon"}),Object(c._x)("Check answer","label of button check answer","learnpress"),!e&&React.createElement("div",{className:"instant-check__info",dangerouslySetInnerHTML:{__html:Object(c.__)("You need to answer the question before check answer.","learnpress")}})))}}])&&H(t.prototype,n),r&&H(t,r),i}(i.Component),Y=Object(a.compose)(Object(u.withSelect)((function(e,t){var n=t.question.id;return{answered:(0,e("learnpress/quiz").getQuestionAnswered)(n)}})),Object(u.withDispatch)((function(e,t){t.id;var n=e("learnpress/quiz").checkAnswer;return{checkAnswer:function(e){n(e)}}})))(Z),V=function(e){var t=e.question,n={"instant-check":function(){return React.createElement(S,{type:"check",Button:Y,question:t})},hint:function(){return React.createElement(S,{type:"hint",Button:D,question:t})}};return React.createElement(React.Fragment,null,LP.config.questionFooterButtons().map((function(e){return React.createElement(i.Fragment,{key:"button-".concat(e)},n[e]&&n[e]())})))};function X(e){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=se(e);if(t){var o=se(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ae(this,n)}}function ae(e,t){return!t||"object"!==X(t)&&"function"!=typeof t?ue(e):t}function ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var le=window.jQuery,fe=lodash,pe=(fe.uniqueId,fe.isArray),de=(fe.isNumber,fe.bind,function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oe(e,t)}(a,e);var t,n,r,o=ie(a);function a(){var e;return ne(this,a),ce(ue(e=o.apply(this,arguments)),"setRef",(function(t){e.$wrap=le(t)})),ce(ue(e),"parseOptions",(function(e){return e&&(e=pe(e)?e:JSON.parse(CryptoJS.AES.decrypt(e.data,e.key,{format:CryptoJSAesJson}).toString(CryptoJS.enc.Utf8)),e=pe(e)?e:JSON.parse(e)),e||[]})),ce(ue(e),"getWrapperClass",(function(){var t=e.props,n=t.question,r=(t.answered,["question","question-"+n.type]),o=e.parseOptions(n.options);return o.length&&void 0!==o[0].isTrue&&r.push("question-answered"),r})),ce(ue(e),"getEditLink",(function(){var t=e.props,n=t.question,r=t.editPermalink;return r?r.replace(/post=([0-9]{3,4})/,"post=".concat(n.id)):""})),ce(ue(e),"editPermalink",(function(e){return Object(c.sprintf)('<a href="%s">%s</a>',e,Object(c.__)("Edit","learnpress"))})),e.state={time:null,showHint:!1},e.$wrap=null,e}return t=a,(n=[{key:"componentDidMount",value:function(e){var t=this.props,n=t.question,r=t.isCurrent,o=t.markQuestionRendered;return r&&o(n.id),this.state.time||this.setState({time:new Date}),LP.Hook.doAction("lp-question-compatible-builder"),e}},{key:"render",value:function(){var e=this,t=this.props,n=t.question,r=t.isShow,o=t.isShowIndex,a=(t.isShowHint,t.status),u=LP.questionTypes.default,s=this.getEditLink();s&&jQuery("#wp-admin-bar-edit-lp_question").find(".ab-item").attr("href",s);var l={index:function(){return o?React.createElement("span",{className:"question-index"},o,"."):""},title:function(){return n.title},hint:function(){return React.createElement(D,{question:n})},"edit-permalink":function(){return s&&React.createElement("span",{dangerouslySetInnerHTML:{__html:e.editPermalink(s)},className:"edit-link"})}},f={title:function(){return React.createElement("h4",{className:"question-title"},LP.config.questionTitleParts().map((function(e){return React.createElement(i.Fragment,{key:"title-part-".concat(e)},l[e]&&l[e]())})))},content:function(){return React.createElement("div",{className:"question-content",dangerouslySetInnerHTML:{__html:n.content}})},"answer-options":function(){return e.$wrap&&React.createElement(u,te(te({},e.props),{},{$wrap:e.$wrap}))},explanation:function(){return n.explanation&&React.createElement(React.Fragment,null,React.createElement("div",{className:"question-explanation-content"},React.createElement("strong",{className:"explanation-title"},Object(c.__)("Explanation:","learnpress")),React.createElement("div",{dangerouslySetInnerHTML:{__html:n.explanation}})))},hint:function(){return n.hint&&!n.explanation&&n.showHint&&React.createElement(React.Fragment,null,React.createElement("div",{className:"question-hint-content"},React.createElement("strong",{className:"hint-title"},Object(c.__)("Hint:","learnpress")),React.createElement("div",{dangerouslySetInnerHTML:{__html:n.hint}})))},buttons:function(){return"started"===a&&React.createElement(V,{question:n})}},p=LP.config.questionBlocks();return React.createElement(React.Fragment,null,React.createElement("div",{className:this.getWrapperClass().join(" "),style:{display:r?"":"none"},"data-id":n.id,ref:this.setRef},p.map((function(e){return React.createElement(i.Fragment,{key:"block-".concat(e)},f[e]?f[e]():"")}))))}}])&&re(t.prototype,n),r&&re(t,r),a}(i.Component)),me=Object(a.compose)([Object(u.withSelect)((function(e,t){var n=t.question.id,r=e("learnpress/quiz"),o=r.getData,i=r.getQuestionAnswered,a=r.getQuestionMark;return{status:o("status"),questions:o("question"),answered:i(n),questionsRendered:o("questionsRendered"),editPermalink:o("editPermalink"),numPages:o("numPages"),mark:a(n)||""}})),Object(u.withDispatch)((function(e){var t=e("learnpress/quiz"),n=t.updateUserQuestionAnswers;return{markQuestionRendered:t.markQuestionRendered,updateUserQuestionAnswers:n}}))])(de);function be(e){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_e(e);if(t){var o=_e(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Oe(this,n)}}function Oe(e,t){return!t||"object"!==be(t)&&"function"!=typeof t?we(e):t}function we(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _e(e){return(_e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ve(e,t)}(i,e);var t,n,r,o=ge(i);function i(e){var t;return ye(this,i),je(we(t=o.apply(this,arguments)),"startQuiz",(function(e){e.preventDefault(),(0,t.props.startQuiz)()})),je(we(t),"isInVisibleRange",(function(e,n){var r=t.props,o=r.currentPage,i=r.questionsPerPage;return o===Math.ceil(n/i)})),je(we(t),"nav",(function(e){var n=t.props.sendKey;switch(e.keyCode){case 37:return n("left");case 38:return;case 39:return n("right");case 40:return;default:e.keyCode>=49&&e.keyCode<=57&&n(e.keyCode-48)}})),t.needToTop=!1,t.state={isReviewing:null,currentPage:0,self:we(t)},t}return t=i,r=[{key:"getDerivedStateFromProps",value:function(e,t){for(var n=["isReviewing","currentPage"],r={},o=0;o<n.length;o++)e[n[o]]!==t[n[o]]&&(r[n[o]]=e[n[o]]);return Object.values(r).length?(t.self.needToTop=!0,r):null}}],(n=[{key:"componentDidUpdate",value:function(){this.needToTop&&(jQuery("#popup-content").animate({scrollTop:0}).find(".content-item-scrollable:last").animate({scrollTop:0}),this.needToTop=!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.status,r=t.currentQuestion,o=t.questions,i=t.questionsRendered,a=t.isReviewing,u=t.questionsPerPage,s=!0;return"completed"!==n||a||(s=!1),React.createElement(React.Fragment,null,React.createElement("div",{tabIndex:100,onKeyUp:this.nav},React.createElement("div",{className:"quiz-questions",style:{display:s?"":"none"}},o.map((function(t,n){var o=!u&&r===t.id,a=i&&-1!==i.indexOf(t.id),s=e.isInVisibleRange(t.id,n+1);return a||!a||s?React.createElement(me,{key:"loop-question-".concat(t.id),isCurrent:o,isShow:s,isShowIndex:!!u&&n+1,questionsPerPage:u,question:t}):""})))))}}])&&he(t.prototype,n),r&&he(t,r),i}(i.Component),qe=Object(a.compose)(Object(u.withSelect)((function(e,t,n){var r=e("learnpress/quiz"),o=r.getData,i=r.getQuestions;return{status:o("status"),currentQuestion:o("currentQuestion"),questions:i(),questionsRendered:o("questionsRendered"),isReviewing:"reviewing"===o("mode"),numPages:o("numPages"),currentPage:o("currentPage"),questionsPerPage:o("questionsPerPage")||1}})),Object(u.withDispatch)((function(e){var t=e("learnpress/quiz");return{startQuiz:t.startQuiz,sendKey:t.sendKey}})))(Re),Se=function(){var e=Object(u.select)("learnpress/quiz").getData("attempts")||[],t=e&&!!e.length;return!!t&&React.createElement(React.Fragment,null,React.createElement("div",{className:"quiz-attempts"},React.createElement("h4",{className:"attempts-heading"},Object(c.__)("Last Attempted","learnpress")),t&&React.createElement("table",null,React.createElement("thead",null,React.createElement("tr",null,React.createElement("th",{className:"quiz-attempts__questions"},Object(c.__)("Questions","learnpress")),React.createElement("th",{className:"quiz-attempts__spend"},Object(c.__)("Time spend","learnpress")),React.createElement("th",{className:"quiz-attempts__marks"},Object(c.__)("Marks","learnpress")),React.createElement("th",{className:"quiz-attempts__grade"},Object(c.__)("Passing grade","learnpress")),React.createElement("th",{className:"quiz-attempts__result"},Object(c.__)("Result","learnpress")))),React.createElement("tbody",null,e.map((function(e,t){return React.createElement("tr",{key:"attempt-".concat(t)},React.createElement("td",{className:"quiz-attempts__questions"},"".concat(e.questionCorrect," / ").concat(e.questionCount)),React.createElement("td",{className:"quiz-attempts__spend"},e.timeSpend||"--"),React.createElement("td",{className:"quiz-attempts__marks"},"".concat(e.userMark," / ").concat(e.mark)),React.createElement("td",{className:"quiz-attempts__grade"},e.passingGrade||Object(c._x)("-","unknown passing grade value","learnpress")),React.createElement("td",{className:"quiz-attempts__result"},"".concat(parseFloat(e.result).toFixed(2),"%")," ",React.createElement("span",null,e.graduationText)))}))))))};function Pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ke=function(){var e=Object(u.select)("learnpress/quiz").getData,t=Object(u.dispatch)("learnpress/quiz").submitQuiz,n=e("totalTime")?e("totalTime"):e("duration"),r=e("endTime"),o=new Date(r.replace(/-/g,"/")),a=new Date,s=(new Date).getTimezoneOffset(),c=parseInt(o.getTime()/1e3-(a.getTime()/1e3+60*s)),l=Pe(Object(i.useState)(c>0?c:0),2),f=l[0],p=l[1];Object(i.useEffect)((function(){var e=setInterval((function(){var n=f;(n-=1)>0?p(n):(clearInterval(e),t())}),1e3);return function(){return clearInterval(e)}}),[f]);return React.createElement("div",{className:"countdown"},React.createElement("i",{className:"fas fa-stopwatch"}),React.createElement("span",null,function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":",r=[];return n<3600?(r.push((f-f%60)/60),r.push(f%60)):n&&(r.push((f-f%3600)/3600),e=f%3600,r.push((e-e%60)/60),r.push(e%60)),r.map((function(e){return e<10?"0".concat(e):e})).join(t)}()))},ze=n(8);function Qe(e){return function(e){if(Array.isArray(e))return Ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ie(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||Ie(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(e,t){if(e){if("string"==typeof e)return Ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ce(e,t):void 0}}function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ne=lodash.debounce,Te=function(){var e=Ae(Object(i.useState)(0),2),t=e[0],n=e[1],r=Ae(Object(i.useState)(!1),2),o=r[0],a=r[1],s=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("results")}),[]),l=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("passingGrade")}),[]),f=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("id")}),[]);Object(i.useEffect)((function(){d();var e="";if(e=s.graduation?s.graduation:s.result>=v.replace(/[^0-9\.]+/g,"")?"passed":"failed"){var t=document.querySelector(".course-curriculum .course-item.course-item-".concat(f));t&&(t.classList.remove("failed","passed"),t.classList.add("has-status","status-completed",e))}var n=Qe(document.querySelectorAll("#popup-header .items-progress"))[0];if(n){var r=n.querySelector(".items-completed");if(r){parseInt(r.textContent);var o=document.querySelectorAll("#popup-sidebar .course-curriculum .course-item.status-completed");r.textContent=parseInt(o.length)}}p()}),[s]);var p=function(){var e=document.querySelectorAll(".popup-header__inner");e.length>0&&0===e[0].querySelectorAll("form.form-button-finish-course").length&&Object(ze.a)(e[0])},d=function(){n(0),a(!1),jQuery.easing._customEasing=function(e,t,n,r,o){return r*Math.sqrt(1-(t=t/o-1)*t)+n},Ne((function(){var e=jQuery("<span />").css({width:1,height:1}).appendTo(document.body);e.css("left",0).animate({left:s.result},{duration:1500,step:function(e,t){n(e)},done:function(){a(!0),e.remove(),jQuery("#quizResultGrade").css({transform:"scale(1.3)",transition:"all 0.25s"}),Ne((function(){jQuery("#quizResultGrade").css({transform:"scale(1)"})}),500)()},easing:"_customEasing"})}),s.result>0?1e3:10)()},m=t;Number.isInteger(t)||(m=parseFloat(t).toFixed(2));var b=190*Math.PI,y=b-m/100*b,h={strokeDasharray:"".concat(b," ").concat(b),strokeDashoffset:y},v=s.passingGrade||l,g="";g=s.graduation?s.graduation:m>=v.replace(/[^0-9\.]+/g,"")?"passed":"failed";var O="";O=s.graduationText?s.graduationText:"passed"===g?Object(c.__)("Passed","learnpress"):Object(c.__)("Failed","learnpress");var w=["quiz-result",g];return React.createElement("div",{className:w.join(" ")},React.createElement("h3",{className:"result-heading"},Object(c.__)("Your Result","learnpress")),React.createElement("div",{id:"quizResultGrade",className:"result-grade"},React.createElement("svg",{className:"circle-progress-bar",width:200,height:200},React.createElement("circle",{className:"circle-progress-bar__circle",stroke:"",strokeWidth:10,style:h,fill:"transparent",r:95,cx:100,cy:100})),React.createElement("span",{className:"result-achieved"},"".concat(m,"%")),React.createElement("span",{className:"result-require"},v||Object(c._x)("-","unknown passing grade value","learnpress"))),o&&React.createElement("p",{className:"result-message"},O),React.createElement("ul",{className:"result-statistic"},React.createElement("li",{className:"result-statistic-field result-time-spend"},React.createElement("span",null,Object(c.__)("Time spend","learnpress")),React.createElement("p",null,s.timeSpend)),React.createElement("li",{className:"result-statistic-field result-point"},React.createElement("span",null,Object(c.__)("Point","learnpress")),React.createElement("p",null,s.userMark," / ",s.mark)),React.createElement("li",{className:"result-statistic-field result-questions"},React.createElement("span",null,Object(c.__)("Questions","learnpress")),React.createElement("p",null,s.questionCount)),React.createElement("li",{className:"result-statistic-field result-questions-correct"},React.createElement("span",null,Object(c.__)("Correct","learnpress")),React.createElement("p",null,s.questionCorrect)),React.createElement("li",{className:"result-statistic-field result-questions-wrong"},React.createElement("span",null,Object(c.__)("Wrong","learnpress")),React.createElement("p",null,s.questionWrong)),React.createElement("li",{className:"result-statistic-field result-questions-skipped"},React.createElement("span",null,Object(c.__)("Skipped","learnpress")),React.createElement("p",null,s.questionEmpty))))},xe=jQuery,De=lodash.debounce,Me=function(){var e=Object(u.dispatch)("learnpress/quiz").submitQuiz;Object(i.useEffect)((function(){var e=xe("#popup-content");if(e.length){var t=e.find(".content-item-scrollable:eq(1)"),n=e.find(".content-item-wrap"),r=e.find(".quiz-status"),o=r.offset().top-92,i=!1,a="-"+n.css("margin-left");xe(window).on("resize.refresh-quiz-stauts-bar",De((function(){a="-"+n.css("margin-left"),r.css({"margin-left":a,"margin-right":a})}),100)).trigger("resize.refresh-quiz-stauts-bar"),t.on("scroll",(function(){if(t.scrollTop()>=o){if(i)return;i=!0}else{if(!i)return;i=!1}i?e.addClass("fixed-quiz-status"):e.removeClass("fixed-quiz-status")}))}}),[]);var t=Object(u.select)("learnpress/quiz"),n=t.getData,r=t.getUserMark,o=n("currentPage"),a=n("questionsPerPage"),s=n("questionIds").length,l=n("submitting"),f=n("totalTime"),p=n("duration"),d=r(),m=["quiz-status"],b=(o-1)*a+1,y=b+a-1,h="";return y=Math.min(y,s),l&&m.push("submitting"),h=y<s?a>1?Object(c.sprintf)(Object(c.__)("Question <span>%d to %d of %d</span>","learnpress"),b,y,s):Object(c.sprintf)(Object(c.__)("Question <span>%d of %d</span>","learnpress"),b,s):Object(c.sprintf)(Object(c.__)("Question <span>%d to %d</span>","learnpress"),b,y),React.createElement("div",{className:m.join(" ")},React.createElement("div",null,React.createElement("div",{className:"questions-index",dangerouslySetInnerHTML:{__html:h}}),React.createElement("div",{className:"current-point"},Object(c.sprintf)(Object(c.__)("Earned Point: %s","learnpress"),d)),React.createElement("div",null,React.createElement("div",{className:"submit-quiz"},React.createElement("button",{className:"lp-button",id:"button-submit-quiz",onClick:function t(){"no"!==(0,Object(u.select)("learnpress/modal").confirm)(Object(c.__)("Are you sure to submit quiz?","learnpress"),t)&&e()}},l?Object(c.__)("Submitting...","learnpress"):Object(c.__)("Finish Quiz","learnpress"))),f&&p&&React.createElement(ke,null))))};function Le(e){return function(e){if(Array.isArray(e))return Ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ue(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){Be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ge=lodash,Ke=(Ge.omit,Ge.flow),We=Ge.isArray,$e=Ge.chunk,Je=(LP.camelCaseDashObjectKeys,LP.localStorage),Ze=Je.get,Ye=Je.set,Ve={},Xe=function(e,t){var n=He(He({},e.answered[t.questionId]||{}),{},{answered:t.answers,temp:!0});return He(He({},e),{},{answered:He(He({},e.answered),{},Be({},t.questionId,n))})},et=function(e,t){var n=e.questionsRendered;return We(n)?(n.push(t.questionId),He(He({},e),{},{questionsRendered:Le(n)})):He(He({},e),{},{questionsRendered:[t.questionId]})},tt=function(e,t){return t.currentPage&&Ye("Q".concat(e.id,".currentPage"),t.currentPage),He(He({},e),t)},nt=function(e,t){var n=e.questions.map((function(e){return e.id==t.questionId?He(He({},e),{},{showHint:t.showHint}):e}));return He(He({},e),{},{questions:Le(n)})},rt=function(e,t){var n=e.questions.map((function(e){if(e.id!==t.questionId)return e;var n={explanation:t.explanation};return t.options&&(n.options=t.options),He(He({},e),n)}));return He(He({},e),{},{questions:Le(n),answered:He(He({},e.answered),{},Be({},t.questionId,t.result)),checkedQuestions:[].concat(Le(e.checkedQuestions),[t.questionId])})},ot=function(e,t){var n=e.questions.map((function(n){var r={};return e.reviewQuestions&&(t.results.questions[n.id].explanation&&(r.explanation=t.results.questions[n.id].explanation),t.results.questions[n.id].options&&(r.options=t.results.questions[n.id].options)),He(He({},n),r)}));return tt(e,He(He({submitting:!1,currentPage:1},t.results),{},{questions:Le(n)}))},it=function(e,t){var n=void 0!==t.results.success&&t.results.success,r=t.results.message||!1;return tt(e,He(He({checkedQuestions:[],hintedQuestions:[],mode:"",currentPage:1},t.results.results),{},{successResponse:n,messageResponse:r}))},at=Ke(u.combineReducers,(function(e){return function(t,n){return e(t,n)}}),(function(e){return function(t,n){return e(t,n)}}),(function(e){return function(t,n){return e(t,n)}}))({a:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{a:1};return e},b:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{b:2};return e}}),ut=Object(u.combineReducers)({blocks:at,userQuiz:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ve,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_QUIZ_DATA":1>t.data.questionsPerPage&&(t.data.questionsPerPage=1);var n=$e(e.questionIds||t.data.questionIds,t.data.questionsPerPage);return t.data.numPages=n.length,t.data.pages=n,He(He(He({},e),t.data),{},{currentPage:Ze("Q".concat(t.data.id,".currentPage"))||t.data.currentPage});case"SUBMIT_QUIZ":return He(He({},e),{},{submitting:!0});case"START_QUIZ":case"START_QUIZ_SUCCESS":return it(e,t);case"SET_CURRENT_QUESTION":return Ye("Q".concat(e.id,".currentQuestion"),t.questionId),He(He({},e),{},{currentQuestion:t.questionId});case"SET_CURRENT_PAGE":return Ye("Q".concat(e.id,".currentPage"),t.currentPage),He(He({},e),{},{currentPage:t.currentPage});case"SUBMIT_QUIZ_SUCCESS":return ot(e,t);case"UPDATE_USER_QUESTION_ANSWERS":return"started"===e.status?Xe(e,t):e;case"MARK_QUESTION_RENDERED":return et(e,t);case"SET_QUIZ_MODE":return"reviewing"==t.mode?tt(e,{mode:t.mode}):He(He({},e),{},{mode:t.mode});case"SET_QUESTION_HINT":return nt(e,t);case"CHECK_ANSWER":return rt(e,t);case"SEND_KEY":return He(He({},e),{},{keyPressed:t.keyPressed})}return e}}),st=n(9);function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var lt=regeneratorRuntime.mark(Et),ft=regeneratorRuntime.mark(Qt),pt=regeneratorRuntime.mark(It);function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mt(e){return function(e){if(Array.isArray(e))return bt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return bt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yt(){var e=[].slice.call(arguments,2),t=Object(u.dispatch)(arguments[0]),n=arguments[1];t[n].apply(t,mt(e))}var ht=LP,vt=ht.camelCaseDashObjectKeys,gt=ht.Hook;function Ot(e,t){return t="string"==typeof e?dt({},e,t):e,{type:"SET_QUIZ_DATA",data:vt(t)}}function wt(e){return{type:"SET_CURRENT_QUESTION",questionId:e}}function _t(e){return{type:"SET_CURRENT_PAGE",currentPage:e}}function jt(e,t,n){return{type:"BEFORE_START_QUIZ"}}function Rt(e,t,n,r){return gt.doAction("quiz-started",e,t,n,r),{type:"START_QUIZ_SUCCESS",quizId:t,courseId:n,userId:r,results:e}}var qt=regeneratorRuntime.mark((function e(){var t,n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Object(u.select)("learnpress/quiz").getDefaultRestArgs(),n=t.itemId,r=t.courseId,!0===gt.applyFilters("before-start-quiz",!0,n,r)){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,Object(st.apiFetch)({path:"lp/v1/users/start-quiz",method:"POST",data:{item_id:n,course_id:r}});case 6:return o=e.sent,o=gt.applyFilters("request-start-quiz-response",o,n,r),e.next=10,yt("learnpress/quiz","__requestStartQuizSuccess",vt(o),n,r);case 10:case"end":return e.stop()}}),e)}));function St(){return{type:"SUBMIT_QUIZ"}}function Pt(e,t,n){return gt.doAction("quiz-submitted",e,t,n),{type:"SUBMIT_QUIZ_SUCCESS",results:e}}function Et(){var e,t,n,r,o,i,a,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(e=Object(u.select)("learnpress/quiz"),t=e.getDefaultRestArgs,n=e.getQuestionsSelectedAnswers,r=t(),o=r.itemId,i=r.courseId,!0===gt.applyFilters("before-submit-quiz",!0)){c.next=5;break}return c.abrupt("return");case 5:return a=n(),c.next=8,Object(st.apiFetch)({path:"lp/v1/users/submit-quiz",method:"POST",data:{item_id:o,course_id:i,answered:a}});case 8:if(s=c.sent,!(s=gt.applyFilters("request-submit-quiz-response",s,o,i)).success){c.next=13;break}return c.next=13,yt("learnpress/quiz","__requestSubmitQuizSuccess",vt(s.results),o,i);case 13:case"end":return c.stop()}}),lt)}function kt(e,t,n){return{type:"UPDATE_USER_QUESTION_ANSWERS",questionId:e,answers:t}}function zt(e,t){return{type:"SET_QUESTION_HINT",questionId:e,showHint:t}}function Qt(e,t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,yt("learnpress/quiz","__requestShowHintSuccess",e,t);case 2:case"end":return n.stop()}}),ft)}function At(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:"CHECK_ANSWER",questionId:e},t)}function It(e){var t,n,r,o,i,a,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=Object(u.select)("learnpress/quiz"),n=t.getDefaultRestArgs,r=t.getQuestionAnswered,o=n(),i=o.itemId,a=o.courseId,c.next=4,Object(st.apiFetch)({path:"lp/v1/users/check-answer",method:"POST",data:{item_id:i,course_id:a,question_id:e,answered:r(e)||""}});case 4:return s=c.sent,c.next=7,yt("learnpress/quiz","__requestCheckAnswerSuccess",e,vt(s));case 7:case"end":return c.stop()}}),pt)}function Ct(e){return{type:"MARK_QUESTION_RENDERED",questionId:e}}function Nt(e){return{type:"SET_QUIZ_MODE",mode:e}}function Tt(e){return setTimeout((function(){yt("learnpress/quiz","sendKey","")}),300),{type:"SEND_KEY",keyPressed:e}}var xt=lodash,Dt=xt.get,Mt=xt.isArray,Lt=function(e,t){console.time("parseOptions");var n=Yt(e,t).options;return n=Mt(n)?n:JSON.parse(CryptoJS.AES.decrypt(n.data,n.key,{format:CryptoJSAesJson}).toString(CryptoJS.enc.Utf8)),n=Mt(n)?n:JSON.parse(n),console.timeEnd("parseOptions"),n};function Ut(e,t){var n=Object(u.select)("course-learner/user").getItemById(t);return n?Dt(n,"userSettings.status"):""}function Ft(e,t,n){return e[t]||n}function Ht(e,t){var n=Object(u.select)("course-learner/user").getItemById(t);return n?Dt(n,"userSettings.attempts"):[]}function Bt(e,t){var n=Object(u.select)("course-learner/user").getItemById(t);return n?Dt(n,"userSettings.answered",{}):{}}function Gt(e){var t=e.userQuiz,n=Dt(t,"questions");return n?Object.values(n):[]}function Kt(e,t){var n=e.userQuiz;return t?Dt(n,t):n}function Wt(e){var t=e.userQuiz;return{itemId:t.id,courseId:t.courseId}}function $t(e,t){var n=e.userQuiz;return Dt(n,"answered.".concat(t,".answered"))||void 0}function Jt(e,t){var n=e.userQuiz;return Dt(n,"answered.".concat(t,".mark"))||void 0}function Zt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Dt(e,"userQuiz.questionsPerPage")||1;if(n>1)return!1;var r=Dt(e,"userQuiz.currentPage")||1;return Dt(e,"object"===t?"userQuiz.questions[".concat(r-1,"]"):"userQuiz.questionIds[".concat(r-1,"]"))}var Yt=function(e,t){e.userQuiz;return Object(u.select)("learnpress/quiz").getQuestions().find((function(e){return e.id==t}))};function Vt(e,t){return-1!==(Dt(e,"userQuiz.checkedQuestions")||[]).indexOf(t)}function Xt(e,t){}var en=function(e,t){var n=Dt(e,"userQuiz.answered"),r={};for(var o in n)if(n.hasOwnProperty(o)&&(n[o].temp||n[o].blanks)){if(t&&o===t)return n[o].answered;r[o]=n[o].answered}return r};function tn(e){var t=e.userQuiz||{},n=t.answered,r=t.negativeMarking,o=t.questions,i=t.checkedQuestions,a=0,u=function(e){if(!n.hasOwnProperty(e))return s=e,"continue";e=parseInt(e);var t,u=n[e],c=u.questionMark?u.questionMark:(t=o.find((function(t){return s=e,t.id===e})),s=e,t?t.point:0);i.indexOf(e);if(u.temp)return s=e,"continue";r?u.answered&&(a=u.correct?a+u.mark:a-c):u.answered&&u.correct&&(a+=u.mark),s=e};for(var s in n)u(s);return a>0?a:0}var nn=n(6),rn=n.n(nn),on={ENROLL_COURSE_X:function(e,t){}};var an=function(e){var t=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},n={getState:e.getState,dispatch:function(){return t.apply(void 0,arguments)}};return t=rn()(on)(n)(e.dispatch),e.dispatch=t,e};function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cn=LP.dataControls.controls,ln=Object(u.registerStore)("learnpress/quiz",{reducer:ut,selectors:o,actions:r,controls:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?un(Object(n),!0).forEach((function(t){sn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},cn)});an(ln);function fn(e){return(fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mn(e,t){return(mn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vn(e);if(t){var o=vn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return yn(this,n)}}function yn(e,t){return!t||"object"!==fn(t)&&"function"!=typeof t?hn(e):t}function hn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vn(e){return(vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var On=lodash.chunk,wn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mn(e,t)}(i,e);var t,n,r,o=bn(i);function i(e){var t;return pn(this,i),gn(hn(t=o.apply(this,arguments)),"startQuiz",(function(e){t.props.startQuiz()})),t.state={currentPage:1,numPages:0,pages:[]},t}return t=i,(n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.settings,n=e.setQuizData,r=t.question_ids,o=t.questions_per_page,i=On(r,o);t.currentPage=1,t.numPages=i.length,t.pages=i,n(t)}},{key:"render",value:function(){var e=this.props,t=e.status,n=e.isReviewing,r=-1!==["","completed","viewed"].indexOf(t)||!t,o=-1!==["","viewed",void 0].indexOf(t)||!t;return void 0!==t&&React.createElement(React.Fragment,null,React.createElement("div",null,!n&&"completed"===t&&React.createElement(Te,null),!n&&o&&React.createElement(p,null),!n&&o&&React.createElement(s,null),"started"===t&&React.createElement(Me,null),(-1!==["completed","started"].indexOf(t)||n)&&React.createElement(qe,null),React.createElement(P,null),r&&!n&&React.createElement(Se,null)))}}])&&dn(t.prototype,n),r&&dn(t,r),i}(i.Component),_n=Object(a.compose)([Object(u.withSelect)((function(e){var t=e("learnpress/quiz"),n=t.getQuestions,r=t.getData;return{questions:n(),status:r("status"),store:r(),answered:r("answered"),isReviewing:"reviewing"===r("mode"),questionIds:r("questionIds"),checkCount:r("instantCheck"),questionsPerPage:r("questionsPerPage")||1}})),Object(u.withDispatch)((function(e){var t=e("learnpress/quiz");return{setQuizData:t.setQuizData,startQuiz:t.startQuiz}}))])(wn);n(10);function jn(e){return function(e){if(Array.isArray(e))return Rn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Rn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var qn=LP.modal.default,Sn=(t.default=_n,function(e,t){wp.element.render(React.createElement(qn,null,React.createElement(_n,{settings:t})),jn(document.querySelectorAll(e))[0]),LP.Hook.doAction("lp-quiz-compatible-builder")})}]);
|
1 |
+
this.LP=this.LP||{},this.LP.quiz=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}([function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.element},function(e,t,n){"use strict";var r=jQuery,o=null,i={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(o=this.elLPOverlay,this.elMainContent=o.find(".main-content"),this.elTitle=o.find(".modal-title"),this.elBtnYes=o.find(".btn-yes"),this.elBtnNo=o.find(".btn-no"),this.elFooter=o.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){o.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof i.callBackYes&&i.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}};t.a=i},function(e,t){e.exports=window.wp.compose},function(e,t,n){"use strict";var r=n(3),o=(jQuery,{elBtnFinishCourse:null,elBtnCompleteItem:null,init:function(){r.a.init()&&void 0!==lpGlobalSettings&&"yes"===lpGlobalSettings.option_enable_popup_confirm_finish&&(this.elBtnFinishCourse=document.querySelectorAll(".lp-btn-finish-course"),this.elBtnCompleteItem=document.querySelector(".lp-btn-complete-item"),this.elBtnCompleteItem&&this.elBtnCompleteItem.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");r.a.elLPOverlay.show(),r.a.setTitleModal(t.dataset.title),r.a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),r.a.callBackYes=function(){t.submit()}})),this.elBtnFinishCourse&&this.elBtnFinishCourse.forEach((function(e){return e.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");r.a.elLPOverlay.show(),r.a.setTitleModal(t.dataset.title),r.a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),r.a.callBackYes=function(){t.submit()}}))})))}});t.a=o},function(e,t){e.exports=window.wp.url},function(e,t,n){"use strict";e.exports=function(e){var t,n={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(n,e),(t=function(e){return function(t){return function(r){var o,i,a=n[r.type],u=t(r);if(a)for(o=0;o<a.length;o++)(i=a[o](r,e))&&e.dispatch(i);return u}}}).effects=n,t}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(6),o=n(5);function i(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=function(){var e=document.querySelectorAll(".popup-header__inner");if(e.length&&null===document.querySelector("#learn-press-quiz-app div.quiz-result")&&0===e[0].querySelectorAll("form.form-button-finish-course").length&&"IntersectionObserver"in window){var t=new IntersectionObserver((function(e,n){e.forEach((function(e){if(e.isIntersecting){var n=e.target;c(n),t.unobserve(n)}}))}));a(e).map((function(e){return t.observe(e)}))}},c=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiFetch({path:Object(r.addQueryArgs)("lp/v1/lazy-load/items-progress",{courseId:lpGlobalSettings.post_id||"",userId:lpGlobalSettings.user_id||""}),method:"GET"});case 2:n=e.sent,i=n.data,t.innerHTML+=i,o.a.init();case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function u(e){i(a,r,o,u,s,"next",e)}function s(e){i(a,r,o,u,s,"throw",e)}u(void 0)}))});return function(e){return t.apply(this,arguments)}}()},function(e,t){!function(){e.exports=this.LP.dataControls}()},function(e,t){function n(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}LP.Hook.addAction("lp-compatible-builder",(function(){LP.Hook.removeAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){Waypoint.refreshAll(),window.dispatchEvent(new Event("resize"))})),"undefined"!=typeof vc_js&&"undefined"!=typeof VcWaypoint&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){VcWaypoint.refreshAll()}))})),LP.Hook.addAction("lp-quiz-compatible-builder",(function(){return LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0})),LP.Hook.addAction("lp-question-compatible-builder",(function(){return LP.Hook.removeAction("lp-question-compatible-builder"),LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0}))},,function(e,t,n){var r;
|
2 |
/*!
|
3 |
Copyright (c) 2018 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&e.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var u in r)n.call(r,u)&&r[u]&&e.push(u);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return Sn}));var r={};n.r(r),n.d(r,"setQuizData",(function(){return Ot})),n.d(r,"setCurrentQuestion",(function(){return wt})),n.d(r,"setCurrentPage",(function(){return _t})),n.d(r,"__requestBeforeStartQuiz",(function(){return jt})),n.d(r,"__requestStartQuizSuccess",(function(){return Rt})),n.d(r,"startQuiz",(function(){return qt})),n.d(r,"__requestSubmitQuiz",(function(){return St})),n.d(r,"__requestSubmitQuizSuccess",(function(){return Et})),n.d(r,"submitQuiz",(function(){return Pt})),n.d(r,"updateUserQuestionAnswers",(function(){return kt})),n.d(r,"__requestShowHintSuccess",(function(){return zt})),n.d(r,"showHint",(function(){return At})),n.d(r,"__requestCheckAnswerSuccess",(function(){return Qt})),n.d(r,"checkAnswer",(function(){return It})),n.d(r,"markQuestionRendered",(function(){return Ct})),n.d(r,"setQuizMode",(function(){return Tt})),n.d(r,"sendKey",(function(){return Nt}));var o={};n.r(o),n.d(o,"getQuestionOptions",(function(){return Lt})),n.d(o,"getItemStatus",(function(){return Ut})),n.d(o,"getProp",(function(){return Ft})),n.d(o,"getQuizAttempts",(function(){return Ht})),n.d(o,"getQuizAnswered",(function(){return Bt})),n.d(o,"getQuestions",(function(){return Gt})),n.d(o,"getData",(function(){return Kt})),n.d(o,"getDefaultRestArgs",(function(){return Wt})),n.d(o,"getQuestionAnswered",(function(){return $t})),n.d(o,"getQuestionMark",(function(){return Jt})),n.d(o,"getCurrentQuestion",(function(){return Zt})),n.d(o,"getQuestion",(function(){return Yt})),n.d(o,"isCheckedAnswer",(function(){return Vt})),n.d(o,"isCorrect",(function(){return Xt})),n.d(o,"getQuestionsSelectedAnswers",(function(){return en})),n.d(o,"getUserMark",(function(){return tn}));var i=n(2),a=n(4),u=n(1),s=function(){var e=Object(u.select)("learnpress/quiz").getData("content");return React.createElement("div",{className:"quiz-content",dangerouslySetInnerHTML:{__html:e}})},c=n(0),l=function(e){var t;if(e>86400)t=(e-e%86400)/86400,e%=86400;else if(86400==e)return"24:00";var n=new Date(1e3*e).toUTCString().match(/\d{2}:\d{2}:\d{2}/)[0].split(":");return t&&(n[0]=parseInt(n[0])+24*t),n.join(":")},f=LP.Hook,p=function(){var e=function(e){return Object(u.select)("learnpress/quiz").getData(e)},t=f.applyFilters("quiz-meta-fields",{duration:{title:Object(c.__)("Duration:","learnpress"),name:"duration",content:l(e("duration"))||"--"},passingGrade:{title:Object(c.__)("Passing grade:","learnpress"),name:"passing-grade",content:e("passingGrade")||"--"},questionsCount:{title:Object(c.__)("Questions:","learnpress"),name:"questions-count",content:e("questionIds")?e("questionIds").length:0}});return t&&React.createElement(React.Fragment,null,React.createElement("ul",{className:"quiz-intro"},Object.values(t).map((function(e,t){var n=e.name||t;return React.createElement("li",{key:"quiz-intro-field-".concat(t),className:"quiz-intro-item quiz-intro-item--".concat(n)},React.createElement("div",{className:"quiz-intro-item__title",dangerouslySetInnerHTML:{__html:e.title}}),React.createElement("span",{className:"quiz-intro-item__content",dangerouslySetInnerHTML:{__html:e.content}}))}))))};function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?_(e):t}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(i,e);var t,n,r,o=O(i);function i(){var e;h(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return R(_(e=o.call.apply(o,[this].concat(n))),"startQuiz",(function(t){t&&t.preventDefault();var n=document.querySelector(".lp-button.start");n&&n.setAttribute("disabled","disabled");var r=e.props,o=r.startQuiz;if("completed"===r.status){var i=Object(u.select)("learnpress/modal"),a=i.confirm,s=i.isOpen;if("no"===a(Object(c.__)("Are you sure you want to retake quiz?","learnpress"),e.startQuiz))return void(!s()&&n&&n.removeAttribute("disabled"))}o()})),R(_(e),"nav",(function(t){return function(n){var r=e.props,o=r.questionNav,i=r.currentPage,a=r.numPages,u=r.setCurrentPage;switch(t){case"prev":i>1?i-=1:i="infinity"===o?a:1;break;default:i<a?i+=1:i="infinity"===o?1:a}u(i)}})),R(_(e),"moveTo",(function(t){return function(n){n.preventDefault();var r=e.props,o=r.numPages,i=r.setCurrentPage;t<1||t>o||i(t)}})),R(_(e),"isLast",(function(){var t=e.props;return t.currentPage===t.numPages})),R(_(e),"isFirst",(function(){return 1===e.props.currentPage})),R(_(e),"submit",(function(){var t=e.props.submitQuiz;"no"!==(0,Object(u.select)("learnpress/modal").confirm)(Object(c.__)("Are you sure to submit quiz?","learnpress"),e.submit)&&t()})),R(_(e),"setQuizMode",(function(t){return function(){(0,e.props.setQuizMode)(t)}})),R(_(e),"isReviewing",(function(){return e.props.isReviewing})),e}return t=i,(n=[{key:"pageNumbers",value:function(e){var t=this,n=this.props,r=n.numPages,o=n.currentPage;if(r<2)return"";(e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({numPages:r,currentPage:o,midSize:1,endSize:1,prevNext:!0},e||{})).endSize<1&&(e.endSize=1),e.midSize<0&&(e.midSize=1);var i=m(Array(r).keys()),a=!1;return React.createElement("div",{className:"nav-links"},e.prevNext&&!this.isFirst()&&React.createElement("button",{className:"page-numbers prev","data-type":"question-navx",onClick:this.nav("prev")},Object(c.__)("Prev","learnpress")),i.map((function(n){return(n+=1)===e.currentPage?(a=!0,React.createElement("span",{key:"page-number-".concat(n),className:"page-numbers current"},n)):n<=e.endSize||e.currentPage&&n>=e.currentPage-e.midSize&&n<=e.currentPage+e.midSize||n>e.numPages-e.endSize?(a=!0,React.createElement("button",{key:"page-number-".concat(n),className:"page-numbers",onClick:t.moveTo(n)},n)):a?(a=!1,React.createElement("span",{key:"page-number-".concat(n),className:"page-numbers dots"},"…")):""})),e.prevNext&&!this.isLast()&&React.createElement("button",{className:"page-numbers next","data-type":"question-navx",onClick:this.nav("next")},Object(c.__)("Next","learnpress")))}},{key:"render",value:function(){var e=this.props,t=e.status,n=e.questionNav,r=e.isReviewing,o=e.showReview,i=e.numPages,a=(e.question,e.questionsPerPage,e.canRetry),u=e.retakeNumber,s=["quiz-buttons"];("started"===t||r)&&s.push("align-center"),"questionNav"===n&&s.push("infinity"),this.isFirst()&&s.push("is-first"),this.isLast()&&s.push("is-last");var l=document.querySelector("#popup-sidebar"),f=document.querySelector("#learn-press-quiz-app"),p="";return p="started"===t||r?{marginLeft:l&&l.offsetWidth/2,width:f&&f.offsetWidth}:null,React.createElement(React.Fragment,null,React.createElement("div",{className:s.join(" ")},React.createElement("div",{className:"button-left"+("started"===t||r?" fixed":""),style:p},("completed"===t&&a||-1!==["","viewed"].indexOf(t))&&!r&&React.createElement("button",{className:"lp-button start",onClick:this.startQuiz},"completed"===t?"".concat(Object(c.__)("Retake","learnpress")).concat(u?" (".concat(u,")"):""):Object(c.__)("Start","learnpress")),("started"===t||r)&&i>1&&React.createElement(React.Fragment,null,React.createElement("div",{className:"questions-pagination"},this.pageNumbers()))),React.createElement("div",{className:"button-right"},"started"===t&&React.createElement(React.Fragment,null,("infinity"===n||this.isLast())&&!r&&React.createElement("button",{className:"lp-button submit-quiz",onClick:this.submit},Object(c.__)("Finish Quiz","learnpress"))),r&&o&&React.createElement("button",{className:"lp-button back-quiz",onClick:this.setQuizMode("")},Object(c.__)("Result","learnpress")),"completed"===t&&o&&!r&&React.createElement("button",{className:"lp-button review-quiz",onClick:this.setQuizMode("reviewing")},Object(c.__)("Review","learnpress")))),this.props.message&&!0!==this.props.success&&React.createElement("div",{className:"learn-press-message error"},this.props.message))}}])&&v(t.prototype,n),r&&v(t,r),i}(i.Component),S=Object(a.compose)(Object(u.withSelect)((function(e){var t=e("learnpress/quiz").getData;return{status:t("status"),showCheck:t("instantCheck"),checkedQuestions:t("checkedQuestions"),hintedQuestions:t("hintedQuestions"),questionsPerPage:t("questionsPerPage")}})))((function(e){var t=e.showCheck,n=e.checkedQuestions,r=e.hintedQuestions,o=e.question,i=e.status,a=e.type,u=e.Button;if("started"!==i)return!1;var s=React.createElement(u,{question:o});switch(a){case"hint":return r?!!o.hasHint&&(-1===r.indexOf(o.id)&&s):s;case"check":return!!t&&(n?-1===n.indexOf(o.id)&&s:s)}})),E=Object(a.compose)([Object(u.withSelect)((function(e){var t=e("learnpress/quiz"),n=t.getData,r=t.getCurrentQuestion,o={id:n("id"),status:n("status"),questionIds:n("questionIds"),questionNav:n("questionNav"),isReviewing:n("reviewQuestions")&&"reviewing"===n("mode"),showReview:n("reviewQuestions"),showCheck:n("instantCheck"),checkedQuestions:n("checkedQuestions"),hintedQuestions:n("hintedQuestions"),numPages:n("numPages"),pages:n("pages"),currentPage:n("currentPage"),questionsPerPage:n("questionsPerPage"),pageNumbers:n("pageNumbers"),keyPressed:n("keyPressed"),canRetry:n("retakeCount")>0&&n("retaken")<n("retakeCount"),retakeNumber:n("retakeCount")>0&&n("retaken")<n("retakeCount")?n("retakeCount")-n("retaken"):null,message:n("messageResponse")||!1,success:void 0===n("successResponse")||n("successResponse")};return 1===o.questionsPerPage&&(o.question=r("object")),o})),Object(u.withDispatch)((function(e,t){t.id;var n=e("learnpress/quiz"),r=n.startQuiz,o=n.setCurrentQuestion,i=n.submitQuiz,a=n.setQuizMode,u=n.showHint,s=n.checkAnswer;return{startQuiz:r,setCurrentQuestion:o,setQuizMode:a,setCurrentPage:n.setCurrentPage,submitQuiz:function(e){i(e)},showHint:function(e){u(e)},checkAnswer:function(e){s(e)}}}))])(q);function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function A(e,t){return(A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?C(e):t}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}(i,e);var t,n,r,o=Q(i);function i(){var e;k(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return N(C(e=o.call.apply(o,[this].concat(n))),"showHint",(function(){var t=e.props,n=t.showHint,r=t.question;n(r.id,!r.showHint)})),e}return t=i,(n=[{key:"render",value:function(){return this.props.question.hint?React.createElement("button",{className:"btn-show-hint",onClick:this.showHint},React.createElement("span",null,Object(c.__)("Hint","learnpress"))):""}}])&&z(t.prototype,n),r&&z(t,r),i}(i.Component),D=Object(a.compose)(Object(u.withDispatch)((function(e,t){t.id;var n=e("learnpress/quiz").showHint;return{showHint:function(e,t){n(e,t)}}})))(x),M=n(13),L=n.n(M);function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$(e);if(t){var o=$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return K(this,n)}}function K(e,t){return!t||"object"!==U(t)&&"function"!=typeof t?W(e):t}function W(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return($=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&B(e,t)}(i,e);var t,n,r,o=G(i);function i(){var e;return F(this,i),J(W(e=o.apply(this,arguments)),"checkAnswer",(function(){var t=e.props,n=t.checkAnswer,r=t.question;t.answered&&(n(r.id),e.setState({loading:!0}))})),e.state={loading:!1},e}return t=i,(n=[{key:"render",value:function(){var e=this.props.answered;return React.createElement(React.Fragment,null,React.createElement("button",{className:L()("lp-button","instant-check",{loading:this.state.loading,disable:!e}),onClick:this.checkAnswer},React.createElement("span",{className:"instant-check__icon"}),Object(c.__)("Check answer","learnpress"),!e&&React.createElement("div",{className:"instant-check__info",dangerouslySetInnerHTML:{__html:Object(c.__)("You need to answer the question before check answer.","learnpress")}})))}}])&&H(t.prototype,n),r&&H(t,r),i}(i.Component),Y=Object(a.compose)(Object(u.withSelect)((function(e,t){var n=t.question.id;return{answered:(0,e("learnpress/quiz").getQuestionAnswered)(n)}})),Object(u.withDispatch)((function(e,t){t.id;var n=e("learnpress/quiz").checkAnswer;return{checkAnswer:function(e){n(e)}}})))(Z),V=function(e){var t=e.question,n={"instant-check":function(){return React.createElement(S,{type:"check",Button:Y,question:t})},hint:function(){return React.createElement(S,{type:"hint",Button:D,question:t})}};return React.createElement(React.Fragment,null,LP.config.questionFooterButtons().map((function(e){return React.createElement(i.Fragment,{key:"button-".concat(e)},n[e]&&n[e]())})))};function X(e){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=se(e);if(t){var o=se(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ae(this,n)}}function ae(e,t){return!t||"object"!==X(t)&&"function"!=typeof t?ue(e):t}function ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var le=window.jQuery,fe=lodash,pe=(fe.uniqueId,fe.isArray),de=(fe.isNumber,fe.bind,function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oe(e,t)}(a,e);var t,n,r,o=ie(a);function a(){var e;return ne(this,a),ce(ue(e=o.apply(this,arguments)),"setRef",(function(t){e.$wrap=le(t)})),ce(ue(e),"parseOptions",(function(e){return e&&(e=pe(e)?e:JSON.parse(CryptoJS.AES.decrypt(e.data,e.key,{format:CryptoJSAesJson}).toString(CryptoJS.enc.Utf8)),e=pe(e)?e:JSON.parse(e)),e||[]})),ce(ue(e),"getWrapperClass",(function(){var t=e.props,n=t.question,r=(t.answered,["question","question-"+n.type]),o=e.parseOptions(n.options);return o.length&&void 0!==o[0].isTrue&&r.push("question-answered"),r})),ce(ue(e),"getEditLink",(function(){var t=e.props,n=t.question,r=t.editPermalink;return r?r.replace(/post=([0-9]{3,4})/,"post=".concat(n.id)):""})),ce(ue(e),"editPermalink",(function(e){return Object(c.sprintf)('<a href="%s">%s</a>',e,Object(c.__)("Edit","learnpress"))})),e.state={time:null,showHint:!1},e.$wrap=null,e}return t=a,(n=[{key:"componentDidMount",value:function(e){var t=this.props,n=t.question,r=t.isCurrent,o=t.markQuestionRendered;return r&&o(n.id),this.state.time||this.setState({time:new Date}),LP.Hook.doAction("lp-question-compatible-builder"),e}},{key:"render",value:function(){var e=this,t=this.props,n=t.question,r=t.isShow,o=t.isShowIndex,a=(t.isShowHint,t.status),u=LP.questionTypes.default,s=this.getEditLink();s&&jQuery("#wp-admin-bar-edit-lp_question").find(".ab-item").attr("href",s);var l={index:function(){return o?React.createElement("span",{className:"question-index"},o,"."):""},title:function(){return React.createElement("span",{dangerouslySetInnerHTML:{__html:n.title}})},hint:function(){return React.createElement(D,{question:n})},"edit-permalink":function(){return s&&React.createElement("span",{dangerouslySetInnerHTML:{__html:e.editPermalink(s)},className:"edit-link"})}},f={title:function(){return React.createElement("h4",{className:"question-title"},LP.config.questionTitleParts().map((function(e){return React.createElement(i.Fragment,{key:"title-part-".concat(e)},l[e]&&l[e]())})))},content:function(){return React.createElement("div",{className:"question-content",dangerouslySetInnerHTML:{__html:n.content}})},"answer-options":function(){return e.$wrap&&React.createElement(u,te(te({},e.props),{},{$wrap:e.$wrap}))},explanation:function(){return n.explanation&&React.createElement(React.Fragment,null,React.createElement("div",{className:"question-explanation-content"},React.createElement("strong",{className:"explanation-title"},Object(c.__)("Explanation:","learnpress")),React.createElement("div",{dangerouslySetInnerHTML:{__html:n.explanation}})))},hint:function(){return n.hint&&!n.explanation&&n.showHint&&React.createElement(React.Fragment,null,React.createElement("div",{className:"question-hint-content"},React.createElement("strong",{className:"hint-title"},Object(c.__)("Hint:","learnpress")),React.createElement("div",{dangerouslySetInnerHTML:{__html:n.hint}})))},buttons:function(){return"started"===a&&React.createElement(V,{question:n})}},p=LP.config.questionBlocks();return React.createElement(React.Fragment,null,React.createElement("div",{className:this.getWrapperClass().join(" "),style:{display:r?"":"none"},"data-id":n.id,ref:this.setRef},p.map((function(e){return React.createElement(i.Fragment,{key:"block-".concat(e)},f[e]?f[e]():"")}))))}}])&&re(t.prototype,n),r&&re(t,r),a}(i.Component)),me=Object(a.compose)([Object(u.withSelect)((function(e,t){var n=t.question.id,r=e("learnpress/quiz"),o=r.getData,i=r.getQuestionAnswered,a=r.getQuestionMark;return{status:o("status"),questions:o("question"),answered:i(n),questionsRendered:o("questionsRendered"),editPermalink:o("editPermalink"),numPages:o("numPages"),mark:a(n)||""}})),Object(u.withDispatch)((function(e){var t=e("learnpress/quiz"),n=t.updateUserQuestionAnswers;return{markQuestionRendered:t.markQuestionRendered,updateUserQuestionAnswers:n}}))])(de);function be(e){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_e(e);if(t){var o=_e(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Oe(this,n)}}function Oe(e,t){return!t||"object"!==be(t)&&"function"!=typeof t?we(e):t}function we(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _e(e){return(_e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ve(e,t)}(i,e);var t,n,r,o=ge(i);function i(e){var t;return ye(this,i),je(we(t=o.apply(this,arguments)),"startQuiz",(function(e){e.preventDefault(),(0,t.props.startQuiz)()})),je(we(t),"isInVisibleRange",(function(e,n){var r=t.props,o=r.currentPage,i=r.questionsPerPage;return o===Math.ceil(n/i)})),je(we(t),"nav",(function(e){var n=t.props.sendKey;switch(e.keyCode){case 37:return n("left");case 38:return;case 39:return n("right");case 40:return;default:e.keyCode>=49&&e.keyCode<=57&&n(e.keyCode-48)}})),t.needToTop=!1,t.state={isReviewing:null,currentPage:0,self:we(t)},t}return t=i,r=[{key:"getDerivedStateFromProps",value:function(e,t){for(var n=["isReviewing","currentPage"],r={},o=0;o<n.length;o++)e[n[o]]!==t[n[o]]&&(r[n[o]]=e[n[o]]);return Object.values(r).length?(t.self.needToTop=!0,r):null}}],(n=[{key:"componentDidUpdate",value:function(){this.needToTop&&(jQuery("#popup-content").animate({scrollTop:0}).find(".content-item-scrollable:last").animate({scrollTop:0}),this.needToTop=!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.status,r=t.currentQuestion,o=t.questions,i=t.questionsRendered,a=t.isReviewing,u=t.questionsPerPage,s=!0;return"completed"!==n||a||(s=!1),React.createElement(React.Fragment,null,React.createElement("div",{tabIndex:100,onKeyUp:this.nav},React.createElement("div",{className:"quiz-questions",style:{display:s?"":"none"}},o.map((function(t,n){var o=!u&&r===t.id,a=i&&-1!==i.indexOf(t.id),s=e.isInVisibleRange(t.id,n+1);return a||!a||s?React.createElement(me,{key:"loop-question-".concat(t.id),isCurrent:o,isShow:s,isShowIndex:!!u&&n+1,questionsPerPage:u,question:t}):""})))))}}])&&he(t.prototype,n),r&&he(t,r),i}(i.Component),qe=Object(a.compose)(Object(u.withSelect)((function(e,t,n){var r=e("learnpress/quiz"),o=r.getData,i=r.getQuestions;return{status:o("status"),currentQuestion:o("currentQuestion"),questions:i(),questionsRendered:o("questionsRendered"),isReviewing:"reviewing"===o("mode"),numPages:o("numPages"),currentPage:o("currentPage"),questionsPerPage:o("questionsPerPage")||1}})),Object(u.withDispatch)((function(e){var t=e("learnpress/quiz");return{startQuiz:t.startQuiz,sendKey:t.sendKey}})))(Re),Se=function(){var e=Object(u.select)("learnpress/quiz").getData("attempts")||[],t=e&&!!e.length;return!!t&&React.createElement(React.Fragment,null,React.createElement("div",{className:"quiz-attempts"},React.createElement("h4",{className:"attempts-heading"},Object(c.__)("Last Attempted","learnpress")),t&&React.createElement("table",null,React.createElement("thead",null,React.createElement("tr",null,React.createElement("th",{className:"quiz-attempts__questions"},Object(c.__)("Questions","learnpress")),React.createElement("th",{className:"quiz-attempts__spend"},Object(c.__)("Time spend","learnpress")),React.createElement("th",{className:"quiz-attempts__marks"},Object(c.__)("Marks","learnpress")),React.createElement("th",{className:"quiz-attempts__grade"},Object(c.__)("Passing grade","learnpress")),React.createElement("th",{className:"quiz-attempts__result"},Object(c.__)("Result","learnpress")))),React.createElement("tbody",null,e.map((function(e,t){return React.createElement("tr",{key:"attempt-".concat(t)},React.createElement("td",{className:"quiz-attempts__questions"},"".concat(e.questionCorrect," / ").concat(e.questionCount)),React.createElement("td",{className:"quiz-attempts__spend"},e.timeSpend||"--"),React.createElement("td",{className:"quiz-attempts__marks"},"".concat(e.userMark," / ").concat(e.mark)),React.createElement("td",{className:"quiz-attempts__grade"},e.passingGrade||_x("-","unknown passing grade value","learnpress")),React.createElement("td",{className:"quiz-attempts__result"},"".concat(parseFloat(e.result).toFixed(2),"%")," ",React.createElement("span",null,e.graduationText)))}))))))};function Ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ke=function(){var e=Object(u.select)("learnpress/quiz").getData,t=Object(u.dispatch)("learnpress/quiz").submitQuiz,n=e("totalTime")?e("totalTime"):e("duration"),r=e("endTime"),o=new Date(r.replace(/-/g,"/")),a=new Date,s=(new Date).getTimezoneOffset(),c=parseInt(o.getTime()/1e3-(a.getTime()/1e3+60*s)),l=Ee(Object(i.useState)(c>0?c:0),2),f=l[0],p=l[1];Object(i.useEffect)((function(){var e=setInterval((function(){var n=f;(n-=1)>0?p(n):(clearInterval(e),t())}),1e3);return function(){return clearInterval(e)}}),[f]);return React.createElement("div",{className:"countdown"},React.createElement("i",{className:"fas fa-stopwatch"}),React.createElement("span",null,function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":",r=[];return n<3600?(r.push((f-f%60)/60),r.push(f%60)):n&&(r.push((f-f%3600)/3600),e=f%3600,r.push((e-e%60)/60),r.push(e%60)),r.map((function(e){return e<10?"0".concat(e):e})).join(t)}()))},ze=n(9);function Ae(e){return function(e){if(Array.isArray(e))return Ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ie(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||Ie(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(e,t){if(e){if("string"==typeof e)return Ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ce(e,t):void 0}}function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Te=lodash.debounce,Ne=function(){var e=Qe(Object(i.useState)(0),2),t=e[0],n=e[1],r=Qe(Object(i.useState)(!1),2),o=r[0],a=r[1],s=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("results")}),[]),l=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("passingGrade")}),[]),f=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("id")}),[]),p=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("submitting")}),[]);Object(i.useEffect)((function(){m();var e="";if(e=s.graduation?s.graduation:s.result>=g.replace(/[^0-9\.]+/g,"")?"passed":"failed"){var t=document.querySelector(".course-curriculum .course-item.course-item-".concat(f));t&&(t.classList.remove("failed","passed"),t.classList.add("has-status","status-completed",e))}var n=Ae(document.querySelectorAll("#popup-header .items-progress"))[0];if(n){var r=n.querySelector(".items-completed");if(r){parseInt(r.textContent);var o=document.querySelectorAll("#popup-sidebar .course-curriculum .course-item.status-completed");r.textContent=parseInt(o.length)}}}),[s]),Object(i.useEffect)((function(){void 0!==p&&d()}),[p]);var d=function(){var e=document.querySelectorAll(".popup-header__inner");e.length>0&&0===e[0].querySelectorAll("form.form-button-finish-course").length&&Object(ze.a)(e[0])},m=function(){n(0),a(!1),jQuery.easing._customEasing=function(e,t,n,r,o){return r*Math.sqrt(1-(t=t/o-1)*t)+n},Te((function(){var e=jQuery("<span />").css({width:1,height:1}).appendTo(document.body);e.css("left",0).animate({left:s.result},{duration:1500,step:function(e,t){n(e)},done:function(){a(!0),e.remove(),jQuery("#quizResultGrade").css({transform:"scale(1.3)",transition:"all 0.25s"}),Te((function(){jQuery("#quizResultGrade").css({transform:"scale(1)"})}),500)()},easing:"_customEasing"})}),s.result>0?1e3:10)()},b=t;Number.isInteger(t)||(b=parseFloat(t).toFixed(2));var y=190*Math.PI,h=y-b/100*y,v={strokeDasharray:"".concat(y," ").concat(y),strokeDashoffset:h},g=s.passingGrade||l,O="";O=s.graduation?s.graduation:b>=g.replace(/[^0-9\.]+/g,"")?"passed":"failed";var w="";w=s.graduationText?s.graduationText:"passed"===O?Object(c.__)("Passed","learnpress"):Object(c.__)("Failed","learnpress");var _=["quiz-result",O];return React.createElement("div",{className:_.join(" ")},React.createElement("h3",{className:"result-heading"},Object(c.__)("Your Result","learnpress")),React.createElement("div",{id:"quizResultGrade",className:"result-grade"},React.createElement("svg",{className:"circle-progress-bar",width:200,height:200},React.createElement("circle",{className:"circle-progress-bar__circle",stroke:"",strokeWidth:10,style:v,fill:"transparent",r:95,cx:100,cy:100})),React.createElement("span",{className:"result-achieved"},"".concat(b,"%")),React.createElement("span",{className:"result-require"},g||_x("-","unknown passing grade value","learnpress"))),o&&React.createElement("p",{className:"result-message"},w),React.createElement("ul",{className:"result-statistic"},React.createElement("li",{className:"result-statistic-field result-time-spend"},React.createElement("span",null,Object(c.__)("Time spend","learnpress")),React.createElement("p",null,s.timeSpend)),React.createElement("li",{className:"result-statistic-field result-point"},React.createElement("span",null,Object(c.__)("Point","learnpress")),React.createElement("p",null,s.userMark," / ",s.mark)),React.createElement("li",{className:"result-statistic-field result-questions"},React.createElement("span",null,Object(c.__)("Questions","learnpress")),React.createElement("p",null,s.questionCount)),React.createElement("li",{className:"result-statistic-field result-questions-correct"},React.createElement("span",null,Object(c.__)("Correct","learnpress")),React.createElement("p",null,s.questionCorrect)),React.createElement("li",{className:"result-statistic-field result-questions-wrong"},React.createElement("span",null,Object(c.__)("Wrong","learnpress")),React.createElement("p",null,s.questionWrong)),React.createElement("li",{className:"result-statistic-field result-questions-skipped"},React.createElement("span",null,Object(c.__)("Skipped","learnpress")),React.createElement("p",null,s.questionEmpty))))},xe=jQuery,De=lodash.debounce,Me=function(){var e=Object(u.dispatch)("learnpress/quiz").submitQuiz;Object(i.useEffect)((function(){var e=xe("#popup-content");if(e.length){var t=e.find(".content-item-scrollable:eq(1)"),n=e.find(".content-item-wrap"),r=e.find(".quiz-status"),o=r.offset().top-92,i=!1,a="-"+n.css("margin-left");xe(window).on("resize.refresh-quiz-stauts-bar",De((function(){a="-"+n.css("margin-left"),r.css({"margin-left":a,"margin-right":a})}),100)).trigger("resize.refresh-quiz-stauts-bar"),t.on("scroll",(function(){if(t.scrollTop()>=o){if(i)return;i=!0}else{if(!i)return;i=!1}i?e.addClass("fixed-quiz-status"):e.removeClass("fixed-quiz-status")}))}}),[]);var t=Object(u.select)("learnpress/quiz"),n=t.getData,r=t.getUserMark,o=n("currentPage"),a=n("questionsPerPage"),s=n("questionIds").length,l=n("submitting"),f=n("totalTime"),p=n("duration"),d=r(),m=["quiz-status"],b=(o-1)*a+1,y=b+a-1,h="";return y=Math.min(y,s),l&&m.push("submitting"),h=y<s?a>1?Object(c.sprintf)(Object(c.__)("Question <span>%d to %d of %d</span>","learnpress"),b,y,s):Object(c.sprintf)(Object(c.__)("Question <span>%d of %d</span>","learnpress"),b,s):Object(c.sprintf)(Object(c.__)("Question <span>%d to %d</span>","learnpress"),b,y),React.createElement("div",{className:m.join(" ")},React.createElement("div",null,React.createElement("div",{className:"questions-index",dangerouslySetInnerHTML:{__html:h}}),React.createElement("div",{className:"current-point"},Object(c.sprintf)(Object(c.__)("Earned Point: %s","learnpress"),d)),React.createElement("div",null,React.createElement("div",{className:"submit-quiz"},React.createElement("button",{className:"lp-button",id:"button-submit-quiz",onClick:function t(){"no"!==(0,Object(u.select)("learnpress/modal").confirm)(Object(c.__)("Are you sure to submit quiz?","learnpress"),t)&&e()}},l?Object(c.__)("Submitting...","learnpress"):Object(c.__)("Finish Quiz","learnpress"))),f&&p&&React.createElement(ke,null))))};function Le(e){return function(e){if(Array.isArray(e))return Ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ue(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){Be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ge=lodash,Ke=(Ge.omit,Ge.flow),We=Ge.isArray,$e=Ge.chunk,Je=(LP.camelCaseDashObjectKeys,LP.localStorage),Ze=Je.get,Ye=Je.set,Ve={},Xe=function(e,t){var n=He(He({},e.answered[t.questionId]||{}),{},{answered:t.answers,temp:!0});return He(He({},e),{},{answered:He(He({},e.answered),{},Be({},t.questionId,n))})},et=function(e,t){var n=e.questionsRendered;return We(n)?(n.push(t.questionId),He(He({},e),{},{questionsRendered:Le(n)})):He(He({},e),{},{questionsRendered:[t.questionId]})},tt=function(e,t){return t.currentPage&&Ye("Q".concat(e.id,".currentPage"),t.currentPage),He(He({},e),t)},nt=function(e,t){var n=e.questions.map((function(e){return e.id==t.questionId?He(He({},e),{},{showHint:t.showHint}):e}));return He(He({},e),{},{questions:Le(n)})},rt=function(e,t){var n=e.questions.map((function(e){if(e.id!==t.questionId)return e;var n={explanation:t.explanation};return t.options&&(n.options=t.options),He(He({},e),n)}));return He(He({},e),{},{questions:Le(n),answered:He(He({},e.answered),{},Be({},t.questionId,t.result)),checkedQuestions:[].concat(Le(e.checkedQuestions),[t.questionId])})},ot=function(e,t){var n=e.questions.map((function(n){var r={};return e.reviewQuestions&&(t.results.questions[n.id].explanation&&(r.explanation=t.results.questions[n.id].explanation),t.results.questions[n.id].options&&(r.options=t.results.questions[n.id].options)),He(He({},n),r)}));return tt(e,He(He({submitting:!1,currentPage:1},t.results),{},{questions:Le(n)}))},it=function(e,t){var n=void 0!==t.results.success&&t.results.success,r=t.results.message||!1;return tt(e,He(He({checkedQuestions:[],hintedQuestions:[],mode:"",currentPage:1},t.results.results),{},{successResponse:n,messageResponse:r}))},at=Ke(u.combineReducers,(function(e){return function(t,n){return e(t,n)}}),(function(e){return function(t,n){return e(t,n)}}),(function(e){return function(t,n){return e(t,n)}}))({a:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{a:1};return e},b:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{b:2};return e}}),ut=Object(u.combineReducers)({blocks:at,userQuiz:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ve,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_QUIZ_DATA":1>t.data.questionsPerPage&&(t.data.questionsPerPage=1);var n=$e(e.questionIds||t.data.questionIds,t.data.questionsPerPage);return t.data.numPages=n.length,t.data.pages=n,He(He(He({},e),t.data),{},{currentPage:Ze("Q".concat(t.data.id,".currentPage"))||t.data.currentPage});case"SUBMIT_QUIZ":return He(He({},e),{},{submitting:!0});case"START_QUIZ":case"START_QUIZ_SUCCESS":return it(e,t);case"SET_CURRENT_QUESTION":return Ye("Q".concat(e.id,".currentQuestion"),t.questionId),He(He({},e),{},{currentQuestion:t.questionId});case"SET_CURRENT_PAGE":return Ye("Q".concat(e.id,".currentPage"),t.currentPage),He(He({},e),{},{currentPage:t.currentPage});case"SUBMIT_QUIZ_SUCCESS":return ot(e,t);case"UPDATE_USER_QUESTION_ANSWERS":return"started"===e.status?Xe(e,t):e;case"MARK_QUESTION_RENDERED":return et(e,t);case"SET_QUIZ_MODE":return"reviewing"==t.mode?tt(e,{mode:t.mode}):He(He({},e),{},{mode:t.mode});case"SET_QUESTION_HINT":return nt(e,t);case"CHECK_ANSWER":return rt(e,t);case"SEND_KEY":return He(He({},e),{},{keyPressed:t.keyPressed})}return e}}),st=n(10);function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var lt=regeneratorRuntime.mark(Pt),ft=regeneratorRuntime.mark(At),pt=regeneratorRuntime.mark(It);function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mt(e){return function(e){if(Array.isArray(e))return bt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return bt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yt(){var e=[].slice.call(arguments,2),t=Object(u.dispatch)(arguments[0]),n=arguments[1];t[n].apply(t,mt(e))}var ht=LP,vt=ht.camelCaseDashObjectKeys,gt=ht.Hook;function Ot(e,t){return t="string"==typeof e?dt({},e,t):e,{type:"SET_QUIZ_DATA",data:vt(t)}}function wt(e){return{type:"SET_CURRENT_QUESTION",questionId:e}}function _t(e){return{type:"SET_CURRENT_PAGE",currentPage:e}}function jt(e,t,n){return{type:"BEFORE_START_QUIZ"}}function Rt(e,t,n,r){return gt.doAction("quiz-started",e,t,n,r),{type:"START_QUIZ_SUCCESS",quizId:t,courseId:n,userId:r,results:e}}var qt=regeneratorRuntime.mark((function e(){var t,n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Object(u.select)("learnpress/quiz").getDefaultRestArgs(),n=t.itemId,r=t.courseId,!0===gt.applyFilters("before-start-quiz",!0,n,r)){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,Object(st.apiFetch)({path:"lp/v1/users/start-quiz",method:"POST",data:{item_id:n,course_id:r}});case 6:return o=e.sent,o=gt.applyFilters("request-start-quiz-response",o,n,r),e.next=10,yt("learnpress/quiz","__requestStartQuizSuccess",vt(o),n,r);case 10:case"end":return e.stop()}}),e)}));function St(){return{type:"SUBMIT_QUIZ"}}function Et(e,t,n){return gt.doAction("quiz-submitted",e,t,n),{type:"SUBMIT_QUIZ_SUCCESS",results:e}}function Pt(){var e,t,n,r,o,i,a,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(e=Object(u.select)("learnpress/quiz"),t=e.getDefaultRestArgs,n=e.getQuestionsSelectedAnswers,r=t(),o=r.itemId,i=r.courseId,!0===gt.applyFilters("before-submit-quiz",!0)){c.next=5;break}return c.abrupt("return");case 5:return a=n(),c.next=8,Object(st.apiFetch)({path:"lp/v1/users/submit-quiz",method:"POST",data:{item_id:o,course_id:i,answered:a}});case 8:if(s=c.sent,!(s=gt.applyFilters("request-submit-quiz-response",s,o,i)).success){c.next=13;break}return c.next=13,yt("learnpress/quiz","__requestSubmitQuizSuccess",vt(s.results),o,i);case 13:case"end":return c.stop()}}),lt)}function kt(e,t,n){return{type:"UPDATE_USER_QUESTION_ANSWERS",questionId:e,answers:t}}function zt(e,t){return{type:"SET_QUESTION_HINT",questionId:e,showHint:t}}function At(e,t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,yt("learnpress/quiz","__requestShowHintSuccess",e,t);case 2:case"end":return n.stop()}}),ft)}function Qt(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:"CHECK_ANSWER",questionId:e},t)}function It(e){var t,n,r,o,i,a,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=Object(u.select)("learnpress/quiz"),n=t.getDefaultRestArgs,r=t.getQuestionAnswered,o=n(),i=o.itemId,a=o.courseId,c.next=4,Object(st.apiFetch)({path:"lp/v1/users/check-answer",method:"POST",data:{item_id:i,course_id:a,question_id:e,answered:r(e)||""}});case 4:return s=c.sent,c.next=7,yt("learnpress/quiz","__requestCheckAnswerSuccess",e,vt(s));case 7:case"end":return c.stop()}}),pt)}function Ct(e){return{type:"MARK_QUESTION_RENDERED",questionId:e}}function Tt(e){return{type:"SET_QUIZ_MODE",mode:e}}function Nt(e){return setTimeout((function(){yt("learnpress/quiz","sendKey","")}),300),{type:"SEND_KEY",keyPressed:e}}var xt=lodash,Dt=xt.get,Mt=xt.isArray,Lt=function(e,t){console.time("parseOptions");var n=Yt(e,t).options;return n=Mt(n)?n:JSON.parse(CryptoJS.AES.decrypt(n.data,n.key,{format:CryptoJSAesJson}).toString(CryptoJS.enc.Utf8)),n=Mt(n)?n:JSON.parse(n),console.timeEnd("parseOptions"),n};function Ut(e,t){var n=Object(u.select)("course-learner/user").getItemById(t);return n?Dt(n,"userSettings.status"):""}function Ft(e,t,n){return e[t]||n}function Ht(e,t){var n=Object(u.select)("course-learner/user").getItemById(t);return n?Dt(n,"userSettings.attempts"):[]}function Bt(e,t){var n=Object(u.select)("course-learner/user").getItemById(t);return n?Dt(n,"userSettings.answered",{}):{}}function Gt(e){var t=e.userQuiz,n=Dt(t,"questions");return n?Object.values(n):[]}function Kt(e,t){var n=e.userQuiz;return t?Dt(n,t):n}function Wt(e){var t=e.userQuiz;return{itemId:t.id,courseId:t.courseId}}function $t(e,t){var n=e.userQuiz;return Dt(n,"answered.".concat(t,".answered"))||void 0}function Jt(e,t){var n=e.userQuiz;return Dt(n,"answered.".concat(t,".mark"))||void 0}function Zt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Dt(e,"userQuiz.questionsPerPage")||1;if(n>1)return!1;var r=Dt(e,"userQuiz.currentPage")||1;return Dt(e,"object"===t?"userQuiz.questions[".concat(r-1,"]"):"userQuiz.questionIds[".concat(r-1,"]"))}var Yt=function(e,t){e.userQuiz;return Object(u.select)("learnpress/quiz").getQuestions().find((function(e){return e.id==t}))};function Vt(e,t){return-1!==(Dt(e,"userQuiz.checkedQuestions")||[]).indexOf(t)}function Xt(e,t){}var en=function(e,t){var n=Dt(e,"userQuiz.answered"),r={};for(var o in n)if(n.hasOwnProperty(o)&&(n[o].temp||n[o].blanks)){if(t&&o===t)return n[o].answered;r[o]=n[o].answered}return r};function tn(e){var t=e.userQuiz||{},n=t.answered,r=t.negativeMarking,o=t.questions,i=t.checkedQuestions,a=0,u=function(e){if(!n.hasOwnProperty(e))return s=e,"continue";e=parseInt(e);var t,u=n[e],c=u.questionMark?u.questionMark:(t=o.find((function(t){return s=e,t.id===e})),s=e,t?t.point:0);i.indexOf(e);if(u.temp)return s=e,"continue";r?u.answered&&(a=u.correct?a+u.mark:a-c):u.answered&&u.correct&&(a+=u.mark),s=e};for(var s in n)u(s);return a>0?a:0}var nn=n(7),rn=n.n(nn),on={ENROLL_COURSE_X:function(e,t){}};var an=function(e){var t=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},n={getState:e.getState,dispatch:function(){return t.apply(void 0,arguments)}};return t=rn()(on)(n)(e.dispatch),e.dispatch=t,e};function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cn=LP.dataControls.controls,ln=Object(u.registerStore)("learnpress/quiz",{reducer:ut,selectors:o,actions:r,controls:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?un(Object(n),!0).forEach((function(t){sn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},cn)});an(ln);function fn(e){return(fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mn(e,t){return(mn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vn(e);if(t){var o=vn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return yn(this,n)}}function yn(e,t){return!t||"object"!==fn(t)&&"function"!=typeof t?hn(e):t}function hn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vn(e){return(vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var On=lodash.chunk,wn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mn(e,t)}(i,e);var t,n,r,o=bn(i);function i(e){var t;return pn(this,i),gn(hn(t=o.apply(this,arguments)),"startQuiz",(function(e){t.props.startQuiz()})),t.state={currentPage:1,numPages:0,pages:[]},t}return t=i,(n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.settings,n=e.setQuizData,r=t.question_ids,o=t.questions_per_page,i=On(r,o);t.currentPage=1,t.numPages=i.length,t.pages=i,n(t)}},{key:"render",value:function(){var e=this.props,t=e.status,n=e.isReviewing,r=-1!==["","completed","viewed"].indexOf(t)||!t,o=-1!==["","viewed",void 0].indexOf(t)||!t;return void 0!==t&&React.createElement(React.Fragment,null,React.createElement("div",null,!n&&"completed"===t&&React.createElement(Ne,null),!n&&o&&React.createElement(p,null),!n&&o&&React.createElement(s,null),"started"===t&&React.createElement(Me,null),(-1!==["completed","started"].indexOf(t)||n)&&React.createElement(qe,null),React.createElement(E,null),r&&!n&&React.createElement(Se,null)))}}])&&dn(t.prototype,n),r&&dn(t,r),i}(i.Component),_n=Object(a.compose)([Object(u.withSelect)((function(e){var t=e("learnpress/quiz"),n=t.getQuestions,r=t.getData;return{questions:n(),status:r("status"),store:r(),answered:r("answered"),isReviewing:"reviewing"===r("mode"),questionIds:r("questionIds"),checkCount:r("instantCheck"),questionsPerPage:r("questionsPerPage")||1}})),Object(u.withDispatch)((function(e){var t=e("learnpress/quiz");return{setQuizData:t.setQuizData,startQuiz:t.startQuiz}}))])(wn);n(11);function jn(e){return function(e){if(Array.isArray(e))return Rn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Rn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var qn=LP.modal.default,Sn=(t.default=_n,function(e,t){wp.element.render(React.createElement(qn,null,React.createElement(_n,{settings:t})),jn(document.querySelectorAll(e))[0]),LP.Hook.doAction("lp-quiz-compatible-builder")})}]);
|
assets/js/dist/frontend/single-course.js
CHANGED
@@ -680,7 +680,7 @@ function run() {
|
|
680 |
Object(_single_curriculum_components_sidebar__WEBPACK_IMPORTED_MODULE_3__["Sidebar"])();
|
681 |
}
|
682 |
|
683 |
-
|
684 |
run();
|
685 |
});
|
686 |
|
@@ -725,13 +725,8 @@ var $ = jQuery;
|
|
725 |
var _lodash = lodash,
|
726 |
throttle = _lodash.throttle;
|
727 |
var Sidebar = function Sidebar() {
|
728 |
-
|
729 |
-
var
|
730 |
-
var timerClearScroll;
|
731 |
-
$(document).on('change', '#sidebar-toggle', function (event) {
|
732 |
-
LP.Cookies.set('sidebar-toggle', event.target.checked);
|
733 |
-
toggleSidebar(event.target.checked);
|
734 |
-
});
|
735 |
|
736 |
var toggleSidebar = function toggleSidebar(toggle) {
|
737 |
$('body').removeClass('lp-sidebar-toggle__open');
|
@@ -742,9 +737,28 @@ var Sidebar = function Sidebar() {
|
|
742 |
} else {
|
743 |
$('body').addClass('lp-sidebar-toggle__open');
|
744 |
}
|
745 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
746 |
|
747 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
748 |
$curriculum.find('.section-desc').each(function (i, el) {
|
749 |
var a = $('<span class="show-desc"></span>').on('click', function () {
|
750 |
b.toggleClass('c');
|
@@ -771,23 +785,7 @@ var Sidebar = function Sidebar() {
|
|
771 |
LP.Cookies.remove('closed-section-(.*)');
|
772 |
LP.Cookies.set('closed-section-' + lpGlobalSettings.post_id, _toConsumableArray(new Set(sections)));
|
773 |
});
|
774 |
-
});
|
775 |
-
|
776 |
-
if ($popup.length) {
|
777 |
-
$curriculum.on('scroll', throttle(function () {
|
778 |
-
var $self = $(this);
|
779 |
-
$self.addClass('scrolling');
|
780 |
-
timerClearScroll && clearTimeout(timerClearScroll);
|
781 |
-
timerClearScroll = setTimeout(function () {
|
782 |
-
$self.removeClass('scrolling');
|
783 |
-
}, 1000);
|
784 |
-
}, 500));
|
785 |
-
LP.toElement('.course-item.current', {
|
786 |
-
container: '.curriculum-scrollable:eq(1)',
|
787 |
-
offset: 100,
|
788 |
-
duration: 1
|
789 |
-
});
|
790 |
-
}
|
791 |
};
|
792 |
|
793 |
/***/ }),
|
680 |
Object(_single_curriculum_components_sidebar__WEBPACK_IMPORTED_MODULE_3__["Sidebar"])();
|
681 |
}
|
682 |
|
683 |
+
document.addEventListener('DOMContentLoaded', function () {
|
684 |
run();
|
685 |
});
|
686 |
|
725 |
var _lodash = lodash,
|
726 |
throttle = _lodash.throttle;
|
727 |
var Sidebar = function Sidebar() {
|
728 |
+
// Tungnx - Show/hide sidebar curriculumn
|
729 |
+
var elSidebarToggle = document.querySelector('#sidebar-toggle'); // For style of theme
|
|
|
|
|
|
|
|
|
|
|
730 |
|
731 |
var toggleSidebar = function toggleSidebar(toggle) {
|
732 |
$('body').removeClass('lp-sidebar-toggle__open');
|
737 |
} else {
|
738 |
$('body').addClass('lp-sidebar-toggle__open');
|
739 |
}
|
740 |
+
}; // For lp and theme
|
741 |
+
|
742 |
+
|
743 |
+
if (elSidebarToggle) {
|
744 |
+
if ($(window).innerWidth() <= 768) {
|
745 |
+
elSidebarToggle.setAttribute('checked', 'checked');
|
746 |
+
} else if (LP.Cookies.get('sidebar-toggle')) {
|
747 |
+
elSidebarToggle.setAttribute('checked', 'checked');
|
748 |
+
} else {
|
749 |
+
elSidebarToggle.removeAttribute('checked');
|
750 |
+
}
|
751 |
|
752 |
+
document.querySelector('#popup-course').addEventListener('click', function (e) {
|
753 |
+
if (e.target.id === 'sidebar-toggle') {
|
754 |
+
LP.Cookies.set('sidebar-toggle', e.target.checked ? true : false);
|
755 |
+
toggleSidebar(LP.Cookies.get('sidebar-toggle'));
|
756 |
+
}
|
757 |
+
});
|
758 |
+
} // End editor by tungnx
|
759 |
+
|
760 |
+
|
761 |
+
var $curriculum = $('#learn-press-course-curriculum');
|
762 |
$curriculum.find('.section-desc').each(function (i, el) {
|
763 |
var a = $('<span class="show-desc"></span>').on('click', function () {
|
764 |
b.toggleClass('c');
|
785 |
LP.Cookies.remove('closed-section-(.*)');
|
786 |
LP.Cookies.set('closed-section-' + lpGlobalSettings.post_id, _toConsumableArray(new Set(sections)));
|
787 |
});
|
788 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
789 |
};
|
790 |
|
791 |
/***/ }),
|
assets/js/dist/frontend/single-course.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.LP=this.LP||{},this.LP.singleCourse=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=23)}({14:function(e,t){!function(){e.exports=this.LP.quiz}()},15:function(e,t){},2:function(e,t){e.exports=window.wp.element},23:function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return b})),n.d(t,"initCourseTabs",(function(){return w})),n.d(t,"initCourseSidebar",(function(){return S})),n.d(t,"enrollCourse",(function(){return C}));var r=n(2),o=(n(14),n(15),n(7));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(i,e);var t,n,r,o=c(i);function i(){return a(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){return React.createElement(React.Fragment,null)}}])&&s(t.prototype,n),r&&s(t,r),i}(r.Component);window.addEventListener("DOMContentLoaded",(function(){Object(o.a)()}));n(5);var p=n(4);function v(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)}))}}t.default=f;var b=function(){wp.element.render(React.createElement(f,null))},g=jQuery,w=function(){g("#learn-press-course-tabs").on("change",'input[name="learn-press-course-tab-radio"]',(function(e){var t=g('input[name="learn-press-course-tab-radio"]:checked').val();LP.Cookies.set("course-tab",t),g('label[for="'+g(e.target).attr("id")+'"]').closest("li").addClass("active").siblings().removeClass("active")}))},S=function(){var e=g(".course-summary-sidebar");if(e.length){var t=g(window),n=e.children(),r=e.offset(),o=e.height(),i=n.height(),a=32;t.on("scroll.fixed-course-sidebar",(function(){var s=t.scrollTop()-r.top+a;if(s<0)return e.removeClass("slide-top slide-down"),void n.css("top","");s>o-i?(e.removeClass("slide-down").addClass("slide-top"),n.css("top",o-i)):(e.removeClass("slide-top").addClass("slide-down"),n.css("top",a))})).trigger("scroll.fixed-course-sidebar")}},C=function(){var e=document.querySelectorAll("form.enroll-course");e.length>0&&e.forEach((function(e){var t=function(){var t=h(regeneratorRuntime.mark((function t(n,r){var o,i,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,wp.apiFetch({path:"lp/v1/courses/enroll-course",method:"POST",data:{id:n}});case 3:o=t.sent,r.classList.remove("loading"),r.disabled=!1,i=o.status,a=o.data.redirect,(s=o.message)&&i&&(r.style.display="none",e.innerHTML+='<div class="lp-enroll-notice '.concat(i,'">').concat(s,"</div>"),a&&(window.location.href=a)),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),form.innerHTML+='<div class="lp-enroll-notice error">'.concat(t.t0.message&&t.t0.message,"</div>");case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}();e.addEventListener("submit",(function(n){n.preventDefault();var r=e.querySelector("input[name=enroll-course]").value,o=e.querySelector("button.button-enroll-course");o.classList.add("loading"),o.disabled=!0,t(r,o)}))})),null!==document.querySelector(".course-detail-info")&&window.addEventListener("pageshow",(function(e){(e.persisted||void 0!==window.performance&&"back_forward"==String(window.performance.getEntriesByType("navigation")[0].type))&&location.reload()}))},L=function(){var e=document.querySelectorAll(".lp-form-retake-course");e.length&&e.forEach((function(e){var t=e.querySelector(".button-retake-course"),n=e.querySelector("[name=retake-course]").value,r=e.querySelector(".lp-ajax-message");e.addEventListener("submit",(function(e){e.preventDefault()})),t.addEventListener("click",(function(e){var o;e.preventDefault(),t.classList.add("loading"),t.disabled=!0,o=t,wp.apiFetch({path:"/lp/v1/courses/retake-course",method:"POST",data:{id:n}}).then((function(e){var t=e.status,n=e.message,i=e.data;r.innerHTML=n,null!=t&&"success"===t?(o.style.display="none",setTimeout((function(){window.location.replace(i.url_redirect)}),1e3)):r.classList.add("error")})).catch((function(e){r.classList.add("error"),r.innerHTML="error: "+e.message})).then((function(){o.classList.remove("loading"),o.disabled=!1,r.style.display="block"}))}))}))};g(window).on("load",(function(){var e;g("#popup-course"),g("#learn-press-course-curriculum");v(document.querySelectorAll(".course-extra-box")).map((function(e){var t=e.querySelector(".course-extra-box__title");t.addEventListener("click",(function(){var n=t.nextElementSibling,r=document.querySelector(".course-extra-box.active");r&&!e.classList.contains("active")&&(r.classList.remove("active"),r.querySelector(".course-extra-box__content").style.display="none"),e.classList.contains("active")?(e.classList.remove("active"),n.style.display="none"):(e.classList.add("active"),n.style.display="block")}))})),w(),S(),C(),(e=document.querySelectorAll("form.purchase-course")).length>0&&e.forEach((function(e){var t=function(){var t=h(regeneratorRuntime.mark((function t(n,r){var o,i,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,wp.apiFetch({path:"lp/v1/courses/purchase-course",method:"POST",data:{id:n}});case 3:o=t.sent,r.classList.remove("loading"),r.disabled=!1,i=o.status,a=o.data.redirect,(s=o.message)&&i&&(e.innerHTML+='<div class="lp-enroll-notice '.concat(i,'">').concat(s,"</div>"),"success"===i&&a&&(window.location.href=a)),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),e.innerHTML+='<div class="lp-enroll-notice error">'.concat(t.t0.message&&t.t0.message,"</div>");case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}();e.addEventListener("submit",(function(n){n.preventDefault();var r=e.querySelector("input[name=purchase-course]").value,o=e.querySelector("button.button-purchase-course");o.classList.add("loading"),o.disabled=!0,t(r,o)}))})),L(),function(){var e=document.querySelectorAll(".lp-course-progress-wrapper");if(e.length){if("IntersectionObserver"in window){var t=new IntersectionObserver((function(e,r){e.forEach((function(e){if(e.isIntersecting){var r=e.target;setTimeout((function(){n(r)}),600),t.unobserve(r)}}))}));v(e).map((function(e){return t.observe(e)}))}var n=function(){var e=h(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiFetch({path:"lp/v1/lazy-load/course-progress",method:"POST",data:{courseId:lpGlobalSettings.post_id||"",userId:lpGlobalSettings.user_id||""}});case 2:n=e.sent,r=n.data,t.innerHTML=r;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}(),p.a.init()}))},4:function(e,t,n){"use strict";var r=jQuery,o=null,i={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(o=this.elLPOverlay,this.elMainContent=o.find(".main-content"),this.elTitle=o.find(".modal-title"),this.elBtnYes=o.find(".btn-yes"),this.elBtnNo=o.find(".btn-no"),this.elFooter=o.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){o.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof i.callBackYes&&i.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}},a=i,s=(jQuery,{elBtnFinishCourse:null,elBtnCompleteItem:null,init:function(){a.init()&&void 0!==lpGlobalSettings&&"yes"===lpGlobalSettings.option_enable_popup_confirm_finish&&(this.elBtnFinishCourse=document.querySelectorAll(".lp-btn-finish-course"),this.elBtnCompleteItem=document.querySelector(".lp-btn-complete-item"),this.elBtnCompleteItem&&this.elBtnCompleteItem.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");a.elLPOverlay.show(),a.setTitleModal(t.dataset.title),a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),a.callBackYes=function(){t.submit()}})),this.elBtnFinishCourse&&this.elBtnFinishCourse.forEach((function(e){return e.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");a.elLPOverlay.show(),a.setTitleModal(t.dataset.title),a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),a.callBackYes=function(){t.submit()}}))})))}});t.a=s},5:function(e,t){e.exports=window.wp.url},7:function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return s}));var i=jQuery,a=lodash.throttle,s=function(){var e,t=i("#popup-course"),n=i("#learn-press-course-curriculum");i(document).on("change","#sidebar-toggle",(function(e){LP.Cookies.set("sidebar-toggle",e.target.checked),o(e.target.checked)}));var o=function(e){i("body").removeClass("lp-sidebar-toggle__open"),i("body").removeClass("lp-sidebar-toggle__close"),e?i("body").addClass("lp-sidebar-toggle__close"):i("body").addClass("lp-sidebar-toggle__open")};o(LP.Cookies.get("sidebar-toggle")),n.find(".section-desc").each((function(e,t){var n=i('<span class="show-desc"></span>').on("click",(function(){r.toggleClass("c")})),r=i(t).siblings(".section-title").append(n)})),i(".section").each((function(){var e=i(this);e.find(".section-left").on("click",(function(){var t=e.toggleClass("closed").hasClass("closed"),n=LP.Cookies.get("closed-section-"+lpGlobalSettings.post_id)||[],o=parseInt(e.data("section-id")),i=n.findIndex((function(e){return e==o}));t?n.push(parseInt(e.data("section-id"))):n.splice(i,1),LP.Cookies.remove("closed-section-(.*)"),LP.Cookies.set("closed-section-"+lpGlobalSettings.post_id,r(new Set(n)))}))})),t.length&&(n.on("scroll",a((function(){var t=i(this);t.addClass("scrolling"),e&&clearTimeout(e),e=setTimeout((function(){t.removeClass("scrolling")}),1e3)}),500)),LP.toElement(".course-item.current",{container:".curriculum-scrollable:eq(1)",offset:100,duration:1}))}}});
|
1 |
+
this.LP=this.LP||{},this.LP.singleCourse=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=24)}([,,function(e,t){e.exports=window.wp.element},function(e,t,n){"use strict";var r=jQuery,o=null,i={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(o=this.elLPOverlay,this.elMainContent=o.find(".main-content"),this.elTitle=o.find(".modal-title"),this.elBtnYes=o.find(".btn-yes"),this.elBtnNo=o.find(".btn-no"),this.elFooter=o.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){o.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof i.callBackYes&&i.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}};t.a=i},,function(e,t,n){"use strict";var r=n(3),o=(jQuery,{elBtnFinishCourse:null,elBtnCompleteItem:null,init:function(){r.a.init()&&void 0!==lpGlobalSettings&&"yes"===lpGlobalSettings.option_enable_popup_confirm_finish&&(this.elBtnFinishCourse=document.querySelectorAll(".lp-btn-finish-course"),this.elBtnCompleteItem=document.querySelector(".lp-btn-complete-item"),this.elBtnCompleteItem&&this.elBtnCompleteItem.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");r.a.elLPOverlay.show(),r.a.setTitleModal(t.dataset.title),r.a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),r.a.callBackYes=function(){t.submit()}})),this.elBtnFinishCourse&&this.elBtnFinishCourse.forEach((function(e){return e.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");r.a.elLPOverlay.show(),r.a.setTitleModal(t.dataset.title),r.a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),r.a.callBackYes=function(){t.submit()}}))})))}});t.a=o},function(e,t){e.exports=window.wp.url},,function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return a}));var i=jQuery,a=(lodash.throttle,function(){var e=document.querySelector("#sidebar-toggle");e&&(i(window).innerWidth()<=768||LP.Cookies.get("sidebar-toggle")?e.setAttribute("checked","checked"):e.removeAttribute("checked"),document.querySelector("#popup-course").addEventListener("click",(function(e){var t;"sidebar-toggle"===e.target.id&&(LP.Cookies.set("sidebar-toggle",!!e.target.checked),t=LP.Cookies.get("sidebar-toggle"),i("body").removeClass("lp-sidebar-toggle__open"),i("body").removeClass("lp-sidebar-toggle__close"),t?i("body").addClass("lp-sidebar-toggle__close"):i("body").addClass("lp-sidebar-toggle__open"))}))),i("#learn-press-course-curriculum").find(".section-desc").each((function(e,t){var n=i('<span class="show-desc"></span>').on("click",(function(){r.toggleClass("c")})),r=i(t).siblings(".section-title").append(n)})),i(".section").each((function(){var e=i(this);e.find(".section-left").on("click",(function(){var t=e.toggleClass("closed").hasClass("closed"),n=LP.Cookies.get("closed-section-"+lpGlobalSettings.post_id)||[],o=parseInt(e.data("section-id")),i=n.findIndex((function(e){return e==o}));t?n.push(parseInt(e.data("section-id"))):n.splice(i,1),LP.Cookies.remove("closed-section-(.*)"),LP.Cookies.set("closed-section-"+lpGlobalSettings.post_id,r(new Set(n)))}))}))})},,,,,,,function(e,t){!function(){e.exports=this.LP.quiz}()},function(e,t){},,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return b})),n.d(t,"initCourseTabs",(function(){return w})),n.d(t,"initCourseSidebar",(function(){return S})),n.d(t,"enrollCourse",(function(){return L}));var r=n(2),o=(n(15),n(16),n(8));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(i,e);var t,n,r,o=c(i);function i(){return a(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){return React.createElement(React.Fragment,null)}}])&&s(t.prototype,n),r&&s(t,r),i}(r.Component);document.addEventListener("DOMContentLoaded",(function(){Object(o.a)()}));n(6);var p=n(5);function v(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)}))}}t.default=f;var b=function(){wp.element.render(React.createElement(f,null))},g=jQuery,w=function(){g("#learn-press-course-tabs").on("change",'input[name="learn-press-course-tab-radio"]',(function(e){var t=g('input[name="learn-press-course-tab-radio"]:checked').val();LP.Cookies.set("course-tab",t),g('label[for="'+g(e.target).attr("id")+'"]').closest("li").addClass("active").siblings().removeClass("active")}))},S=function(){var e=g(".course-summary-sidebar");if(e.length){var t=g(window),n=e.children(),r=e.offset(),o=e.height(),i=n.height(),a=32;t.on("scroll.fixed-course-sidebar",(function(){var s=t.scrollTop()-r.top+a;if(s<0)return e.removeClass("slide-top slide-down"),void n.css("top","");s>o-i?(e.removeClass("slide-down").addClass("slide-top"),n.css("top",o-i)):(e.removeClass("slide-top").addClass("slide-down"),n.css("top",a))})).trigger("scroll.fixed-course-sidebar")}},L=function(){var e=document.querySelectorAll("form.enroll-course");e.length>0&&e.forEach((function(e){var t=function(){var t=h(regeneratorRuntime.mark((function t(n,r){var o,i,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,wp.apiFetch({path:"lp/v1/courses/enroll-course",method:"POST",data:{id:n}});case 3:o=t.sent,r.classList.remove("loading"),r.disabled=!1,i=o.status,a=o.data.redirect,(s=o.message)&&i&&(r.style.display="none",e.innerHTML+='<div class="lp-enroll-notice '.concat(i,'">').concat(s,"</div>"),a&&(window.location.href=a)),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),form.innerHTML+='<div class="lp-enroll-notice error">'.concat(t.t0.message&&t.t0.message,"</div>");case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}();e.addEventListener("submit",(function(n){n.preventDefault();var r=e.querySelector("input[name=enroll-course]").value,o=e.querySelector("button.button-enroll-course");o.classList.add("loading"),o.disabled=!0,t(r,o)}))})),null!==document.querySelector(".course-detail-info")&&window.addEventListener("pageshow",(function(e){(e.persisted||void 0!==window.performance&&"back_forward"==String(window.performance.getEntriesByType("navigation")[0].type))&&location.reload()}))},C=function(){var e=document.querySelectorAll(".lp-form-retake-course");e.length&&e.forEach((function(e){var t=e.querySelector(".button-retake-course"),n=e.querySelector("[name=retake-course]").value,r=e.querySelector(".lp-ajax-message");e.addEventListener("submit",(function(e){e.preventDefault()})),t.addEventListener("click",(function(e){var o;e.preventDefault(),t.classList.add("loading"),t.disabled=!0,o=t,wp.apiFetch({path:"/lp/v1/courses/retake-course",method:"POST",data:{id:n}}).then((function(e){var t=e.status,n=e.message,i=e.data;r.innerHTML=n,null!=t&&"success"===t?(o.style.display="none",setTimeout((function(){window.location.replace(i.url_redirect)}),1e3)):r.classList.add("error")})).catch((function(e){r.classList.add("error"),r.innerHTML="error: "+e.message})).then((function(){o.classList.remove("loading"),o.disabled=!1,r.style.display="block"}))}))}))};g(window).on("load",(function(){var e;g("#popup-course"),g("#learn-press-course-curriculum");v(document.querySelectorAll(".course-extra-box")).map((function(e){var t=e.querySelector(".course-extra-box__title");t.addEventListener("click",(function(){var n=t.nextElementSibling,r=document.querySelector(".course-extra-box.active");r&&!e.classList.contains("active")&&(r.classList.remove("active"),r.querySelector(".course-extra-box__content").style.display="none"),e.classList.contains("active")?(e.classList.remove("active"),n.style.display="none"):(e.classList.add("active"),n.style.display="block")}))})),w(),S(),L(),(e=document.querySelectorAll("form.purchase-course")).length>0&&e.forEach((function(e){var t=function(){var t=h(regeneratorRuntime.mark((function t(n,r){var o,i,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,wp.apiFetch({path:"lp/v1/courses/purchase-course",method:"POST",data:{id:n}});case 3:o=t.sent,r.classList.remove("loading"),r.disabled=!1,i=o.status,a=o.data.redirect,(s=o.message)&&i&&(e.innerHTML+='<div class="lp-enroll-notice '.concat(i,'">').concat(s,"</div>"),"success"===i&&a&&(window.location.href=a)),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),e.innerHTML+='<div class="lp-enroll-notice error">'.concat(t.t0.message&&t.t0.message,"</div>");case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}();e.addEventListener("submit",(function(n){n.preventDefault();var r=e.querySelector("input[name=purchase-course]").value,o=e.querySelector("button.button-purchase-course");o.classList.add("loading"),o.disabled=!0,t(r,o)}))})),C(),function(){var e=document.querySelectorAll(".lp-course-progress-wrapper");if(e.length){if("IntersectionObserver"in window){var t=new IntersectionObserver((function(e,r){e.forEach((function(e){if(e.isIntersecting){var r=e.target;setTimeout((function(){n(r)}),600),t.unobserve(r)}}))}));v(e).map((function(e){return t.observe(e)}))}var n=function(){var e=h(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiFetch({path:"lp/v1/lazy-load/course-progress",method:"POST",data:{courseId:lpGlobalSettings.post_id||"",userId:lpGlobalSettings.user_id||""}});case 2:n=e.sent,r=n.data,t.innerHTML=r;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}(),p.a.init()}))}]);
|
assets/js/dist/frontend/single-curriculum.js
CHANGED
@@ -372,6 +372,10 @@ var itemsProgress = function itemsProgress() {
|
|
372 |
return;
|
373 |
}
|
374 |
|
|
|
|
|
|
|
|
|
375 |
if ('IntersectionObserver' in window) {
|
376 |
var eleObserver = new IntersectionObserver(function (entries, observer) {
|
377 |
entries.forEach(function (entry) {
|
@@ -569,13 +573,8 @@ var $ = jQuery;
|
|
569 |
var _lodash = lodash,
|
570 |
throttle = _lodash.throttle;
|
571 |
var Sidebar = function Sidebar() {
|
572 |
-
|
573 |
-
var
|
574 |
-
var timerClearScroll;
|
575 |
-
$(document).on('change', '#sidebar-toggle', function (event) {
|
576 |
-
LP.Cookies.set('sidebar-toggle', event.target.checked);
|
577 |
-
toggleSidebar(event.target.checked);
|
578 |
-
});
|
579 |
|
580 |
var toggleSidebar = function toggleSidebar(toggle) {
|
581 |
$('body').removeClass('lp-sidebar-toggle__open');
|
@@ -586,9 +585,28 @@ var Sidebar = function Sidebar() {
|
|
586 |
} else {
|
587 |
$('body').addClass('lp-sidebar-toggle__open');
|
588 |
}
|
589 |
-
};
|
590 |
|
591 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
592 |
$curriculum.find('.section-desc').each(function (i, el) {
|
593 |
var a = $('<span class="show-desc"></span>').on('click', function () {
|
594 |
b.toggleClass('c');
|
@@ -615,23 +633,7 @@ var Sidebar = function Sidebar() {
|
|
615 |
LP.Cookies.remove('closed-section-(.*)');
|
616 |
LP.Cookies.set('closed-section-' + lpGlobalSettings.post_id, _toConsumableArray(new Set(sections)));
|
617 |
});
|
618 |
-
});
|
619 |
-
|
620 |
-
if ($popup.length) {
|
621 |
-
$curriculum.on('scroll', throttle(function () {
|
622 |
-
var $self = $(this);
|
623 |
-
$self.addClass('scrolling');
|
624 |
-
timerClearScroll && clearTimeout(timerClearScroll);
|
625 |
-
timerClearScroll = setTimeout(function () {
|
626 |
-
$self.removeClass('scrolling');
|
627 |
-
}, 1000);
|
628 |
-
}, 500));
|
629 |
-
LP.toElement('.course-item.current', {
|
630 |
-
container: '.curriculum-scrollable:eq(1)',
|
631 |
-
offset: 100,
|
632 |
-
duration: 1
|
633 |
-
});
|
634 |
-
}
|
635 |
};
|
636 |
|
637 |
/***/ }),
|
@@ -724,7 +726,7 @@ var SingleCurriculums = /*#__PURE__*/function (_Component) {
|
|
724 |
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Component"]);
|
725 |
|
726 |
/* harmony default export */ __webpack_exports__["default"] = (SingleCurriculums);
|
727 |
-
|
728 |
LP.Hook.doAction('lp-compatible-builder');
|
729 |
Object(_components_search__WEBPACK_IMPORTED_MODULE_1__["searchCourseContent"])();
|
730 |
Object(_components_sidebar__WEBPACK_IMPORTED_MODULE_2__["Sidebar"])();
|
@@ -747,6 +749,8 @@ window.addEventListener('DOMContentLoaded', function () {
|
|
747 |
|
748 |
"use strict";
|
749 |
__webpack_require__.r(__webpack_exports__);
|
|
|
|
|
750 |
var $ = jQuery;
|
751 |
var scrollToItemCurrent = {
|
752 |
init: function init() {
|
@@ -754,6 +758,7 @@ var scrollToItemCurrent = {
|
|
754 |
var elItemViewing = $('.viewing-course-item');
|
755 |
|
756 |
if (elItemViewing.length) {
|
|
|
757 |
var heightCourseItemContentHeader = $('#popup-sidebar').outerHeight();
|
758 |
var heightSectionTitle = $('.section-title').outerHeight();
|
759 |
var heightSectionHeader = $('.section-header').outerHeight();
|
@@ -776,16 +781,9 @@ var scrollToItemCurrent = {
|
|
776 |
|
777 |
var elItemCurrent = $('.course-item-' + idItem);
|
778 |
var offSetTop = elItemCurrent.offset().top;
|
779 |
-
var
|
780 |
-
|
781 |
-
|
782 |
-
numberOffSetTop = numberOffSetTop - heightSectionHeader + 20;
|
783 |
-
} else {
|
784 |
-
numberOffSetTop = numberOffSetTop - heightSectionTitle;
|
785 |
-
}
|
786 |
-
|
787 |
-
$('#learn-press-course-curriculum').animate({
|
788 |
-
scrollTop: numberOffSetTop + 300
|
789 |
}, 800);
|
790 |
}
|
791 |
};
|
372 |
return;
|
373 |
}
|
374 |
|
375 |
+
if (elements[0].querySelectorAll('form.form-button-finish-course').length !== 0) {
|
376 |
+
return;
|
377 |
+
}
|
378 |
+
|
379 |
if ('IntersectionObserver' in window) {
|
380 |
var eleObserver = new IntersectionObserver(function (entries, observer) {
|
381 |
entries.forEach(function (entry) {
|
573 |
var _lodash = lodash,
|
574 |
throttle = _lodash.throttle;
|
575 |
var Sidebar = function Sidebar() {
|
576 |
+
// Tungnx - Show/hide sidebar curriculumn
|
577 |
+
var elSidebarToggle = document.querySelector('#sidebar-toggle'); // For style of theme
|
|
|
|
|
|
|
|
|
|
|
578 |
|
579 |
var toggleSidebar = function toggleSidebar(toggle) {
|
580 |
$('body').removeClass('lp-sidebar-toggle__open');
|
585 |
} else {
|
586 |
$('body').addClass('lp-sidebar-toggle__open');
|
587 |
}
|
588 |
+
}; // For lp and theme
|
589 |
|
590 |
+
|
591 |
+
if (elSidebarToggle) {
|
592 |
+
if ($(window).innerWidth() <= 768) {
|
593 |
+
elSidebarToggle.setAttribute('checked', 'checked');
|
594 |
+
} else if (LP.Cookies.get('sidebar-toggle')) {
|
595 |
+
elSidebarToggle.setAttribute('checked', 'checked');
|
596 |
+
} else {
|
597 |
+
elSidebarToggle.removeAttribute('checked');
|
598 |
+
}
|
599 |
+
|
600 |
+
document.querySelector('#popup-course').addEventListener('click', function (e) {
|
601 |
+
if (e.target.id === 'sidebar-toggle') {
|
602 |
+
LP.Cookies.set('sidebar-toggle', e.target.checked ? true : false);
|
603 |
+
toggleSidebar(LP.Cookies.get('sidebar-toggle'));
|
604 |
+
}
|
605 |
+
});
|
606 |
+
} // End editor by tungnx
|
607 |
+
|
608 |
+
|
609 |
+
var $curriculum = $('#learn-press-course-curriculum');
|
610 |
$curriculum.find('.section-desc').each(function (i, el) {
|
611 |
var a = $('<span class="show-desc"></span>').on('click', function () {
|
612 |
b.toggleClass('c');
|
633 |
LP.Cookies.remove('closed-section-(.*)');
|
634 |
LP.Cookies.set('closed-section-' + lpGlobalSettings.post_id, _toConsumableArray(new Set(sections)));
|
635 |
});
|
636 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
637 |
};
|
638 |
|
639 |
/***/ }),
|
726 |
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Component"]);
|
727 |
|
728 |
/* harmony default export */ __webpack_exports__["default"] = (SingleCurriculums);
|
729 |
+
document.addEventListener('DOMContentLoaded', function () {
|
730 |
LP.Hook.doAction('lp-compatible-builder');
|
731 |
Object(_components_search__WEBPACK_IMPORTED_MODULE_1__["searchCourseContent"])();
|
732 |
Object(_components_sidebar__WEBPACK_IMPORTED_MODULE_2__["Sidebar"])();
|
749 |
|
750 |
"use strict";
|
751 |
__webpack_require__.r(__webpack_exports__);
|
752 |
+
/* harmony import */ var _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/lp-modal-overlay */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/utils/lp-modal-overlay.js");
|
753 |
+
|
754 |
var $ = jQuery;
|
755 |
var scrollToItemCurrent = {
|
756 |
init: function init() {
|
758 |
var elItemViewing = $('.viewing-course-item');
|
759 |
|
760 |
if (elItemViewing.length) {
|
761 |
+
var elCourseCurriculumn = $('#learn-press-course-curriculum');
|
762 |
var heightCourseItemContentHeader = $('#popup-sidebar').outerHeight();
|
763 |
var heightSectionTitle = $('.section-title').outerHeight();
|
764 |
var heightSectionHeader = $('.section-header').outerHeight();
|
781 |
|
782 |
var elItemCurrent = $('.course-item-' + idItem);
|
783 |
var offSetTop = elItemCurrent.offset().top;
|
784 |
+
var offset = elItemCurrent.offset().top - elCourseCurriculumn.offset().top + elCourseCurriculumn.scrollTop();
|
785 |
+
elCourseCurriculumn.animate({
|
786 |
+
scrollTop: offset - heightSectionHeader
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
787 |
}, 800);
|
788 |
}
|
789 |
};
|
assets/js/dist/frontend/single-curriculum.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.LP=this.LP||{},this.LP.singleCurriculum=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=22)}({10:function(e,t){function n(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}LP.Hook.addAction("lp-compatible-builder",(function(){LP.Hook.removeAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){Waypoint.refreshAll(),window.dispatchEvent(new Event("resize"))})),"undefined"!=typeof vc_js&&"undefined"!=typeof VcWaypoint&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){VcWaypoint.refreshAll()}))})),LP.Hook.addAction("lp-quiz-compatible-builder",(function(){return LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0})),LP.Hook.addAction("lp-question-compatible-builder",(function(){return LP.Hook.removeAction("lp-question-compatible-builder"),LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0}))},2:function(e,t){e.exports=window.wp.element},22:function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return g}));var r=n(2),o=n(7),i=jQuery,l=n(8);n(10);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}jQuery;var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(i,e);var t,n,r,o=f(i);function i(){return u(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"checkCourseDurationExpire",value:function(){var e=document.getElementsByName("lp-course-timestamp-remaining");if(e.length){var t=e[0].value;t<86400&&setTimeout((function(){window.location.reload(!0)}),1e3*t)}}},{key:"render",value:function(){return React.createElement("div",null)}}])&&a(t.prototype,n),r&&a(t,r),i}(r.Component),y=m;window.addEventListener("DOMContentLoaded",(function(){LP.Hook.doAction("lp-compatible-builder"),function(){var e=document.querySelector("#popup-course"),t=document.querySelector("#learn-press-course-curriculum");if(e&&t){var n=t.querySelector(".curriculum-sections"),r=e.querySelector(".search-course"),o=e.querySelector('.search-course input[type="text"]');if(!o||!n||!r)return;var i=n.querySelectorAll("li.section"),l=n.querySelectorAll("li.course-item"),c=[];l.forEach((function(e){var t=e.dataset.id,n=e.querySelector(".item-name");c.push({id:t,name:n?n.textContent.toLowerCase():""})}));var u=function(e){e.preventDefault();var t=o.value;r.classList.add("searching"),t||r.classList.remove("searching");var n=[];c.forEach((function(e){t&&!e.name.match(t.toLowerCase())||(n.push(e.id),l.forEach((function(e){-1!==n.indexOf(e.dataset.id)?e.classList.remove("hide-if-js"):e.classList.add("hide-if-js")})))})),i.forEach((function(e){var t=e.querySelectorAll(".course-item"),r=[];t.forEach((function(e){n.includes(e.dataset.id)&&r.push(e.dataset.id)})),0===r.length?e.classList.add("hide-if-js"):e.classList.remove("hide-if-js")}))},a=r.querySelector(".clear");a&&a.addEventListener("click",(function(e){e.preventDefault(),o.value="",u(e)})),r.addEventListener("submit",u),o.addEventListener("keyup",u)}}(),Object(o.a)(),i(".learn-press-progress").each((function(){var e=i(this).find(".learn-press-progress__active"),t=e.data("value");void 0!==t&&e.css("left",-(100-parseInt(t))+"%")})),Object(l.b)(),(new m).checkCourseDurationExpire()}));var v=n(4),h=jQuery,b={init:function(){this.scrollToItemViewing=function(){var e=h(".viewing-course-item");if(e.length){var t=h("#popup-sidebar").outerHeight(),n=h(".section-title").outerHeight(),r=h(".section-header").outerHeight(),o=new RegExp("^viewing-course-item-([0-9].*)"),i=e.attr("class").split(/\s+/),l=0;if(h.each(i,(function(e,t){var n=o.exec(t);if(n)return l=n[1],!1})),0===l)return;var c=h(".course-item-"+l).offset().top-t;void 0===n?c=c-r+20:c-=n,h("#learn-press-course-curriculum").animate({scrollTop:c+300},800)}},this.scrollToItemViewing()}},g=(jQuery,t.default=y,function(){wp.element.render(React.createElement(y,null),document.getElementById("learn-press-course-curriculum"))});document.addEventListener("DOMContentLoaded",(function(e){LP.Hook.doAction("course-ready"),v.a.init(),b.init()}))},4:function(e,t,n){"use strict";var r=jQuery,o=null,i={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(o=this.elLPOverlay,this.elMainContent=o.find(".main-content"),this.elTitle=o.find(".modal-title"),this.elBtnYes=o.find(".btn-yes"),this.elBtnNo=o.find(".btn-no"),this.elFooter=o.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){o.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof i.callBackYes&&i.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}},l=i,c=(jQuery,{elBtnFinishCourse:null,elBtnCompleteItem:null,init:function(){l.init()&&void 0!==lpGlobalSettings&&"yes"===lpGlobalSettings.option_enable_popup_confirm_finish&&(this.elBtnFinishCourse=document.querySelectorAll(".lp-btn-finish-course"),this.elBtnCompleteItem=document.querySelector(".lp-btn-complete-item"),this.elBtnCompleteItem&&this.elBtnCompleteItem.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");l.elLPOverlay.show(),l.setTitleModal(t.dataset.title),l.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),l.callBackYes=function(){t.submit()}})),this.elBtnFinishCourse&&this.elBtnFinishCourse.forEach((function(e){return e.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");l.elLPOverlay.show(),l.setTitleModal(t.dataset.title),l.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),l.callBackYes=function(){t.submit()}}))})))}});t.a=c},5:function(e,t){e.exports=window.wp.url},7:function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return c}));var i=jQuery,l=lodash.throttle,c=function(){var e,t=i("#popup-course"),n=i("#learn-press-course-curriculum");i(document).on("change","#sidebar-toggle",(function(e){LP.Cookies.set("sidebar-toggle",e.target.checked),o(e.target.checked)}));var o=function(e){i("body").removeClass("lp-sidebar-toggle__open"),i("body").removeClass("lp-sidebar-toggle__close"),e?i("body").addClass("lp-sidebar-toggle__close"):i("body").addClass("lp-sidebar-toggle__open")};o(LP.Cookies.get("sidebar-toggle")),n.find(".section-desc").each((function(e,t){var n=i('<span class="show-desc"></span>').on("click",(function(){r.toggleClass("c")})),r=i(t).siblings(".section-title").append(n)})),i(".section").each((function(){var e=i(this);e.find(".section-left").on("click",(function(){var t=e.toggleClass("closed").hasClass("closed"),n=LP.Cookies.get("closed-section-"+lpGlobalSettings.post_id)||[],o=parseInt(e.data("section-id")),i=n.findIndex((function(e){return e==o}));t?n.push(parseInt(e.data("section-id"))):n.splice(i,1),LP.Cookies.remove("closed-section-(.*)"),LP.Cookies.set("closed-section-"+lpGlobalSettings.post_id,r(new Set(n)))}))})),t.length&&(n.on("scroll",l((function(){var t=i(this);t.addClass("scrolling"),e&&clearTimeout(e),e=setTimeout((function(){t.removeClass("scrolling")}),1e3)}),500)),LP.toElement(".course-item.current",{container:".curriculum-scrollable:eq(1)",offset:100,duration:1}))}},8:function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return a}));var r=n(5),o=n(4);function i(e,t,n,r,o,i,l){try{var c=e[i](l),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var u=function(){var e=document.querySelectorAll(".popup-header__inner");if(e.length&&null===document.querySelector("#learn-press-quiz-app div.quiz-result")&&"IntersectionObserver"in window){var t=new IntersectionObserver((function(e,n){e.forEach((function(e){if(e.isIntersecting){var n=e.target;a(n),t.unobserve(n)}}))}));l(e).map((function(e){return t.observe(e)}))}},a=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiFetch({path:Object(r.addQueryArgs)("lp/v1/lazy-load/items-progress",{courseId:lpGlobalSettings.post_id||"",userId:lpGlobalSettings.user_id||""}),method:"GET"});case 2:n=e.sent,i=n.data,t.innerHTML+=i,o.a.init();case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var l=e.apply(t,n);function c(e){i(l,r,o,c,u,"next",e)}function u(e){i(l,r,o,c,u,"throw",e)}c(void 0)}))});return function(e){return t.apply(this,arguments)}}()}});
|
1 |
+
this.LP=this.LP||{},this.LP.singleCurriculum=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=23)}([,,function(e,t){e.exports=window.wp.element},function(e,t,n){"use strict";var r=jQuery,o=null,i={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(o=this.elLPOverlay,this.elMainContent=o.find(".main-content"),this.elTitle=o.find(".modal-title"),this.elBtnYes=o.find(".btn-yes"),this.elBtnNo=o.find(".btn-no"),this.elFooter=o.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){o.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof i.callBackYes&&i.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}};t.a=i},,function(e,t,n){"use strict";var r=n(3),o=(jQuery,{elBtnFinishCourse:null,elBtnCompleteItem:null,init:function(){r.a.init()&&void 0!==lpGlobalSettings&&"yes"===lpGlobalSettings.option_enable_popup_confirm_finish&&(this.elBtnFinishCourse=document.querySelectorAll(".lp-btn-finish-course"),this.elBtnCompleteItem=document.querySelector(".lp-btn-complete-item"),this.elBtnCompleteItem&&this.elBtnCompleteItem.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");r.a.elLPOverlay.show(),r.a.setTitleModal(t.dataset.title),r.a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),r.a.callBackYes=function(){t.submit()}})),this.elBtnFinishCourse&&this.elBtnFinishCourse.forEach((function(e){return e.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");r.a.elLPOverlay.show(),r.a.setTitleModal(t.dataset.title),r.a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),r.a.callBackYes=function(){t.submit()}}))})))}});t.a=o},function(e,t){e.exports=window.wp.url},,function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return l}));var i=jQuery,l=(lodash.throttle,function(){var e=document.querySelector("#sidebar-toggle");e&&(i(window).innerWidth()<=768||LP.Cookies.get("sidebar-toggle")?e.setAttribute("checked","checked"):e.removeAttribute("checked"),document.querySelector("#popup-course").addEventListener("click",(function(e){var t;"sidebar-toggle"===e.target.id&&(LP.Cookies.set("sidebar-toggle",!!e.target.checked),t=LP.Cookies.get("sidebar-toggle"),i("body").removeClass("lp-sidebar-toggle__open"),i("body").removeClass("lp-sidebar-toggle__close"),t?i("body").addClass("lp-sidebar-toggle__close"):i("body").addClass("lp-sidebar-toggle__open"))}))),i("#learn-press-course-curriculum").find(".section-desc").each((function(e,t){var n=i('<span class="show-desc"></span>').on("click",(function(){r.toggleClass("c")})),r=i(t).siblings(".section-title").append(n)})),i(".section").each((function(){var e=i(this);e.find(".section-left").on("click",(function(){var t=e.toggleClass("closed").hasClass("closed"),n=LP.Cookies.get("closed-section-"+lpGlobalSettings.post_id)||[],o=parseInt(e.data("section-id")),i=n.findIndex((function(e){return e==o}));t?n.push(parseInt(e.data("section-id"))):n.splice(i,1),LP.Cookies.remove("closed-section-(.*)"),LP.Cookies.set("closed-section-"+lpGlobalSettings.post_id,r(new Set(n)))}))}))})},function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return a}));var r=n(6),o=n(5);function i(e,t,n,r,o,i,l){try{var c=e[i](l),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var u=function(){var e=document.querySelectorAll(".popup-header__inner");if(e.length&&null===document.querySelector("#learn-press-quiz-app div.quiz-result")&&0===e[0].querySelectorAll("form.form-button-finish-course").length&&"IntersectionObserver"in window){var t=new IntersectionObserver((function(e,n){e.forEach((function(e){if(e.isIntersecting){var n=e.target;a(n),t.unobserve(n)}}))}));l(e).map((function(e){return t.observe(e)}))}},a=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiFetch({path:Object(r.addQueryArgs)("lp/v1/lazy-load/items-progress",{courseId:lpGlobalSettings.post_id||"",userId:lpGlobalSettings.user_id||""}),method:"GET"});case 2:n=e.sent,i=n.data,t.innerHTML+=i,o.a.init();case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var l=e.apply(t,n);function c(e){i(l,r,o,c,u,"next",e)}function u(e){i(l,r,o,c,u,"throw",e)}c(void 0)}))});return function(e){return t.apply(this,arguments)}}()},,function(e,t){function n(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}LP.Hook.addAction("lp-compatible-builder",(function(){LP.Hook.removeAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){Waypoint.refreshAll(),window.dispatchEvent(new Event("resize"))})),"undefined"!=typeof vc_js&&"undefined"!=typeof VcWaypoint&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){VcWaypoint.refreshAll()}))})),LP.Hook.addAction("lp-quiz-compatible-builder",(function(){return LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0})),LP.Hook.addAction("lp-question-compatible-builder",(function(){return LP.Hook.removeAction("lp-question-compatible-builder"),LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0}))},,,,,,,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return g}));var r=n(2),o=n(8),i=jQuery,l=n(9);n(11);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}jQuery;var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(i,e);var t,n,r,o=f(i);function i(){return u(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"checkCourseDurationExpire",value:function(){var e=document.getElementsByName("lp-course-timestamp-remaining");if(e.length){var t=e[0].value;t<86400&&setTimeout((function(){window.location.reload(!0)}),1e3*t)}}},{key:"render",value:function(){return React.createElement("div",null)}}])&&a(t.prototype,n),r&&a(t,r),i}(r.Component),y=m;document.addEventListener("DOMContentLoaded",(function(){LP.Hook.doAction("lp-compatible-builder"),function(){var e=document.querySelector("#popup-course"),t=document.querySelector("#learn-press-course-curriculum");if(e&&t){var n=t.querySelector(".curriculum-sections"),r=e.querySelector(".search-course"),o=e.querySelector('.search-course input[type="text"]');if(!o||!n||!r)return;var i=n.querySelectorAll("li.section"),l=n.querySelectorAll("li.course-item"),c=[];l.forEach((function(e){var t=e.dataset.id,n=e.querySelector(".item-name");c.push({id:t,name:n?n.textContent.toLowerCase():""})}));var u=function(e){e.preventDefault();var t=o.value;r.classList.add("searching"),t||r.classList.remove("searching");var n=[];c.forEach((function(e){t&&!e.name.match(t.toLowerCase())||(n.push(e.id),l.forEach((function(e){-1!==n.indexOf(e.dataset.id)?e.classList.remove("hide-if-js"):e.classList.add("hide-if-js")})))})),i.forEach((function(e){var t=e.querySelectorAll(".course-item"),r=[];t.forEach((function(e){n.includes(e.dataset.id)&&r.push(e.dataset.id)})),0===r.length?e.classList.add("hide-if-js"):e.classList.remove("hide-if-js")}))},a=r.querySelector(".clear");a&&a.addEventListener("click",(function(e){e.preventDefault(),o.value="",u(e)})),r.addEventListener("submit",u),o.addEventListener("keyup",u)}}(),Object(o.a)(),i(".learn-press-progress").each((function(){var e=i(this).find(".learn-press-progress__active"),t=e.data("value");void 0!==t&&e.css("left",-(100-parseInt(t))+"%")})),Object(l.b)(),(new m).checkCourseDurationExpire()}));var v=n(5),h=(n(3),jQuery),b={init:function(){this.scrollToItemViewing=function(){var e=h(".viewing-course-item");if(e.length){var t=h("#learn-press-course-curriculum"),n=(h("#popup-sidebar").outerHeight(),h(".section-title").outerHeight(),h(".section-header").outerHeight()),r=new RegExp("^viewing-course-item-([0-9].*)"),o=e.attr("class").split(/\s+/),i=0;if(h.each(o,(function(e,t){var n=r.exec(t);if(n)return i=n[1],!1})),0===i)return;var l=h(".course-item-"+i),c=(l.offset().top,l.offset().top-t.offset().top+t.scrollTop());t.animate({scrollTop:c-n},800)}},this.scrollToItemViewing()}},g=(jQuery,t.default=y,function(){wp.element.render(React.createElement(y,null),document.getElementById("learn-press-course-curriculum"))});document.addEventListener("DOMContentLoaded",(function(e){LP.Hook.doAction("course-ready"),v.a.init(),b.init()}))}]);
|
assets/js/dist/js/data-controls.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.LP=this.LP||{},this.LP.dataControls=function(r){var t={};function e(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=r,e.c=t,e.d=function(r,t,n){e.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:n})},e.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,t){if(1&t&&(r=e(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)e.d(n,o,function(t){return r[t]}.bind(null,o));return n},e.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(t,"a",t),t},e.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},e.p="",e(e.s=
|
1 |
+
this.LP=this.LP||{},this.LP.dataControls=function(r){var t={};function e(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=r,e.c=t,e.d=function(r,t,n){e.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:n})},e.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,t){if(1&t&&(r=e(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)e.d(n,o,function(t){return r[t]}.bind(null,o));return n},e.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(t,"a",t),t},e.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},e.p="",e(e.s=14)}({12:function(r,t){r.exports=window.wp.apiFetch},14:function(r,t,e){"use strict";e.r(t),e.d(t,"apiFetch",(function(){return c})),e.d(t,"select",(function(){return f})),e.d(t,"dispatch",(function(){return s})),e.d(t,"controls",(function(){return l}));var n=e(12),o=e.n(n);function u(r){return function(r){if(Array.isArray(r))return i(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,t){if(!r)return;if("string"==typeof r)return i(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(r);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(r,t)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var a=function(r){return r.isRegistryControl=!0,r},c=function(r){return{type:"API_FETCH",request:r}};function f(r,t){for(var e=arguments.length,n=new Array(e>2?e-2:0),o=2;o<e;o++)n[o-2]=arguments[o];return{type:"SELECT",storeKey:r,selectorName:t,args:n}}function s(r,t){for(var e=arguments.length,n=new Array(e>2?e-2:0),o=2;o<e;o++)n[o-2]=arguments[o];return{type:"DISPATCH",storeKey:r,actionName:t,args:n}}var l={API_FETCH:function(r){var t=r.request;return o()(t)},SELECT:a((function(r){return function(t){var e,n=t.storeKey,o=t.selectorName,i=t.args;return r.select(n)[o].hasResolver?function(r,t){var e=t.storeKey,n=t.selectorName,o=t.args;return new Promise((function(t){var u=function(){return r.select("").hasFinishedResolution(e,n,o)},i=function(){return r.select(e)[n].apply(null,o)},a=i();if(u())return t(a);var c=r.subscribe((function(){u()&&(c(),t(i()))}))}))}(r,{storeKey:n,selectorName:o,args:i}):(e=r.select(n))[o].apply(e,u(i))}})),DISPATCH:a((function(r){return function(t){var e,n=t.storeKey,o=t.actionName,i=t.args;return(e=r.dispatch(n))[o].apply(e,u(i))}}))}}});
|
assets/src/apps/js/admin/pages/tools/database/create_indexs.js
CHANGED
@@ -55,8 +55,6 @@ const createIndexes = () => {
|
|
55 |
const scrollToStepCurrent = ( stepCurrent ) => {
|
56 |
const elItemStepCurrent = elGroupStep.querySelector( 'input[value=' + stepCurrent + ']' ).closest( '.lp-item-step' );
|
57 |
|
58 |
-
console.log( elItemStepCurrent.offsetTop, lpModalOverlay.elMainContent[ 0 ].offsetTop );
|
59 |
-
|
60 |
const offset = elItemStepCurrent.offsetTop - lpModalOverlay.elMainContent[ 0 ].offsetTop +
|
61 |
lpModalOverlay.elMainContent[ 0 ].scrollTop;
|
62 |
|
@@ -77,7 +75,7 @@ const createIndexes = () => {
|
|
77 |
}
|
78 |
|
79 |
lpModalOverlay.callBackYes = () => {
|
80 |
-
const url = '/lp/v1/tools/
|
81 |
const params = { tables, table };
|
82 |
|
83 |
lpModalOverlay.elBtnNo[ 0 ].style.display = 'none';
|
@@ -101,7 +99,9 @@ const createIndexes = () => {
|
|
101 |
}
|
102 |
|
103 |
if ( 'success' === status ) {
|
104 |
-
|
|
|
|
|
105 |
} else if ( 'finished' === status ) {
|
106 |
console.log( 'finished' );
|
107 |
lpModalOverlay.elBtnNo[ 0 ].style.display = 'inline-block';
|
55 |
const scrollToStepCurrent = ( stepCurrent ) => {
|
56 |
const elItemStepCurrent = elGroupStep.querySelector( 'input[value=' + stepCurrent + ']' ).closest( '.lp-item-step' );
|
57 |
|
|
|
|
|
58 |
const offset = elItemStepCurrent.offsetTop - lpModalOverlay.elMainContent[ 0 ].offsetTop +
|
59 |
lpModalOverlay.elMainContent[ 0 ].scrollTop;
|
60 |
|
75 |
}
|
76 |
|
77 |
lpModalOverlay.callBackYes = () => {
|
78 |
+
const url = '/lp/v1/admin/tools/create-indexs';
|
79 |
const params = { tables, table };
|
80 |
|
81 |
lpModalOverlay.elBtnNo[ 0 ].style.display = 'none';
|
99 |
}
|
100 |
|
101 |
if ( 'success' === status ) {
|
102 |
+
setTimeout( () => {
|
103 |
+
handleAjax( url, params, functions );
|
104 |
+
}, 2000 );
|
105 |
} else if ( 'finished' === status ) {
|
106 |
console.log( 'finished' );
|
107 |
lpModalOverlay.elBtnNo[ 0 ].style.display = 'inline-block';
|
assets/src/apps/js/frontend/modal/index.js
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
*/
|
7 |
|
8 |
import store from './store';
|
9 |
-
import {
|
10 |
import { useSelect, dispatch } from '@wordpress/data';
|
11 |
|
12 |
const Modal = ( { children } ) => {
|
@@ -38,22 +38,10 @@ const Modal = ( { children } ) => {
|
|
38 |
<div id="lp-modal-content" dangerouslySetInnerHTML={ { __html: message } }></div>
|
39 |
<div id="lp-modal-buttons">
|
40 |
<button className="lp-button modal-button-ok" onClick={ dataConfirm( 'yes' ) }>
|
41 |
-
<span>
|
42 |
-
{ _x(
|
43 |
-
'OK',
|
44 |
-
'button confirm ok',
|
45 |
-
'learnpress'
|
46 |
-
) }
|
47 |
-
</span>
|
48 |
</button>
|
49 |
<button className="lp-button modal-button-cancel" onClick={ dataConfirm( 'no' ) }>
|
50 |
-
<span>
|
51 |
-
{ _x(
|
52 |
-
'Cancel',
|
53 |
-
'button confirm cancel',
|
54 |
-
'learnpress'
|
55 |
-
) }
|
56 |
-
</span>
|
57 |
</button>
|
58 |
</div>
|
59 |
</div>
|
6 |
*/
|
7 |
|
8 |
import store from './store';
|
9 |
+
import { __ } from '@wordpress/i18n';
|
10 |
import { useSelect, dispatch } from '@wordpress/data';
|
11 |
|
12 |
const Modal = ( { children } ) => {
|
38 |
<div id="lp-modal-content" dangerouslySetInnerHTML={ { __html: message } }></div>
|
39 |
<div id="lp-modal-buttons">
|
40 |
<button className="lp-button modal-button-ok" onClick={ dataConfirm( 'yes' ) }>
|
41 |
+
<span>{ __( 'OK', 'learnpress' ) }</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
</button>
|
43 |
<button className="lp-button modal-button-cancel" onClick={ dataConfirm( 'no' ) }>
|
44 |
+
<span>{ __( 'Cancel', 'learnpress' ) }</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
</button>
|
46 |
</div>
|
47 |
</div>
|
assets/src/apps/js/frontend/question-types/components/question-base/index.js
CHANGED
@@ -95,7 +95,7 @@ class QuestionBase extends Component {
|
|
95 |
} = this.props;
|
96 |
|
97 |
if ( status !== 'started' ) {
|
98 |
-
return 'LP Error: can not set answers';
|
99 |
}
|
100 |
|
101 |
const $options = this.$wrap.find( '.option-check' );
|
95 |
} = this.props;
|
96 |
|
97 |
if ( status !== 'started' ) {
|
98 |
+
return __( 'LP Error: can not set answers', 'learnpress' );
|
99 |
}
|
100 |
|
101 |
const $options = this.$wrap.find( '.option-check' );
|
assets/src/apps/js/frontend/quiz/components/attempts/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import { select } from '@wordpress/data';
|
2 |
-
import { __
|
3 |
|
4 |
import { default as formatDuration } from '../duration';
|
5 |
|
1 |
import { select } from '@wordpress/data';
|
2 |
+
import { __ } from '@wordpress/i18n';
|
3 |
|
4 |
import { default as formatDuration } from '../duration';
|
5 |
|
assets/src/apps/js/frontend/quiz/components/buttons/button-check.js
CHANGED
@@ -3,7 +3,7 @@ import classNames from 'classnames';
|
|
3 |
import { Component } from '@wordpress/element';
|
4 |
import { withDispatch, withSelect } from '@wordpress/data';
|
5 |
import { compose } from '@wordpress/compose';
|
6 |
-
import { __
|
7 |
|
8 |
class ButtonCheck extends Component {
|
9 |
constructor() {
|
@@ -37,7 +37,7 @@ class ButtonCheck extends Component {
|
|
37 |
} ) } onClick={ this.checkAnswer }
|
38 |
>
|
39 |
<span className="instant-check__icon" />
|
40 |
-
{
|
41 |
|
42 |
{ ! answered && (
|
43 |
<div className="instant-check__info" dangerouslySetInnerHTML={ { __html: __( 'You need to answer the question before check answer.', 'learnpress' ) } } />
|
3 |
import { Component } from '@wordpress/element';
|
4 |
import { withDispatch, withSelect } from '@wordpress/data';
|
5 |
import { compose } from '@wordpress/compose';
|
6 |
+
import { __ } from '@wordpress/i18n';
|
7 |
|
8 |
class ButtonCheck extends Component {
|
9 |
constructor() {
|
37 |
} ) } onClick={ this.checkAnswer }
|
38 |
>
|
39 |
<span className="instant-check__icon" />
|
40 |
+
{ __( 'Check answer', 'learnpress' ) }
|
41 |
|
42 |
{ ! answered && (
|
43 |
<div className="instant-check__info" dangerouslySetInnerHTML={ { __html: __( 'You need to answer the question before check answer.', 'learnpress' ) } } />
|
assets/src/apps/js/frontend/quiz/components/buttons/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import { Component } from '@wordpress/element';
|
2 |
import { withSelect, withDispatch, select } from '@wordpress/data';
|
3 |
import { compose } from '@wordpress/compose';
|
4 |
-
import { __
|
5 |
|
6 |
class Buttons extends Component {
|
7 |
startQuiz = ( event ) => {
|
@@ -16,7 +16,7 @@ class Buttons extends Component {
|
|
16 |
if ( status === 'completed' ) {
|
17 |
const { confirm, isOpen } = select( 'learnpress/modal' );
|
18 |
|
19 |
-
if ( 'no' === confirm( 'Are you sure you want to
|
20 |
! isOpen() && btn && btn.removeAttribute( 'disabled' );
|
21 |
return;
|
22 |
}
|
@@ -246,7 +246,7 @@ class Buttons extends Component {
|
|
246 |
|
247 |
{ ( ( status === 'completed' && canRetry ) || -1 !== [ '', 'viewed' ].indexOf( status ) ) && ! isReviewing && (
|
248 |
<button className="lp-button start" onClick={ this.startQuiz }>
|
249 |
-
{ ( status === 'completed' ) ? `${
|
250 |
</button>
|
251 |
) }
|
252 |
|
1 |
import { Component } from '@wordpress/element';
|
2 |
import { withSelect, withDispatch, select } from '@wordpress/data';
|
3 |
import { compose } from '@wordpress/compose';
|
4 |
+
import { __ } from '@wordpress/i18n';
|
5 |
|
6 |
class Buttons extends Component {
|
7 |
startQuiz = ( event ) => {
|
16 |
if ( status === 'completed' ) {
|
17 |
const { confirm, isOpen } = select( 'learnpress/modal' );
|
18 |
|
19 |
+
if ( 'no' === confirm( __( 'Are you sure you want to retake quiz?', 'learnpress' ), this.startQuiz ) ) {
|
20 |
! isOpen() && btn && btn.removeAttribute( 'disabled' );
|
21 |
return;
|
22 |
}
|
246 |
|
247 |
{ ( ( status === 'completed' && canRetry ) || -1 !== [ '', 'viewed' ].indexOf( status ) ) && ! isReviewing && (
|
248 |
<button className="lp-button start" onClick={ this.startQuiz }>
|
249 |
+
{ ( status === 'completed' ) ? `${ __( 'Retake', 'learnpress' ) }${ retakeNumber ? ` (${ retakeNumber })` : '' }` : __( 'Start', 'learnpress' ) }
|
250 |
</button>
|
251 |
) }
|
252 |
|
assets/src/apps/js/frontend/quiz/components/questions/question.js
CHANGED
@@ -105,7 +105,7 @@ class Question extends Component {
|
|
105 |
},
|
106 |
|
107 |
title: () => {
|
108 |
-
return question.title;
|
109 |
},
|
110 |
|
111 |
hint: () => {
|
105 |
},
|
106 |
|
107 |
title: () => {
|
108 |
+
return ( <span dangerouslySetInnerHTML={ { __html: question.title } } /> );
|
109 |
},
|
110 |
|
111 |
hint: () => {
|
assets/src/apps/js/frontend/quiz/components/result/index.js
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
*/
|
7 |
import { useState, useEffect } from '@wordpress/element';
|
8 |
import { useSelect } from '@wordpress/data';
|
9 |
-
import { __
|
10 |
|
11 |
import { getResponse } from '../../../single-curriculum/components/items-progress';
|
12 |
|
@@ -28,6 +28,10 @@ const Result = () => {
|
|
28 |
return select( 'learnpress/quiz' ).getData( 'id' );
|
29 |
}, [] );
|
30 |
|
|
|
|
|
|
|
|
|
31 |
useEffect( () => {
|
32 |
animate();
|
33 |
|
@@ -62,10 +66,14 @@ const Result = () => {
|
|
62 |
itemCompleted.textContent = parseInt( allItemCompleted.length );
|
63 |
}
|
64 |
}
|
65 |
-
|
66 |
-
updateItemsProgress();
|
67 |
}, [ results ] );
|
68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
const updateItemsProgress = () => {
|
70 |
const elements = document.querySelectorAll( '.popup-header__inner' );
|
71 |
|
6 |
*/
|
7 |
import { useState, useEffect } from '@wordpress/element';
|
8 |
import { useSelect } from '@wordpress/data';
|
9 |
+
import { __ } from '@wordpress/i18n';
|
10 |
|
11 |
import { getResponse } from '../../../single-curriculum/components/items-progress';
|
12 |
|
28 |
return select( 'learnpress/quiz' ).getData( 'id' );
|
29 |
}, [] );
|
30 |
|
31 |
+
const submitting = useSelect( ( select ) => {
|
32 |
+
return select( 'learnpress/quiz' ).getData( 'submitting' );
|
33 |
+
}, [] );
|
34 |
+
|
35 |
useEffect( () => {
|
36 |
animate();
|
37 |
|
66 |
itemCompleted.textContent = parseInt( allItemCompleted.length );
|
67 |
}
|
68 |
}
|
|
|
|
|
69 |
}, [ results ] );
|
70 |
|
71 |
+
useEffect( () => {
|
72 |
+
if ( submitting !== undefined ) {
|
73 |
+
updateItemsProgress();
|
74 |
+
}
|
75 |
+
}, [ submitting ] );
|
76 |
+
|
77 |
const updateItemsProgress = () => {
|
78 |
const elements = document.querySelectorAll( '.popup-header__inner' );
|
79 |
|
assets/src/apps/js/frontend/single-course/index.js
CHANGED
@@ -20,7 +20,7 @@ function run() {
|
|
20 |
Sidebar();
|
21 |
}
|
22 |
|
23 |
-
|
24 |
run();
|
25 |
} );
|
26 |
|
20 |
Sidebar();
|
21 |
}
|
22 |
|
23 |
+
document.addEventListener( 'DOMContentLoaded', () => {
|
24 |
run();
|
25 |
} );
|
26 |
|
assets/src/apps/js/frontend/single-curriculum/components/items-progress.js
CHANGED
@@ -13,6 +13,10 @@ export const itemsProgress = () => {
|
|
13 |
return;
|
14 |
}
|
15 |
|
|
|
|
|
|
|
|
|
16 |
if ( 'IntersectionObserver' in window ) {
|
17 |
const eleObserver = new IntersectionObserver( ( entries, observer ) => {
|
18 |
entries.forEach( ( entry ) => {
|
13 |
return;
|
14 |
}
|
15 |
|
16 |
+
if ( elements[ 0 ].querySelectorAll( 'form.form-button-finish-course' ).length !== 0 ) {
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
|
20 |
if ( 'IntersectionObserver' in window ) {
|
21 |
const eleObserver = new IntersectionObserver( ( entries, observer ) => {
|
22 |
entries.forEach( ( entry ) => {
|
assets/src/apps/js/frontend/single-curriculum/components/sidebar.js
CHANGED
@@ -2,16 +2,10 @@ const $ = jQuery;
|
|
2 |
const { throttle } = lodash;
|
3 |
|
4 |
export const Sidebar = () => {
|
5 |
-
|
6 |
-
const
|
7 |
-
let timerClearScroll;
|
8 |
-
|
9 |
-
$( document ).on( 'change', '#sidebar-toggle', ( event ) => {
|
10 |
-
LP.Cookies.set( 'sidebar-toggle', event.target.checked );
|
11 |
-
|
12 |
-
toggleSidebar( event.target.checked );
|
13 |
-
} );
|
14 |
|
|
|
15 |
const toggleSidebar = ( toggle ) => {
|
16 |
$( 'body' ).removeClass( 'lp-sidebar-toggle__open' );
|
17 |
$( 'body' ).removeClass( 'lp-sidebar-toggle__close' );
|
@@ -23,8 +17,26 @@ export const Sidebar = () => {
|
|
23 |
}
|
24 |
};
|
25 |
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
$curriculum.find( '.section-desc' ).each( ( i, el ) => {
|
29 |
const a = $( '<span class="show-desc"></span>' ).on( 'click', () => {
|
30 |
b.toggleClass( 'c' );
|
@@ -54,22 +66,5 @@ export const Sidebar = () => {
|
|
54 |
LP.Cookies.set( 'closed-section-' + lpGlobalSettings.post_id, [ ...new Set( sections ) ] );
|
55 |
} );
|
56 |
} );
|
57 |
-
|
58 |
-
// Popup only
|
59 |
-
if ( $popup.length ) {
|
60 |
-
$curriculum.on( 'scroll', throttle( function() {
|
61 |
-
const $self = $( this );
|
62 |
-
|
63 |
-
$self.addClass( 'scrolling' );
|
64 |
-
|
65 |
-
timerClearScroll && clearTimeout( timerClearScroll );
|
66 |
-
|
67 |
-
timerClearScroll = setTimeout( () => {
|
68 |
-
$self.removeClass( 'scrolling' );
|
69 |
-
}, 1000 );
|
70 |
-
}, 500 ) );
|
71 |
-
|
72 |
-
LP.toElement( '.course-item.current', { container: '.curriculum-scrollable:eq(1)', offset: 100, duration: 1 } );
|
73 |
-
}
|
74 |
};
|
75 |
|
2 |
const { throttle } = lodash;
|
3 |
|
4 |
export const Sidebar = () => {
|
5 |
+
// Tungnx - Show/hide sidebar curriculumn
|
6 |
+
const elSidebarToggle = document.querySelector( '#sidebar-toggle' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
+
// For style of theme
|
9 |
const toggleSidebar = ( toggle ) => {
|
10 |
$( 'body' ).removeClass( 'lp-sidebar-toggle__open' );
|
11 |
$( 'body' ).removeClass( 'lp-sidebar-toggle__close' );
|
17 |
}
|
18 |
};
|
19 |
|
20 |
+
// For lp and theme
|
21 |
+
if ( elSidebarToggle ) {
|
22 |
+
if ( $( window ).innerWidth() <= 768 ) {
|
23 |
+
elSidebarToggle.setAttribute( 'checked', 'checked' );
|
24 |
+
} else if ( LP.Cookies.get( 'sidebar-toggle' ) ) {
|
25 |
+
elSidebarToggle.setAttribute( 'checked', 'checked' );
|
26 |
+
} else {
|
27 |
+
elSidebarToggle.removeAttribute( 'checked' );
|
28 |
+
}
|
29 |
|
30 |
+
document.querySelector( '#popup-course' ).addEventListener( 'click', ( e ) => {
|
31 |
+
if ( e.target.id === 'sidebar-toggle' ) {
|
32 |
+
LP.Cookies.set( 'sidebar-toggle', e.target.checked ? true : false );
|
33 |
+
toggleSidebar( LP.Cookies.get( 'sidebar-toggle' ) );
|
34 |
+
}
|
35 |
+
} );
|
36 |
+
}
|
37 |
+
// End editor by tungnx
|
38 |
+
|
39 |
+
const $curriculum = $( '#learn-press-course-curriculum' );
|
40 |
$curriculum.find( '.section-desc' ).each( ( i, el ) => {
|
41 |
const a = $( '<span class="show-desc"></span>' ).on( 'click', () => {
|
42 |
b.toggleClass( 'c' );
|
66 |
LP.Cookies.set( 'closed-section-' + lpGlobalSettings.post_id, [ ...new Set( sections ) ] );
|
67 |
} );
|
68 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
};
|
70 |
|
assets/src/apps/js/frontend/single-curriculum/index.js
CHANGED
@@ -35,7 +35,7 @@ class SingleCurriculums extends Component {
|
|
35 |
|
36 |
export default SingleCurriculums;
|
37 |
|
38 |
-
|
39 |
LP.Hook.doAction( 'lp-compatible-builder' );
|
40 |
|
41 |
searchCourseContent();
|
35 |
|
36 |
export default SingleCurriculums;
|
37 |
|
38 |
+
document.addEventListener( 'DOMContentLoaded', () => {
|
39 |
LP.Hook.doAction( 'lp-compatible-builder' );
|
40 |
|
41 |
searchCourseContent();
|
assets/src/apps/js/frontend/single-curriculum/scrolltoitem.js
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
const $ = jQuery;
|
2 |
|
3 |
const scrollToItemCurrent = {
|
@@ -5,6 +7,7 @@ const scrollToItemCurrent = {
|
|
5 |
this.scrollToItemViewing = function() {
|
6 |
const elItemViewing = $( '.viewing-course-item' );
|
7 |
if ( elItemViewing.length ) {
|
|
|
8 |
const heightCourseItemContentHeader = $( '#popup-sidebar' ).outerHeight();
|
9 |
const heightSectionTitle = $( '.section-title' ).outerHeight();
|
10 |
const heightSectionHeader = $( '.section-header' ).outerHeight();
|
@@ -28,15 +31,11 @@ const scrollToItemCurrent = {
|
|
28 |
|
29 |
const elItemCurrent = $( '.course-item-' + idItem );
|
30 |
const offSetTop = elItemCurrent.offset().top;
|
31 |
-
|
|
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
} else {
|
36 |
-
numberOffSetTop = numberOffSetTop - heightSectionTitle;
|
37 |
-
}
|
38 |
-
$( '#learn-press-course-curriculum' ).animate( {
|
39 |
-
scrollTop: numberOffSetTop + 300,
|
40 |
}, 800 );
|
41 |
}
|
42 |
};
|
1 |
+
import lpModalOverlay from '../../utils/lp-modal-overlay';
|
2 |
+
|
3 |
const $ = jQuery;
|
4 |
|
5 |
const scrollToItemCurrent = {
|
7 |
this.scrollToItemViewing = function() {
|
8 |
const elItemViewing = $( '.viewing-course-item' );
|
9 |
if ( elItemViewing.length ) {
|
10 |
+
const elCourseCurriculumn = $( '#learn-press-course-curriculum' );
|
11 |
const heightCourseItemContentHeader = $( '#popup-sidebar' ).outerHeight();
|
12 |
const heightSectionTitle = $( '.section-title' ).outerHeight();
|
13 |
const heightSectionHeader = $( '.section-header' ).outerHeight();
|
31 |
|
32 |
const elItemCurrent = $( '.course-item-' + idItem );
|
33 |
const offSetTop = elItemCurrent.offset().top;
|
34 |
+
const offset = elItemCurrent.offset().top - elCourseCurriculumn.offset().top +
|
35 |
+
elCourseCurriculumn.scrollTop();
|
36 |
|
37 |
+
elCourseCurriculumn.animate( {
|
38 |
+
scrollTop: offset - heightSectionHeader,
|
|
|
|
|
|
|
|
|
|
|
39 |
}, 800 );
|
40 |
}
|
41 |
};
|
inc/abstracts/abstract-object-data.php
CHANGED
@@ -213,13 +213,13 @@ if ( ! class_exists( 'LP_Abstract_Object_Data' ) ) {
|
|
213 |
|
214 |
/**
|
215 |
* @param string $name
|
216 |
-
* @param
|
217 |
*
|
218 |
* @return array|bool|mixed|string
|
219 |
*/
|
220 |
-
public function get_extra_data( $name = '', $default =
|
221 |
if ( is_string( $name ) ) {
|
222 |
-
return array_key_exists( $name, $this->_extra_data ) ? $this->_extra_data[ $name ] : $default;
|
223 |
} elseif ( is_array( $name ) ) {
|
224 |
$data = array();
|
225 |
foreach ( $name as $key ) {
|
@@ -227,11 +227,9 @@ if ( ! class_exists( 'LP_Abstract_Object_Data' ) ) {
|
|
227 |
}
|
228 |
|
229 |
return $data;
|
230 |
-
} elseif ( true === $name ) {
|
231 |
-
return $this->_extra_data;
|
232 |
}
|
233 |
|
234 |
-
return
|
235 |
}
|
236 |
|
237 |
/**
|
213 |
|
214 |
/**
|
215 |
* @param string $name
|
216 |
+
* @param mixed $default
|
217 |
*
|
218 |
* @return array|bool|mixed|string
|
219 |
*/
|
220 |
+
public function get_extra_data( string $name = '', $default = false ) {
|
221 |
if ( is_string( $name ) ) {
|
222 |
+
return array_key_exists( $name, $this->_extra_data ) && ! empty( $this->_extra_data[ $name ] ) ? $this->_extra_data[ $name ] : $default;
|
223 |
} elseif ( is_array( $name ) ) {
|
224 |
$data = array();
|
225 |
foreach ( $name as $key ) {
|
227 |
}
|
228 |
|
229 |
return $data;
|
|
|
|
|
230 |
}
|
231 |
|
232 |
+
return $default;
|
233 |
}
|
234 |
|
235 |
/**
|
inc/admin/settings/class-lp-settings-general.php
CHANGED
@@ -71,6 +71,13 @@ class LP_Settings_General extends LP_Abstract_Settings_Page {
|
|
71 |
'default' => '',
|
72 |
'type' => 'pages-dropdown',
|
73 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
array(
|
75 |
'type' => 'sectionend',
|
76 |
),
|
@@ -127,11 +134,12 @@ class LP_Settings_General extends LP_Abstract_Settings_Page {
|
|
127 |
'type' => 'title',
|
128 |
),
|
129 |
array(
|
130 |
-
'title'
|
131 |
-
'id'
|
132 |
-
'default'
|
133 |
-
'type'
|
134 |
-
'
|
|
|
135 |
),
|
136 |
array(
|
137 |
'title' => esc_html__( 'Instructor registration', 'learnpress' ),
|
71 |
'default' => '',
|
72 |
'type' => 'pages-dropdown',
|
73 |
),
|
74 |
+
array(
|
75 |
+
'title' => esc_html__( 'Logout Redirect', 'learnpress' ),
|
76 |
+
'id' => 'logout_redirect_page_id',
|
77 |
+
'default' => '',
|
78 |
+
'type' => 'pages-dropdown',
|
79 |
+
'desc' => __( 'The page where user will be redirected to after logging out.', 'learnpress' ),
|
80 |
+
),
|
81 |
array(
|
82 |
'type' => 'sectionend',
|
83 |
),
|
134 |
'type' => 'title',
|
135 |
),
|
136 |
array(
|
137 |
+
'title' => esc_html__( 'Publish profile', 'learnpress' ),
|
138 |
+
'id' => 'publish_profile',
|
139 |
+
'default' => 'no',
|
140 |
+
'type' => 'checkbox',
|
141 |
+
'desc_tip' => esc_html__( 'This option will add a sub-item "Privacy" under Setting tab on the Profile page. If users want to publish or hide their course, quiz tab when other users visit their profile page, they need to enable/disable that option in the Privacy section.', 'learnpress' ),
|
142 |
+
'desc' => __( 'Public all user profile page (Overview tab only).', 'learnpress' ),
|
143 |
),
|
144 |
array(
|
145 |
'title' => esc_html__( 'Instructor registration', 'learnpress' ),
|
inc/admin/views/meta-boxes/course/settings.php
CHANGED
@@ -92,12 +92,7 @@ class LP_Meta_Box_Course extends LP_Meta_Box {
|
|
92 |
esc_html__( 'Choose a difficulty level.', 'learnpress' ),
|
93 |
'',
|
94 |
array(
|
95 |
-
'options' =>
|
96 |
-
'' => esc_html__( 'All levels', 'learnpress' ),
|
97 |
-
'beginner' => esc_html__( 'Beginner', 'learnpress' ),
|
98 |
-
'intermediate' => esc_html__( 'Intermediate', 'learnpress' ),
|
99 |
-
'expert' => esc_html__( 'Expert', 'learnpress' ),
|
100 |
-
),
|
101 |
)
|
102 |
),
|
103 |
'_lp_students' => new LP_Meta_Box_Text_Field(
|
92 |
esc_html__( 'Choose a difficulty level.', 'learnpress' ),
|
93 |
'',
|
94 |
array(
|
95 |
+
'options' => lp_course_level(),
|
|
|
|
|
|
|
|
|
|
|
96 |
)
|
97 |
),
|
98 |
'_lp_students' => new LP_Meta_Box_Text_Field(
|
inc/admin/views/meta-boxes/order/details.php
CHANGED
@@ -66,6 +66,15 @@ $user_ip = $order->get_user_ip_address();
|
|
66 |
}
|
67 |
?>
|
68 |
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
</div>
|
70 |
|
71 |
<div class="order-data-field order-data-user">
|
66 |
}
|
67 |
?>
|
68 |
</select>
|
69 |
+
|
70 |
+
<?php if ( $order->get_status() === 'completed' ) : ?>
|
71 |
+
<div>
|
72 |
+
<div style="padding: 10px 18px; margin-top: 10px; border: 2px solid #d80000; border-radius: 4px; display: inline-block;">
|
73 |
+
<span class="dashicons dashicons-warning" style="color:#d80000"></span>
|
74 |
+
<?php esc_html_e( 'When change Status to "Pending", "Cancelled" or "Failed" will delete all course, lesson, quiz... progress!', 'learnpress' ); ?>
|
75 |
+
</div>
|
76 |
+
</div>
|
77 |
+
<?php endif; ?>
|
78 |
</div>
|
79 |
|
80 |
<div class="order-data-field order-data-user">
|
inc/admin/views/meta-boxes/order/exports-invoice.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Order invoice export pdf Meta box
|
|
|
4 |
* @author hungkv
|
5 |
* @since 3.2.7.8
|
6 |
* @version 1.0.0
|
@@ -23,76 +24,75 @@ wp_enqueue_script( 'learnpress-jspdf' );
|
|
23 |
<?php global $post; ?>
|
24 |
|
25 |
<div class="submitbox" id="order-export">
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
</div>
|
31 |
</div>
|
32 |
|
33 |
<!-- The Modal -->
|
34 |
<div id="myModal" class="modal export-modal" style="display:none;">
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
<div id="lp-invoice">
|
51 |
-
<div id="lp-invoice__content">
|
52 |
<?php
|
53 |
-
learn_press_admin_view(
|
|
|
54 |
array(
|
55 |
'order' => $order,
|
56 |
-
'currency_symbol' => $currency_symbol
|
57 |
-
)
|
|
|
58 |
?>
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
|
95 |
-
|
96 |
-
|
97 |
|
98 |
-
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
* Admin View: Order invoice export pdf Meta box
|
4 |
+
*
|
5 |
* @author hungkv
|
6 |
* @since 3.2.7.8
|
7 |
* @version 1.0.0
|
24 |
<?php global $post; ?>
|
25 |
|
26 |
<div class="submitbox" id="order-export">
|
27 |
+
<div id="order-export__section">
|
28 |
+
<div id="editor"></div>
|
29 |
+
<button data-id="<?php echo esc_attr( $order->get_id() ); ?>" type="button" class="button" id="order-export__button"><?php echo esc_html__( 'PDF Invoice', 'learnpress' ); ?></button>
|
30 |
+
</div>
|
|
|
31 |
</div>
|
32 |
|
33 |
<!-- The Modal -->
|
34 |
<div id="myModal" class="modal export-modal" style="display:none;">
|
35 |
|
36 |
+
<!-- Modal content -->
|
37 |
+
<div class="modal-content">
|
38 |
+
<span class="close">×</span>
|
39 |
|
40 |
+
<!-- Tab links -->
|
41 |
+
<div class="tabs" id="order-export__tabs">
|
42 |
+
<div class="preview-tab tab active" data-target="pdf-preview"><?php echo esc_html__( 'PDF Preview', 'learnpress' ); ?></div>
|
43 |
+
<div class="options-tab tab" data-target="export-options"><?php echo esc_html__( 'Export Options', 'learnpress' ); ?></div>
|
44 |
+
</div>
|
45 |
+
<div id="panels">
|
46 |
+
<div class="pdf-preview panel active">
|
47 |
+
<!--Start print invoice-->
|
48 |
+
<div id="lp-invoice">
|
49 |
+
<div id="lp-invoice__content">
|
|
|
|
|
50 |
<?php
|
51 |
+
learn_press_admin_view(
|
52 |
+
'meta-boxes/order/content-tab-preview-exports-invoice.php',
|
53 |
array(
|
54 |
'order' => $order,
|
55 |
+
'currency_symbol' => $currency_symbol,
|
56 |
+
)
|
57 |
+
);
|
58 |
?>
|
59 |
+
</div>
|
60 |
+
<div id="lp-invoice__actions">
|
61 |
+
<button type="button"
|
62 |
+
id="lp-invoice__export"><?php echo esc_html__( 'Export to pdf', 'learnpress' ); ?></button>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<!--End print invoice-->
|
66 |
+
</div>
|
67 |
+
<div class="export-options panel">
|
68 |
+
<div class="export-options__content">
|
69 |
+
<h5>Please select the fields you want to display</h5>
|
70 |
+
<div class="export-options__select">
|
71 |
+
<input type="checkbox" name="site_title" value="" checked="checked">
|
72 |
+
<label for="order_date"> <?php echo esc_html__( 'Site Title', 'learnpress' ); ?></label><br>
|
73 |
+
<input type="checkbox" name="order_date" value="" checked="checked">
|
74 |
+
<label for="order_date"> <?php echo esc_html__( 'Order Date', 'learnpress' ); ?></label><br>
|
75 |
+
<input type="checkbox" name="invoice_no" value="" checked="checked">
|
76 |
+
<label for="order_date"> <?php echo esc_html__( 'Invoice No.', 'learnpress' ); ?></label><br>
|
77 |
+
<input type="checkbox" name="order_customer" value="" checked="checked">
|
78 |
+
<label for="order_date"> <?php echo esc_html__( 'Customer', 'learnpress' ); ?></label><br>
|
79 |
+
<input type="checkbox" name="order_email" value="" checked="checked">
|
80 |
+
<label for="order_date"> <?php echo esc_html__( 'Email', 'learnpress' ); ?></label><br>
|
81 |
+
<input type="checkbox" name="order_payment" value="" checked="checked">
|
82 |
+
<label for="order_payment"> <?php echo esc_html__( 'Payment Medthod', 'learnpress' ); ?></label>
|
83 |
+
</div>
|
84 |
+
<div class="export-options__loading">
|
85 |
+
<div class="spinner"></div>
|
86 |
+
</div>
|
87 |
+
</div>
|
88 |
+
<div class="export-options__actions">
|
89 |
+
<button type="button" data-id="<?php echo esc_attr( $order->get_id() ); ?>"
|
90 |
+
id="lp-invoice__update"><?php echo esc_html__( 'Update', 'learnpress' ); ?></button>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
|
95 |
+
<!--End print invoice-->
|
96 |
+
</div>
|
97 |
|
98 |
+
</div>
|
inc/class-lp-assets.php
CHANGED
@@ -154,6 +154,7 @@ class LP_Assets extends LP_Abstract_Assets {
|
|
154 |
array_merge(
|
155 |
$wp_js,
|
156 |
array(
|
|
|
157 |
'lp-global',
|
158 |
'lp-utils',
|
159 |
'lp-data-controls',
|
@@ -162,6 +163,7 @@ class LP_Assets extends LP_Abstract_Assets {
|
|
162 |
'lp-config',
|
163 |
'lp-single-curriculum',
|
164 |
'jquery-ui-sortable', //Use in question type: sorting choice - Nhamdv
|
|
|
165 |
)
|
166 |
),
|
167 |
array( LP_PAGE_QUIZ ),
|
@@ -217,6 +219,8 @@ class LP_Assets extends LP_Abstract_Assets {
|
|
217 |
)
|
218 |
);
|
219 |
|
|
|
|
|
220 |
}
|
221 |
|
222 |
/**
|
@@ -294,7 +298,11 @@ class LP_Assets extends LP_Abstract_Assets {
|
|
294 |
}
|
295 |
}
|
296 |
|
297 |
-
|
|
|
|
|
|
|
|
|
298 |
}
|
299 |
|
300 |
/**
|
154 |
array_merge(
|
155 |
$wp_js,
|
156 |
array(
|
157 |
+
'wp-i18n',
|
158 |
'lp-global',
|
159 |
'lp-utils',
|
160 |
'lp-data-controls',
|
163 |
'lp-config',
|
164 |
'lp-single-curriculum',
|
165 |
'jquery-ui-sortable', //Use in question type: sorting choice - Nhamdv
|
166 |
+
|
167 |
)
|
168 |
),
|
169 |
array( LP_PAGE_QUIZ ),
|
219 |
)
|
220 |
);
|
221 |
|
222 |
+
wp_set_script_translations( 'lp-quiz', 'learnpress' );
|
223 |
+
|
224 |
}
|
225 |
|
226 |
/**
|
298 |
}
|
299 |
}
|
300 |
|
301 |
+
/**
|
302 |
+
* Set translate on file js of folder js/dist
|
303 |
+
* Path translate of a string on file ".pot" if have must map to js/dist
|
304 |
+
*/
|
305 |
+
wp_set_script_translations( 'lp-quiz', 'learnpress' );
|
306 |
}
|
307 |
|
308 |
/**
|
inc/class-lp-session-handler.php
CHANGED
@@ -299,6 +299,13 @@ class LP_Session_Handler implements ArrayAccess {
|
|
299 |
$this->_data = array();
|
300 |
$this->_changed = false;
|
301 |
$this->_customer_id = $this->generate_customer_id();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
}
|
303 |
|
304 |
public function cleanup_sessions() {
|
299 |
$this->_data = array();
|
300 |
$this->_changed = false;
|
301 |
$this->_customer_id = $this->generate_customer_id();
|
302 |
+
|
303 |
+
$logout_redirect_page_id = LP_Settings::get_option( 'logout_redirect_page_id', false );
|
304 |
+
if ( $logout_redirect_page_id ) {
|
305 |
+
|
306 |
+
wp_safe_redirect( get_the_permalink( $logout_redirect_page_id ) );
|
307 |
+
die;
|
308 |
+
}
|
309 |
}
|
310 |
|
311 |
public function cleanup_sessions() {
|
inc/curds/class-lp-course-curd.php
CHANGED
@@ -1034,11 +1034,10 @@ if ( ! class_exists( 'LP_Course_CURD' ) ) {
|
|
1034 |
* @return int
|
1035 |
*/
|
1036 |
public function count_enrolled_users_by_orders( $course_id ) {
|
1037 |
-
|
1038 |
$completed = get_post_meta( $course_id, 'order-completed', true );
|
1039 |
$processing = get_post_meta( $course_id, 'order-processing', true );
|
1040 |
|
1041 |
-
return
|
1042 |
|
1043 |
$statuses = array( 'completed', 'processing' );
|
1044 |
$count = $this->count_by_orders( $course_id, $statuses );
|
1034 |
* @return int
|
1035 |
*/
|
1036 |
public function count_enrolled_users_by_orders( $course_id ) {
|
|
|
1037 |
$completed = get_post_meta( $course_id, 'order-completed', true );
|
1038 |
$processing = get_post_meta( $course_id, 'order-processing', true );
|
1039 |
|
1040 |
+
return absint( $completed ) + absint( $processing );
|
1041 |
|
1042 |
$statuses = array( 'completed', 'processing' );
|
1043 |
$count = $this->count_by_orders( $course_id, $statuses );
|
inc/lp-core-functions.php
CHANGED
@@ -1820,9 +1820,9 @@ function is_learnpress() {
|
|
1820 |
if ( ! function_exists( 'learn_press_is_search' ) ) {
|
1821 |
function learn_press_is_search() {
|
1822 |
return array_key_exists( 's', $_REQUEST ) && array_key_exists(
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
}
|
1827 |
}
|
1828 |
|
@@ -1962,7 +1962,7 @@ function learn_press_add_notice( $message, $type = 'updated' ) {
|
|
1962 |
function learn_press_setcookie( $name, $value, $expire = 0, $secure = false ) {
|
1963 |
$secure = ( 'https' === parse_url( wp_login_url(), PHP_URL_SCHEME ) );
|
1964 |
|
1965 |
-
setcookie( $name, $value, $expire, SITECOOKIEPATH !== COOKIEPATH ? SITECOOKIEPATH : COOKIEPATH, COOKIE_DOMAIN, $secure );
|
1966 |
}
|
1967 |
|
1968 |
/**
|
@@ -3870,3 +3870,12 @@ function lp_add_shortcode_profile() {
|
|
3870 |
}
|
3871 |
|
3872 |
add_action( 'template_redirect', 'lp_add_shortcode_profile' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1820 |
if ( ! function_exists( 'learn_press_is_search' ) ) {
|
1821 |
function learn_press_is_search() {
|
1822 |
return array_key_exists( 's', $_REQUEST ) && array_key_exists(
|
1823 |
+
'ref',
|
1824 |
+
$_REQUEST
|
1825 |
+
) && $_REQUEST['ref'] == 'course';
|
1826 |
}
|
1827 |
}
|
1828 |
|
1962 |
function learn_press_setcookie( $name, $value, $expire = 0, $secure = false ) {
|
1963 |
$secure = ( 'https' === parse_url( wp_login_url(), PHP_URL_SCHEME ) );
|
1964 |
|
1965 |
+
@setcookie( $name, $value, $expire, SITECOOKIEPATH !== COOKIEPATH ? SITECOOKIEPATH : COOKIEPATH, COOKIE_DOMAIN, $secure );
|
1966 |
}
|
1967 |
|
1968 |
/**
|
3870 |
}
|
3871 |
|
3872 |
add_action( 'template_redirect', 'lp_add_shortcode_profile' );
|
3873 |
+
|
3874 |
+
add_filter(
|
3875 |
+
'elementor/theme/get_location_templates/template_id',
|
3876 |
+
function() {
|
3877 |
+
if ( is_post_type_archive( LP_COURSE_CPT ) && class_exists( 'ElementorPro\Modules\ThemeBuilder\Conditions\Archive' ) ) {
|
3878 |
+
return false;
|
3879 |
+
}
|
3880 |
+
}
|
3881 |
+
);
|
inc/lp-template-functions.php
CHANGED
@@ -158,11 +158,18 @@ if ( ! function_exists( 'learn_press_content_item_body_class' ) ) {
|
|
158 |
function learn_press_content_item_body_class( $classes ) {
|
159 |
global $lp_course_item;
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
if ( $lp_course_item ) {
|
162 |
$classes[] = 'course-item-popup';
|
163 |
$classes[] = 'viewing-course-item';
|
164 |
$classes[] = 'viewing-course-item-' . $lp_course_item->get_id();
|
165 |
$classes[] = 'course-item-' . $lp_course_item->get_item_type();
|
|
|
166 |
}
|
167 |
|
168 |
return $classes;
|
@@ -1747,11 +1754,23 @@ function learn_press_get_post_level( $post_id ) {
|
|
1747 |
|
1748 |
return apply_filters(
|
1749 |
'learn-press/level-label',
|
1750 |
-
! empty( $level ) ?
|
1751 |
$post_id
|
1752 |
);
|
1753 |
}
|
1754 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1755 |
// function learn_press_is_preview_course() {
|
1756 |
// $course_id = isset( $GLOBALS['preview_course'] ) ? $GLOBALS['preview_course'] : 0;
|
1757 |
//
|
@@ -1815,7 +1834,7 @@ if ( ! function_exists( 'lp_profile_page_content' ) ) {
|
|
1815 |
if ( $profile_id ) {
|
1816 |
$profile_page = get_post( $profile_id );
|
1817 |
|
1818 |
-
//remove_shortcode( 'learn_press_profile' );
|
1819 |
$description = lp_format_page_content( wp_kses_post( $profile_page->post_content ) );
|
1820 |
|
1821 |
if ( $description ) {
|
158 |
function learn_press_content_item_body_class( $classes ) {
|
159 |
global $lp_course_item;
|
160 |
|
161 |
+
if ( wp_is_mobile() ) {
|
162 |
+
$sidebar_toggle_class = 'lp-sidebar-toggle__close';
|
163 |
+
} else {
|
164 |
+
$sidebar_toggle_class = learn_press_cookie_get( 'sidebar-toggle' ) ? 'lp-sidebar-toggle__close' : 'lp-sidebar-toggle__open';
|
165 |
+
}
|
166 |
+
|
167 |
if ( $lp_course_item ) {
|
168 |
$classes[] = 'course-item-popup';
|
169 |
$classes[] = 'viewing-course-item';
|
170 |
$classes[] = 'viewing-course-item-' . $lp_course_item->get_id();
|
171 |
$classes[] = 'course-item-' . $lp_course_item->get_item_type();
|
172 |
+
$classes[] = $sidebar_toggle_class;
|
173 |
}
|
174 |
|
175 |
return $classes;
|
1754 |
|
1755 |
return apply_filters(
|
1756 |
'learn-press/level-label',
|
1757 |
+
! empty( $level ) ? lp_course_level()[ $level ] : esc_html__( 'All levels', 'learnpress' ),
|
1758 |
$post_id
|
1759 |
);
|
1760 |
}
|
1761 |
|
1762 |
+
function lp_course_level() {
|
1763 |
+
return apply_filters(
|
1764 |
+
'lp/template/function/course/level',
|
1765 |
+
array(
|
1766 |
+
'' => esc_html__( 'All levels', 'learnpress' ),
|
1767 |
+
'beginner' => esc_html__( 'Beginner', 'learnpress' ),
|
1768 |
+
'intermediate' => esc_html__( 'Intermediate', 'learnpress' ),
|
1769 |
+
'expert' => esc_html__( 'Expert', 'learnpress' ),
|
1770 |
+
)
|
1771 |
+
);
|
1772 |
+
}
|
1773 |
+
|
1774 |
// function learn_press_is_preview_course() {
|
1775 |
// $course_id = isset( $GLOBALS['preview_course'] ) ? $GLOBALS['preview_course'] : 0;
|
1776 |
//
|
1834 |
if ( $profile_id ) {
|
1835 |
$profile_page = get_post( $profile_id );
|
1836 |
|
1837 |
+
// remove_shortcode( 'learn_press_profile' );
|
1838 |
$description = lp_format_page_content( wp_kses_post( $profile_page->post_content ) );
|
1839 |
|
1840 |
if ( $description ) {
|
inc/lp-template-hooks.php
CHANGED
@@ -367,6 +367,13 @@ add_action(
|
|
367 |
/** END: Course section */
|
368 |
|
369 |
/** BEGIN: Popup */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
|
371 |
/**
|
372 |
* @see LP_Template_Course::popup_header()
|
@@ -437,12 +444,17 @@ add_action( 'learn-press/course-item-content', LP()->template( 'course' )->func(
|
|
437 |
* @see LP_Template_Profile::tabs()
|
438 |
* @see LP_Template_Profile::content()
|
439 |
*/
|
440 |
-
add_action( 'learn-press/before-user-profile', LP()->template( 'profile' )->func( 'header' ), 10 );
|
|
|
441 |
add_action( 'learn-press/user-profile', LP()->template( 'profile' )->func( 'sidebar' ), 10 );
|
442 |
add_action( 'learn-press/user-profile', LP()->template( 'profile' )->func( 'content' ), 20 );
|
443 |
|
|
|
444 |
add_action( 'learn-press/user-profile-account', LP()->template( 'profile' )->func( 'avatar' ), 10 );
|
445 |
add_action( 'learn-press/user-profile-account', LP()->template( 'profile' )->func( 'socials' ), 10 );
|
|
|
|
|
|
|
446 |
add_action( 'learn-press/user-profile-tabs', LP()->template( 'profile' )->func( 'tabs' ), 10 );
|
447 |
|
448 |
|
367 |
/** END: Course section */
|
368 |
|
369 |
/** BEGIN: Popup */
|
370 |
+
/**
|
371 |
+
* @see single-button-toggle-sidebar
|
372 |
+
*/
|
373 |
+
add_action( 'learn-press/single-button-toggle-sidebar',
|
374 |
+
LP()->template( 'course' )->text( '<input type="checkbox" id="sidebar-toggle" />','single-button-toggle-sidebar' ),
|
375 |
+
5
|
376 |
+
);
|
377 |
|
378 |
/**
|
379 |
* @see LP_Template_Course::popup_header()
|
444 |
* @see LP_Template_Profile::tabs()
|
445 |
* @see LP_Template_Profile::content()
|
446 |
*/
|
447 |
+
//add_action( 'learn-press/before-user-profile', LP()->template( 'profile' )->func( 'header' ), 10 );
|
448 |
+
|
449 |
add_action( 'learn-press/user-profile', LP()->template( 'profile' )->func( 'sidebar' ), 10 );
|
450 |
add_action( 'learn-press/user-profile', LP()->template( 'profile' )->func( 'content' ), 20 );
|
451 |
|
452 |
+
add_action( 'learn-press/user-profile-account', LP()->template( 'profile' )->text( ' <div class="lp-profile-left">','user-profile-account-left-open' ), 5);
|
453 |
add_action( 'learn-press/user-profile-account', LP()->template( 'profile' )->func( 'avatar' ), 10 );
|
454 |
add_action( 'learn-press/user-profile-account', LP()->template( 'profile' )->func( 'socials' ), 10 );
|
455 |
+
add_action( 'learn-press/user-profile-account', LP()->template( 'profile' )->text( ' </div>','user-profile-account-left-close' ), 15);
|
456 |
+
add_action( 'learn-press/user-profile-account', LP()->template( 'profile' )->func( 'header' ), 20 );
|
457 |
+
|
458 |
add_action( 'learn-press/user-profile-tabs', LP()->template( 'profile' )->func( 'tabs' ), 10 );
|
459 |
|
460 |
|
inc/order/lp-order-functions.php
CHANGED
@@ -722,14 +722,14 @@ function learn_press_get_register_order_statuses() {
|
|
722 |
'show_in_admin_status_list' => true,
|
723 |
'label_count' => _n_noop( 'Pending Payment <span class="count">(%s)</span>', 'Pending Payment <span class="count">(%s)</span>', 'learnpress' ),
|
724 |
);
|
725 |
-
$order_statues['lp-processing'] = array(
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
);
|
733 |
$order_statues['lp-completed'] = array(
|
734 |
'label' => _x( 'Completed', 'Order status', 'learnpress' ),
|
735 |
'public' => false,
|
722 |
'show_in_admin_status_list' => true,
|
723 |
'label_count' => _n_noop( 'Pending Payment <span class="count">(%s)</span>', 'Pending Payment <span class="count">(%s)</span>', 'learnpress' ),
|
724 |
);
|
725 |
+
// $order_statues['lp-processing'] = array(
|
726 |
+
// 'label' => _x( 'Processing', 'Order status', 'learnpress' ),
|
727 |
+
// 'public' => false,
|
728 |
+
// 'exclude_from_search' => false,
|
729 |
+
// 'show_in_admin_all_list' => true,
|
730 |
+
// 'show_in_admin_status_list' => true,
|
731 |
+
// 'label_count' => _n_noop( 'Processing <span class="count">(%s)</span>', 'Processing <span class="count">(%s)</span>', 'learnpress' ),
|
732 |
+
// );
|
733 |
$order_statues['lp-completed'] = array(
|
734 |
'label' => _x( 'Completed', 'Order status', 'learnpress' ),
|
735 |
'public' => false,
|
inc/question/class-lp-question.php
CHANGED
@@ -566,7 +566,7 @@ if ( ! class_exists( 'LP_Question' ) ) {
|
|
566 |
* @return string
|
567 |
*/
|
568 |
public function get_type_label() {
|
569 |
-
return
|
570 |
}
|
571 |
|
572 |
protected function _init() {
|
566 |
* @return string
|
567 |
*/
|
568 |
public function get_type_label() {
|
569 |
+
return learn_press_question_types()[ $this->get_type() ];
|
570 |
}
|
571 |
|
572 |
protected function _init() {
|
inc/templates/class-lp-template-profile.php
CHANGED
@@ -71,6 +71,18 @@ class LP_Template_Profile extends LP_Abstract_Template {
|
|
71 |
}
|
72 |
|
73 |
public function dashboard_featured_courses() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
$user = $this->get_user();
|
75 |
$query = new LP_Course_Query(
|
76 |
array(
|
@@ -87,6 +99,18 @@ class LP_Template_Profile extends LP_Abstract_Template {
|
|
87 |
}
|
88 |
|
89 |
public function dashboard_latest_courses() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
$user = $this->get_user();
|
91 |
$query = new LP_Course_Query(
|
92 |
array(
|
71 |
}
|
72 |
|
73 |
public function dashboard_featured_courses() {
|
74 |
+
$profile_privacy = $this->get_user()->get_extra_data(
|
75 |
+
'profile_privacy',
|
76 |
+
array(
|
77 |
+
'courses' => 'no',
|
78 |
+
'quizzes' => 'no',
|
79 |
+
)
|
80 |
+
);
|
81 |
+
|
82 |
+
if ( $this->get_user()->get_id() !== get_current_user_id() && 'yes' !== $profile_privacy['courses'] ) {
|
83 |
+
return;
|
84 |
+
}
|
85 |
+
|
86 |
$user = $this->get_user();
|
87 |
$query = new LP_Course_Query(
|
88 |
array(
|
99 |
}
|
100 |
|
101 |
public function dashboard_latest_courses() {
|
102 |
+
$profile_privacy = $this->get_user()->get_extra_data(
|
103 |
+
'profile_privacy',
|
104 |
+
array(
|
105 |
+
'courses' => 'no',
|
106 |
+
'quizzes' => 'no',
|
107 |
+
)
|
108 |
+
);
|
109 |
+
|
110 |
+
if ( $this->get_user()->get_id() !== get_current_user_id() && 'yes' !== $profile_privacy['courses'] ) {
|
111 |
+
return;
|
112 |
+
}
|
113 |
+
|
114 |
$user = $this->get_user();
|
115 |
$query = new LP_Course_Query(
|
116 |
array(
|
inc/user/class-lp-profile.php
CHANGED
@@ -195,7 +195,7 @@ if ( ! class_exists( 'LP_Profile' ) ) {
|
|
195 |
$this->_privacy = apply_filters(
|
196 |
'learn-press/check-privacy-setting',
|
197 |
array(
|
198 |
-
'view-tab-dashboard' =>
|
199 |
'view-tab-courses' => $this->get_privacy( 'courses' ) == 'yes',
|
200 |
'view-tab-quizzes' => $this->get_privacy( 'quizzes' ) == 'yes',
|
201 |
),
|
@@ -332,7 +332,7 @@ if ( ! class_exists( 'LP_Profile' ) ) {
|
|
332 |
);
|
333 |
}
|
334 |
|
335 |
-
if ( 'yes' ===
|
336 |
$this->_default_settings['settings']['sections']['privacy'] = array(
|
337 |
'title' => esc_html__( 'Privacy', 'learnpress' ),
|
338 |
'slug' => $settings->get( 'profile_endpoints.settings-privacy', 'privacy' ),
|
@@ -1044,8 +1044,11 @@ if ( ! class_exists( 'LP_Profile' ) ) {
|
|
1044 |
$uploaded_profile_src = $upload['baseurl'] . '/' . $profile_picture;
|
1045 |
|
1046 |
if ( $user->get_data( 'profile_picture_changed' ) == 'yes' ) {
|
1047 |
-
$uploaded_profile_src = add_query_arg(
|
1048 |
-
|
|
|
|
|
|
|
1049 |
delete_user_meta( $user->get_id(), '_lp_profile_picture_changed' );
|
1050 |
}
|
1051 |
} else {
|
@@ -1081,6 +1084,15 @@ if ( ! class_exists( 'LP_Profile' ) ) {
|
|
1081 |
return $avatar;
|
1082 |
}
|
1083 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1084 |
/**
|
1085 |
* Get an instance of LP_Profile for a user id
|
1086 |
*
|
195 |
$this->_privacy = apply_filters(
|
196 |
'learn-press/check-privacy-setting',
|
197 |
array(
|
198 |
+
'view-tab-dashboard' => self::get_option_publish_profile() == 'yes',
|
199 |
'view-tab-courses' => $this->get_privacy( 'courses' ) == 'yes',
|
200 |
'view-tab-quizzes' => $this->get_privacy( 'quizzes' ) == 'yes',
|
201 |
),
|
332 |
);
|
333 |
}
|
334 |
|
335 |
+
if ( 'yes' === self::get_option_publish_profile() ) {
|
336 |
$this->_default_settings['settings']['sections']['privacy'] = array(
|
337 |
'title' => esc_html__( 'Privacy', 'learnpress' ),
|
338 |
'slug' => $settings->get( 'profile_endpoints.settings-privacy', 'privacy' ),
|
1044 |
$uploaded_profile_src = $upload['baseurl'] . '/' . $profile_picture;
|
1045 |
|
1046 |
if ( $user->get_data( 'profile_picture_changed' ) == 'yes' ) {
|
1047 |
+
$uploaded_profile_src = add_query_arg(
|
1048 |
+
'r',
|
1049 |
+
md5( rand( 0, 10 ) / rand( 1, 1000000 ) ),
|
1050 |
+
$user->get_data( 'uploaded_profile_src' )
|
1051 |
+
);
|
1052 |
delete_user_meta( $user->get_id(), '_lp_profile_picture_changed' );
|
1053 |
}
|
1054 |
} else {
|
1084 |
return $avatar;
|
1085 |
}
|
1086 |
|
1087 |
+
/**
|
1088 |
+
* Get option enable "Publish profile"
|
1089 |
+
*
|
1090 |
+
* @return string
|
1091 |
+
*/
|
1092 |
+
public static function get_option_publish_profile(): string {
|
1093 |
+
return LP_Settings::get_option( 'publish_profile', 'no' );
|
1094 |
+
}
|
1095 |
+
|
1096 |
/**
|
1097 |
* Get an instance of LP_Profile for a user id
|
1098 |
*
|
inc/user/class-lp-user-factory.php
CHANGED
@@ -87,6 +87,8 @@ class LP_User_Factory {
|
|
87 |
* @param LP_Order $order
|
88 |
* @param string $old_status
|
89 |
* @param string $new_status
|
|
|
|
|
90 |
*/
|
91 |
protected static function _update_user_item_pending( $order, $old_status, $new_status ) {
|
92 |
$curd = new LP_User_CURD();
|
@@ -96,22 +98,68 @@ class LP_User_Factory {
|
|
96 |
return;
|
97 |
}
|
98 |
|
|
|
|
|
99 |
foreach ( $order->get_users() as $user_id ) {
|
100 |
foreach ( $items as $item ) {
|
101 |
if ( ! isset( $item['course_id'] ) ) {
|
102 |
continue;
|
103 |
}
|
104 |
|
105 |
-
$
|
106 |
|
107 |
-
if ( $
|
108 |
-
|
109 |
-
$
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
|
113 |
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
116 |
}
|
117 |
}
|
87 |
* @param LP_Order $order
|
88 |
* @param string $old_status
|
89 |
* @param string $new_status
|
90 |
+
*
|
91 |
+
* @author Nhamdv <email@email.com>
|
92 |
*/
|
93 |
protected static function _update_user_item_pending( $order, $old_status, $new_status ) {
|
94 |
$curd = new LP_User_CURD();
|
98 |
return;
|
99 |
}
|
100 |
|
101 |
+
global $wpdb;
|
102 |
+
|
103 |
foreach ( $order->get_users() as $user_id ) {
|
104 |
foreach ( $items as $item ) {
|
105 |
if ( ! isset( $item['course_id'] ) ) {
|
106 |
continue;
|
107 |
}
|
108 |
|
109 |
+
$user_item_id = LP_Course_DB::getInstance()->get_user_item_id( $order->get_id(), $item['course_id'], $user_id );
|
110 |
|
111 |
+
if ( $user_item_id ) {
|
112 |
+
$wpdb->delete(
|
113 |
+
$wpdb->learnpress_user_items,
|
114 |
+
array(
|
115 |
+
'user_item_id' => $user_item_id,
|
116 |
+
),
|
117 |
+
array( '%d' )
|
118 |
+
);
|
119 |
|
120 |
+
// DELETE user_itemmeta by user_item_id.
|
121 |
+
$wpdb->delete(
|
122 |
+
$wpdb->learnpress_user_itemmeta,
|
123 |
+
array(
|
124 |
+
'learnpress_user_item_id' => absint( $user_item_id ),
|
125 |
+
),
|
126 |
+
array( '%d' )
|
127 |
+
);
|
128 |
+
|
129 |
+
// DELETE user_item_result
|
130 |
+
LP_User_Items_Result_DB::instance()->delete( absint( $user_item_id ) );
|
131 |
+
|
132 |
+
// DELETE Lesson, Quiz in Course.
|
133 |
+
$wpdb->delete(
|
134 |
+
$wpdb->learnpress_user_items,
|
135 |
+
array(
|
136 |
+
'parent_id' => $user_item_id,
|
137 |
+
),
|
138 |
+
array( '%d' )
|
139 |
+
);
|
140 |
+
|
141 |
+
$child_user_item_ids = $wpdb->get_col(
|
142 |
+
$wpdb->prepare(
|
143 |
+
"SELECT user_item_id FROM $wpdb->learnpress_user_items
|
144 |
+
WHERE parent_id=%d",
|
145 |
+
$user_item_id
|
146 |
+
)
|
147 |
+
);
|
148 |
+
|
149 |
+
// DELETE user_itemmeta for ( lesson, quiz... )
|
150 |
+
if ( ! empty( $child_user_item_ids ) ) {
|
151 |
+
foreach ( $child_user_item_ids as $child_user_item_id ) {
|
152 |
+
$wpdb->delete(
|
153 |
+
$wpdb->learnpress_user_itemmeta,
|
154 |
+
array(
|
155 |
+
'learnpress_user_item_id' => absint( $child_user_item_id ),
|
156 |
+
),
|
157 |
+
array( '%d' )
|
158 |
+
);
|
159 |
+
|
160 |
+
LP_User_Items_Result_DB::instance()->delete( absint( $child_user_item_id ) );
|
161 |
+
}
|
162 |
+
}
|
163 |
}
|
164 |
}
|
165 |
}
|
languages/learnpress.pot
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
# This file is distributed under the same license as the LearnPress plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: LearnPress 4.0.
|
6 |
"Report-Msgid-Bugs-To: https://github.com/LearnPress/learnpress/issues\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2021-05-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"last-translator: admin@email.com\n"
|
@@ -46,14 +46,14 @@ msgid "No setting available."
|
|
46 |
msgstr ""
|
47 |
|
48 |
#: inc/abstracts/abstract-addon.php:284
|
49 |
-
msgid "<strong>%1$s</strong> add-on version %2$s requires <strong>LearnPress</strong> version %3$s or higher"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: inc/abstracts/abstract-addon.php:
|
53 |
msgid "%s plugin file does not exist."
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: inc/abstracts/abstract-addon.php:
|
57 |
msgid "%s plugin class does not exist."
|
58 |
msgstr ""
|
59 |
|
@@ -66,17 +66,17 @@ msgid "Dismissed!"
|
|
66 |
msgstr ""
|
67 |
|
68 |
#: inc/admin/class-lp-admin-ajax.php:376
|
69 |
-
#: inc/admin/class-lp-admin.php:
|
70 |
msgid "Fail while joining newsletter! Please try again!"
|
71 |
msgstr ""
|
72 |
|
73 |
#: inc/admin/class-lp-admin-ajax.php:400
|
74 |
-
#: inc/admin/class-lp-admin.php:
|
75 |
msgid "Something went wrong: "
|
76 |
msgstr ""
|
77 |
|
78 |
#: inc/admin/class-lp-admin-ajax.php:403
|
79 |
-
#: inc/admin/class-lp-admin.php:
|
80 |
msgid "Thank you for subscribing! Please check and click the confirmation link from the email we've just sent to your mail box."
|
81 |
msgstr ""
|
82 |
|
@@ -133,9 +133,10 @@ msgstr ""
|
|
133 |
#: inc/admin/views/meta-boxes/course/tabs/price.php:72
|
134 |
#: inc/admin/views/meta-boxes/fields/date.php:35
|
135 |
#: inc/class-lp-assets.php:61
|
136 |
-
#: inc/lp-core-functions.php:
|
137 |
-
#: inc/lp-core-functions.php:
|
138 |
-
#: inc/order/class-lp-order.php:
|
|
|
139 |
msgid "Cancel"
|
140 |
msgstr ""
|
141 |
|
@@ -216,14 +217,6 @@ msgstr ""
|
|
216 |
msgid "Learning Management System"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: inc/admin/class-lp-admin-tools.php:133
|
220 |
-
msgid "All courses, lessons, quizzes and questions have been removed"
|
221 |
-
msgstr ""
|
222 |
-
|
223 |
-
#: inc/admin/class-lp-admin-tools.php:213
|
224 |
-
msgid "Outdated data from version older than 1.0 has been removed"
|
225 |
-
msgstr ""
|
226 |
-
|
227 |
#: inc/admin/class-lp-admin.php:90
|
228 |
msgid "Available Courses"
|
229 |
msgstr ""
|
@@ -310,7 +303,7 @@ msgstr ""
|
|
310 |
|
311 |
#: inc/admin/class-lp-admin.php:305
|
312 |
#: inc/admin/settings/class-lp-settings-profile.php:24
|
313 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
314 |
#: inc/admin/views/setup/steps/pages.php:31
|
315 |
msgid "Profile"
|
316 |
msgstr ""
|
@@ -351,19 +344,19 @@ msgstr ""
|
|
351 |
msgid "User has %s to become a teacher."
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: inc/admin/class-lp-admin.php:
|
355 |
msgid "LearnPress requires permalink option <strong>Post name</strong> is enabled. Please enable it <a href=\"%s\">here</a> to ensure that all functions work properly."
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: inc/admin/class-lp-admin.php:
|
359 |
msgid "If you like <strong>LearnPress</strong> please leave us a %1$s★★★★★%2$s rating. A huge thanks from LearnPress team for your generous."
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: inc/admin/class-lp-admin.php:
|
363 |
msgid "Thanks :)"
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: inc/admin/class-lp-admin.php:
|
367 |
msgid "Permalink only available if the item is already assigned to a course."
|
368 |
msgstr ""
|
369 |
|
@@ -387,7 +380,7 @@ msgstr ""
|
|
387 |
#: inc/custom-post-types/abstract.php:790
|
388 |
#: inc/custom-post-types/abstract.php:799
|
389 |
#: inc/custom-post-types/question.php:374
|
390 |
-
#: inc/order/class-lp-order.php:
|
391 |
msgid "View"
|
392 |
msgstr ""
|
393 |
|
@@ -396,6 +389,7 @@ msgstr ""
|
|
396 |
#: inc/custom-post-types/abstract.php:591
|
397 |
#: inc/custom-post-types/question.php:372
|
398 |
#: templates/content-lesson/content.php:20
|
|
|
399 |
msgid "Edit"
|
400 |
msgstr ""
|
401 |
|
@@ -431,7 +425,7 @@ msgstr ""
|
|
431 |
#: inc/admin/class-lp-modal-search-items.php:61
|
432 |
#: inc/admin/class-lp-modal-search-users.php:49
|
433 |
#: inc/admin/views/course/modal-choose-items.php:66
|
434 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
435 |
#: inc/admin/views/quiz/modal-choose-items.php:58
|
436 |
msgid "Close"
|
437 |
msgstr ""
|
@@ -443,13 +437,13 @@ msgstr ""
|
|
443 |
|
444 |
#: inc/admin/class-lp-modal-search-items.php:184
|
445 |
#: inc/admin/class-lp-modal-search-users.php:141
|
446 |
-
#: inc/lp-core-functions.php:
|
447 |
msgid "<"
|
448 |
msgstr ""
|
449 |
|
450 |
#: inc/admin/class-lp-modal-search-items.php:185
|
451 |
#: inc/admin/class-lp-modal-search-users.php:142
|
452 |
-
#: inc/lp-core-functions.php:
|
453 |
msgid ">"
|
454 |
msgstr ""
|
455 |
|
@@ -529,7 +523,7 @@ msgstr ""
|
|
529 |
|
530 |
#: inc/admin/class-lp-plugin-install-list-table.php:490
|
531 |
#: inc/class-lp-datetime.php:209
|
532 |
-
#: inc/custom-post-types/order.php:
|
533 |
#: inc/order/class-lp-order.php:150
|
534 |
#: inc/user-item/class-lp-user-item.php:182
|
535 |
msgid "%s ago"
|
@@ -554,11 +548,11 @@ msgstr ""
|
|
554 |
msgid "<strong>Compatible</strong> with your version of WordPress"
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: inc/admin/class-lp-reset-data.php:
|
558 |
msgid "Item progress deleted"
|
559 |
msgstr ""
|
560 |
|
561 |
-
#: inc/admin/class-lp-reset-data.php:
|
562 |
msgid "No data found"
|
563 |
msgstr ""
|
564 |
|
@@ -587,32 +581,32 @@ msgctxt "static-page"
|
|
587 |
msgid "LP Terms and Conditions"
|
588 |
msgstr ""
|
589 |
|
590 |
-
#: inc/admin/class-lp-setup-wizard.php:
|
591 |
msgid "Welcome"
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: inc/admin/class-lp-setup-wizard.php:
|
595 |
msgid "Run Setup Wizard"
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: inc/admin/class-lp-setup-wizard.php:
|
599 |
msgid "Pages"
|
600 |
msgstr ""
|
601 |
|
602 |
-
#: inc/admin/class-lp-setup-wizard.php:
|
603 |
#: inc/admin/meta-box/fields/payment-order.php:7
|
604 |
#: inc/admin/views/setup/steps/payment.php:16
|
605 |
#: templates/checkout/payment.php:25
|
606 |
msgid "Payment"
|
607 |
msgstr ""
|
608 |
|
609 |
-
#: inc/admin/class-lp-setup-wizard.php:
|
610 |
#: inc/admin/views/setup/content.php:94
|
611 |
#: inc/admin/views/setup/steps/finish.php:12
|
612 |
msgid "Finish"
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: inc/admin/class-lp-setup-wizard.php:
|
616 |
#: inc/gateways/paypal/class-lp-gateway-paypal.php:91
|
617 |
#: inc/gateways/paypal/class-lp-gateway-paypal.php:95
|
618 |
msgid "PayPal"
|
@@ -729,7 +723,7 @@ msgid "Enable Now"
|
|
729 |
msgstr ""
|
730 |
|
731 |
#: inc/admin/helpers/class-lp-plugins-helper.php:271
|
732 |
-
#: templates/single-course/buttons/purchase.php:
|
733 |
msgid "Buy Now"
|
734 |
msgstr ""
|
735 |
|
@@ -976,10 +970,6 @@ msgstr ""
|
|
976 |
msgid "Only check <strong><em>the final quiz</em></strong> result"
|
977 |
msgstr ""
|
978 |
|
979 |
-
#: inc/admin/meta-box/class-lp-meta-box-v3.php:311
|
980 |
-
msgid "LearnPress 4 don't use LP_Meta_Box_Tabs, please update your code."
|
981 |
-
msgstr ""
|
982 |
-
|
983 |
#: inc/admin/meta-box/fields/course-permalink.php:16
|
984 |
#: inc/admin/settings/class-lp-settings-courses.php:43
|
985 |
msgctxt "default-slug"
|
@@ -1138,8 +1128,8 @@ msgstr ""
|
|
1138 |
#: inc/admin/settings/class-lp-settings-courses.php:129
|
1139 |
#: inc/course/lp-course-functions.php:422
|
1140 |
#: inc/custom-post-types/lesson.php:166
|
1141 |
-
#: inc/lp-core-functions.php:
|
1142 |
-
#: inc/lp-template-functions.php:
|
1143 |
msgid "Lesson"
|
1144 |
msgstr ""
|
1145 |
|
@@ -1148,8 +1138,8 @@ msgstr ""
|
|
1148 |
#: inc/course/lp-course-functions.php:423
|
1149 |
#: inc/custom-post-types/question.php:328
|
1150 |
#: inc/custom-post-types/quiz.php:94
|
1151 |
-
#: inc/lp-core-functions.php:
|
1152 |
-
#: inc/lp-template-functions.php:
|
1153 |
#: templates/profile/tabs/quizzes.php:33
|
1154 |
msgid "Quiz"
|
1155 |
msgstr ""
|
@@ -1444,23 +1434,23 @@ msgid "Enable default fields"
|
|
1444 |
msgstr ""
|
1445 |
|
1446 |
#: inc/admin/settings/class-lp-settings-profile.php:89
|
1447 |
-
#: inc/user/lp-user-functions.php:
|
1448 |
-
#: inc/user/lp-user-functions.php:
|
1449 |
#: templates/profile/tabs/settings/basic-information.php:33
|
1450 |
msgid "First name"
|
1451 |
msgstr ""
|
1452 |
|
1453 |
#: inc/admin/settings/class-lp-settings-profile.php:96
|
1454 |
-
#: inc/user/lp-user-functions.php:
|
1455 |
-
#: inc/user/lp-user-functions.php:
|
1456 |
#: templates/profile/tabs/settings/basic-information.php:39
|
1457 |
msgid "Last name"
|
1458 |
msgstr ""
|
1459 |
|
1460 |
#: inc/admin/settings/class-lp-settings-profile.php:103
|
1461 |
#: inc/admin/settings/class-lp-settings-profile.php:115
|
1462 |
-
#: inc/user/lp-user-functions.php:
|
1463 |
-
#: inc/user/lp-user-functions.php:
|
1464 |
#: templates/profile/tabs/settings/basic-information.php:45
|
1465 |
msgid "Display name"
|
1466 |
msgstr ""
|
@@ -1535,9 +1525,9 @@ msgstr ""
|
|
1535 |
#: inc/admin/sub-menus/class-lp-submenu-statistics.php:22
|
1536 |
#: inc/admin/sub-menus/class-lp-submenu-statistics.php:29
|
1537 |
#: inc/class-lp-gdpr.php:183
|
1538 |
-
#: inc/custom-post-types/order.php:
|
1539 |
-
#: inc/custom-post-types/order.php:
|
1540 |
-
#: inc/custom-post-types/order.php:
|
1541 |
#: inc/user/class-lp-profile.php:284
|
1542 |
msgid "Orders"
|
1543 |
msgstr ""
|
@@ -1669,14 +1659,6 @@ msgstr ""
|
|
1669 |
msgid "Templates"
|
1670 |
msgstr ""
|
1671 |
|
1672 |
-
#: inc/admin/sub-menus/class-lp-submenu-tools.php:22
|
1673 |
-
msgid "Cron Jobs"
|
1674 |
-
msgstr ""
|
1675 |
-
|
1676 |
-
#: inc/admin/sub-menus/class-lp-submenu-tools.php:23
|
1677 |
-
msgid "Caches"
|
1678 |
-
msgstr ""
|
1679 |
-
|
1680 |
#: inc/admin/views/addons/html-loop-plugin.php:47
|
1681 |
msgid "Version: "
|
1682 |
msgstr ""
|
@@ -1909,27 +1891,27 @@ msgstr ""
|
|
1909 |
msgid "Choose a difficulty level."
|
1910 |
msgstr ""
|
1911 |
|
1912 |
-
#: inc/admin/views/meta-boxes/course/settings.php:96
|
1913 |
-
#: inc/admin/views/meta-boxes/course/tabs/general.php:52
|
1914 |
#: inc/lp-template-functions.php:1759
|
|
|
|
|
1915 |
msgid "All levels"
|
1916 |
msgstr ""
|
1917 |
|
1918 |
-
#: inc/
|
1919 |
#: inc/admin/views/meta-boxes/course/tabs/general.php:53
|
1920 |
-
#: inc/lp-core-functions.php:
|
1921 |
msgid "Beginner"
|
1922 |
msgstr ""
|
1923 |
|
1924 |
-
#: inc/
|
1925 |
#: inc/admin/views/meta-boxes/course/tabs/general.php:54
|
1926 |
-
#: inc/lp-core-functions.php:
|
1927 |
msgid "Intermediate"
|
1928 |
msgstr ""
|
1929 |
|
1930 |
-
#: inc/
|
1931 |
#: inc/admin/views/meta-boxes/course/tabs/general.php:55
|
1932 |
-
#: inc/lp-core-functions.php:
|
1933 |
msgid "Expert"
|
1934 |
msgstr ""
|
1935 |
|
@@ -2051,7 +2033,7 @@ msgstr ""
|
|
2051 |
|
2052 |
#: inc/admin/views/meta-boxes/course/settings.php:314
|
2053 |
#: inc/admin/views/meta-boxes/course/tabs/assessment.php:30
|
2054 |
-
#: inc/rest-api/admin/class-lp-admin-rest-course-controller.php:85
|
2055 |
msgid "Edit: %s"
|
2056 |
msgstr ""
|
2057 |
|
@@ -2073,8 +2055,8 @@ msgstr ""
|
|
2073 |
|
2074 |
#: inc/admin/views/meta-boxes/course/settings.php:354
|
2075 |
#: inc/admin/views/meta-boxes/course/tabs/extra.php:21
|
2076 |
-
#: inc/templates/class-lp-template-course.php:
|
2077 |
-
#: inc/templates/class-lp-template-course.php:
|
2078 |
#: inc/widgets/course-extra.php:30
|
2079 |
msgid "Requirements"
|
2080 |
msgstr ""
|
@@ -2182,7 +2164,7 @@ msgstr ""
|
|
2182 |
#: inc/admin/views/meta-boxes/lesson/settings.php:29
|
2183 |
#: inc/custom-post-types/abstract.php:811
|
2184 |
#: inc/custom-post-types/lesson.php:239
|
2185 |
-
#: inc/lp-template-functions.php:
|
2186 |
#: templates/single-course/section/item-meta.php:28
|
2187 |
msgid "Preview"
|
2188 |
msgstr ""
|
@@ -2213,8 +2195,8 @@ msgstr ""
|
|
2213 |
|
2214 |
#: inc/admin/views/meta-boxes/order/child-order.php:21
|
2215 |
#: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:37
|
2216 |
-
#: inc/admin/views/meta-boxes/order/details.php:217
|
2217 |
#: inc/admin/views/meta-boxes/order/details.php:226
|
|
|
2218 |
#: inc/admin/views/meta-boxes/order/exports-invoice.php:78
|
2219 |
msgid "Customer"
|
2220 |
msgstr ""
|
@@ -2226,7 +2208,7 @@ msgstr ""
|
|
2226 |
|
2227 |
#: inc/admin/views/meta-boxes/order/child-order.php:23
|
2228 |
#: inc/class-lp-gdpr.php:453
|
2229 |
-
#: inc/custom-post-types/order.php:
|
2230 |
#: templates/emails/order-items-table.php:53
|
2231 |
#: templates/emails/plain/order-items-table.php:30
|
2232 |
#: templates/profile/tabs/orders/list.php:31
|
@@ -2245,7 +2227,7 @@ msgid "Invoice No."
|
|
2245 |
msgstr ""
|
2246 |
|
2247 |
#: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:71
|
2248 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2249 |
#: inc/custom-post-types/course.php:85
|
2250 |
#: inc/gateways/paypal/class-lp-gateway-paypal.php:420
|
2251 |
#: templates/checkout/order-received.php:52
|
@@ -2253,12 +2235,12 @@ msgid "Item"
|
|
2253 |
msgstr ""
|
2254 |
|
2255 |
#: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:72
|
2256 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2257 |
msgid "Cost"
|
2258 |
msgstr ""
|
2259 |
|
2260 |
#: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:73
|
2261 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2262 |
#: templates/emails/order-items-table.php:67
|
2263 |
msgid "Quantity"
|
2264 |
msgstr ""
|
@@ -2272,14 +2254,14 @@ msgid "Sub Total"
|
|
2272 |
msgstr ""
|
2273 |
|
2274 |
#: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:104
|
2275 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2276 |
-
#: inc/custom-post-types/order.php:
|
2277 |
#: templates/checkout/order-received.php:99
|
2278 |
#: templates/checkout/review-order.php:99
|
2279 |
-
#: templates/emails/order-items-table.php:
|
2280 |
#: templates/emails/plain/order-items-table.php:60
|
2281 |
#: templates/order/order-details.php:26
|
2282 |
-
#: templates/order/order-details.php:
|
2283 |
#: templates/profile/tabs/orders/list.php:30
|
2284 |
msgid "Total"
|
2285 |
msgstr ""
|
@@ -2298,67 +2280,71 @@ msgid "Status:"
|
|
2298 |
msgstr ""
|
2299 |
|
2300 |
#: inc/admin/views/meta-boxes/order/details.php:74
|
|
|
|
|
|
|
|
|
2301 |
msgid "Customers:"
|
2302 |
msgstr ""
|
2303 |
|
2304 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2305 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2306 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2307 |
msgid "Add multi users"
|
2308 |
msgstr ""
|
2309 |
|
2310 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2311 |
msgid "Customer:"
|
2312 |
msgstr ""
|
2313 |
|
2314 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2315 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2316 |
msgid "Change"
|
2317 |
msgstr ""
|
2318 |
|
2319 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2320 |
msgid "- Or -"
|
2321 |
msgstr ""
|
2322 |
|
2323 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2324 |
msgid "In order to change the order user, please change the order status to 'Pending'."
|
2325 |
msgstr ""
|
2326 |
|
2327 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2328 |
-
#: templates/order/order-details.php:
|
2329 |
msgid "Order key:"
|
2330 |
msgstr ""
|
2331 |
|
2332 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2333 |
msgid "Customer Note"
|
2334 |
msgstr ""
|
2335 |
|
2336 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2337 |
msgid "No order items"
|
2338 |
msgstr ""
|
2339 |
|
2340 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2341 |
msgid "Subtotal:"
|
2342 |
msgstr ""
|
2343 |
|
2344 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2345 |
#: templates/order/confirm.php:57
|
2346 |
msgid "Total:"
|
2347 |
msgstr ""
|
2348 |
|
2349 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2350 |
msgid "Add item(s)"
|
2351 |
msgstr ""
|
2352 |
|
2353 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2354 |
msgid "In order to change the order item, please change the order status to 'Pending'."
|
2355 |
msgstr ""
|
2356 |
|
2357 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2358 |
msgid "Type here to search the course"
|
2359 |
msgstr ""
|
2360 |
|
2361 |
-
#: inc/admin/views/meta-boxes/order/details.php:
|
2362 |
msgid "No results"
|
2363 |
msgstr ""
|
2364 |
|
@@ -2366,11 +2352,11 @@ msgstr ""
|
|
2366 |
msgid "PDF Invoice"
|
2367 |
msgstr ""
|
2368 |
|
2369 |
-
#: inc/admin/views/meta-boxes/order/exports-invoice.php:
|
2370 |
msgid "PDF Preview"
|
2371 |
msgstr ""
|
2372 |
|
2373 |
-
#: inc/admin/views/meta-boxes/order/exports-invoice.php:
|
2374 |
msgid "Export Options"
|
2375 |
msgstr ""
|
2376 |
|
@@ -2390,7 +2376,7 @@ msgstr ""
|
|
2390 |
msgid "Update"
|
2391 |
msgstr ""
|
2392 |
|
2393 |
-
#: inc/admin/views/meta-boxes/order/order-item.php:
|
2394 |
msgid "Delete item"
|
2395 |
msgstr ""
|
2396 |
|
@@ -2400,6 +2386,7 @@ msgstr ""
|
|
2400 |
|
2401 |
#: inc/admin/views/meta-boxes/question/settings.php:17
|
2402 |
#: inc/admin/views/quiz/question-meta.php:28
|
|
|
2403 |
msgid "Points"
|
2404 |
msgstr ""
|
2405 |
|
@@ -2410,6 +2397,7 @@ msgstr ""
|
|
2410 |
|
2411 |
#: inc/admin/views/meta-boxes/question/settings.php:30
|
2412 |
#: inc/admin/views/quiz/question-meta.php:39
|
|
|
2413 |
msgid "Hint"
|
2414 |
msgstr ""
|
2415 |
|
@@ -2461,6 +2449,7 @@ msgid "For each question which students answer skip, the total point is deducted
|
|
2461 |
msgstr ""
|
2462 |
|
2463 |
#: inc/admin/views/meta-boxes/quiz/settings.php:58
|
|
|
2464 |
msgid "Retake"
|
2465 |
msgstr ""
|
2466 |
|
@@ -2477,6 +2466,7 @@ msgid "The number of questions displayed on each page."
|
|
2477 |
msgstr ""
|
2478 |
|
2479 |
#: inc/admin/views/meta-boxes/quiz/settings.php:86
|
|
|
2480 |
msgid "Review"
|
2481 |
msgstr ""
|
2482 |
|
@@ -2583,9 +2573,9 @@ msgstr ""
|
|
2583 |
#: inc/custom-post-types/question.php:214
|
2584 |
#: inc/custom-post-types/quiz.php:181
|
2585 |
#: inc/custom-post-types/quiz.php:244
|
2586 |
-
#: inc/custom-post-types/quiz.php:
|
2587 |
-
#: assets/
|
2588 |
-
#: assets/
|
2589 |
msgid "Questions"
|
2590 |
msgstr ""
|
2591 |
|
@@ -2831,7 +2821,7 @@ msgid "Sale by"
|
|
2831 |
msgstr ""
|
2832 |
|
2833 |
#: inc/admin/views/statistics/orders.php:47
|
2834 |
-
#: inc/custom-post-types/order.php:
|
2835 |
#: templates/checkout/order-received.php:86
|
2836 |
#: templates/profile/tabs/courses.php:35
|
2837 |
#: templates/profile/tabs/orders/list.php:32
|
@@ -3031,8 +3021,8 @@ msgid "There is no item found!"
|
|
3031 |
msgstr ""
|
3032 |
|
3033 |
#: inc/background-process/class-lp-background-schedule-items.php:48
|
3034 |
-
#: inc/user/class-lp-user-factory.php:
|
3035 |
-
#: learnpress.php:
|
3036 |
msgid "Every 3 Minutes"
|
3037 |
msgstr ""
|
3038 |
|
@@ -3089,23 +3079,24 @@ msgid "Congrats! You have completed \"%s\"."
|
|
3089 |
msgstr ""
|
3090 |
|
3091 |
#: inc/class-lp-assets.php:60
|
3092 |
-
#: inc/lp-core-functions.php:
|
3093 |
-
#: inc/lp-core-functions.php:
|
|
|
3094 |
msgid "OK"
|
3095 |
msgstr ""
|
3096 |
|
3097 |
#: inc/class-lp-assets.php:62
|
3098 |
#: inc/class-lp-gdpr.php:464
|
3099 |
-
#: inc/lp-core-functions.php:
|
3100 |
-
#: inc/lp-core-functions.php:
|
3101 |
#: templates/global/lp-modal-overlay.php:24
|
3102 |
msgid "Yes"
|
3103 |
msgstr ""
|
3104 |
|
3105 |
#: inc/class-lp-assets.php:63
|
3106 |
#: inc/class-lp-gdpr.php:464
|
3107 |
-
#: inc/lp-core-functions.php:
|
3108 |
-
#: inc/lp-core-functions.php:
|
3109 |
#: templates/global/lp-modal-overlay.php:23
|
3110 |
msgid "No"
|
3111 |
msgstr ""
|
@@ -3254,13 +3245,13 @@ msgstr ""
|
|
3254 |
|
3255 |
#: inc/class-lp-forms-handler.php:30
|
3256 |
#: inc/class-lp-forms-handler.php:207
|
3257 |
-
#: inc/curds/class-lp-user-curd.php:
|
3258 |
msgid "Please enter a valid account username."
|
3259 |
msgstr ""
|
3260 |
|
3261 |
#: inc/class-lp-forms-handler.php:37
|
3262 |
#: inc/class-lp-forms-handler.php:197
|
3263 |
-
#: inc/curds/class-lp-user-curd.php:
|
3264 |
msgid "Please provide a valid email address."
|
3265 |
msgstr ""
|
3266 |
|
@@ -3297,7 +3288,7 @@ msgid "An account is already registered with your email address."
|
|
3297 |
msgstr ""
|
3298 |
|
3299 |
#: inc/class-lp-forms-handler.php:211
|
3300 |
-
#: inc/curds/class-lp-user-curd.php:
|
3301 |
msgid "An account is already registered with that username. Please choose another."
|
3302 |
msgstr ""
|
3303 |
|
@@ -3435,7 +3426,7 @@ msgstr ""
|
|
3435 |
msgid "Grade"
|
3436 |
msgstr ""
|
3437 |
|
3438 |
-
#: inc/class-lp-install.php:
|
3439 |
msgid "Thank you for using LearnPress"
|
3440 |
msgstr ""
|
3441 |
|
@@ -3452,10 +3443,6 @@ msgstr ""
|
|
3452 |
msgid "No payment method is available."
|
3453 |
msgstr ""
|
3454 |
|
3455 |
-
#: inc/class-lp-page-controller.php:667
|
3456 |
-
msgid "The user %s is not available!"
|
3457 |
-
msgstr ""
|
3458 |
-
|
3459 |
#: inc/class-lp-query-list-table.php:27
|
3460 |
#: inc/custom-post-types/course.php:79
|
3461 |
msgid "item"
|
@@ -3477,11 +3464,11 @@ msgstr ""
|
|
3477 |
msgid "The method %s is not callable."
|
3478 |
msgstr ""
|
3479 |
|
3480 |
-
#: inc/class-lp-shortcodes.php:
|
3481 |
msgid "Forgot password?"
|
3482 |
msgstr ""
|
3483 |
|
3484 |
-
#: inc/class-lp-shortcodes.php:
|
3485 |
msgid "Create new account"
|
3486 |
msgstr ""
|
3487 |
|
@@ -3509,7 +3496,7 @@ msgstr ""
|
|
3509 |
msgid "Do you want to retake course \"%s\"?"
|
3510 |
msgstr ""
|
3511 |
|
3512 |
-
#: inc/class-lp-thumbnail-helper.php:
|
3513 |
msgctxt "no course thumbnail"
|
3514 |
msgid "course thumbnail"
|
3515 |
msgstr ""
|
@@ -3543,7 +3530,7 @@ msgstr ""
|
|
3543 |
#: inc/course/abstract-course.php:885
|
3544 |
#: inc/course/abstract-course.php:905
|
3545 |
#: inc/lesson/class-lp-lesson.php:104
|
3546 |
-
#: inc/quiz/class-lp-quiz.php:
|
3547 |
msgid "The function %s doesn't exist"
|
3548 |
msgstr ""
|
3549 |
|
@@ -3590,22 +3577,22 @@ msgid "Edit this item"
|
|
3590 |
msgstr ""
|
3591 |
|
3592 |
#: inc/course/lp-course-functions.php:956
|
3593 |
-
#: inc/lp-core-functions.php:
|
3594 |
#: inc/user-item/class-lp-user-item-quiz.php:140
|
3595 |
#: inc/user-item/class-lp-user-item.php:755
|
3596 |
#: inc/user/class-lp-profile.php:844
|
3597 |
#: inc/user/class-lp-profile.php:878
|
3598 |
-
#: assets/
|
3599 |
msgid "Passed"
|
3600 |
msgstr ""
|
3601 |
|
3602 |
#: inc/course/lp-course-functions.php:959
|
3603 |
-
#: inc/lp-core-functions.php:
|
3604 |
#: inc/user-item/class-lp-user-item-quiz.php:141
|
3605 |
#: inc/user-item/class-lp-user-item.php:756
|
3606 |
#: inc/user/class-lp-profile.php:845
|
3607 |
#: inc/user/class-lp-profile.php:879
|
3608 |
-
#: assets/
|
3609 |
msgid "Failed"
|
3610 |
msgstr ""
|
3611 |
|
@@ -3743,29 +3730,33 @@ msgstr ""
|
|
3743 |
msgid "<p>Sorry! Failed to duplicate quiz!</p>"
|
3744 |
msgstr ""
|
3745 |
|
3746 |
-
#: inc/curds/class-lp-user-curd.php:
|
3747 |
-
#: inc/curds/class-lp-user-curd.php:
|
3748 |
msgid "course"
|
3749 |
msgstr ""
|
3750 |
|
3751 |
-
#: inc/curds/class-lp-user-curd.php:
|
3752 |
-
#: inc/curds/class-lp-user-curd.php:
|
3753 |
msgid "courses"
|
3754 |
msgstr ""
|
3755 |
|
3756 |
-
#: inc/curds/class-lp-user-curd.php:
|
|
|
|
|
|
|
|
|
3757 |
msgid "quiz"
|
3758 |
msgstr ""
|
3759 |
|
3760 |
-
#: inc/curds/class-lp-user-curd.php:
|
3761 |
msgid "quizzes"
|
3762 |
msgstr ""
|
3763 |
|
3764 |
-
#: inc/curds/class-lp-user-curd.php:
|
3765 |
msgid "An account is already registered with your email address. Please log in."
|
3766 |
msgstr ""
|
3767 |
|
3768 |
-
#: inc/curds/class-lp-user-curd.php:
|
3769 |
msgid "Failed to create user"
|
3770 |
msgstr ""
|
3771 |
|
@@ -3898,7 +3889,7 @@ msgstr ""
|
|
3898 |
|
3899 |
#: inc/custom-post-types/course.php:118
|
3900 |
#: inc/custom-post-types/lesson.php:170
|
3901 |
-
#: inc/custom-post-types/order.php:
|
3902 |
#: inc/custom-post-types/question.php:217
|
3903 |
msgid "Add New"
|
3904 |
msgstr ""
|
@@ -4097,92 +4088,92 @@ msgstr ""
|
|
4097 |
|
4098 |
#: inc/custom-post-types/lesson.php:348
|
4099 |
#: inc/custom-post-types/question.php:535
|
4100 |
-
#: inc/custom-post-types/quiz.php:
|
4101 |
msgid "Assigned"
|
4102 |
msgstr ""
|
4103 |
|
4104 |
-
#: inc/custom-post-types/order.php:
|
4105 |
msgid "Order number, user name, user email, course name etc..."
|
4106 |
msgstr ""
|
4107 |
|
4108 |
-
#: inc/custom-post-types/order.php:
|
4109 |
-
#: inc/custom-post-types/order.php:
|
4110 |
msgid "View Order"
|
4111 |
msgstr ""
|
4112 |
|
4113 |
-
#: inc/custom-post-types/order.php:
|
4114 |
msgid "View child orders"
|
4115 |
msgstr ""
|
4116 |
|
4117 |
-
#: inc/custom-post-types/order.php:
|
4118 |
-
#: inc/custom-post-types/order.php:
|
4119 |
#: templates/profile/tabs/orders/list.php:29
|
4120 |
msgid "Order"
|
4121 |
msgstr ""
|
4122 |
|
4123 |
-
#: inc/custom-post-types/order.php:
|
4124 |
msgid "Student"
|
4125 |
msgstr ""
|
4126 |
|
4127 |
-
#: inc/custom-post-types/order.php:
|
4128 |
#: inc/lp-deprecated.php:372
|
4129 |
msgid "Purchased"
|
4130 |
msgstr ""
|
4131 |
|
4132 |
-
#: inc/custom-post-types/order.php:
|
4133 |
#: inc/order/class-lp-order.php:467
|
4134 |
msgid "(Guest)"
|
4135 |
msgstr ""
|
4136 |
|
4137 |
-
#: inc/custom-post-types/order.php:
|
4138 |
#: templates/checkout/order-received.php:63
|
4139 |
msgid "Course does not exist"
|
4140 |
msgstr ""
|
4141 |
|
4142 |
-
#: inc/custom-post-types/order.php:
|
4143 |
msgid "Deleted"
|
4144 |
msgstr ""
|
4145 |
|
4146 |
-
#: inc/custom-post-types/order.php:
|
4147 |
#: templates/checkout/order-received.php:80
|
4148 |
msgid "(No item)"
|
4149 |
msgstr ""
|
4150 |
|
4151 |
-
#: inc/custom-post-types/order.php:
|
4152 |
msgid "Pay via <strong>%s</strong>"
|
4153 |
msgstr ""
|
4154 |
|
4155 |
-
#: inc/custom-post-types/order.php:
|
4156 |
msgid "Add New Order"
|
4157 |
msgstr ""
|
4158 |
|
4159 |
-
#: inc/custom-post-types/order.php:
|
4160 |
-
#: inc/custom-post-types/order.php:
|
4161 |
#: templates/order/order-details.php:20
|
4162 |
msgid "Order Details"
|
4163 |
msgstr ""
|
4164 |
|
4165 |
-
#: inc/custom-post-types/order.php:
|
4166 |
msgid "Update Order"
|
4167 |
msgstr ""
|
4168 |
|
4169 |
-
#: inc/custom-post-types/order.php:
|
4170 |
msgid "Search Orders"
|
4171 |
msgstr ""
|
4172 |
|
4173 |
-
#: inc/custom-post-types/order.php:
|
4174 |
msgid "No order found"
|
4175 |
msgstr ""
|
4176 |
|
4177 |
-
#: inc/custom-post-types/order.php:
|
4178 |
msgid "No order found in Trash"
|
4179 |
msgstr ""
|
4180 |
|
4181 |
-
#: inc/custom-post-types/order.php:
|
4182 |
msgid "Order Actions"
|
4183 |
msgstr ""
|
4184 |
|
4185 |
-
#: inc/custom-post-types/order.php:
|
4186 |
msgid "Order Exports"
|
4187 |
msgstr ""
|
4188 |
|
@@ -4282,8 +4273,8 @@ msgid "Do you want to move question \"{{QUESTION_NAME}}\" to trash?"
|
|
4282 |
msgstr ""
|
4283 |
|
4284 |
#: inc/custom-post-types/quiz.php:292
|
|
|
4285 |
#: inc/templates/class-lp-template-course.php:108
|
4286 |
-
#: inc/templates/class-lp-template-course.php:113
|
4287 |
msgid "%d question"
|
4288 |
msgid_plural "%d questions"
|
4289 |
msgstr[0] ""
|
@@ -4731,14 +4722,18 @@ msgstr ""
|
|
4731 |
msgid "Sandbox email address"
|
4732 |
msgstr ""
|
4733 |
|
4734 |
-
#: inc/handle-steps/class-lp-handle-steps.php:
|
4735 |
msgid "Steps invalid"
|
4736 |
msgstr ""
|
4737 |
|
4738 |
-
#: inc/handle-steps/class-lp-handle-steps.php:
|
4739 |
msgid "Step invalid"
|
4740 |
msgstr ""
|
4741 |
|
|
|
|
|
|
|
|
|
4742 |
#: inc/jwt/includes/class-jwt-public.php:44
|
4743 |
msgid "The username of the user."
|
4744 |
msgstr ""
|
@@ -4808,9 +4803,9 @@ msgstr ""
|
|
4808 |
#: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:202
|
4809 |
#: inc/jwt/rest-api/version1/class-lp-rest-users-v1-controller.php:36
|
4810 |
#: inc/jwt/rest-api/version1/class-lp-rest-users-v1-controller.php:62
|
4811 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:57
|
4812 |
-
#: inc/rest-api/class-lp-rest-settings-controller.php:23
|
4813 |
-
#: inc/rest-api/class-lp-rest-users-controller.php:90
|
4814 |
msgid "Unique identifier for the resource."
|
4815 |
msgstr ""
|
4816 |
|
@@ -5125,823 +5120,831 @@ msgstr ""
|
|
5125 |
msgid "Every %d minutes"
|
5126 |
msgstr ""
|
5127 |
|
5128 |
-
#: inc/lp-core-functions.php:
|
5129 |
msgid "Minute(s)"
|
5130 |
msgstr ""
|
5131 |
|
5132 |
-
#: inc/lp-core-functions.php:
|
5133 |
msgid "Hour(s)"
|
5134 |
msgstr ""
|
5135 |
|
5136 |
-
#: inc/lp-core-functions.php:
|
5137 |
msgid "Day(s)"
|
5138 |
msgstr ""
|
5139 |
|
5140 |
-
#: inc/lp-core-functions.php:
|
5141 |
msgid "Week(s)"
|
5142 |
msgstr ""
|
5143 |
|
5144 |
-
#: inc/lp-core-functions.php:
|
5145 |
msgid "Left"
|
5146 |
msgstr ""
|
5147 |
|
5148 |
-
#: inc/lp-core-functions.php:
|
5149 |
msgid "Right"
|
5150 |
msgstr ""
|
5151 |
|
5152 |
-
#: inc/lp-core-functions.php:
|
5153 |
msgid "Left with space"
|
5154 |
msgstr ""
|
5155 |
|
5156 |
-
#: inc/lp-core-functions.php:
|
5157 |
msgid "Right with space"
|
5158 |
msgstr ""
|
5159 |
|
5160 |
-
#: inc/lp-core-functions.php:
|
5161 |
msgid "Afghan afghani"
|
5162 |
msgstr ""
|
5163 |
|
5164 |
-
#: inc/lp-core-functions.php:
|
5165 |
msgid "Albanian lek"
|
5166 |
msgstr ""
|
5167 |
|
5168 |
-
#: inc/lp-core-functions.php:
|
5169 |
msgid "Algerian dinar"
|
5170 |
msgstr ""
|
5171 |
|
5172 |
-
#: inc/lp-core-functions.php:
|
5173 |
msgid "Euro"
|
5174 |
msgstr ""
|
5175 |
|
5176 |
-
#: inc/lp-core-functions.php:
|
5177 |
msgid "Angolan kwanza"
|
5178 |
msgstr ""
|
5179 |
|
5180 |
-
#: inc/lp-core-functions.php:
|
5181 |
msgid "East Caribbean dollar"
|
5182 |
msgstr ""
|
5183 |
|
5184 |
-
#: inc/lp-core-functions.php:
|
5185 |
msgid "Argentine peso"
|
5186 |
msgstr ""
|
5187 |
|
5188 |
-
#: inc/lp-core-functions.php:
|
5189 |
msgid "Armenian dram"
|
5190 |
msgstr ""
|
5191 |
|
5192 |
-
#: inc/lp-core-functions.php:
|
5193 |
msgid "Aruban florin"
|
5194 |
msgstr ""
|
5195 |
|
5196 |
-
#: inc/lp-core-functions.php:
|
5197 |
msgid "Australian dollar"
|
5198 |
msgstr ""
|
5199 |
|
5200 |
-
#: inc/lp-core-functions.php:
|
5201 |
msgid "Azerbaijani manat"
|
5202 |
msgstr ""
|
5203 |
|
5204 |
-
#: inc/lp-core-functions.php:
|
5205 |
msgid "Bahamian dollar"
|
5206 |
msgstr ""
|
5207 |
|
5208 |
-
#: inc/lp-core-functions.php:
|
5209 |
msgid "Bahraini dinar"
|
5210 |
msgstr ""
|
5211 |
|
5212 |
-
#: inc/lp-core-functions.php:
|
5213 |
msgid "Bangladeshi taka"
|
5214 |
msgstr ""
|
5215 |
|
5216 |
-
#: inc/lp-core-functions.php:
|
5217 |
msgid "Barbadian dollar"
|
5218 |
msgstr ""
|
5219 |
|
5220 |
-
#: inc/lp-core-functions.php:
|
5221 |
msgid "Belarusian ruble"
|
5222 |
msgstr ""
|
5223 |
|
5224 |
-
#: inc/lp-core-functions.php:
|
5225 |
msgid "Belizean dollar"
|
5226 |
msgstr ""
|
5227 |
|
5228 |
-
#: inc/lp-core-functions.php:
|
5229 |
msgid "West African CFA franc"
|
5230 |
msgstr ""
|
5231 |
|
5232 |
-
#: inc/lp-core-functions.php:
|
5233 |
msgid "Bermudian dollar"
|
5234 |
msgstr ""
|
5235 |
|
5236 |
-
#: inc/lp-core-functions.php:
|
5237 |
msgid "Bhutanese ngultrum"
|
5238 |
msgstr ""
|
5239 |
|
5240 |
-
#: inc/lp-core-functions.php:
|
5241 |
msgid "Bolivian boliviano"
|
5242 |
msgstr ""
|
5243 |
|
5244 |
-
#: inc/lp-core-functions.php:
|
5245 |
msgid "US dollar"
|
5246 |
msgstr ""
|
5247 |
|
5248 |
-
#: inc/lp-core-functions.php:
|
5249 |
msgid "Bosnia and Herzegovina convertible mark"
|
5250 |
msgstr ""
|
5251 |
|
5252 |
-
#: inc/lp-core-functions.php:
|
5253 |
msgid "Botswana pula"
|
5254 |
msgstr ""
|
5255 |
|
5256 |
-
#: inc/lp-core-functions.php:
|
5257 |
msgid "Brazilian real"
|
5258 |
msgstr ""
|
5259 |
|
5260 |
-
#: inc/lp-core-functions.php:
|
5261 |
msgid "Brunei dollar"
|
5262 |
msgstr ""
|
5263 |
|
5264 |
-
#: inc/lp-core-functions.php:
|
5265 |
msgid "Bulgarian lev"
|
5266 |
msgstr ""
|
5267 |
|
5268 |
-
#: inc/lp-core-functions.php:
|
5269 |
msgid "Burmese kyat"
|
5270 |
msgstr ""
|
5271 |
|
5272 |
-
#: inc/lp-core-functions.php:
|
5273 |
msgid "Burundian franc"
|
5274 |
msgstr ""
|
5275 |
|
5276 |
-
#: inc/lp-core-functions.php:
|
5277 |
msgid "Cambodian riel"
|
5278 |
msgstr ""
|
5279 |
|
5280 |
-
#: inc/lp-core-functions.php:
|
5281 |
msgid "Central African CFA franc"
|
5282 |
msgstr ""
|
5283 |
|
5284 |
-
#: inc/lp-core-functions.php:
|
5285 |
msgid "Canadian dollar"
|
5286 |
msgstr ""
|
5287 |
|
5288 |
-
#: inc/lp-core-functions.php:
|
5289 |
msgid "Cape Verdean escudo"
|
5290 |
msgstr ""
|
5291 |
|
5292 |
-
#: inc/lp-core-functions.php:
|
5293 |
msgid "Cayman Islands dollar"
|
5294 |
msgstr ""
|
5295 |
|
5296 |
-
#: inc/lp-core-functions.php:
|
5297 |
msgid "Chilean peso"
|
5298 |
msgstr ""
|
5299 |
|
5300 |
-
#: inc/lp-core-functions.php:
|
5301 |
msgid "Chinese renminbi"
|
5302 |
msgstr ""
|
5303 |
|
5304 |
-
#: inc/lp-core-functions.php:
|
5305 |
msgid "Colombian peso"
|
5306 |
msgstr ""
|
5307 |
|
5308 |
-
#: inc/lp-core-functions.php:
|
5309 |
msgid "Comorian franc"
|
5310 |
msgstr ""
|
5311 |
|
5312 |
-
#: inc/lp-core-functions.php:
|
5313 |
msgid "Congolese franc"
|
5314 |
msgstr ""
|
5315 |
|
5316 |
-
#: inc/lp-core-functions.php:
|
5317 |
msgid "New Zealand dollar"
|
5318 |
msgstr ""
|
5319 |
|
5320 |
-
#: inc/lp-core-functions.php:
|
5321 |
msgid "Costa Rican colón"
|
5322 |
msgstr ""
|
5323 |
|
5324 |
-
#: inc/lp-core-functions.php:
|
5325 |
msgid "Croatian kuna"
|
5326 |
msgstr ""
|
5327 |
|
5328 |
-
#: inc/lp-core-functions.php:
|
5329 |
msgid "Cuban peso"
|
5330 |
msgstr ""
|
5331 |
|
5332 |
-
#: inc/lp-core-functions.php:
|
5333 |
msgid "Netherlands Antilles guilder"
|
5334 |
msgstr ""
|
5335 |
|
5336 |
-
#: inc/lp-core-functions.php:
|
5337 |
msgid "Czech koruna"
|
5338 |
msgstr ""
|
5339 |
|
5340 |
-
#: inc/lp-core-functions.php:
|
5341 |
msgid "Danish krone"
|
5342 |
msgstr ""
|
5343 |
|
5344 |
-
#: inc/lp-core-functions.php:
|
5345 |
msgid "Djiboutian franc"
|
5346 |
msgstr ""
|
5347 |
|
5348 |
-
#: inc/lp-core-functions.php:
|
5349 |
msgid "Dominican peso"
|
5350 |
msgstr ""
|
5351 |
|
5352 |
-
#: inc/lp-core-functions.php:
|
5353 |
msgid "Egyptian pound"
|
5354 |
msgstr ""
|
5355 |
|
5356 |
-
#: inc/lp-core-functions.php:
|
5357 |
msgid "Salvadoran colón"
|
5358 |
msgstr ""
|
5359 |
|
5360 |
-
#: inc/lp-core-functions.php:
|
5361 |
msgid "Eritrean nakfa"
|
5362 |
msgstr ""
|
5363 |
|
5364 |
-
#: inc/lp-core-functions.php:
|
5365 |
msgid "Ethiopian birr"
|
5366 |
msgstr ""
|
5367 |
|
5368 |
-
#: inc/lp-core-functions.php:
|
5369 |
msgid "Falkland Islands pound"
|
5370 |
msgstr ""
|
5371 |
|
5372 |
-
#: inc/lp-core-functions.php:
|
5373 |
msgid "Fijian dollar"
|
5374 |
msgstr ""
|
5375 |
|
5376 |
-
#: inc/lp-core-functions.php:
|
5377 |
msgid "CFP franc"
|
5378 |
msgstr ""
|
5379 |
|
5380 |
-
#: inc/lp-core-functions.php:
|
5381 |
msgid "Gambian dalasi"
|
5382 |
msgstr ""
|
5383 |
|
5384 |
-
#: inc/lp-core-functions.php:
|
5385 |
msgid "Georgian lari"
|
5386 |
msgstr ""
|
5387 |
|
5388 |
-
#: inc/lp-core-functions.php:
|
5389 |
msgid "Ghanian cedi"
|
5390 |
msgstr ""
|
5391 |
|
5392 |
-
#: inc/lp-core-functions.php:
|
5393 |
msgid "Gibraltar pound"
|
5394 |
msgstr ""
|
5395 |
|
5396 |
-
#: inc/lp-core-functions.php:
|
5397 |
msgid "Guatemalan quetzal"
|
5398 |
msgstr ""
|
5399 |
|
5400 |
-
#: inc/lp-core-functions.php:
|
5401 |
msgid "British pound"
|
5402 |
msgstr ""
|
5403 |
|
5404 |
-
#: inc/lp-core-functions.php:
|
5405 |
msgid "Guinean franc"
|
5406 |
msgstr ""
|
5407 |
|
5408 |
-
#: inc/lp-core-functions.php:
|
5409 |
msgid "Guyanese dollar"
|
5410 |
msgstr ""
|
5411 |
|
5412 |
-
#: inc/lp-core-functions.php:
|
5413 |
msgid "Haitian gourde"
|
5414 |
msgstr ""
|
5415 |
|
5416 |
-
#: inc/lp-core-functions.php:
|
5417 |
msgid "Honduran lempira"
|
5418 |
msgstr ""
|
5419 |
|
5420 |
-
#: inc/lp-core-functions.php:
|
5421 |
msgid "Hong Kong dollar"
|
5422 |
msgstr ""
|
5423 |
|
5424 |
-
#: inc/lp-core-functions.php:
|
5425 |
msgid "Hungarian forint"
|
5426 |
msgstr ""
|
5427 |
|
5428 |
-
#: inc/lp-core-functions.php:
|
5429 |
msgid "Icelandic króna"
|
5430 |
msgstr ""
|
5431 |
|
5432 |
-
#: inc/lp-core-functions.php:
|
5433 |
msgid "Indian rupee"
|
5434 |
msgstr ""
|
5435 |
|
5436 |
-
#: inc/lp-core-functions.php:
|
5437 |
msgid "Indonesian rupiah"
|
5438 |
msgstr ""
|
5439 |
|
5440 |
-
#: inc/lp-core-functions.php:
|
5441 |
msgid "Iranian rial"
|
5442 |
msgstr ""
|
5443 |
|
5444 |
-
#: inc/lp-core-functions.php:
|
5445 |
msgid "Iraqi dinar"
|
5446 |
msgstr ""
|
5447 |
|
5448 |
-
#: inc/lp-core-functions.php:
|
5449 |
msgid "Israeli new sheqel"
|
5450 |
msgstr ""
|
5451 |
|
5452 |
-
#: inc/lp-core-functions.php:
|
5453 |
msgid "Jamaican dollar"
|
5454 |
msgstr ""
|
5455 |
|
5456 |
-
#: inc/lp-core-functions.php:
|
5457 |
msgid "Japanese yen "
|
5458 |
msgstr ""
|
5459 |
|
5460 |
-
#: inc/lp-core-functions.php:
|
5461 |
msgid "Jordanian dinar"
|
5462 |
msgstr ""
|
5463 |
|
5464 |
-
#: inc/lp-core-functions.php:
|
5465 |
msgid "Kazakhstani tenge"
|
5466 |
msgstr ""
|
5467 |
|
5468 |
-
#: inc/lp-core-functions.php:
|
5469 |
msgid "Kenyan shilling"
|
5470 |
msgstr ""
|
5471 |
|
5472 |
-
#: inc/lp-core-functions.php:
|
5473 |
msgid "North Korean won"
|
5474 |
msgstr ""
|
5475 |
|
5476 |
-
#: inc/lp-core-functions.php:
|
5477 |
msgid "Kuwaiti dinar"
|
5478 |
msgstr ""
|
5479 |
|
5480 |
-
#: inc/lp-core-functions.php:
|
5481 |
msgid "Kyrgyzstani som"
|
5482 |
msgstr ""
|
5483 |
|
5484 |
-
#: inc/lp-core-functions.php:
|
5485 |
msgid "South Korean won"
|
5486 |
msgstr ""
|
5487 |
|
5488 |
-
#: inc/lp-core-functions.php:
|
5489 |
msgid "Lao kip"
|
5490 |
msgstr ""
|
5491 |
|
5492 |
-
#: inc/lp-core-functions.php:
|
5493 |
msgid "Latvian lats"
|
5494 |
msgstr ""
|
5495 |
|
5496 |
-
#: inc/lp-core-functions.php:
|
5497 |
msgid "Lebanese pound"
|
5498 |
msgstr ""
|
5499 |
|
5500 |
-
#: inc/lp-core-functions.php:
|
5501 |
msgid "Lesotho loti"
|
5502 |
msgstr ""
|
5503 |
|
5504 |
-
#: inc/lp-core-functions.php:
|
5505 |
msgid "Liberian dollar"
|
5506 |
msgstr ""
|
5507 |
|
5508 |
-
#: inc/lp-core-functions.php:
|
5509 |
-
#: inc/lp-core-functions.php:
|
5510 |
msgid "Libyan dinar"
|
5511 |
msgstr ""
|
5512 |
|
5513 |
-
#: inc/lp-core-functions.php:
|
5514 |
msgid "Swiss franc"
|
5515 |
msgstr ""
|
5516 |
|
5517 |
-
#: inc/lp-core-functions.php:
|
5518 |
msgid "Lithuanian litas"
|
5519 |
msgstr ""
|
5520 |
|
5521 |
-
#: inc/lp-core-functions.php:
|
5522 |
msgid "Macanese pataca"
|
5523 |
msgstr ""
|
5524 |
|
5525 |
-
#: inc/lp-core-functions.php:
|
5526 |
msgid "Macedonian denar"
|
5527 |
msgstr ""
|
5528 |
|
5529 |
-
#: inc/lp-core-functions.php:
|
5530 |
msgid "Malagasy ariary"
|
5531 |
msgstr ""
|
5532 |
|
5533 |
-
#: inc/lp-core-functions.php:
|
5534 |
msgid "Malawian kwacha"
|
5535 |
msgstr ""
|
5536 |
|
5537 |
-
#: inc/lp-core-functions.php:
|
5538 |
msgid "Malaysian ringgit"
|
5539 |
msgstr ""
|
5540 |
|
5541 |
-
#: inc/lp-core-functions.php:
|
5542 |
msgid "Maldivian rufiyaa"
|
5543 |
msgstr ""
|
5544 |
|
5545 |
-
#: inc/lp-core-functions.php:
|
5546 |
msgid "Mauritanian ouguiya"
|
5547 |
msgstr ""
|
5548 |
|
5549 |
-
#: inc/lp-core-functions.php:
|
5550 |
msgid "Mauritian rupee"
|
5551 |
msgstr ""
|
5552 |
|
5553 |
-
#: inc/lp-core-functions.php:
|
5554 |
msgid "Mexican peso"
|
5555 |
msgstr ""
|
5556 |
|
5557 |
-
#: inc/lp-core-functions.php:
|
5558 |
msgid "Moldovan leu"
|
5559 |
msgstr ""
|
5560 |
|
5561 |
-
#: inc/lp-core-functions.php:
|
5562 |
msgid "Mongolian tugrik"
|
5563 |
msgstr ""
|
5564 |
|
5565 |
-
#: inc/lp-core-functions.php:
|
5566 |
msgid "Moroccan dirham"
|
5567 |
msgstr ""
|
5568 |
|
5569 |
-
#: inc/lp-core-functions.php:
|
5570 |
msgid "Mozambican metical"
|
5571 |
msgstr ""
|
5572 |
|
5573 |
-
#: inc/lp-core-functions.php:
|
5574 |
msgid "Namibian dollar"
|
5575 |
msgstr ""
|
5576 |
|
5577 |
-
#: inc/lp-core-functions.php:
|
5578 |
msgid "Nepalese rupee"
|
5579 |
msgstr ""
|
5580 |
|
5581 |
-
#: inc/lp-core-functions.php:
|
5582 |
msgid "Nicaraguan córdoba"
|
5583 |
msgstr ""
|
5584 |
|
5585 |
-
#: inc/lp-core-functions.php:
|
5586 |
msgid "Nigerian naira"
|
5587 |
msgstr ""
|
5588 |
|
5589 |
-
#: inc/lp-core-functions.php:
|
5590 |
msgid "Norwegian krone"
|
5591 |
msgstr ""
|
5592 |
|
5593 |
-
#: inc/lp-core-functions.php:
|
5594 |
msgid "Omani rial"
|
5595 |
msgstr ""
|
5596 |
|
5597 |
-
#: inc/lp-core-functions.php:
|
5598 |
msgid "Pakistani rupee"
|
5599 |
msgstr ""
|
5600 |
|
5601 |
-
#: inc/lp-core-functions.php:
|
5602 |
msgid "Panamanian balboa"
|
5603 |
msgstr ""
|
5604 |
|
5605 |
-
#: inc/lp-core-functions.php:
|
5606 |
msgid "Papua New Guinea kina"
|
5607 |
msgstr ""
|
5608 |
|
5609 |
-
#: inc/lp-core-functions.php:
|
5610 |
msgid "Paraguayan guarani"
|
5611 |
msgstr ""
|
5612 |
|
5613 |
-
#: inc/lp-core-functions.php:
|
5614 |
msgid "Peruvian nuevo sol"
|
5615 |
msgstr ""
|
5616 |
|
5617 |
-
#: inc/lp-core-functions.php:
|
5618 |
msgid "Philippine peso"
|
5619 |
msgstr ""
|
5620 |
|
5621 |
-
#: inc/lp-core-functions.php:
|
5622 |
msgid "Polish zloty"
|
5623 |
msgstr ""
|
5624 |
|
5625 |
-
#: inc/lp-core-functions.php:
|
5626 |
msgid "Qatari riyal"
|
5627 |
msgstr ""
|
5628 |
|
5629 |
-
#: inc/lp-core-functions.php:
|
5630 |
msgid "Romanian leu"
|
5631 |
msgstr ""
|
5632 |
|
5633 |
-
#: inc/lp-core-functions.php:
|
5634 |
msgid "Russian ruble"
|
5635 |
msgstr ""
|
5636 |
|
5637 |
-
#: inc/lp-core-functions.php:
|
5638 |
msgid "Rwandan franc"
|
5639 |
msgstr ""
|
5640 |
|
5641 |
-
#: inc/lp-core-functions.php:
|
5642 |
msgid "Samoan tālā"
|
5643 |
msgstr ""
|
5644 |
|
5645 |
-
#: inc/lp-core-functions.php:
|
5646 |
msgid "São Tomé and Príncipe dobra"
|
5647 |
msgstr ""
|
5648 |
|
5649 |
-
#: inc/lp-core-functions.php:
|
5650 |
msgid "Saudi riyal"
|
5651 |
msgstr ""
|
5652 |
|
5653 |
-
#: inc/lp-core-functions.php:
|
5654 |
msgid "Serbian dinar"
|
5655 |
msgstr ""
|
5656 |
|
5657 |
-
#: inc/lp-core-functions.php:
|
5658 |
msgid "Seychellois rupee"
|
5659 |
msgstr ""
|
5660 |
|
5661 |
-
#: inc/lp-core-functions.php:
|
5662 |
msgid "Sierra Leonean leone"
|
5663 |
msgstr ""
|
5664 |
|
5665 |
-
#: inc/lp-core-functions.php:
|
5666 |
msgid "Singapore dollar"
|
5667 |
msgstr ""
|
5668 |
|
5669 |
-
#: inc/lp-core-functions.php:
|
5670 |
msgid "Solomon Islands dollar"
|
5671 |
msgstr ""
|
5672 |
|
5673 |
-
#: inc/lp-core-functions.php:
|
5674 |
msgid "Somali shilling"
|
5675 |
msgstr ""
|
5676 |
|
5677 |
-
#: inc/lp-core-functions.php:
|
5678 |
msgid "South African rand"
|
5679 |
msgstr ""
|
5680 |
|
5681 |
-
#: inc/lp-core-functions.php:
|
5682 |
msgid "Sri Lankan rupee"
|
5683 |
msgstr ""
|
5684 |
|
5685 |
-
#: inc/lp-core-functions.php:
|
5686 |
msgid "St. Helena pound"
|
5687 |
msgstr ""
|
5688 |
|
5689 |
-
#: inc/lp-core-functions.php:
|
5690 |
msgid "Sudanese pound"
|
5691 |
msgstr ""
|
5692 |
|
5693 |
-
#: inc/lp-core-functions.php:
|
5694 |
msgid "Surinamese dollar"
|
5695 |
msgstr ""
|
5696 |
|
5697 |
-
#: inc/lp-core-functions.php:
|
5698 |
msgid "Swazi lilangeni"
|
5699 |
msgstr ""
|
5700 |
|
5701 |
-
#: inc/lp-core-functions.php:
|
5702 |
msgid "Swedish krona"
|
5703 |
msgstr ""
|
5704 |
|
5705 |
-
#: inc/lp-core-functions.php:
|
5706 |
msgid "Syrian pound"
|
5707 |
msgstr ""
|
5708 |
|
5709 |
-
#: inc/lp-core-functions.php:
|
5710 |
msgid "New Taiwan dollar"
|
5711 |
msgstr ""
|
5712 |
|
5713 |
-
#: inc/lp-core-functions.php:
|
5714 |
msgid "Tajikistani somoni"
|
5715 |
msgstr ""
|
5716 |
|
5717 |
-
#: inc/lp-core-functions.php:
|
5718 |
msgid "Tanzanian shilling"
|
5719 |
msgstr ""
|
5720 |
|
5721 |
-
#: inc/lp-core-functions.php:
|
5722 |
msgid "Thai baht "
|
5723 |
msgstr ""
|
5724 |
|
5725 |
-
#: inc/lp-core-functions.php:
|
5726 |
msgid "Tongan pa’anga"
|
5727 |
msgstr ""
|
5728 |
|
5729 |
-
#: inc/lp-core-functions.php:
|
5730 |
msgid "Trinidad and Tobago dollar"
|
5731 |
msgstr ""
|
5732 |
|
5733 |
-
#: inc/lp-core-functions.php:
|
5734 |
msgid "Tunisian dinar"
|
5735 |
msgstr ""
|
5736 |
|
5737 |
-
#: inc/lp-core-functions.php:
|
5738 |
msgid "Turkish lira"
|
5739 |
msgstr ""
|
5740 |
|
5741 |
-
#: inc/lp-core-functions.php:
|
5742 |
msgid "Turkmenistani manat"
|
5743 |
msgstr ""
|
5744 |
|
5745 |
-
#: inc/lp-core-functions.php:
|
5746 |
msgid "Ugandan shilling"
|
5747 |
msgstr ""
|
5748 |
|
5749 |
-
#: inc/lp-core-functions.php:
|
5750 |
msgid "Ukrainian hryvnia"
|
5751 |
msgstr ""
|
5752 |
|
5753 |
-
#: inc/lp-core-functions.php:
|
5754 |
msgid "United Arab Emirates dirham"
|
5755 |
msgstr ""
|
5756 |
|
5757 |
-
#: inc/lp-core-functions.php:
|
5758 |
msgid "Uruguayan peso"
|
5759 |
msgstr ""
|
5760 |
|
5761 |
-
#: inc/lp-core-functions.php:
|
5762 |
msgid "Uzbekistani som"
|
5763 |
msgstr ""
|
5764 |
|
5765 |
-
#: inc/lp-core-functions.php:
|
5766 |
msgid "Vanuatu vatu"
|
5767 |
msgstr ""
|
5768 |
|
5769 |
-
#: inc/lp-core-functions.php:
|
5770 |
msgid "Venezuelan bolivar"
|
5771 |
msgstr ""
|
5772 |
|
5773 |
-
#: inc/lp-core-functions.php:
|
5774 |
msgid "Vietnamese dong"
|
5775 |
msgstr ""
|
5776 |
|
5777 |
-
#: inc/lp-core-functions.php:
|
5778 |
msgid "Yemeni rial"
|
5779 |
msgstr ""
|
5780 |
|
5781 |
-
#: inc/lp-core-functions.php:
|
5782 |
msgid "Zambian kwacha"
|
5783 |
msgstr ""
|
5784 |
|
5785 |
-
#: inc/lp-core-functions.php:
|
5786 |
msgid "Zimbabwean dollar"
|
5787 |
msgstr ""
|
5788 |
|
5789 |
-
#: inc/lp-core-functions.php:
|
5790 |
msgid "Jersey pound"
|
5791 |
msgstr ""
|
5792 |
|
5793 |
-
#: inc/lp-core-functions.php:
|
5794 |
-
#: inc/lp-template-functions.php:
|
5795 |
msgid "%s week"
|
5796 |
msgid_plural "%s weeks"
|
5797 |
msgstr[0] ""
|
5798 |
msgstr[1] ""
|
5799 |
|
5800 |
-
#: inc/lp-core-functions.php:
|
5801 |
-
#: inc/lp-template-functions.php:
|
5802 |
msgid "%s day"
|
5803 |
msgid_plural "%s days"
|
5804 |
msgstr[0] ""
|
5805 |
msgstr[1] ""
|
5806 |
|
5807 |
-
#: inc/lp-core-functions.php:
|
5808 |
-
#: inc/lp-template-functions.php:
|
5809 |
msgid "%s hour"
|
5810 |
msgid_plural "%s hours"
|
5811 |
msgstr[0] ""
|
5812 |
msgstr[1] ""
|
5813 |
|
5814 |
-
#: inc/lp-core-functions.php:
|
5815 |
-
#: inc/lp-template-functions.php:
|
5816 |
msgid "%s minute"
|
5817 |
msgid_plural "%s minutes"
|
5818 |
msgstr[0] ""
|
5819 |
msgstr[1] ""
|
5820 |
|
5821 |
-
#: inc/lp-core-functions.php:
|
5822 |
msgid "Cart"
|
5823 |
msgstr ""
|
5824 |
|
5825 |
-
#: inc/lp-core-functions.php:
|
5826 |
msgid "Enable cart"
|
5827 |
msgstr ""
|
5828 |
|
5829 |
-
#: inc/lp-core-functions.php:
|
5830 |
msgid "Check this option to enable user purchase multiple courses at one time."
|
5831 |
msgstr ""
|
5832 |
|
5833 |
-
#: inc/lp-core-functions.php:
|
5834 |
msgid "Add to cart redirect"
|
5835 |
msgstr ""
|
5836 |
|
5837 |
-
#: inc/lp-core-functions.php:
|
5838 |
msgid "Redirect to checkout immediately after adding course to cart."
|
5839 |
msgstr ""
|
5840 |
|
5841 |
-
#: inc/lp-core-functions.php:
|
5842 |
msgid "AJAX add to cart"
|
5843 |
msgstr ""
|
5844 |
|
5845 |
-
#: inc/lp-core-functions.php:
|
5846 |
msgid "Using AJAX to add course to cart."
|
5847 |
msgstr ""
|
5848 |
|
5849 |
-
#: inc/lp-core-functions.php:
|
5850 |
msgid "Cart page"
|
5851 |
msgstr ""
|
5852 |
|
5853 |
-
#: inc/lp-core-functions.php:
|
5854 |
msgctxt "static-page-name"
|
5855 |
msgid "Checkout"
|
5856 |
msgstr ""
|
5857 |
|
5858 |
-
#: inc/lp-core-functions.php:
|
5859 |
msgctxt "static-page-name"
|
5860 |
msgid "Courses"
|
5861 |
msgstr ""
|
5862 |
|
5863 |
-
#: inc/lp-core-functions.php:
|
5864 |
msgctxt "static-page-name"
|
5865 |
msgid "Profile"
|
5866 |
msgstr ""
|
5867 |
|
5868 |
-
#: inc/lp-core-functions.php:
|
5869 |
msgctxt "static-page-name"
|
5870 |
msgid "Become a Teacher"
|
5871 |
msgstr ""
|
5872 |
|
5873 |
-
#: inc/lp-core-functions.php:
|
5874 |
msgid "All Levels"
|
5875 |
msgstr ""
|
5876 |
|
5877 |
-
#: inc/lp-core-functions.php:
|
5878 |
msgid "Loading..."
|
5879 |
msgstr ""
|
5880 |
|
5881 |
-
#: inc/lp-core-functions.php:
|
5882 |
msgid "Get Passing Grade"
|
5883 |
msgstr ""
|
5884 |
|
5885 |
-
#: inc/lp-core-functions.php:
|
5886 |
msgid "Evaluate by number of lessons completed per number of total lessons."
|
5887 |
msgstr ""
|
5888 |
|
5889 |
-
#: inc/lp-core-functions.php:
|
5890 |
msgid "E.g: Course has 10 lessons and user completed 5 lessons then the result = 5/10 = 50.%"
|
5891 |
msgstr ""
|
5892 |
|
5893 |
-
#: inc/lp-core-functions.php:
|
5894 |
msgid "Evaluate by results of final quiz in course. Click to Get Passing Grade to get and update Final Quiz"
|
5895 |
msgstr ""
|
5896 |
|
5897 |
-
#: inc/lp-core-functions.php:
|
5898 |
msgid "Evaluate as a percentage of completed quizzes on the total number of quizzes."
|
5899 |
msgstr ""
|
5900 |
|
5901 |
-
#: inc/lp-core-functions.php:
|
5902 |
msgid "<p>E.g: Course has 3 quizzes and user completed quiz 1: 30% correct, quiz 2: 50% corect, quiz 3: 100% correct => Result: (30% + 50% + 100%) / 3 = 60%.</p>"
|
5903 |
msgstr ""
|
5904 |
|
5905 |
-
#: inc/lp-core-functions.php:
|
5906 |
msgid "<p>Evaluate by number of quizzes passed per number of total quizzes.</p>"
|
5907 |
msgstr ""
|
5908 |
|
5909 |
-
#: inc/lp-core-functions.php:
|
5910 |
msgid "<p>E.g: Course has 10 quizzes and user passed 5 quizzes then the result = 5/10 = 50%.</p>"
|
5911 |
msgstr ""
|
5912 |
|
5913 |
-
#: inc/lp-core-functions.php:
|
5914 |
msgid "Evaluate by achieved points of question passed per total point of all questions."
|
5915 |
msgstr ""
|
5916 |
|
5917 |
-
#: inc/lp-core-functions.php:
|
5918 |
msgid "E.g: Course has 10 questions. User correct 5 questions. Result is 5/10 = 50%."
|
5919 |
msgstr ""
|
5920 |
|
5921 |
-
#: inc/lp-core-functions.php:
|
5922 |
msgid "Evaluate by achieved marks per total marks of all questions."
|
5923 |
msgstr ""
|
5924 |
|
5925 |
-
#: inc/lp-core-functions.php:
|
5926 |
msgid "Evaluate via lessons"
|
5927 |
msgstr ""
|
5928 |
|
5929 |
-
#: inc/lp-core-functions.php:
|
5930 |
msgid "Evaluate via results of the final quiz"
|
5931 |
msgstr ""
|
5932 |
|
5933 |
-
#: inc/lp-core-functions.php:
|
5934 |
msgid "Evaluate via quizzes passed"
|
5935 |
msgstr ""
|
5936 |
|
5937 |
-
#: inc/lp-core-functions.php:
|
5938 |
msgid "Evaluate via questions"
|
5939 |
msgstr ""
|
5940 |
|
5941 |
-
#: inc/lp-core-functions.php:
|
5942 |
msgid "Evaluate via mark"
|
5943 |
msgstr ""
|
5944 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5945 |
#: inc/lp-deprecated.php:371
|
5946 |
msgid "Learning"
|
5947 |
msgstr ""
|
@@ -6012,33 +6015,33 @@ msgid "Search Results for: “%s”"
|
|
6012 |
msgstr ""
|
6013 |
|
6014 |
#: inc/lp-template-functions.php:779
|
6015 |
-
#: inc/lp-template-functions.php:
|
6016 |
msgid " – Page %s"
|
6017 |
msgstr ""
|
6018 |
|
6019 |
-
#: inc/lp-template-functions.php:
|
6020 |
-
#: inc/lp-template-functions.php:
|
6021 |
-
#: inc/templates/class-lp-template-course.php:
|
6022 |
msgid "Final"
|
6023 |
msgstr ""
|
6024 |
|
6025 |
-
#: inc/lp-template-functions.php:
|
6026 |
msgid "Course Sidebar"
|
6027 |
msgstr ""
|
6028 |
|
6029 |
-
#: inc/lp-template-functions.php:
|
6030 |
msgid "Widgets in this area will be shown in single course"
|
6031 |
msgstr ""
|
6032 |
|
6033 |
-
#: inc/lp-template-functions.php:
|
6034 |
msgid "All Courses"
|
6035 |
msgstr ""
|
6036 |
|
6037 |
-
#: inc/lp-template-functions.php:
|
6038 |
msgid "Widgets in this area will be shown in all courses page"
|
6039 |
msgstr ""
|
6040 |
|
6041 |
-
#: inc/lp-template-functions.php:
|
6042 |
msgid "Search results: “%s”"
|
6043 |
msgstr ""
|
6044 |
|
@@ -6064,16 +6067,16 @@ msgstr ""
|
|
6064 |
msgid "%s (Guest)"
|
6065 |
msgstr ""
|
6066 |
|
6067 |
-
#: inc/order/class-lp-order.php:
|
6068 |
msgctxt "full name"
|
6069 |
msgid "%1$s"
|
6070 |
msgstr ""
|
6071 |
|
6072 |
-
#: inc/order/class-lp-order.php:
|
6073 |
msgid "No user assigned"
|
6074 |
msgstr ""
|
6075 |
|
6076 |
-
#: inc/order/class-lp-order.php:
|
6077 |
msgid "Order on"
|
6078 |
msgstr ""
|
6079 |
|
@@ -6092,17 +6095,6 @@ msgid_plural "Pending Payment <span class=\"count\">(%s)</span>"
|
|
6092 |
msgstr[0] ""
|
6093 |
msgstr[1] ""
|
6094 |
|
6095 |
-
#: inc/order/lp-order-functions.php:726
|
6096 |
-
msgctxt "Order status"
|
6097 |
-
msgid "Processing"
|
6098 |
-
msgstr ""
|
6099 |
-
|
6100 |
-
#: inc/order/lp-order-functions.php:731
|
6101 |
-
msgid "Processing <span class=\"count\">(%s)</span>"
|
6102 |
-
msgid_plural "Processing <span class=\"count\">(%s)</span>"
|
6103 |
-
msgstr[0] ""
|
6104 |
-
msgstr[1] ""
|
6105 |
-
|
6106 |
#: inc/order/lp-order-functions.php:734
|
6107 |
msgctxt "Order status"
|
6108 |
msgid "Completed"
|
@@ -6208,140 +6200,156 @@ msgstr ""
|
|
6208 |
msgid "Third option"
|
6209 |
msgstr ""
|
6210 |
|
6211 |
-
#: inc/quiz/class-lp-quiz.php:
|
6212 |
msgid "Unlimited"
|
6213 |
msgstr ""
|
6214 |
|
6215 |
-
#: inc/quiz/class-lp-quiz.php:
|
6216 |
msgid "Finish quiz"
|
6217 |
msgstr ""
|
6218 |
|
6219 |
-
#: inc/quiz/class-lp-quiz.php:
|
6220 |
msgid "Are you sure you want to finish this quiz?"
|
6221 |
msgstr ""
|
6222 |
|
6223 |
-
#: inc/quiz/class-lp-quiz.php:
|
6224 |
msgid "Retake quiz"
|
6225 |
msgstr ""
|
6226 |
|
6227 |
-
#: inc/quiz/class-lp-quiz.php:
|
6228 |
msgid "Are you sure you want to retake this quiz?"
|
6229 |
msgstr ""
|
6230 |
|
6231 |
-
#: inc/quiz/class-lp-quiz.php:
|
6232 |
msgid "Time's up!"
|
6233 |
msgstr ""
|
6234 |
|
6235 |
-
#: inc/quiz/class-lp-quiz.php:
|
6236 |
msgid "The time is up! Your quiz will automate come to finish"
|
6237 |
msgstr ""
|
6238 |
|
6239 |
-
#: inc/quiz/class-lp-quiz.php:
|
6240 |
msgid "Congrats! You have finished this quiz"
|
6241 |
msgstr ""
|
6242 |
|
6243 |
-
#: inc/quiz/class-lp-quiz.php:
|
6244 |
msgid "Congrats! You have re-taken this quiz. Please wait a moment and the page will reload"
|
6245 |
msgstr ""
|
6246 |
|
6247 |
-
#: inc/rest-api/
|
|
|
|
|
|
|
|
|
6248 |
msgid "No Course ID avaliable!"
|
6249 |
msgstr ""
|
6250 |
|
6251 |
-
#: inc/rest-api/admin/class-lp-admin-rest-course-controller.php:60
|
6252 |
msgid "No Course avaliable!"
|
6253 |
msgstr ""
|
6254 |
|
6255 |
-
#: inc/rest-api/admin/class-lp-admin-rest-course-controller.php:93
|
6256 |
msgid "No Quiz in this course!"
|
6257 |
msgstr ""
|
6258 |
|
6259 |
-
#: inc/rest-api/admin/class-lp-admin-rest-database-controller.php:
|
6260 |
msgid "The LP Database is Latest:"
|
6261 |
msgstr ""
|
6262 |
|
6263 |
-
#: inc/rest-api/admin/class-lp-admin-rest-question-controller.php:186
|
6264 |
-
#: inc/rest-api/class-lp-rest-users-controller.php:170
|
6265 |
msgid "The ID of course item object."
|
6266 |
msgstr ""
|
6267 |
|
6268 |
-
#: inc/rest-api/admin/class-lp-admin-rest-question-controller.php:192
|
6269 |
-
#: inc/rest-api/class-lp-rest-users-controller.php:176
|
6270 |
msgid "The ID of course object."
|
6271 |
msgstr ""
|
6272 |
|
6273 |
-
#: inc/rest-api/admin/class-lp-admin-rest-question-controller.php:213
|
6274 |
-
#: inc/rest-api/class-lp-rest-users-controller.php:197
|
6275 |
msgid "%s was not registered as a request argument."
|
6276 |
msgstr ""
|
6277 |
|
6278 |
-
#: inc/rest-api/class-lp-rest-
|
6279 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6280 |
msgstr ""
|
6281 |
|
6282 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:202
|
6283 |
msgid "Error: No course available!."
|
6284 |
msgstr ""
|
6285 |
|
6286 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:209
|
6287 |
msgid "Invalid course!"
|
6288 |
msgstr ""
|
6289 |
|
6290 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:238
|
6291 |
msgid "Error: Can't Enroll course."
|
6292 |
msgstr ""
|
6293 |
|
6294 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:256
|
6295 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:
|
6296 |
msgid "Error: Can't add Course to cart."
|
6297 |
msgstr ""
|
6298 |
|
6299 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:
|
6300 |
msgid "Congrats! You enroll course successfully. Redirecting..."
|
6301 |
msgstr ""
|
6302 |
|
6303 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:
|
6304 |
msgid "Redirecting..."
|
6305 |
msgstr ""
|
6306 |
|
6307 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:
|
6308 |
msgid "Error: Invalid Course ID."
|
6309 |
msgstr ""
|
6310 |
|
6311 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:
|
6312 |
msgid "Error: No Course available."
|
6313 |
msgstr ""
|
6314 |
|
6315 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:
|
6316 |
msgid "Error: You have already purchased this course."
|
6317 |
msgstr ""
|
6318 |
|
6319 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:
|
6320 |
msgid "Error: Please setup page for checkout."
|
6321 |
msgstr ""
|
6322 |
|
6323 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:
|
6324 |
msgid "\"%s\" has been added to your cart."
|
6325 |
msgstr ""
|
6326 |
|
6327 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:
|
6328 |
msgid "Invalid params"
|
6329 |
msgstr ""
|
6330 |
|
6331 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:
|
6332 |
msgid "Invalid course"
|
6333 |
msgstr ""
|
6334 |
|
6335 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:
|
6336 |
msgid "You can't retry course"
|
6337 |
msgstr ""
|
6338 |
|
6339 |
-
#: inc/rest-api/class-lp-rest-courses-controller.php:
|
6340 |
msgid "Now you can learn this course"
|
6341 |
msgstr ""
|
6342 |
|
6343 |
-
#: inc/rest-api/class-lp-rest-
|
6344 |
-
|
|
|
|
|
|
|
|
|
6345 |
msgid "Success!"
|
6346 |
msgstr ""
|
6347 |
|
@@ -6396,72 +6404,104 @@ msgstr ""
|
|
6396 |
msgid "Your are logged in as %1$s. <a href=\"%2$s\">Log out</a>?"
|
6397 |
msgstr ""
|
6398 |
|
6399 |
-
#: inc/
|
|
|
|
|
|
|
|
|
6400 |
msgctxt "duration"
|
6401 |
msgid "%s day"
|
6402 |
msgstr ""
|
6403 |
|
6404 |
-
#: inc/templates/class-lp-template-course.php:
|
6405 |
msgctxt "duration"
|
6406 |
msgid "%s hour"
|
6407 |
msgstr ""
|
6408 |
|
6409 |
-
#: inc/templates/class-lp-template-course.php:
|
6410 |
msgctxt "duration"
|
6411 |
msgid "%s min"
|
6412 |
msgstr ""
|
6413 |
|
6414 |
-
#: inc/templates/class-lp-template-course.php:
|
6415 |
msgctxt "duration"
|
6416 |
msgid "%s sec"
|
6417 |
msgstr ""
|
6418 |
|
6419 |
-
#: inc/templates/class-lp-template-course.php:
|
6420 |
msgid "This course is out of stock"
|
6421 |
msgstr ""
|
6422 |
|
6423 |
-
#: inc/templates/class-lp-template-course.php:
|
6424 |
msgid "Your order is waiting for processing"
|
6425 |
msgstr ""
|
6426 |
|
6427 |
-
#: inc/templates/class-lp-template-course.php:
|
6428 |
#: inc/widgets/course-extra.php:28
|
6429 |
msgid "Key features"
|
6430 |
msgstr ""
|
6431 |
|
6432 |
-
#: inc/templates/class-lp-template-course.php:
|
6433 |
-
#: inc/templates/class-lp-template-course.php:
|
6434 |
msgid "Target audiences"
|
6435 |
msgstr ""
|
6436 |
|
6437 |
-
#: inc/templates/class-lp-template-course.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6438 |
msgid "<span class=\"meta-number\">%d</span> lessons"
|
6439 |
msgstr ""
|
6440 |
|
6441 |
-
#: inc/templates/class-lp-template-course.php:
|
6442 |
msgid "<span class=\"meta-number\">%d</span> lesson"
|
6443 |
msgstr ""
|
6444 |
|
6445 |
-
#: inc/templates/class-lp-template-course.php:
|
6446 |
msgid "<span class=\"meta-number\">%d</span> quizzes"
|
6447 |
msgstr ""
|
6448 |
|
6449 |
-
#: inc/templates/class-lp-template-course.php:
|
6450 |
msgid "<span class=\"meta-number\">%d</span> quiz"
|
6451 |
msgstr ""
|
6452 |
|
6453 |
-
#: inc/templates/class-lp-template-course.php:
|
6454 |
msgid "<span class=\"meta-number\">%d</span> students"
|
6455 |
msgstr ""
|
6456 |
|
6457 |
-
#: inc/templates/class-lp-template-course.php:
|
6458 |
msgid "<span class=\"meta-number\">%d</span> student"
|
6459 |
msgstr ""
|
6460 |
|
6461 |
-
#: inc/templates/class-lp-template-course.php:
|
6462 |
msgid "Features"
|
6463 |
msgstr ""
|
6464 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6465 |
#: inc/user-item/class-lp-user-item-quiz.php:148
|
6466 |
msgid "Not Started"
|
6467 |
msgstr ""
|
@@ -6531,30 +6571,30 @@ msgstr ""
|
|
6531 |
msgid "%1$s::%2$s - Your Quiz can't retake."
|
6532 |
msgstr ""
|
6533 |
|
6534 |
-
#: inc/user/abstract-lp-user.php:
|
6535 |
msgid "You can not hint question."
|
6536 |
msgstr ""
|
6537 |
|
6538 |
-
#: inc/user/abstract-lp-user.php:
|
6539 |
-
#: inc/user/abstract-lp-user.php:
|
6540 |
-
#: inc/user/abstract-lp-user.php:
|
6541 |
msgid "The role %s for user doesn't exist"
|
6542 |
msgstr ""
|
6543 |
|
6544 |
-
#: inc/user/abstract-lp-user.php:
|
6545 |
msgid "You have already completed this lesson."
|
6546 |
msgstr ""
|
6547 |
|
6548 |
-
#: inc/user/abstract-lp-user.php:
|
6549 |
msgid "Update user item error."
|
6550 |
msgstr ""
|
6551 |
|
6552 |
-
#: inc/user/abstract-lp-user.php:
|
6553 |
-
#: inc/user/abstract-lp-user.php:
|
6554 |
msgid "Failed to enroll course."
|
6555 |
msgstr ""
|
6556 |
|
6557 |
-
#: inc/user/abstract-lp-user.php:
|
6558 |
msgid "Please login to enroll course."
|
6559 |
msgstr ""
|
6560 |
|
@@ -6628,59 +6668,59 @@ msgstr ""
|
|
6628 |
msgid "Want to become an instructor?"
|
6629 |
msgstr ""
|
6630 |
|
6631 |
-
#: inc/user/lp-user-functions.php:
|
6632 |
msgid "Please login to enroll this course"
|
6633 |
msgstr ""
|
6634 |
|
6635 |
-
#: inc/user/lp-user-functions.php:
|
6636 |
msgid "You have already finished course"
|
6637 |
msgstr ""
|
6638 |
|
6639 |
-
#: inc/user/lp-user-functions.php:
|
6640 |
msgid "You have already enrolled in this course"
|
6641 |
msgstr ""
|
6642 |
|
6643 |
-
#: inc/user/lp-user-functions.php:
|
6644 |
msgid "Old password incorrect!"
|
6645 |
msgstr ""
|
6646 |
|
6647 |
-
#: inc/user/lp-user-functions.php:
|
6648 |
msgid "Confirmation password incorrect!"
|
6649 |
msgstr ""
|
6650 |
|
6651 |
-
#: inc/user/lp-user-functions.php:
|
6652 |
msgid "Invalid item id."
|
6653 |
msgstr ""
|
6654 |
|
6655 |
-
#: inc/user/lp-user-functions.php:
|
6656 |
msgid "Invalid item data."
|
6657 |
msgstr ""
|
6658 |
|
6659 |
-
#: inc/user/lp-user-functions.php:
|
6660 |
msgid "Invalid Course ID."
|
6661 |
msgstr ""
|
6662 |
|
6663 |
-
#: inc/user/lp-user-functions.php:
|
6664 |
msgid "Invalid Quiz"
|
6665 |
msgstr ""
|
6666 |
|
6667 |
-
#: inc/user/lp-user-functions.php:
|
6668 |
msgid "Facebook Profile"
|
6669 |
msgstr ""
|
6670 |
|
6671 |
-
#: inc/user/lp-user-functions.php:
|
6672 |
msgid "Twitter Profile"
|
6673 |
msgstr ""
|
6674 |
|
6675 |
-
#: inc/user/lp-user-functions.php:
|
6676 |
msgid "Google Profile"
|
6677 |
msgstr ""
|
6678 |
|
6679 |
-
#: inc/user/lp-user-functions.php:
|
6680 |
msgid "Youtube Channel"
|
6681 |
msgstr ""
|
6682 |
|
6683 |
-
#: inc/user/lp-user-functions.php:
|
6684 |
msgid "Linkedin Profile"
|
6685 |
msgstr ""
|
6686 |
|
@@ -6821,7 +6861,7 @@ msgstr ""
|
|
6821 |
msgid "Recent Courses"
|
6822 |
msgstr ""
|
6823 |
|
6824 |
-
#: learnpress.php:
|
6825 |
msgid "LearnPress plugin base directory must be <strong>learnpress/learnpres.php</strong> (case sensitive) to ensure all functions work properly and fully operational (currently <strong>%s</strong>)"
|
6826 |
msgstr ""
|
6827 |
|
@@ -6949,7 +6989,7 @@ msgid "Your order"
|
|
6949 |
msgstr ""
|
6950 |
|
6951 |
#: templates/checkout/review-order.php:85
|
6952 |
-
#: templates/order/order-details.php:
|
6953 |
msgid "Subtotal"
|
6954 |
msgstr ""
|
6955 |
|
@@ -7078,7 +7118,7 @@ msgstr ""
|
|
7078 |
msgid "Payment Method:"
|
7079 |
msgstr ""
|
7080 |
|
7081 |
-
#: templates/order/order-details.php:
|
7082 |
msgid "Order status:"
|
7083 |
msgstr ""
|
7084 |
|
@@ -7086,7 +7126,7 @@ msgstr ""
|
|
7086 |
msgid "Recover"
|
7087 |
msgstr ""
|
7088 |
|
7089 |
-
#: templates/pages/profile.php:
|
7090 |
msgid "This user does not public their profile."
|
7091 |
msgstr ""
|
7092 |
|
@@ -7094,13 +7134,6 @@ msgstr ""
|
|
7094 |
msgid "Featured courses"
|
7095 |
msgstr ""
|
7096 |
|
7097 |
-
#: templates/profile/dashboard/featured-courses.php:46
|
7098 |
-
#: templates/profile/dashboard/latest-courses.php:46
|
7099 |
-
#: templates/profile/tabs/courses/created.php:71
|
7100 |
-
#: templates/profile/tabs/courses/enrolled.php:69
|
7101 |
-
msgid "View More"
|
7102 |
-
msgstr ""
|
7103 |
-
|
7104 |
#: templates/profile/dashboard/featured-courses.php:49
|
7105 |
msgid "There is no featured courses."
|
7106 |
msgstr ""
|
@@ -7183,13 +7216,12 @@ msgid "When you checkout with Guest order key will send in email, you can use or
|
|
7183 |
msgstr ""
|
7184 |
|
7185 |
#: templates/profile/tabs/quizzes.php:34
|
7186 |
-
#: assets/
|
7187 |
msgid "Result"
|
7188 |
msgstr ""
|
7189 |
|
7190 |
#: templates/profile/tabs/quizzes.php:35
|
7191 |
-
#: assets/
|
7192 |
-
#: assets/src/apps/js/frontend/quiz/components/result/index.js:167
|
7193 |
msgid "Time spend"
|
7194 |
msgstr ""
|
7195 |
|
@@ -7242,8 +7274,8 @@ msgstr ""
|
|
7242 |
msgid "Start Now"
|
7243 |
msgstr ""
|
7244 |
|
7245 |
-
#: templates/single-course/buttons/finish.php:
|
7246 |
-
#: templates/single-course/buttons/finish.php:
|
7247 |
msgid "Finish course"
|
7248 |
msgstr ""
|
7249 |
|
@@ -7256,11 +7288,13 @@ msgid "Retake course"
|
|
7256 |
msgstr ""
|
7257 |
|
7258 |
#: templates/single-course/content-item/nav.php:30
|
|
|
7259 |
msgctxt "course-item-navigation"
|
7260 |
msgid "Prev"
|
7261 |
msgstr ""
|
7262 |
|
7263 |
#: templates/single-course/content-item/nav.php:39
|
|
|
7264 |
msgctxt "course-item-navigation"
|
7265 |
msgid "Next"
|
7266 |
msgstr ""
|
@@ -7274,6 +7308,10 @@ msgctxt "search course input placeholder"
|
|
7274 |
msgid "Search courses content"
|
7275 |
msgstr ""
|
7276 |
|
|
|
|
|
|
|
|
|
7277 |
#: templates/single-course/featured-review.php:18
|
7278 |
msgid "Featured Review"
|
7279 |
msgstr ""
|
@@ -7287,14 +7325,6 @@ msgstr ""
|
|
7287 |
msgid "About the Instructor"
|
7288 |
msgstr ""
|
7289 |
|
7290 |
-
#: templates/single-course/item-comments.php:13
|
7291 |
-
msgid "Close comments"
|
7292 |
-
msgstr ""
|
7293 |
-
|
7294 |
-
#: templates/single-course/item-comments.php:13
|
7295 |
-
msgid "View comments"
|
7296 |
-
msgstr ""
|
7297 |
-
|
7298 |
#: templates/single-course/loop-section.php:48
|
7299 |
msgctxt "template title empty"
|
7300 |
msgid "Untitled"
|
@@ -7332,24 +7362,24 @@ msgstr ""
|
|
7332 |
msgid "%1$d/%2$d"
|
7333 |
msgstr ""
|
7334 |
|
7335 |
-
#: templates/single-course/sidebar/user-time.php:
|
7336 |
msgid "You started on:"
|
7337 |
msgstr ""
|
7338 |
|
7339 |
-
#: templates/single-course/sidebar/user-time.php:
|
7340 |
msgid "Course will end:"
|
7341 |
msgstr ""
|
7342 |
|
7343 |
-
#: templates/single-course/sidebar/user-time.php:
|
7344 |
-
#: assets/
|
7345 |
msgid "Duration:"
|
7346 |
msgstr ""
|
7347 |
|
7348 |
-
#: templates/single-course/sidebar/user-time.php:
|
7349 |
msgid "Lifetime"
|
7350 |
msgstr ""
|
7351 |
|
7352 |
-
#: templates/single-course/sidebar/user-time.php:
|
7353 |
msgid "You finished on:"
|
7354 |
msgstr ""
|
7355 |
|
@@ -7381,86 +7411,119 @@ msgstr ""
|
|
7381 |
msgid "%d lesson"
|
7382 |
msgstr ""
|
7383 |
|
7384 |
-
#: assets/
|
7385 |
-
msgctxt "button confirm ok"
|
7386 |
-
msgid "OK"
|
7387 |
-
msgstr ""
|
7388 |
-
|
7389 |
-
#: assets/src/apps/js/frontend/modal/index.js:51
|
7390 |
-
msgctxt "button confirm cancel"
|
7391 |
-
msgid "Cancel"
|
7392 |
-
msgstr ""
|
7393 |
-
|
7394 |
-
#: assets/src/apps/js/frontend/quiz/components/attempts/index.js:17
|
7395 |
msgid "Last Attempted"
|
7396 |
msgstr ""
|
7397 |
|
7398 |
-
#: assets/
|
7399 |
msgid "Marks"
|
7400 |
msgstr ""
|
7401 |
|
7402 |
-
#: assets/
|
7403 |
msgid "Passing grade"
|
7404 |
msgstr ""
|
7405 |
|
7406 |
-
#: assets/
|
7407 |
-
#: assets/src/apps/js/frontend/quiz/components/result/index.js:159
|
7408 |
msgctxt "unknown passing grade value"
|
7409 |
msgid "-"
|
7410 |
msgstr ""
|
7411 |
|
7412 |
-
#: assets/
|
7413 |
msgid "Passing grade:"
|
7414 |
msgstr ""
|
7415 |
|
7416 |
-
#: assets/
|
7417 |
msgid "Questions:"
|
7418 |
msgstr ""
|
7419 |
|
7420 |
-
#: assets/
|
7421 |
msgid "Your Result"
|
7422 |
msgstr ""
|
7423 |
|
7424 |
-
#: assets/
|
7425 |
msgid "Point"
|
7426 |
msgstr ""
|
7427 |
|
7428 |
-
#: assets/
|
7429 |
msgid "Correct"
|
7430 |
msgstr ""
|
7431 |
|
7432 |
-
#: assets/
|
7433 |
msgid "Wrong"
|
7434 |
msgstr ""
|
7435 |
|
7436 |
-
#: assets/
|
7437 |
msgid "Skipped"
|
7438 |
msgstr ""
|
7439 |
|
7440 |
-
#: assets/
|
7441 |
msgid "Are you sure to submit quiz?"
|
7442 |
msgstr ""
|
7443 |
|
7444 |
-
#: assets/
|
7445 |
msgid "Question <span>%d to %d of %d</span>"
|
7446 |
msgstr ""
|
7447 |
|
7448 |
-
#: assets/
|
7449 |
msgid "Question <span>%d of %d</span>"
|
7450 |
msgstr ""
|
7451 |
|
7452 |
-
#: assets/
|
7453 |
msgid "Question <span>%d to %d</span>"
|
7454 |
msgstr ""
|
7455 |
|
7456 |
-
#: assets/
|
7457 |
msgid "Earned Point: %s"
|
7458 |
msgstr ""
|
7459 |
|
7460 |
-
#: assets/
|
7461 |
msgid "Finish Quiz"
|
7462 |
msgstr ""
|
7463 |
|
7464 |
-
#: assets/
|
7465 |
msgid "Submitting..."
|
7466 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
# This file is distributed under the same license as the LearnPress plugin.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: LearnPress 4.0.5\n"
|
6 |
"Report-Msgid-Bugs-To: https://github.com/LearnPress/learnpress/issues\n"
|
7 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-05-22T05:00:53+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"last-translator: admin@email.com\n"
|
46 |
msgstr ""
|
47 |
|
48 |
#: inc/abstracts/abstract-addon.php:284
|
49 |
+
msgid "<strong>%1$s</strong> add-on version %2$s requires <strong>LearnPress</strong> version %3$s or higher %4$s"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: inc/abstracts/abstract-addon.php:366
|
53 |
msgid "%s plugin file does not exist."
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: inc/abstracts/abstract-addon.php:387
|
57 |
msgid "%s plugin class does not exist."
|
58 |
msgstr ""
|
59 |
|
66 |
msgstr ""
|
67 |
|
68 |
#: inc/admin/class-lp-admin-ajax.php:376
|
69 |
+
#: inc/admin/class-lp-admin.php:712
|
70 |
msgid "Fail while joining newsletter! Please try again!"
|
71 |
msgstr ""
|
72 |
|
73 |
#: inc/admin/class-lp-admin-ajax.php:400
|
74 |
+
#: inc/admin/class-lp-admin.php:738
|
75 |
msgid "Something went wrong: "
|
76 |
msgstr ""
|
77 |
|
78 |
#: inc/admin/class-lp-admin-ajax.php:403
|
79 |
+
#: inc/admin/class-lp-admin.php:740
|
80 |
msgid "Thank you for subscribing! Please check and click the confirmation link from the email we've just sent to your mail box."
|
81 |
msgstr ""
|
82 |
|
133 |
#: inc/admin/views/meta-boxes/course/tabs/price.php:72
|
134 |
#: inc/admin/views/meta-boxes/fields/date.php:35
|
135 |
#: inc/class-lp-assets.php:61
|
136 |
+
#: inc/lp-core-functions.php:2151
|
137 |
+
#: inc/lp-core-functions.php:3224
|
138 |
+
#: inc/order/class-lp-order.php:949
|
139 |
+
#: assets/js/dist/frontend/quiz.js:44
|
140 |
msgid "Cancel"
|
141 |
msgstr ""
|
142 |
|
217 |
msgid "Learning Management System"
|
218 |
msgstr ""
|
219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
#: inc/admin/class-lp-admin.php:90
|
221 |
msgid "Available Courses"
|
222 |
msgstr ""
|
303 |
|
304 |
#: inc/admin/class-lp-admin.php:305
|
305 |
#: inc/admin/settings/class-lp-settings-profile.php:24
|
306 |
+
#: inc/admin/views/meta-boxes/order/details.php:101
|
307 |
#: inc/admin/views/setup/steps/pages.php:31
|
308 |
msgid "Profile"
|
309 |
msgstr ""
|
344 |
msgid "User has %s to become a teacher."
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: inc/admin/class-lp-admin.php:592
|
348 |
msgid "LearnPress requires permalink option <strong>Post name</strong> is enabled. Please enable it <a href=\"%s\">here</a> to ensure that all functions work properly."
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: inc/admin/class-lp-admin.php:645
|
352 |
msgid "If you like <strong>LearnPress</strong> please leave us a %1$s★★★★★%2$s rating. A huge thanks from LearnPress team for your generous."
|
353 |
msgstr ""
|
354 |
|
355 |
+
#: inc/admin/class-lp-admin.php:647
|
356 |
msgid "Thanks :)"
|
357 |
msgstr ""
|
358 |
|
359 |
+
#: inc/admin/class-lp-admin.php:865
|
360 |
msgid "Permalink only available if the item is already assigned to a course."
|
361 |
msgstr ""
|
362 |
|
380 |
#: inc/custom-post-types/abstract.php:790
|
381 |
#: inc/custom-post-types/abstract.php:799
|
382 |
#: inc/custom-post-types/question.php:374
|
383 |
+
#: inc/order/class-lp-order.php:942
|
384 |
msgid "View"
|
385 |
msgstr ""
|
386 |
|
389 |
#: inc/custom-post-types/abstract.php:591
|
390 |
#: inc/custom-post-types/question.php:372
|
391 |
#: templates/content-lesson/content.php:20
|
392 |
+
#: assets/js/dist/frontend/quiz.js:1
|
393 |
msgid "Edit"
|
394 |
msgstr ""
|
395 |
|
425 |
#: inc/admin/class-lp-modal-search-items.php:61
|
426 |
#: inc/admin/class-lp-modal-search-users.php:49
|
427 |
#: inc/admin/views/course/modal-choose-items.php:66
|
428 |
+
#: inc/admin/views/meta-boxes/order/details.php:268
|
429 |
#: inc/admin/views/quiz/modal-choose-items.php:58
|
430 |
msgid "Close"
|
431 |
msgstr ""
|
437 |
|
438 |
#: inc/admin/class-lp-modal-search-items.php:184
|
439 |
#: inc/admin/class-lp-modal-search-users.php:141
|
440 |
+
#: inc/lp-core-functions.php:782
|
441 |
msgid "<"
|
442 |
msgstr ""
|
443 |
|
444 |
#: inc/admin/class-lp-modal-search-items.php:185
|
445 |
#: inc/admin/class-lp-modal-search-users.php:142
|
446 |
+
#: inc/lp-core-functions.php:783
|
447 |
msgid ">"
|
448 |
msgstr ""
|
449 |
|
523 |
|
524 |
#: inc/admin/class-lp-plugin-install-list-table.php:490
|
525 |
#: inc/class-lp-datetime.php:209
|
526 |
+
#: inc/custom-post-types/order.php:749
|
527 |
#: inc/order/class-lp-order.php:150
|
528 |
#: inc/user-item/class-lp-user-item.php:182
|
529 |
msgid "%s ago"
|
548 |
msgid "<strong>Compatible</strong> with your version of WordPress"
|
549 |
msgstr ""
|
550 |
|
551 |
+
#: inc/admin/class-lp-reset-data.php:103
|
552 |
msgid "Item progress deleted"
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: inc/admin/class-lp-reset-data.php:105
|
556 |
msgid "No data found"
|
557 |
msgstr ""
|
558 |
|
581 |
msgid "LP Terms and Conditions"
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: inc/admin/class-lp-setup-wizard.php:222
|
585 |
msgid "Welcome"
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: inc/admin/class-lp-setup-wizard.php:224
|
589 |
msgid "Run Setup Wizard"
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: inc/admin/class-lp-setup-wizard.php:227
|
593 |
msgid "Pages"
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: inc/admin/class-lp-setup-wizard.php:237
|
597 |
#: inc/admin/meta-box/fields/payment-order.php:7
|
598 |
#: inc/admin/views/setup/steps/payment.php:16
|
599 |
#: templates/checkout/payment.php:25
|
600 |
msgid "Payment"
|
601 |
msgstr ""
|
602 |
|
603 |
+
#: inc/admin/class-lp-setup-wizard.php:245
|
604 |
#: inc/admin/views/setup/content.php:94
|
605 |
#: inc/admin/views/setup/steps/finish.php:12
|
606 |
msgid "Finish"
|
607 |
msgstr ""
|
608 |
|
609 |
+
#: inc/admin/class-lp-setup-wizard.php:362
|
610 |
#: inc/gateways/paypal/class-lp-gateway-paypal.php:91
|
611 |
#: inc/gateways/paypal/class-lp-gateway-paypal.php:95
|
612 |
msgid "PayPal"
|
723 |
msgstr ""
|
724 |
|
725 |
#: inc/admin/helpers/class-lp-plugins-helper.php:271
|
726 |
+
#: templates/single-course/buttons/purchase.php:33
|
727 |
msgid "Buy Now"
|
728 |
msgstr ""
|
729 |
|
970 |
msgid "Only check <strong><em>the final quiz</em></strong> result"
|
971 |
msgstr ""
|
972 |
|
|
|
|
|
|
|
|
|
973 |
#: inc/admin/meta-box/fields/course-permalink.php:16
|
974 |
#: inc/admin/settings/class-lp-settings-courses.php:43
|
975 |
msgctxt "default-slug"
|
1128 |
#: inc/admin/settings/class-lp-settings-courses.php:129
|
1129 |
#: inc/course/lp-course-functions.php:422
|
1130 |
#: inc/custom-post-types/lesson.php:166
|
1131 |
+
#: inc/lp-core-functions.php:399
|
1132 |
+
#: inc/lp-template-functions.php:1080
|
1133 |
msgid "Lesson"
|
1134 |
msgstr ""
|
1135 |
|
1138 |
#: inc/course/lp-course-functions.php:423
|
1139 |
#: inc/custom-post-types/question.php:328
|
1140 |
#: inc/custom-post-types/quiz.php:94
|
1141 |
+
#: inc/lp-core-functions.php:400
|
1142 |
+
#: inc/lp-template-functions.php:1070
|
1143 |
#: templates/profile/tabs/quizzes.php:33
|
1144 |
msgid "Quiz"
|
1145 |
msgstr ""
|
1434 |
msgstr ""
|
1435 |
|
1436 |
#: inc/admin/settings/class-lp-settings-profile.php:89
|
1437 |
+
#: inc/user/lp-user-functions.php:1997
|
1438 |
+
#: inc/user/lp-user-functions.php:1999
|
1439 |
#: templates/profile/tabs/settings/basic-information.php:33
|
1440 |
msgid "First name"
|
1441 |
msgstr ""
|
1442 |
|
1443 |
#: inc/admin/settings/class-lp-settings-profile.php:96
|
1444 |
+
#: inc/user/lp-user-functions.php:2010
|
1445 |
+
#: inc/user/lp-user-functions.php:2012
|
1446 |
#: templates/profile/tabs/settings/basic-information.php:39
|
1447 |
msgid "Last name"
|
1448 |
msgstr ""
|
1449 |
|
1450 |
#: inc/admin/settings/class-lp-settings-profile.php:103
|
1451 |
#: inc/admin/settings/class-lp-settings-profile.php:115
|
1452 |
+
#: inc/user/lp-user-functions.php:2023
|
1453 |
+
#: inc/user/lp-user-functions.php:2025
|
1454 |
#: templates/profile/tabs/settings/basic-information.php:45
|
1455 |
msgid "Display name"
|
1456 |
msgstr ""
|
1525 |
#: inc/admin/sub-menus/class-lp-submenu-statistics.php:22
|
1526 |
#: inc/admin/sub-menus/class-lp-submenu-statistics.php:29
|
1527 |
#: inc/class-lp-gdpr.php:183
|
1528 |
+
#: inc/custom-post-types/order.php:816
|
1529 |
+
#: inc/custom-post-types/order.php:817
|
1530 |
+
#: inc/custom-post-types/order.php:821
|
1531 |
#: inc/user/class-lp-profile.php:284
|
1532 |
msgid "Orders"
|
1533 |
msgstr ""
|
1659 |
msgid "Templates"
|
1660 |
msgstr ""
|
1661 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1662 |
#: inc/admin/views/addons/html-loop-plugin.php:47
|
1663 |
msgid "Version: "
|
1664 |
msgstr ""
|
1891 |
msgid "Choose a difficulty level."
|
1892 |
msgstr ""
|
1893 |
|
|
|
|
|
1894 |
#: inc/lp-template-functions.php:1759
|
1895 |
+
#: inc/admin/views/meta-boxes/course/tabs/general.php:52
|
1896 |
+
#: inc/lp-template-functions.php:1750
|
1897 |
msgid "All levels"
|
1898 |
msgstr ""
|
1899 |
|
1900 |
+
#: inc/lp-template-functions.php:1760
|
1901 |
#: inc/admin/views/meta-boxes/course/tabs/general.php:53
|
1902 |
+
#: inc/lp-core-functions.php:3477
|
1903 |
msgid "Beginner"
|
1904 |
msgstr ""
|
1905 |
|
1906 |
+
#: inc/lp-template-functions.php:1761
|
1907 |
#: inc/admin/views/meta-boxes/course/tabs/general.php:54
|
1908 |
+
#: inc/lp-core-functions.php:3478
|
1909 |
msgid "Intermediate"
|
1910 |
msgstr ""
|
1911 |
|
1912 |
+
#: inc/lp-template-functions.php:1762
|
1913 |
#: inc/admin/views/meta-boxes/course/tabs/general.php:55
|
1914 |
+
#: inc/lp-core-functions.php:3479
|
1915 |
msgid "Expert"
|
1916 |
msgstr ""
|
1917 |
|
2033 |
|
2034 |
#: inc/admin/views/meta-boxes/course/settings.php:314
|
2035 |
#: inc/admin/views/meta-boxes/course/tabs/assessment.php:30
|
2036 |
+
#: inc/rest-api/v1/admin/class-lp-admin-rest-course-controller.php:85
|
2037 |
msgid "Edit: %s"
|
2038 |
msgstr ""
|
2039 |
|
2055 |
|
2056 |
#: inc/admin/views/meta-boxes/course/settings.php:354
|
2057 |
#: inc/admin/views/meta-boxes/course/tabs/extra.php:21
|
2058 |
+
#: inc/templates/class-lp-template-course.php:319
|
2059 |
+
#: inc/templates/class-lp-template-course.php:807
|
2060 |
#: inc/widgets/course-extra.php:30
|
2061 |
msgid "Requirements"
|
2062 |
msgstr ""
|
2164 |
#: inc/admin/views/meta-boxes/lesson/settings.php:29
|
2165 |
#: inc/custom-post-types/abstract.php:811
|
2166 |
#: inc/custom-post-types/lesson.php:239
|
2167 |
+
#: inc/lp-template-functions.php:1083
|
2168 |
#: templates/single-course/section/item-meta.php:28
|
2169 |
msgid "Preview"
|
2170 |
msgstr ""
|
2195 |
|
2196 |
#: inc/admin/views/meta-boxes/order/child-order.php:21
|
2197 |
#: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:37
|
|
|
2198 |
#: inc/admin/views/meta-boxes/order/details.php:226
|
2199 |
+
#: inc/admin/views/meta-boxes/order/details.php:235
|
2200 |
#: inc/admin/views/meta-boxes/order/exports-invoice.php:78
|
2201 |
msgid "Customer"
|
2202 |
msgstr ""
|
2208 |
|
2209 |
#: inc/admin/views/meta-boxes/order/child-order.php:23
|
2210 |
#: inc/class-lp-gdpr.php:453
|
2211 |
+
#: inc/custom-post-types/order.php:658
|
2212 |
#: templates/emails/order-items-table.php:53
|
2213 |
#: templates/emails/plain/order-items-table.php:30
|
2214 |
#: templates/profile/tabs/orders/list.php:31
|
2227 |
msgstr ""
|
2228 |
|
2229 |
#: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:71
|
2230 |
+
#: inc/admin/views/meta-boxes/order/details.php:153
|
2231 |
#: inc/custom-post-types/course.php:85
|
2232 |
#: inc/gateways/paypal/class-lp-gateway-paypal.php:420
|
2233 |
#: templates/checkout/order-received.php:52
|
2235 |
msgstr ""
|
2236 |
|
2237 |
#: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:72
|
2238 |
+
#: inc/admin/views/meta-boxes/order/details.php:154
|
2239 |
msgid "Cost"
|
2240 |
msgstr ""
|
2241 |
|
2242 |
#: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:73
|
2243 |
+
#: inc/admin/views/meta-boxes/order/details.php:155
|
2244 |
#: templates/emails/order-items-table.php:67
|
2245 |
msgid "Quantity"
|
2246 |
msgstr ""
|
2254 |
msgstr ""
|
2255 |
|
2256 |
#: inc/admin/views/meta-boxes/order/content-tab-preview-exports-invoice.php:104
|
2257 |
+
#: inc/admin/views/meta-boxes/order/details.php:156
|
2258 |
+
#: inc/custom-post-types/order.php:657
|
2259 |
#: templates/checkout/order-received.php:99
|
2260 |
#: templates/checkout/review-order.php:99
|
2261 |
+
#: templates/emails/order-items-table.php:99
|
2262 |
#: templates/emails/plain/order-items-table.php:60
|
2263 |
#: templates/order/order-details.php:26
|
2264 |
+
#: templates/order/order-details.php:85
|
2265 |
#: templates/profile/tabs/orders/list.php:30
|
2266 |
msgid "Total"
|
2267 |
msgstr ""
|
2280 |
msgstr ""
|
2281 |
|
2282 |
#: inc/admin/views/meta-boxes/order/details.php:74
|
2283 |
+
msgid "When change Status to \"Pending\", \"Cancelled\" or \"Failed\" will delete all course, lesson, quizz... processing!"
|
2284 |
+
msgstr ""
|
2285 |
+
|
2286 |
+
#: inc/admin/views/meta-boxes/order/details.php:83
|
2287 |
msgid "Customers:"
|
2288 |
msgstr ""
|
2289 |
|
2290 |
+
#: inc/admin/views/meta-boxes/order/details.php:88
|
2291 |
+
#: inc/admin/views/meta-boxes/order/details.php:118
|
2292 |
+
#: inc/admin/views/meta-boxes/order/details.php:239
|
2293 |
msgid "Add multi users"
|
2294 |
msgstr ""
|
2295 |
|
2296 |
+
#: inc/admin/views/meta-boxes/order/details.php:93
|
2297 |
msgid "Customer:"
|
2298 |
msgstr ""
|
2299 |
|
2300 |
+
#: inc/admin/views/meta-boxes/order/details.php:112
|
2301 |
+
#: inc/admin/views/meta-boxes/order/details.php:231
|
2302 |
msgid "Change"
|
2303 |
msgstr ""
|
2304 |
|
2305 |
+
#: inc/admin/views/meta-boxes/order/details.php:117
|
2306 |
msgid "- Or -"
|
2307 |
msgstr ""
|
2308 |
|
2309 |
+
#: inc/admin/views/meta-boxes/order/details.php:124
|
2310 |
msgid "In order to change the order user, please change the order status to 'Pending'."
|
2311 |
msgstr ""
|
2312 |
|
2313 |
+
#: inc/admin/views/meta-boxes/order/details.php:136
|
2314 |
+
#: templates/order/order-details.php:92
|
2315 |
msgid "Order key:"
|
2316 |
msgstr ""
|
2317 |
|
2318 |
+
#: inc/admin/views/meta-boxes/order/details.php:143
|
2319 |
msgid "Customer Note"
|
2320 |
msgstr ""
|
2321 |
|
2322 |
+
#: inc/admin/views/meta-boxes/order/details.php:170
|
2323 |
msgid "No order items"
|
2324 |
msgstr ""
|
2325 |
|
2326 |
+
#: inc/admin/views/meta-boxes/order/details.php:181
|
2327 |
msgid "Subtotal:"
|
2328 |
msgstr ""
|
2329 |
|
2330 |
+
#: inc/admin/views/meta-boxes/order/details.php:191
|
2331 |
#: templates/order/confirm.php:57
|
2332 |
msgid "Total:"
|
2333 |
msgstr ""
|
2334 |
|
2335 |
+
#: inc/admin/views/meta-boxes/order/details.php:207
|
2336 |
msgid "Add item(s)"
|
2337 |
msgstr ""
|
2338 |
|
2339 |
+
#: inc/admin/views/meta-boxes/order/details.php:212
|
2340 |
msgid "In order to change the order item, please change the order status to 'Pending'."
|
2341 |
msgstr ""
|
2342 |
|
2343 |
+
#: inc/admin/views/meta-boxes/order/details.php:263
|
2344 |
msgid "Type here to search the course"
|
2345 |
msgstr ""
|
2346 |
|
2347 |
+
#: inc/admin/views/meta-boxes/order/details.php:266
|
2348 |
msgid "No results"
|
2349 |
msgstr ""
|
2350 |
|
2352 |
msgid "PDF Invoice"
|
2353 |
msgstr ""
|
2354 |
|
2355 |
+
#: inc/admin/views/meta-boxes/order/exports-invoice.php:42
|
2356 |
msgid "PDF Preview"
|
2357 |
msgstr ""
|
2358 |
|
2359 |
+
#: inc/admin/views/meta-boxes/order/exports-invoice.php:43
|
2360 |
msgid "Export Options"
|
2361 |
msgstr ""
|
2362 |
|
2376 |
msgid "Update"
|
2377 |
msgstr ""
|
2378 |
|
2379 |
+
#: inc/admin/views/meta-boxes/order/order-item.php:18
|
2380 |
msgid "Delete item"
|
2381 |
msgstr ""
|
2382 |
|
2386 |
|
2387 |
#: inc/admin/views/meta-boxes/question/settings.php:17
|
2388 |
#: inc/admin/views/quiz/question-meta.php:28
|
2389 |
+
#: assets/js/dist/frontend/quiz.js:1
|
2390 |
msgid "Points"
|
2391 |
msgstr ""
|
2392 |
|
2397 |
|
2398 |
#: inc/admin/views/meta-boxes/question/settings.php:30
|
2399 |
#: inc/admin/views/quiz/question-meta.php:39
|
2400 |
+
#: assets/js/dist/frontend/quiz.js:1
|
2401 |
msgid "Hint"
|
2402 |
msgstr ""
|
2403 |
|
2449 |
msgstr ""
|
2450 |
|
2451 |
#: inc/admin/views/meta-boxes/quiz/settings.php:58
|
2452 |
+
#: assets/js/dist/frontend/quiz.js:1
|
2453 |
msgid "Retake"
|
2454 |
msgstr ""
|
2455 |
|
2466 |
msgstr ""
|
2467 |
|
2468 |
#: inc/admin/views/meta-boxes/quiz/settings.php:86
|
2469 |
+
#: assets/js/dist/frontend/quiz.js:1
|
2470 |
msgid "Review"
|
2471 |
msgstr ""
|
2472 |
|
2573 |
#: inc/custom-post-types/question.php:214
|
2574 |
#: inc/custom-post-types/quiz.php:181
|
2575 |
#: inc/custom-post-types/quiz.php:244
|
2576 |
+
#: inc/custom-post-types/quiz.php:478
|
2577 |
+
#: assets/js/dist/frontend/quiz.js:23
|
2578 |
+
#: assets/js/dist/frontend/quiz.js:187
|
2579 |
msgid "Questions"
|
2580 |
msgstr ""
|
2581 |
|
2821 |
msgstr ""
|
2822 |
|
2823 |
#: inc/admin/views/statistics/orders.php:47
|
2824 |
+
#: inc/custom-post-types/order.php:656
|
2825 |
#: templates/checkout/order-received.php:86
|
2826 |
#: templates/profile/tabs/courses.php:35
|
2827 |
#: templates/profile/tabs/orders/list.php:32
|
3021 |
msgstr ""
|
3022 |
|
3023 |
#: inc/background-process/class-lp-background-schedule-items.php:48
|
3024 |
+
#: inc/user/class-lp-user-factory.php:416
|
3025 |
+
#: learnpress.php:571
|
3026 |
msgid "Every 3 Minutes"
|
3027 |
msgstr ""
|
3028 |
|
3079 |
msgstr ""
|
3080 |
|
3081 |
#: inc/class-lp-assets.php:60
|
3082 |
+
#: inc/lp-core-functions.php:2150
|
3083 |
+
#: inc/lp-core-functions.php:3223
|
3084 |
+
#: assets/js/dist/frontend/quiz.js:41
|
3085 |
msgid "OK"
|
3086 |
msgstr ""
|
3087 |
|
3088 |
#: inc/class-lp-assets.php:62
|
3089 |
#: inc/class-lp-gdpr.php:464
|
3090 |
+
#: inc/lp-core-functions.php:2152
|
3091 |
+
#: inc/lp-core-functions.php:3225
|
3092 |
#: templates/global/lp-modal-overlay.php:24
|
3093 |
msgid "Yes"
|
3094 |
msgstr ""
|
3095 |
|
3096 |
#: inc/class-lp-assets.php:63
|
3097 |
#: inc/class-lp-gdpr.php:464
|
3098 |
+
#: inc/lp-core-functions.php:2153
|
3099 |
+
#: inc/lp-core-functions.php:3226
|
3100 |
#: templates/global/lp-modal-overlay.php:23
|
3101 |
msgid "No"
|
3102 |
msgstr ""
|
3245 |
|
3246 |
#: inc/class-lp-forms-handler.php:30
|
3247 |
#: inc/class-lp-forms-handler.php:207
|
3248 |
+
#: inc/curds/class-lp-user-curd.php:2117
|
3249 |
msgid "Please enter a valid account username."
|
3250 |
msgstr ""
|
3251 |
|
3252 |
#: inc/class-lp-forms-handler.php:37
|
3253 |
#: inc/class-lp-forms-handler.php:197
|
3254 |
+
#: inc/curds/class-lp-user-curd.php:2107
|
3255 |
msgid "Please provide a valid email address."
|
3256 |
msgstr ""
|
3257 |
|
3288 |
msgstr ""
|
3289 |
|
3290 |
#: inc/class-lp-forms-handler.php:211
|
3291 |
+
#: inc/curds/class-lp-user-curd.php:2121
|
3292 |
msgid "An account is already registered with that username. Please choose another."
|
3293 |
msgstr ""
|
3294 |
|
3426 |
msgid "Grade"
|
3427 |
msgstr ""
|
3428 |
|
3429 |
+
#: inc/class-lp-install.php:504
|
3430 |
msgid "Thank you for using LearnPress"
|
3431 |
msgstr ""
|
3432 |
|
3443 |
msgid "No payment method is available."
|
3444 |
msgstr ""
|
3445 |
|
|
|
|
|
|
|
|
|
3446 |
#: inc/class-lp-query-list-table.php:27
|
3447 |
#: inc/custom-post-types/course.php:79
|
3448 |
msgid "item"
|
3464 |
msgid "The method %s is not callable."
|
3465 |
msgstr ""
|
3466 |
|
3467 |
+
#: inc/class-lp-shortcodes.php:218
|
3468 |
msgid "Forgot password?"
|
3469 |
msgstr ""
|
3470 |
|
3471 |
+
#: inc/class-lp-shortcodes.php:220
|
3472 |
msgid "Create new account"
|
3473 |
msgstr ""
|
3474 |
|
3496 |
msgid "Do you want to retake course \"%s\"?"
|
3497 |
msgstr ""
|
3498 |
|
3499 |
+
#: inc/class-lp-thumbnail-helper.php:60
|
3500 |
msgctxt "no course thumbnail"
|
3501 |
msgid "course thumbnail"
|
3502 |
msgstr ""
|
3530 |
#: inc/course/abstract-course.php:885
|
3531 |
#: inc/course/abstract-course.php:905
|
3532 |
#: inc/lesson/class-lp-lesson.php:104
|
3533 |
+
#: inc/quiz/class-lp-quiz.php:636
|
3534 |
msgid "The function %s doesn't exist"
|
3535 |
msgstr ""
|
3536 |
|
3577 |
msgstr ""
|
3578 |
|
3579 |
#: inc/course/lp-course-functions.php:956
|
3580 |
+
#: inc/lp-core-functions.php:2612
|
3581 |
#: inc/user-item/class-lp-user-item-quiz.php:140
|
3582 |
#: inc/user-item/class-lp-user-item.php:755
|
3583 |
#: inc/user/class-lp-profile.php:844
|
3584 |
#: inc/user/class-lp-profile.php:878
|
3585 |
+
#: assets/js/dist/frontend/quiz.js:152
|
3586 |
msgid "Passed"
|
3587 |
msgstr ""
|
3588 |
|
3589 |
#: inc/course/lp-course-functions.php:959
|
3590 |
+
#: inc/lp-core-functions.php:2615
|
3591 |
#: inc/user-item/class-lp-user-item-quiz.php:141
|
3592 |
#: inc/user-item/class-lp-user-item.php:756
|
3593 |
#: inc/user/class-lp-profile.php:845
|
3594 |
#: inc/user/class-lp-profile.php:879
|
3595 |
+
#: assets/js/dist/frontend/quiz.js:154
|
3596 |
msgid "Failed"
|
3597 |
msgstr ""
|
3598 |
|
3730 |
msgid "<p>Sorry! Failed to duplicate quiz!</p>"
|
3731 |
msgstr ""
|
3732 |
|
3733 |
+
#: inc/curds/class-lp-user-curd.php:1511
|
3734 |
+
#: inc/curds/class-lp-user-curd.php:1813
|
3735 |
msgid "course"
|
3736 |
msgstr ""
|
3737 |
|
3738 |
+
#: inc/curds/class-lp-user-curd.php:1512
|
3739 |
+
#: inc/curds/class-lp-user-curd.php:1814
|
3740 |
msgid "courses"
|
3741 |
msgstr ""
|
3742 |
|
3743 |
+
#: inc/curds/class-lp-user-curd.php:1922
|
3744 |
+
msgid "No item in Order"
|
3745 |
+
msgstr ""
|
3746 |
+
|
3747 |
+
#: inc/curds/class-lp-user-curd.php:2038
|
3748 |
msgid "quiz"
|
3749 |
msgstr ""
|
3750 |
|
3751 |
+
#: inc/curds/class-lp-user-curd.php:2039
|
3752 |
msgid "quizzes"
|
3753 |
msgstr ""
|
3754 |
|
3755 |
+
#: inc/curds/class-lp-user-curd.php:2111
|
3756 |
msgid "An account is already registered with your email address. Please log in."
|
3757 |
msgstr ""
|
3758 |
|
3759 |
+
#: inc/curds/class-lp-user-curd.php:2133
|
3760 |
msgid "Failed to create user"
|
3761 |
msgstr ""
|
3762 |
|
3889 |
|
3890 |
#: inc/custom-post-types/course.php:118
|
3891 |
#: inc/custom-post-types/lesson.php:170
|
3892 |
+
#: inc/custom-post-types/order.php:823
|
3893 |
#: inc/custom-post-types/question.php:217
|
3894 |
msgid "Add New"
|
3895 |
msgstr ""
|
4088 |
|
4089 |
#: inc/custom-post-types/lesson.php:348
|
4090 |
#: inc/custom-post-types/question.php:535
|
4091 |
+
#: inc/custom-post-types/quiz.php:477
|
4092 |
msgid "Assigned"
|
4093 |
msgstr ""
|
4094 |
|
4095 |
+
#: inc/custom-post-types/order.php:383
|
4096 |
msgid "Order number, user name, user email, course name etc..."
|
4097 |
msgstr ""
|
4098 |
|
4099 |
+
#: inc/custom-post-types/order.php:577
|
4100 |
+
#: inc/custom-post-types/order.php:822
|
4101 |
msgid "View Order"
|
4102 |
msgstr ""
|
4103 |
|
4104 |
+
#: inc/custom-post-types/order.php:585
|
4105 |
msgid "View child orders"
|
4106 |
msgstr ""
|
4107 |
|
4108 |
+
#: inc/custom-post-types/order.php:653
|
4109 |
+
#: inc/custom-post-types/order.php:818
|
4110 |
#: templates/profile/tabs/orders/list.php:29
|
4111 |
msgid "Order"
|
4112 |
msgstr ""
|
4113 |
|
4114 |
+
#: inc/custom-post-types/order.php:654
|
4115 |
msgid "Student"
|
4116 |
msgstr ""
|
4117 |
|
4118 |
+
#: inc/custom-post-types/order.php:655
|
4119 |
#: inc/lp-deprecated.php:372
|
4120 |
msgid "Purchased"
|
4121 |
msgstr ""
|
4122 |
|
4123 |
+
#: inc/custom-post-types/order.php:708
|
4124 |
#: inc/order/class-lp-order.php:467
|
4125 |
msgid "(Guest)"
|
4126 |
msgstr ""
|
4127 |
|
4128 |
+
#: inc/custom-post-types/order.php:764
|
4129 |
#: templates/checkout/order-received.php:63
|
4130 |
msgid "Course does not exist"
|
4131 |
msgstr ""
|
4132 |
|
4133 |
+
#: inc/custom-post-types/order.php:766
|
4134 |
msgid "Deleted"
|
4135 |
msgstr ""
|
4136 |
|
4137 |
+
#: inc/custom-post-types/order.php:781
|
4138 |
#: templates/checkout/order-received.php:80
|
4139 |
msgid "(No item)"
|
4140 |
msgstr ""
|
4141 |
|
4142 |
+
#: inc/custom-post-types/order.php:789
|
4143 |
msgid "Pay via <strong>%s</strong>"
|
4144 |
msgstr ""
|
4145 |
|
4146 |
+
#: inc/custom-post-types/order.php:819
|
4147 |
msgid "Add New Order"
|
4148 |
msgstr ""
|
4149 |
|
4150 |
+
#: inc/custom-post-types/order.php:820
|
4151 |
+
#: inc/custom-post-types/order.php:920
|
4152 |
#: templates/order/order-details.php:20
|
4153 |
msgid "Order Details"
|
4154 |
msgstr ""
|
4155 |
|
4156 |
+
#: inc/custom-post-types/order.php:824
|
4157 |
msgid "Update Order"
|
4158 |
msgstr ""
|
4159 |
|
4160 |
+
#: inc/custom-post-types/order.php:825
|
4161 |
msgid "Search Orders"
|
4162 |
msgstr ""
|
4163 |
|
4164 |
+
#: inc/custom-post-types/order.php:826
|
4165 |
msgid "No order found"
|
4166 |
msgstr ""
|
4167 |
|
4168 |
+
#: inc/custom-post-types/order.php:827
|
4169 |
msgid "No order found in Trash"
|
4170 |
msgstr ""
|
4171 |
|
4172 |
+
#: inc/custom-post-types/order.php:921
|
4173 |
msgid "Order Actions"
|
4174 |
msgstr ""
|
4175 |
|
4176 |
+
#: inc/custom-post-types/order.php:922
|
4177 |
msgid "Order Exports"
|
4178 |
msgstr ""
|
4179 |
|
4273 |
msgstr ""
|
4274 |
|
4275 |
#: inc/custom-post-types/quiz.php:292
|
4276 |
+
#: inc/templates/class-lp-template-course.php:103
|
4277 |
#: inc/templates/class-lp-template-course.php:108
|
|
|
4278 |
msgid "%d question"
|
4279 |
msgid_plural "%d questions"
|
4280 |
msgstr[0] ""
|
4722 |
msgid "Sandbox email address"
|
4723 |
msgstr ""
|
4724 |
|
4725 |
+
#: inc/handle-steps/class-lp-handle-steps.php:26
|
4726 |
msgid "Steps invalid"
|
4727 |
msgstr ""
|
4728 |
|
4729 |
+
#: inc/handle-steps/class-lp-handle-steps.php:31
|
4730 |
msgid "Step invalid"
|
4731 |
msgstr ""
|
4732 |
|
4733 |
+
#: inc/handle-steps/class-lp-handle-steps.php:78
|
4734 |
+
msgid "Not found function"
|
4735 |
+
msgstr ""
|
4736 |
+
|
4737 |
#: inc/jwt/includes/class-jwt-public.php:44
|
4738 |
msgid "The username of the user."
|
4739 |
msgstr ""
|
4803 |
#: inc/jwt/rest-api/version1/class-lp-rest-quiz-v1-controller.php:202
|
4804 |
#: inc/jwt/rest-api/version1/class-lp-rest-users-v1-controller.php:36
|
4805 |
#: inc/jwt/rest-api/version1/class-lp-rest-users-v1-controller.php:62
|
4806 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:57
|
4807 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-settings-controller.php:23
|
4808 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-users-controller.php:90
|
4809 |
msgid "Unique identifier for the resource."
|
4810 |
msgstr ""
|
4811 |
|
5120 |
msgid "Every %d minutes"
|
5121 |
msgstr ""
|
5122 |
|
5123 |
+
#: inc/lp-core-functions.php:866
|
5124 |
msgid "Minute(s)"
|
5125 |
msgstr ""
|
5126 |
|
5127 |
+
#: inc/lp-core-functions.php:867
|
5128 |
msgid "Hour(s)"
|
5129 |
msgstr ""
|
5130 |
|
5131 |
+
#: inc/lp-core-functions.php:868
|
5132 |
msgid "Day(s)"
|
5133 |
msgstr ""
|
5134 |
|
5135 |
+
#: inc/lp-core-functions.php:869
|
5136 |
msgid "Week(s)"
|
5137 |
msgstr ""
|
5138 |
|
5139 |
+
#: inc/lp-core-functions.php:1014
|
5140 |
msgid "Left"
|
5141 |
msgstr ""
|
5142 |
|
5143 |
+
#: inc/lp-core-functions.php:1015
|
5144 |
msgid "Right"
|
5145 |
msgstr ""
|
5146 |
|
5147 |
+
#: inc/lp-core-functions.php:1016
|
5148 |
msgid "Left with space"
|
5149 |
msgstr ""
|
5150 |
|
5151 |
+
#: inc/lp-core-functions.php:1017
|
5152 |
msgid "Right with space"
|
5153 |
msgstr ""
|
5154 |
|
5155 |
+
#: inc/lp-core-functions.php:1076
|
5156 |
msgid "Afghan afghani"
|
5157 |
msgstr ""
|
5158 |
|
5159 |
+
#: inc/lp-core-functions.php:1077
|
5160 |
msgid "Albanian lek"
|
5161 |
msgstr ""
|
5162 |
|
5163 |
+
#: inc/lp-core-functions.php:1078
|
5164 |
msgid "Algerian dinar"
|
5165 |
msgstr ""
|
5166 |
|
5167 |
+
#: inc/lp-core-functions.php:1079
|
5168 |
msgid "Euro"
|
5169 |
msgstr ""
|
5170 |
|
5171 |
+
#: inc/lp-core-functions.php:1080
|
5172 |
msgid "Angolan kwanza"
|
5173 |
msgstr ""
|
5174 |
|
5175 |
+
#: inc/lp-core-functions.php:1081
|
5176 |
msgid "East Caribbean dollar"
|
5177 |
msgstr ""
|
5178 |
|
5179 |
+
#: inc/lp-core-functions.php:1082
|
5180 |
msgid "Argentine peso"
|
5181 |
msgstr ""
|
5182 |
|
5183 |
+
#: inc/lp-core-functions.php:1083
|
5184 |
msgid "Armenian dram"
|
5185 |
msgstr ""
|
5186 |
|
5187 |
+
#: inc/lp-core-functions.php:1084
|
5188 |
msgid "Aruban florin"
|
5189 |
msgstr ""
|
5190 |
|
5191 |
+
#: inc/lp-core-functions.php:1085
|
5192 |
msgid "Australian dollar"
|
5193 |
msgstr ""
|
5194 |
|
5195 |
+
#: inc/lp-core-functions.php:1086
|
5196 |
msgid "Azerbaijani manat"
|
5197 |
msgstr ""
|
5198 |
|
5199 |
+
#: inc/lp-core-functions.php:1087
|
5200 |
msgid "Bahamian dollar"
|
5201 |
msgstr ""
|
5202 |
|
5203 |
+
#: inc/lp-core-functions.php:1088
|
5204 |
msgid "Bahraini dinar"
|
5205 |
msgstr ""
|
5206 |
|
5207 |
+
#: inc/lp-core-functions.php:1089
|
5208 |
msgid "Bangladeshi taka"
|
5209 |
msgstr ""
|
5210 |
|
5211 |
+
#: inc/lp-core-functions.php:1090
|
5212 |
msgid "Barbadian dollar"
|
5213 |
msgstr ""
|
5214 |
|
5215 |
+
#: inc/lp-core-functions.php:1091
|
5216 |
msgid "Belarusian ruble"
|
5217 |
msgstr ""
|
5218 |
|
5219 |
+
#: inc/lp-core-functions.php:1092
|
5220 |
msgid "Belizean dollar"
|
5221 |
msgstr ""
|
5222 |
|
5223 |
+
#: inc/lp-core-functions.php:1093
|
5224 |
msgid "West African CFA franc"
|
5225 |
msgstr ""
|
5226 |
|
5227 |
+
#: inc/lp-core-functions.php:1094
|
5228 |
msgid "Bermudian dollar"
|
5229 |
msgstr ""
|
5230 |
|
5231 |
+
#: inc/lp-core-functions.php:1095
|
5232 |
msgid "Bhutanese ngultrum"
|
5233 |
msgstr ""
|
5234 |
|
5235 |
+
#: inc/lp-core-functions.php:1096
|
5236 |
msgid "Bolivian boliviano"
|
5237 |
msgstr ""
|
5238 |
|
5239 |
+
#: inc/lp-core-functions.php:1097
|
5240 |
msgid "US dollar"
|
5241 |
msgstr ""
|
5242 |
|
5243 |
+
#: inc/lp-core-functions.php:1098
|
5244 |
msgid "Bosnia and Herzegovina convertible mark"
|
5245 |
msgstr ""
|
5246 |
|
5247 |
+
#: inc/lp-core-functions.php:1099
|
5248 |
msgid "Botswana pula"
|
5249 |
msgstr ""
|
5250 |
|
5251 |
+
#: inc/lp-core-functions.php:1100
|
5252 |
msgid "Brazilian real"
|
5253 |
msgstr ""
|
5254 |
|
5255 |
+
#: inc/lp-core-functions.php:1101
|
5256 |
msgid "Brunei dollar"
|
5257 |
msgstr ""
|
5258 |
|
5259 |
+
#: inc/lp-core-functions.php:1102
|
5260 |
msgid "Bulgarian lev"
|
5261 |
msgstr ""
|
5262 |
|
5263 |
+
#: inc/lp-core-functions.php:1103
|
5264 |
msgid "Burmese kyat"
|
5265 |
msgstr ""
|
5266 |
|
5267 |
+
#: inc/lp-core-functions.php:1104
|
5268 |
msgid "Burundian franc"
|
5269 |
msgstr ""
|
5270 |
|
5271 |
+
#: inc/lp-core-functions.php:1105
|
5272 |
msgid "Cambodian riel"
|
5273 |
msgstr ""
|
5274 |
|
5275 |
+
#: inc/lp-core-functions.php:1106
|
5276 |
msgid "Central African CFA franc"
|
5277 |
msgstr ""
|
5278 |
|
5279 |
+
#: inc/lp-core-functions.php:1107
|
5280 |
msgid "Canadian dollar"
|
5281 |
msgstr ""
|
5282 |
|
5283 |
+
#: inc/lp-core-functions.php:1108
|
5284 |
msgid "Cape Verdean escudo"
|
5285 |
msgstr ""
|
5286 |
|
5287 |
+
#: inc/lp-core-functions.php:1109
|
5288 |
msgid "Cayman Islands dollar"
|
5289 |
msgstr ""
|
5290 |
|
5291 |
+
#: inc/lp-core-functions.php:1110
|
5292 |
msgid "Chilean peso"
|
5293 |
msgstr ""
|
5294 |
|
5295 |
+
#: inc/lp-core-functions.php:1111
|
5296 |
msgid "Chinese renminbi"
|
5297 |
msgstr ""
|
5298 |
|
5299 |
+
#: inc/lp-core-functions.php:1112
|
5300 |
msgid "Colombian peso"
|
5301 |
msgstr ""
|
5302 |
|
5303 |
+
#: inc/lp-core-functions.php:1113
|
5304 |
msgid "Comorian franc"
|
5305 |
msgstr ""
|
5306 |
|
5307 |
+
#: inc/lp-core-functions.php:1114
|
5308 |
msgid "Congolese franc"
|
5309 |
msgstr ""
|
5310 |
|
5311 |
+
#: inc/lp-core-functions.php:1115
|
5312 |
msgid "New Zealand dollar"
|
5313 |
msgstr ""
|
5314 |
|
5315 |
+
#: inc/lp-core-functions.php:1116
|
5316 |
msgid "Costa Rican colón"
|
5317 |
msgstr ""
|
5318 |
|
5319 |
+
#: inc/lp-core-functions.php:1117
|
5320 |
msgid "Croatian kuna"
|
5321 |
msgstr ""
|
5322 |
|
5323 |
+
#: inc/lp-core-functions.php:1118
|
5324 |
msgid "Cuban peso"
|
5325 |
msgstr ""
|
5326 |
|
5327 |
+
#: inc/lp-core-functions.php:1119
|
5328 |
msgid "Netherlands Antilles guilder"
|
5329 |
msgstr ""
|
5330 |
|
5331 |
+
#: inc/lp-core-functions.php:1120
|
5332 |
msgid "Czech koruna"
|
5333 |
msgstr ""
|
5334 |
|
5335 |
+
#: inc/lp-core-functions.php:1121
|
5336 |
msgid "Danish krone"
|
5337 |
msgstr ""
|
5338 |
|
5339 |
+
#: inc/lp-core-functions.php:1122
|
5340 |
msgid "Djiboutian franc"
|
5341 |
msgstr ""
|
5342 |
|
5343 |
+
#: inc/lp-core-functions.php:1123
|
5344 |
msgid "Dominican peso"
|
5345 |
msgstr ""
|
5346 |
|
5347 |
+
#: inc/lp-core-functions.php:1124
|
5348 |
msgid "Egyptian pound"
|
5349 |
msgstr ""
|
5350 |
|
5351 |
+
#: inc/lp-core-functions.php:1125
|
5352 |
msgid "Salvadoran colón"
|
5353 |
msgstr ""
|
5354 |
|
5355 |
+
#: inc/lp-core-functions.php:1126
|
5356 |
msgid "Eritrean nakfa"
|
5357 |
msgstr ""
|
5358 |
|
5359 |
+
#: inc/lp-core-functions.php:1127
|
5360 |
msgid "Ethiopian birr"
|
5361 |
msgstr ""
|
5362 |
|
5363 |
+
#: inc/lp-core-functions.php:1128
|
5364 |
msgid "Falkland Islands pound"
|
5365 |
msgstr ""
|
5366 |
|
5367 |
+
#: inc/lp-core-functions.php:1129
|
5368 |
msgid "Fijian dollar"
|
5369 |
msgstr ""
|
5370 |
|
5371 |
+
#: inc/lp-core-functions.php:1130
|
5372 |
msgid "CFP franc"
|
5373 |
msgstr ""
|
5374 |
|
5375 |
+
#: inc/lp-core-functions.php:1131
|
5376 |
msgid "Gambian dalasi"
|
5377 |
msgstr ""
|
5378 |
|
5379 |
+
#: inc/lp-core-functions.php:1132
|
5380 |
msgid "Georgian lari"
|
5381 |
msgstr ""
|
5382 |
|
5383 |
+
#: inc/lp-core-functions.php:1133
|
5384 |
msgid "Ghanian cedi"
|
5385 |
msgstr ""
|
5386 |
|
5387 |
+
#: inc/lp-core-functions.php:1134
|
5388 |
msgid "Gibraltar pound"
|
5389 |
msgstr ""
|
5390 |
|
5391 |
+
#: inc/lp-core-functions.php:1135
|
5392 |
msgid "Guatemalan quetzal"
|
5393 |
msgstr ""
|
5394 |
|
5395 |
+
#: inc/lp-core-functions.php:1136
|
5396 |
msgid "British pound"
|
5397 |
msgstr ""
|
5398 |
|
5399 |
+
#: inc/lp-core-functions.php:1137
|
5400 |
msgid "Guinean franc"
|
5401 |
msgstr ""
|
5402 |
|
5403 |
+
#: inc/lp-core-functions.php:1138
|
5404 |
msgid "Guyanese dollar"
|
5405 |
msgstr ""
|
5406 |
|
5407 |
+
#: inc/lp-core-functions.php:1139
|
5408 |
msgid "Haitian gourde"
|
5409 |
msgstr ""
|
5410 |
|
5411 |
+
#: inc/lp-core-functions.php:1140
|
5412 |
msgid "Honduran lempira"
|
5413 |
msgstr ""
|
5414 |
|
5415 |
+
#: inc/lp-core-functions.php:1141
|
5416 |
msgid "Hong Kong dollar"
|
5417 |
msgstr ""
|
5418 |
|
5419 |
+
#: inc/lp-core-functions.php:1142
|
5420 |
msgid "Hungarian forint"
|
5421 |
msgstr ""
|
5422 |
|
5423 |
+
#: inc/lp-core-functions.php:1143
|
5424 |
msgid "Icelandic króna"
|
5425 |
msgstr ""
|
5426 |
|
5427 |
+
#: inc/lp-core-functions.php:1144
|
5428 |
msgid "Indian rupee"
|
5429 |
msgstr ""
|
5430 |
|
5431 |
+
#: inc/lp-core-functions.php:1145
|
5432 |
msgid "Indonesian rupiah"
|
5433 |
msgstr ""
|
5434 |
|
5435 |
+
#: inc/lp-core-functions.php:1146
|
5436 |
msgid "Iranian rial"
|
5437 |
msgstr ""
|
5438 |
|
5439 |
+
#: inc/lp-core-functions.php:1147
|
5440 |
msgid "Iraqi dinar"
|
5441 |
msgstr ""
|
5442 |
|
5443 |
+
#: inc/lp-core-functions.php:1148
|
5444 |
msgid "Israeli new sheqel"
|
5445 |
msgstr ""
|
5446 |
|
5447 |
+
#: inc/lp-core-functions.php:1149
|
5448 |
msgid "Jamaican dollar"
|
5449 |
msgstr ""
|
5450 |
|
5451 |
+
#: inc/lp-core-functions.php:1150
|
5452 |
msgid "Japanese yen "
|
5453 |
msgstr ""
|
5454 |
|
5455 |
+
#: inc/lp-core-functions.php:1151
|
5456 |
msgid "Jordanian dinar"
|
5457 |
msgstr ""
|
5458 |
|
5459 |
+
#: inc/lp-core-functions.php:1152
|
5460 |
msgid "Kazakhstani tenge"
|
5461 |
msgstr ""
|
5462 |
|
5463 |
+
#: inc/lp-core-functions.php:1153
|
5464 |
msgid "Kenyan shilling"
|
5465 |
msgstr ""
|
5466 |
|
5467 |
+
#: inc/lp-core-functions.php:1154
|
5468 |
msgid "North Korean won"
|
5469 |
msgstr ""
|
5470 |
|
5471 |
+
#: inc/lp-core-functions.php:1155
|
5472 |
msgid "Kuwaiti dinar"
|
5473 |
msgstr ""
|
5474 |
|
5475 |
+
#: inc/lp-core-functions.php:1156
|
5476 |
msgid "Kyrgyzstani som"
|
5477 |
msgstr ""
|
5478 |
|
5479 |
+
#: inc/lp-core-functions.php:1157
|
5480 |
msgid "South Korean won"
|
5481 |
msgstr ""
|
5482 |
|
5483 |
+
#: inc/lp-core-functions.php:1158
|
5484 |
msgid "Lao kip"
|
5485 |
msgstr ""
|
5486 |
|
5487 |
+
#: inc/lp-core-functions.php:1159
|
5488 |
msgid "Latvian lats"
|
5489 |
msgstr ""
|
5490 |
|
5491 |
+
#: inc/lp-core-functions.php:1160
|
5492 |
msgid "Lebanese pound"
|
5493 |
msgstr ""
|
5494 |
|
5495 |
+
#: inc/lp-core-functions.php:1161
|
5496 |
msgid "Lesotho loti"
|
5497 |
msgstr ""
|
5498 |
|
5499 |
+
#: inc/lp-core-functions.php:1162
|
5500 |
msgid "Liberian dollar"
|
5501 |
msgstr ""
|
5502 |
|
5503 |
+
#: inc/lp-core-functions.php:1163
|
5504 |
+
#: inc/lp-core-functions.php:1234
|
5505 |
msgid "Libyan dinar"
|
5506 |
msgstr ""
|
5507 |
|
5508 |
+
#: inc/lp-core-functions.php:1164
|
5509 |
msgid "Swiss franc"
|
5510 |
msgstr ""
|
5511 |
|
5512 |
+
#: inc/lp-core-functions.php:1165
|
5513 |
msgid "Lithuanian litas"
|
5514 |
msgstr ""
|
5515 |
|
5516 |
+
#: inc/lp-core-functions.php:1166
|
5517 |
msgid "Macanese pataca"
|
5518 |
msgstr ""
|
5519 |
|
5520 |
+
#: inc/lp-core-functions.php:1167
|
5521 |
msgid "Macedonian denar"
|
5522 |
msgstr ""
|
5523 |
|
5524 |
+
#: inc/lp-core-functions.php:1168
|
5525 |
msgid "Malagasy ariary"
|
5526 |
msgstr ""
|
5527 |
|
5528 |
+
#: inc/lp-core-functions.php:1169
|
5529 |
msgid "Malawian kwacha"
|
5530 |
msgstr ""
|
5531 |
|
5532 |
+
#: inc/lp-core-functions.php:1170
|
5533 |
msgid "Malaysian ringgit"
|
5534 |
msgstr ""
|
5535 |
|
5536 |
+
#: inc/lp-core-functions.php:1171
|
5537 |
msgid "Maldivian rufiyaa"
|
5538 |
msgstr ""
|
5539 |
|
5540 |
+
#: inc/lp-core-functions.php:1172
|
5541 |
msgid "Mauritanian ouguiya"
|
5542 |
msgstr ""
|
5543 |
|
5544 |
+
#: inc/lp-core-functions.php:1173
|
5545 |
msgid "Mauritian rupee"
|
5546 |
msgstr ""
|
5547 |
|
5548 |
+
#: inc/lp-core-functions.php:1174
|
5549 |
msgid "Mexican peso"
|
5550 |
msgstr ""
|
5551 |
|
5552 |
+
#: inc/lp-core-functions.php:1175
|
5553 |
msgid "Moldovan leu"
|
5554 |
msgstr ""
|
5555 |
|
5556 |
+
#: inc/lp-core-functions.php:1176
|
5557 |
msgid "Mongolian tugrik"
|
5558 |
msgstr ""
|
5559 |
|
5560 |
+
#: inc/lp-core-functions.php:1177
|
5561 |
msgid "Moroccan dirham"
|
5562 |
msgstr ""
|
5563 |
|
5564 |
+
#: inc/lp-core-functions.php:1178
|
5565 |
msgid "Mozambican metical"
|
5566 |
msgstr ""
|
5567 |
|
5568 |
+
#: inc/lp-core-functions.php:1179
|
5569 |
msgid "Namibian dollar"
|
5570 |
msgstr ""
|
5571 |
|
5572 |
+
#: inc/lp-core-functions.php:1180
|
5573 |
msgid "Nepalese rupee"
|
5574 |
msgstr ""
|
5575 |
|
5576 |
+
#: inc/lp-core-functions.php:1181
|
5577 |
msgid "Nicaraguan córdoba"
|
5578 |
msgstr ""
|
5579 |
|
5580 |
+
#: inc/lp-core-functions.php:1182
|
5581 |
msgid "Nigerian naira"
|
5582 |
msgstr ""
|
5583 |
|
5584 |
+
#: inc/lp-core-functions.php:1183
|
5585 |
msgid "Norwegian krone"
|
5586 |
msgstr ""
|
5587 |
|
5588 |
+
#: inc/lp-core-functions.php:1184
|
5589 |
msgid "Omani rial"
|
5590 |
msgstr ""
|
5591 |
|
5592 |
+
#: inc/lp-core-functions.php:1185
|
5593 |
msgid "Pakistani rupee"
|
5594 |
msgstr ""
|
5595 |
|
5596 |
+
#: inc/lp-core-functions.php:1186
|
5597 |
msgid "Panamanian balboa"
|
5598 |
msgstr ""
|
5599 |
|
5600 |
+
#: inc/lp-core-functions.php:1187
|
5601 |
msgid "Papua New Guinea kina"
|
5602 |
msgstr ""
|
5603 |
|
5604 |
+
#: inc/lp-core-functions.php:1188
|
5605 |
msgid "Paraguayan guarani"
|
5606 |
msgstr ""
|
5607 |
|
5608 |
+
#: inc/lp-core-functions.php:1189
|
5609 |
msgid "Peruvian nuevo sol"
|
5610 |
msgstr ""
|
5611 |
|
5612 |
+
#: inc/lp-core-functions.php:1190
|
5613 |
msgid "Philippine peso"
|
5614 |
msgstr ""
|
5615 |
|
5616 |
+
#: inc/lp-core-functions.php:1191
|
5617 |
msgid "Polish zloty"
|
5618 |
msgstr ""
|
5619 |
|
5620 |
+
#: inc/lp-core-functions.php:1192
|
5621 |
msgid "Qatari riyal"
|
5622 |
msgstr ""
|
5623 |
|
5624 |
+
#: inc/lp-core-functions.php:1193
|
5625 |
msgid "Romanian leu"
|
5626 |
msgstr ""
|
5627 |
|
5628 |
+
#: inc/lp-core-functions.php:1194
|
5629 |
msgid "Russian ruble"
|
5630 |
msgstr ""
|
5631 |
|
5632 |
+
#: inc/lp-core-functions.php:1195
|
5633 |
msgid "Rwandan franc"
|
5634 |
msgstr ""
|
5635 |
|
5636 |
+
#: inc/lp-core-functions.php:1196
|
5637 |
msgid "Samoan tālā"
|
5638 |
msgstr ""
|
5639 |
|
5640 |
+
#: inc/lp-core-functions.php:1197
|
5641 |
msgid "São Tomé and Príncipe dobra"
|
5642 |
msgstr ""
|
5643 |
|
5644 |
+
#: inc/lp-core-functions.php:1198
|
5645 |
msgid "Saudi riyal"
|
5646 |
msgstr ""
|
5647 |
|
5648 |
+
#: inc/lp-core-functions.php:1199
|
5649 |
msgid "Serbian dinar"
|
5650 |
msgstr ""
|
5651 |
|
5652 |
+
#: inc/lp-core-functions.php:1200
|
5653 |
msgid "Seychellois rupee"
|
5654 |
msgstr ""
|
5655 |
|
5656 |
+
#: inc/lp-core-functions.php:1201
|
5657 |
msgid "Sierra Leonean leone"
|
5658 |
msgstr ""
|
5659 |
|
5660 |
+
#: inc/lp-core-functions.php:1202
|
5661 |
msgid "Singapore dollar"
|
5662 |
msgstr ""
|
5663 |
|
5664 |
+
#: inc/lp-core-functions.php:1203
|
5665 |
msgid "Solomon Islands dollar"
|
5666 |
msgstr ""
|
5667 |
|
5668 |
+
#: inc/lp-core-functions.php:1204
|
5669 |
msgid "Somali shilling"
|
5670 |
msgstr ""
|
5671 |
|
5672 |
+
#: inc/lp-core-functions.php:1205
|
5673 |
msgid "South African rand"
|
5674 |
msgstr ""
|
5675 |
|
5676 |
+
#: inc/lp-core-functions.php:1206
|
5677 |
msgid "Sri Lankan rupee"
|
5678 |
msgstr ""
|
5679 |
|
5680 |
+
#: inc/lp-core-functions.php:1207
|
5681 |
msgid "St. Helena pound"
|
5682 |
msgstr ""
|
5683 |
|
5684 |
+
#: inc/lp-core-functions.php:1208
|
5685 |
msgid "Sudanese pound"
|
5686 |
msgstr ""
|
5687 |
|
5688 |
+
#: inc/lp-core-functions.php:1209
|
5689 |
msgid "Surinamese dollar"
|
5690 |
msgstr ""
|
5691 |
|
5692 |
+
#: inc/lp-core-functions.php:1210
|
5693 |
msgid "Swazi lilangeni"
|
5694 |
msgstr ""
|
5695 |
|
5696 |
+
#: inc/lp-core-functions.php:1211
|
5697 |
msgid "Swedish krona"
|
5698 |
msgstr ""
|
5699 |
|
5700 |
+
#: inc/lp-core-functions.php:1212
|
5701 |
msgid "Syrian pound"
|
5702 |
msgstr ""
|
5703 |
|
5704 |
+
#: inc/lp-core-functions.php:1213
|
5705 |
msgid "New Taiwan dollar"
|
5706 |
msgstr ""
|
5707 |
|
5708 |
+
#: inc/lp-core-functions.php:1214
|
5709 |
msgid "Tajikistani somoni"
|
5710 |
msgstr ""
|
5711 |
|
5712 |
+
#: inc/lp-core-functions.php:1215
|
5713 |
msgid "Tanzanian shilling"
|
5714 |
msgstr ""
|
5715 |
|
5716 |
+
#: inc/lp-core-functions.php:1216
|
5717 |
msgid "Thai baht "
|
5718 |
msgstr ""
|
5719 |
|
5720 |
+
#: inc/lp-core-functions.php:1217
|
5721 |
msgid "Tongan pa’anga"
|
5722 |
msgstr ""
|
5723 |
|
5724 |
+
#: inc/lp-core-functions.php:1218
|
5725 |
msgid "Trinidad and Tobago dollar"
|
5726 |
msgstr ""
|
5727 |
|
5728 |
+
#: inc/lp-core-functions.php:1219
|
5729 |
msgid "Tunisian dinar"
|
5730 |
msgstr ""
|
5731 |
|
5732 |
+
#: inc/lp-core-functions.php:1220
|
5733 |
msgid "Turkish lira"
|
5734 |
msgstr ""
|
5735 |
|
5736 |
+
#: inc/lp-core-functions.php:1221
|
5737 |
msgid "Turkmenistani manat"
|
5738 |
msgstr ""
|
5739 |
|
5740 |
+
#: inc/lp-core-functions.php:1222
|
5741 |
msgid "Ugandan shilling"
|
5742 |
msgstr ""
|
5743 |
|
5744 |
+
#: inc/lp-core-functions.php:1223
|
5745 |
msgid "Ukrainian hryvnia"
|
5746 |
msgstr ""
|
5747 |
|
5748 |
+
#: inc/lp-core-functions.php:1224
|
5749 |
msgid "United Arab Emirates dirham"
|
5750 |
msgstr ""
|
5751 |
|
5752 |
+
#: inc/lp-core-functions.php:1225
|
5753 |
msgid "Uruguayan peso"
|
5754 |
msgstr ""
|
5755 |
|
5756 |
+
#: inc/lp-core-functions.php:1226
|
5757 |
msgid "Uzbekistani som"
|
5758 |
msgstr ""
|
5759 |
|
5760 |
+
#: inc/lp-core-functions.php:1227
|
5761 |
msgid "Vanuatu vatu"
|
5762 |
msgstr ""
|
5763 |
|
5764 |
+
#: inc/lp-core-functions.php:1228
|
5765 |
msgid "Venezuelan bolivar"
|
5766 |
msgstr ""
|
5767 |
|
5768 |
+
#: inc/lp-core-functions.php:1229
|
5769 |
msgid "Vietnamese dong"
|
5770 |
msgstr ""
|
5771 |
|
5772 |
+
#: inc/lp-core-functions.php:1230
|
5773 |
msgid "Yemeni rial"
|
5774 |
msgstr ""
|
5775 |
|
5776 |
+
#: inc/lp-core-functions.php:1231
|
5777 |
msgid "Zambian kwacha"
|
5778 |
msgstr ""
|
5779 |
|
5780 |
+
#: inc/lp-core-functions.php:1232
|
5781 |
msgid "Zimbabwean dollar"
|
5782 |
msgstr ""
|
5783 |
|
5784 |
+
#: inc/lp-core-functions.php:1233
|
5785 |
msgid "Jersey pound"
|
5786 |
msgstr ""
|
5787 |
|
5788 |
+
#: inc/lp-core-functions.php:1545
|
5789 |
+
#: inc/lp-template-functions.php:1726
|
5790 |
msgid "%s week"
|
5791 |
msgid_plural "%s weeks"
|
5792 |
msgstr[0] ""
|
5793 |
msgstr[1] ""
|
5794 |
|
5795 |
+
#: inc/lp-core-functions.php:1549
|
5796 |
+
#: inc/lp-template-functions.php:1722
|
5797 |
msgid "%s day"
|
5798 |
msgid_plural "%s days"
|
5799 |
msgstr[0] ""
|
5800 |
msgstr[1] ""
|
5801 |
|
5802 |
+
#: inc/lp-core-functions.php:1554
|
5803 |
+
#: inc/lp-template-functions.php:1717
|
5804 |
msgid "%s hour"
|
5805 |
msgid_plural "%s hours"
|
5806 |
msgstr[0] ""
|
5807 |
msgstr[1] ""
|
5808 |
|
5809 |
+
#: inc/lp-core-functions.php:1558
|
5810 |
+
#: inc/lp-template-functions.php:1711
|
5811 |
msgid "%s minute"
|
5812 |
msgid_plural "%s minutes"
|
5813 |
msgstr[0] ""
|
5814 |
msgstr[1] ""
|
5815 |
|
5816 |
+
#: inc/lp-core-functions.php:2413
|
5817 |
msgid "Cart"
|
5818 |
msgstr ""
|
5819 |
|
5820 |
+
#: inc/lp-core-functions.php:2417
|
5821 |
msgid "Enable cart"
|
5822 |
msgstr ""
|
5823 |
|
5824 |
+
#: inc/lp-core-functions.php:2418
|
5825 |
msgid "Check this option to enable user purchase multiple courses at one time."
|
5826 |
msgstr ""
|
5827 |
|
5828 |
+
#: inc/lp-core-functions.php:2427
|
5829 |
msgid "Add to cart redirect"
|
5830 |
msgstr ""
|
5831 |
|
5832 |
+
#: inc/lp-core-functions.php:2428
|
5833 |
msgid "Redirect to checkout immediately after adding course to cart."
|
5834 |
msgstr ""
|
5835 |
|
5836 |
+
#: inc/lp-core-functions.php:2434
|
5837 |
msgid "AJAX add to cart"
|
5838 |
msgstr ""
|
5839 |
|
5840 |
+
#: inc/lp-core-functions.php:2435
|
5841 |
msgid "Using AJAX to add course to cart."
|
5842 |
msgstr ""
|
5843 |
|
5844 |
+
#: inc/lp-core-functions.php:2441
|
5845 |
msgid "Cart page"
|
5846 |
msgstr ""
|
5847 |
|
5848 |
+
#: inc/lp-core-functions.php:2809
|
5849 |
msgctxt "static-page-name"
|
5850 |
msgid "Checkout"
|
5851 |
msgstr ""
|
5852 |
|
5853 |
+
#: inc/lp-core-functions.php:2810
|
5854 |
msgctxt "static-page-name"
|
5855 |
msgid "Courses"
|
5856 |
msgstr ""
|
5857 |
|
5858 |
+
#: inc/lp-core-functions.php:2811
|
5859 |
msgctxt "static-page-name"
|
5860 |
msgid "Profile"
|
5861 |
msgstr ""
|
5862 |
|
5863 |
+
#: inc/lp-core-functions.php:2812
|
5864 |
msgctxt "static-page-name"
|
5865 |
msgid "Become a Teacher"
|
5866 |
msgstr ""
|
5867 |
|
5868 |
+
#: inc/lp-core-functions.php:3480
|
5869 |
msgid "All Levels"
|
5870 |
msgstr ""
|
5871 |
|
5872 |
+
#: inc/lp-core-functions.php:3498
|
5873 |
msgid "Loading..."
|
5874 |
msgstr ""
|
5875 |
|
5876 |
+
#: inc/lp-core-functions.php:3501
|
5877 |
msgid "Get Passing Grade"
|
5878 |
msgstr ""
|
5879 |
|
5880 |
+
#: inc/lp-core-functions.php:3504
|
5881 |
msgid "Evaluate by number of lessons completed per number of total lessons."
|
5882 |
msgstr ""
|
5883 |
|
5884 |
+
#: inc/lp-core-functions.php:3510
|
5885 |
msgid "E.g: Course has 10 lessons and user completed 5 lessons then the result = 5/10 = 50.%"
|
5886 |
msgstr ""
|
5887 |
|
5888 |
+
#: inc/lp-core-functions.php:3515
|
5889 |
msgid "Evaluate by results of final quiz in course. Click to Get Passing Grade to get and update Final Quiz"
|
5890 |
msgstr ""
|
5891 |
|
5892 |
+
#: inc/lp-core-functions.php:3519
|
5893 |
msgid "Evaluate as a percentage of completed quizzes on the total number of quizzes."
|
5894 |
msgstr ""
|
5895 |
|
5896 |
+
#: inc/lp-core-functions.php:3523
|
5897 |
msgid "<p>E.g: Course has 3 quizzes and user completed quiz 1: 30% correct, quiz 2: 50% corect, quiz 3: 100% correct => Result: (30% + 50% + 100%) / 3 = 60%.</p>"
|
5898 |
msgstr ""
|
5899 |
|
5900 |
+
#: inc/lp-core-functions.php:3527
|
5901 |
msgid "<p>Evaluate by number of quizzes passed per number of total quizzes.</p>"
|
5902 |
msgstr ""
|
5903 |
|
5904 |
+
#: inc/lp-core-functions.php:3531
|
5905 |
msgid "<p>E.g: Course has 10 quizzes and user passed 5 quizzes then the result = 5/10 = 50%.</p>"
|
5906 |
msgstr ""
|
5907 |
|
5908 |
+
#: inc/lp-core-functions.php:3535
|
5909 |
msgid "Evaluate by achieved points of question passed per total point of all questions."
|
5910 |
msgstr ""
|
5911 |
|
5912 |
+
#: inc/lp-core-functions.php:3541
|
5913 |
msgid "E.g: Course has 10 questions. User correct 5 questions. Result is 5/10 = 50%."
|
5914 |
msgstr ""
|
5915 |
|
5916 |
+
#: inc/lp-core-functions.php:3546
|
5917 |
msgid "Evaluate by achieved marks per total marks of all questions."
|
5918 |
msgstr ""
|
5919 |
|
5920 |
+
#: inc/lp-core-functions.php:3552
|
5921 |
msgid "Evaluate via lessons"
|
5922 |
msgstr ""
|
5923 |
|
5924 |
+
#: inc/lp-core-functions.php:3556
|
5925 |
msgid "Evaluate via results of the final quiz"
|
5926 |
msgstr ""
|
5927 |
|
5928 |
+
#: inc/lp-core-functions.php:3560
|
5929 |
msgid "Evaluate via quizzes passed"
|
5930 |
msgstr ""
|
5931 |
|
5932 |
+
#: inc/lp-core-functions.php:3564
|
5933 |
msgid "Evaluate via questions"
|
5934 |
msgstr ""
|
5935 |
|
5936 |
+
#: inc/lp-core-functions.php:3568
|
5937 |
msgid "Evaluate via mark"
|
5938 |
msgstr ""
|
5939 |
|
5940 |
+
#: inc/lp-core-functions.php:3836
|
5941 |
+
msgid "Heads up, Please backup before upgrade!"
|
5942 |
+
msgstr ""
|
5943 |
+
|
5944 |
+
#: inc/lp-core-functions.php:3839
|
5945 |
+
msgid "The latest update includes some substantial changes across different areas of the plugin. We highly recommend you backup your site before upgrading, and make sure you first update in a staging environment"
|
5946 |
+
msgstr ""
|
5947 |
+
|
5948 |
#: inc/lp-deprecated.php:371
|
5949 |
msgid "Learning"
|
5950 |
msgstr ""
|
6015 |
msgstr ""
|
6016 |
|
6017 |
#: inc/lp-template-functions.php:779
|
6018 |
+
#: inc/lp-template-functions.php:1621
|
6019 |
msgid " – Page %s"
|
6020 |
msgstr ""
|
6021 |
|
6022 |
+
#: inc/lp-template-functions.php:1074
|
6023 |
+
#: inc/lp-template-functions.php:1251
|
6024 |
+
#: inc/templates/class-lp-template-course.php:144
|
6025 |
msgid "Final"
|
6026 |
msgstr ""
|
6027 |
|
6028 |
+
#: inc/lp-template-functions.php:1575
|
6029 |
msgid "Course Sidebar"
|
6030 |
msgstr ""
|
6031 |
|
6032 |
+
#: inc/lp-template-functions.php:1577
|
6033 |
msgid "Widgets in this area will be shown in single course"
|
6034 |
msgstr ""
|
6035 |
|
6036 |
+
#: inc/lp-template-functions.php:1586
|
6037 |
msgid "All Courses"
|
6038 |
msgstr ""
|
6039 |
|
6040 |
+
#: inc/lp-template-functions.php:1588
|
6041 |
msgid "Widgets in this area will be shown in all courses page"
|
6042 |
msgstr ""
|
6043 |
|
6044 |
+
#: inc/lp-template-functions.php:1618
|
6045 |
msgid "Search results: “%s”"
|
6046 |
msgstr ""
|
6047 |
|
6067 |
msgid "%s (Guest)"
|
6068 |
msgstr ""
|
6069 |
|
6070 |
+
#: inc/order/class-lp-order.php:995
|
6071 |
msgctxt "full name"
|
6072 |
msgid "%1$s"
|
6073 |
msgstr ""
|
6074 |
|
6075 |
+
#: inc/order/class-lp-order.php:1035
|
6076 |
msgid "No user assigned"
|
6077 |
msgstr ""
|
6078 |
|
6079 |
+
#: inc/order/class-lp-order.php:1102
|
6080 |
msgid "Order on"
|
6081 |
msgstr ""
|
6082 |
|
6095 |
msgstr[0] ""
|
6096 |
msgstr[1] ""
|
6097 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6098 |
#: inc/order/lp-order-functions.php:734
|
6099 |
msgctxt "Order status"
|
6100 |
msgid "Completed"
|
6200 |
msgid "Third option"
|
6201 |
msgstr ""
|
6202 |
|
6203 |
+
#: inc/quiz/class-lp-quiz.php:519
|
6204 |
msgid "Unlimited"
|
6205 |
msgstr ""
|
6206 |
|
6207 |
+
#: inc/quiz/class-lp-quiz.php:577
|
6208 |
msgid "Finish quiz"
|
6209 |
msgstr ""
|
6210 |
|
6211 |
+
#: inc/quiz/class-lp-quiz.php:578
|
6212 |
msgid "Are you sure you want to finish this quiz?"
|
6213 |
msgstr ""
|
6214 |
|
6215 |
+
#: inc/quiz/class-lp-quiz.php:581
|
6216 |
msgid "Retake quiz"
|
6217 |
msgstr ""
|
6218 |
|
6219 |
+
#: inc/quiz/class-lp-quiz.php:582
|
6220 |
msgid "Are you sure you want to retake this quiz?"
|
6221 |
msgstr ""
|
6222 |
|
6223 |
+
#: inc/quiz/class-lp-quiz.php:585
|
6224 |
msgid "Time's up!"
|
6225 |
msgstr ""
|
6226 |
|
6227 |
+
#: inc/quiz/class-lp-quiz.php:586
|
6228 |
msgid "The time is up! Your quiz will automate come to finish"
|
6229 |
msgstr ""
|
6230 |
|
6231 |
+
#: inc/quiz/class-lp-quiz.php:588
|
6232 |
msgid "Congrats! You have finished this quiz"
|
6233 |
msgstr ""
|
6234 |
|
6235 |
+
#: inc/quiz/class-lp-quiz.php:589
|
6236 |
msgid "Congrats! You have re-taken this quiz. Please wait a moment and the page will reload"
|
6237 |
msgstr ""
|
6238 |
|
6239 |
+
#: inc/rest-api/class-lp-rest-authentication.php:98
|
6240 |
+
msgid "Consumer key is invalid."
|
6241 |
+
msgstr ""
|
6242 |
+
|
6243 |
+
#: inc/rest-api/v1/admin/class-lp-admin-rest-course-controller.php:54
|
6244 |
msgid "No Course ID avaliable!"
|
6245 |
msgstr ""
|
6246 |
|
6247 |
+
#: inc/rest-api/v1/admin/class-lp-admin-rest-course-controller.php:60
|
6248 |
msgid "No Course avaliable!"
|
6249 |
msgstr ""
|
6250 |
|
6251 |
+
#: inc/rest-api/v1/admin/class-lp-admin-rest-course-controller.php:93
|
6252 |
msgid "No Quiz in this course!"
|
6253 |
msgstr ""
|
6254 |
|
6255 |
+
#: inc/rest-api/v1/admin/class-lp-admin-rest-database-controller.php:118
|
6256 |
msgid "The LP Database is Latest:"
|
6257 |
msgstr ""
|
6258 |
|
6259 |
+
#: inc/rest-api/v1/admin/class-lp-admin-rest-question-controller.php:186
|
6260 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-users-controller.php:170
|
6261 |
msgid "The ID of course item object."
|
6262 |
msgstr ""
|
6263 |
|
6264 |
+
#: inc/rest-api/v1/admin/class-lp-admin-rest-question-controller.php:192
|
6265 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-users-controller.php:176
|
6266 |
msgid "The ID of course object."
|
6267 |
msgstr ""
|
6268 |
|
6269 |
+
#: inc/rest-api/v1/admin/class-lp-admin-rest-question-controller.php:213
|
6270 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-users-controller.php:197
|
6271 |
msgid "%s was not registered as a request argument."
|
6272 |
msgstr ""
|
6273 |
|
6274 |
+
#: inc/rest-api/v1/admin/class-lp-admin-rest-reset-data-controller.php:91
|
6275 |
+
msgid "No items available!"
|
6276 |
+
msgstr ""
|
6277 |
+
|
6278 |
+
#: inc/rest-api/v1/admin/class-lp-admin-rest-reset-data-controller.php:106
|
6279 |
+
msgid "No courses available!"
|
6280 |
+
msgstr ""
|
6281 |
+
|
6282 |
+
#: inc/rest-api/v1/admin/class-lp-admin-rest-reset-data-controller.php:133
|
6283 |
+
msgid "No course ID available"
|
6284 |
msgstr ""
|
6285 |
|
6286 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:202
|
6287 |
msgid "Error: No course available!."
|
6288 |
msgstr ""
|
6289 |
|
6290 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:209
|
6291 |
msgid "Invalid course!"
|
6292 |
msgstr ""
|
6293 |
|
6294 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:238
|
6295 |
msgid "Error: Can't Enroll course."
|
6296 |
msgstr ""
|
6297 |
|
6298 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:256
|
6299 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:347
|
6300 |
msgid "Error: Can't add Course to cart."
|
6301 |
msgstr ""
|
6302 |
|
6303 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:278
|
6304 |
msgid "Congrats! You enroll course successfully. Redirecting..."
|
6305 |
msgstr ""
|
6306 |
|
6307 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:287
|
6308 |
msgid "Redirecting..."
|
6309 |
msgstr ""
|
6310 |
|
6311 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:315
|
6312 |
msgid "Error: Invalid Course ID."
|
6313 |
msgstr ""
|
6314 |
|
6315 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:321
|
6316 |
msgid "Error: No Course available."
|
6317 |
msgstr ""
|
6318 |
|
6319 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:328
|
6320 |
msgid "Error: You have already purchased this course."
|
6321 |
msgstr ""
|
6322 |
|
6323 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:357
|
6324 |
msgid "Error: Please setup page for checkout."
|
6325 |
msgstr ""
|
6326 |
|
6327 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:362
|
6328 |
msgid "\"%s\" has been added to your cart."
|
6329 |
msgstr ""
|
6330 |
|
6331 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:387
|
6332 |
msgid "Invalid params"
|
6333 |
msgstr ""
|
6334 |
|
6335 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:393
|
6336 |
msgid "Invalid course"
|
6337 |
msgstr ""
|
6338 |
|
6339 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:405
|
6340 |
msgid "You can't retry course"
|
6341 |
msgstr ""
|
6342 |
|
6343 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-courses-controller.php:431
|
6344 |
msgid "Now you can learn this course"
|
6345 |
msgstr ""
|
6346 |
|
6347 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-lazy-load-controller.php:75
|
6348 |
+
msgid "Error: Cannot get course ID or user ID"
|
6349 |
+
msgstr ""
|
6350 |
+
|
6351 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-users-controller.php:267
|
6352 |
+
#: inc/rest-api/v1/frontend/class-lp-rest-users-controller.php:360
|
6353 |
msgid "Success!"
|
6354 |
msgstr ""
|
6355 |
|
6404 |
msgid "Your are logged in as %1$s. <a href=\"%2$s\">Log out</a>?"
|
6405 |
msgstr ""
|
6406 |
|
6407 |
+
#: inc/shortcodes/class-lp-shortcode-profile.php:51
|
6408 |
+
msgid "You can't viewing user profile"
|
6409 |
+
msgstr ""
|
6410 |
+
|
6411 |
+
#: inc/templates/class-lp-template-course.php:124
|
6412 |
msgctxt "duration"
|
6413 |
msgid "%s day"
|
6414 |
msgstr ""
|
6415 |
|
6416 |
+
#: inc/templates/class-lp-template-course.php:125
|
6417 |
msgctxt "duration"
|
6418 |
msgid "%s hour"
|
6419 |
msgstr ""
|
6420 |
|
6421 |
+
#: inc/templates/class-lp-template-course.php:126
|
6422 |
msgctxt "duration"
|
6423 |
msgid "%s min"
|
6424 |
msgstr ""
|
6425 |
|
6426 |
+
#: inc/templates/class-lp-template-course.php:127
|
6427 |
msgctxt "duration"
|
6428 |
msgid "%s sec"
|
6429 |
msgstr ""
|
6430 |
|
6431 |
+
#: inc/templates/class-lp-template-course.php:196
|
6432 |
msgid "This course is out of stock"
|
6433 |
msgstr ""
|
6434 |
|
6435 |
+
#: inc/templates/class-lp-template-course.php:221
|
6436 |
msgid "Your order is waiting for processing"
|
6437 |
msgstr ""
|
6438 |
|
6439 |
+
#: inc/templates/class-lp-template-course.php:342
|
6440 |
#: inc/widgets/course-extra.php:28
|
6441 |
msgid "Key features"
|
6442 |
msgstr ""
|
6443 |
|
6444 |
+
#: inc/templates/class-lp-template-course.php:365
|
6445 |
+
#: inc/templates/class-lp-template-course.php:815
|
6446 |
msgid "Target audiences"
|
6447 |
msgstr ""
|
6448 |
|
6449 |
+
#: inc/templates/class-lp-template-course.php:428
|
6450 |
+
msgid "Error: No Course or User avaliable."
|
6451 |
+
msgstr ""
|
6452 |
+
|
6453 |
+
#: inc/templates/class-lp-template-course.php:439
|
6454 |
+
msgid "Error: Course is not in-progress."
|
6455 |
+
msgstr ""
|
6456 |
+
|
6457 |
+
#: inc/templates/class-lp-template-course.php:446
|
6458 |
+
msgid "Error: Course is not has finish."
|
6459 |
+
msgstr ""
|
6460 |
+
|
6461 |
+
#: inc/templates/class-lp-template-course.php:450
|
6462 |
+
msgid "Error: Cannot finish course."
|
6463 |
+
msgstr ""
|
6464 |
+
|
6465 |
+
#: inc/templates/class-lp-template-course.php:454
|
6466 |
+
msgid "Error: Filter disable finish course."
|
6467 |
+
msgstr ""
|
6468 |
+
|
6469 |
+
#: inc/templates/class-lp-template-course.php:757
|
6470 |
msgid "<span class=\"meta-number\">%d</span> lessons"
|
6471 |
msgstr ""
|
6472 |
|
6473 |
+
#: inc/templates/class-lp-template-course.php:760
|
6474 |
msgid "<span class=\"meta-number\">%d</span> lesson"
|
6475 |
msgstr ""
|
6476 |
|
6477 |
+
#: inc/templates/class-lp-template-course.php:767
|
6478 |
msgid "<span class=\"meta-number\">%d</span> quizzes"
|
6479 |
msgstr ""
|
6480 |
|
6481 |
+
#: inc/templates/class-lp-template-course.php:770
|
6482 |
msgid "<span class=\"meta-number\">%d</span> quiz"
|
6483 |
msgstr ""
|
6484 |
|
6485 |
+
#: inc/templates/class-lp-template-course.php:777
|
6486 |
msgid "<span class=\"meta-number\">%d</span> students"
|
6487 |
msgstr ""
|
6488 |
|
6489 |
+
#: inc/templates/class-lp-template-course.php:780
|
6490 |
msgid "<span class=\"meta-number\">%d</span> student"
|
6491 |
msgstr ""
|
6492 |
|
6493 |
+
#: inc/templates/class-lp-template-course.php:811
|
6494 |
msgid "Features"
|
6495 |
msgstr ""
|
6496 |
|
6497 |
+
#: inc/templates/class-lp-template-course.php:908
|
6498 |
+
#: templates/profile/dashboard/featured-courses.php:46
|
6499 |
+
#: templates/profile/dashboard/latest-courses.php:46
|
6500 |
+
#: templates/profile/tabs/courses/created.php:71
|
6501 |
+
#: templates/profile/tabs/courses/enrolled.php:69
|
6502 |
+
msgid "View More"
|
6503 |
+
msgstr ""
|
6504 |
+
|
6505 |
#: inc/user-item/class-lp-user-item-quiz.php:148
|
6506 |
msgid "Not Started"
|
6507 |
msgstr ""
|
6571 |
msgid "%1$s::%2$s - Your Quiz can't retake."
|
6572 |
msgstr ""
|
6573 |
|
6574 |
+
#: inc/user/abstract-lp-user.php:1003
|
6575 |
msgid "You can not hint question."
|
6576 |
msgstr ""
|
6577 |
|
6578 |
+
#: inc/user/abstract-lp-user.php:1261
|
6579 |
+
#: inc/user/abstract-lp-user.php:1532
|
6580 |
+
#: inc/user/abstract-lp-user.php:1544
|
6581 |
msgid "The role %s for user doesn't exist"
|
6582 |
msgstr ""
|
6583 |
|
6584 |
+
#: inc/user/abstract-lp-user.php:1840
|
6585 |
msgid "You have already completed this lesson."
|
6586 |
msgstr ""
|
6587 |
|
6588 |
+
#: inc/user/abstract-lp-user.php:2339
|
6589 |
msgid "Update user item error."
|
6590 |
msgstr ""
|
6591 |
|
6592 |
+
#: inc/user/abstract-lp-user.php:2415
|
6593 |
+
#: inc/user/abstract-lp-user.php:2419
|
6594 |
msgid "Failed to enroll course."
|
6595 |
msgstr ""
|
6596 |
|
6597 |
+
#: inc/user/abstract-lp-user.php:2423
|
6598 |
msgid "Please login to enroll course."
|
6599 |
msgstr ""
|
6600 |
|
6668 |
msgid "Want to become an instructor?"
|
6669 |
msgstr ""
|
6670 |
|
6671 |
+
#: inc/user/lp-user-functions.php:970
|
6672 |
msgid "Please login to enroll this course"
|
6673 |
msgstr ""
|
6674 |
|
6675 |
+
#: inc/user/lp-user-functions.php:988
|
6676 |
msgid "You have already finished course"
|
6677 |
msgstr ""
|
6678 |
|
6679 |
+
#: inc/user/lp-user-functions.php:991
|
6680 |
msgid "You have already enrolled in this course"
|
6681 |
msgstr ""
|
6682 |
|
6683 |
+
#: inc/user/lp-user-functions.php:1260
|
6684 |
msgid "Old password incorrect!"
|
6685 |
msgstr ""
|
6686 |
|
6687 |
+
#: inc/user/lp-user-functions.php:1266
|
6688 |
msgid "Confirmation password incorrect!"
|
6689 |
msgstr ""
|
6690 |
|
6691 |
+
#: inc/user/lp-user-functions.php:1553
|
6692 |
msgid "Invalid item id."
|
6693 |
msgstr ""
|
6694 |
|
6695 |
+
#: inc/user/lp-user-functions.php:1586
|
6696 |
msgid "Invalid item data."
|
6697 |
msgstr ""
|
6698 |
|
6699 |
+
#: inc/user/lp-user-functions.php:1736
|
6700 |
msgid "Invalid Course ID."
|
6701 |
msgstr ""
|
6702 |
|
6703 |
+
#: inc/user/lp-user-functions.php:1756
|
6704 |
msgid "Invalid Quiz"
|
6705 |
msgstr ""
|
6706 |
|
6707 |
+
#: inc/user/lp-user-functions.php:2160
|
6708 |
msgid "Facebook Profile"
|
6709 |
msgstr ""
|
6710 |
|
6711 |
+
#: inc/user/lp-user-functions.php:2163
|
6712 |
msgid "Twitter Profile"
|
6713 |
msgstr ""
|
6714 |
|
6715 |
+
#: inc/user/lp-user-functions.php:2166
|
6716 |
msgid "Google Profile"
|
6717 |
msgstr ""
|
6718 |
|
6719 |
+
#: inc/user/lp-user-functions.php:2169
|
6720 |
msgid "Youtube Channel"
|
6721 |
msgstr ""
|
6722 |
|
6723 |
+
#: inc/user/lp-user-functions.php:2172
|
6724 |
msgid "Linkedin Profile"
|
6725 |
msgstr ""
|
6726 |
|
6861 |
msgid "Recent Courses"
|
6862 |
msgstr ""
|
6863 |
|
6864 |
+
#: learnpress.php:490
|
6865 |
msgid "LearnPress plugin base directory must be <strong>learnpress/learnpres.php</strong> (case sensitive) to ensure all functions work properly and fully operational (currently <strong>%s</strong>)"
|
6866 |
msgstr ""
|
6867 |
|
6989 |
msgstr ""
|
6990 |
|
6991 |
#: templates/checkout/review-order.php:85
|
6992 |
+
#: templates/order/order-details.php:81
|
6993 |
msgid "Subtotal"
|
6994 |
msgstr ""
|
6995 |
|
7118 |
msgid "Payment Method:"
|
7119 |
msgstr ""
|
7120 |
|
7121 |
+
#: templates/order/order-details.php:97
|
7122 |
msgid "Order status:"
|
7123 |
msgstr ""
|
7124 |
|
7126 |
msgid "Recover"
|
7127 |
msgstr ""
|
7128 |
|
7129 |
+
#: templates/pages/profile.php:41
|
7130 |
msgid "This user does not public their profile."
|
7131 |
msgstr ""
|
7132 |
|
7134 |
msgid "Featured courses"
|
7135 |
msgstr ""
|
7136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7137 |
#: templates/profile/dashboard/featured-courses.php:49
|
7138 |
msgid "There is no featured courses."
|
7139 |
msgstr ""
|
7216 |
msgstr ""
|
7217 |
|
7218 |
#: templates/profile/tabs/quizzes.php:34
|
7219 |
+
#: assets/js/dist/frontend/quiz.js:27
|
7220 |
msgid "Result"
|
7221 |
msgstr ""
|
7222 |
|
7223 |
#: templates/profile/tabs/quizzes.php:35
|
7224 |
+
#: assets/js/dist/frontend/quiz.js:24
|
|
|
7225 |
msgid "Time spend"
|
7226 |
msgstr ""
|
7227 |
|
7274 |
msgid "Start Now"
|
7275 |
msgstr ""
|
7276 |
|
7277 |
+
#: templates/single-course/buttons/finish.php:15
|
7278 |
+
#: templates/single-course/buttons/finish.php:16
|
7279 |
msgid "Finish course"
|
7280 |
msgstr ""
|
7281 |
|
7288 |
msgstr ""
|
7289 |
|
7290 |
#: templates/single-course/content-item/nav.php:30
|
7291 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7292 |
msgctxt "course-item-navigation"
|
7293 |
msgid "Prev"
|
7294 |
msgstr ""
|
7295 |
|
7296 |
#: templates/single-course/content-item/nav.php:39
|
7297 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7298 |
msgctxt "course-item-navigation"
|
7299 |
msgid "Next"
|
7300 |
msgstr ""
|
7308 |
msgid "Search courses content"
|
7309 |
msgstr ""
|
7310 |
|
7311 |
+
#: templates/single-course/content-protected.php:22
|
7312 |
+
msgid "This content is protected, please <a class=\"lp-link-login\" href=\"%s\">login</a> and enroll course to view this content!"
|
7313 |
+
msgstr ""
|
7314 |
+
|
7315 |
#: templates/single-course/featured-review.php:18
|
7316 |
msgid "Featured Review"
|
7317 |
msgstr ""
|
7325 |
msgid "About the Instructor"
|
7326 |
msgstr ""
|
7327 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7328 |
#: templates/single-course/loop-section.php:48
|
7329 |
msgctxt "template title empty"
|
7330 |
msgid "Untitled"
|
7362 |
msgid "%1$d/%2$d"
|
7363 |
msgstr ""
|
7364 |
|
7365 |
+
#: templates/single-course/sidebar/user-time.php:26
|
7366 |
msgid "You started on:"
|
7367 |
msgstr ""
|
7368 |
|
7369 |
+
#: templates/single-course/sidebar/user-time.php:32
|
7370 |
msgid "Course will end:"
|
7371 |
msgstr ""
|
7372 |
|
7373 |
+
#: templates/single-course/sidebar/user-time.php:37
|
7374 |
+
#: assets/js/dist/frontend/quiz.js:20
|
7375 |
msgid "Duration:"
|
7376 |
msgstr ""
|
7377 |
|
7378 |
+
#: templates/single-course/sidebar/user-time.php:38
|
7379 |
msgid "Lifetime"
|
7380 |
msgstr ""
|
7381 |
|
7382 |
+
#: templates/single-course/sidebar/user-time.php:43
|
7383 |
msgid "You finished on:"
|
7384 |
msgstr ""
|
7385 |
|
7411 |
msgid "%d lesson"
|
7412 |
msgstr ""
|
7413 |
|
7414 |
+
#: assets/js/dist/frontend/quiz.js:17
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7415 |
msgid "Last Attempted"
|
7416 |
msgstr ""
|
7417 |
|
7418 |
+
#: assets/js/dist/frontend/quiz.js:25
|
7419 |
msgid "Marks"
|
7420 |
msgstr ""
|
7421 |
|
7422 |
+
#: assets/js/dist/frontend/quiz.js:26
|
7423 |
msgid "Passing grade"
|
7424 |
msgstr ""
|
7425 |
|
7426 |
+
#: assets/js/dist/frontend/quiz.js:37
|
|
|
7427 |
msgctxt "unknown passing grade value"
|
7428 |
msgid "-"
|
7429 |
msgstr ""
|
7430 |
|
7431 |
+
#: assets/js/dist/frontend/quiz.js:25
|
7432 |
msgid "Passing grade:"
|
7433 |
msgstr ""
|
7434 |
|
7435 |
+
#: assets/js/dist/frontend/quiz.js:30
|
7436 |
msgid "Questions:"
|
7437 |
msgstr ""
|
7438 |
|
7439 |
+
#: assets/js/dist/frontend/quiz.js:161
|
7440 |
msgid "Your Result"
|
7441 |
msgstr ""
|
7442 |
|
7443 |
+
#: assets/js/dist/frontend/quiz.js:183
|
7444 |
msgid "Point"
|
7445 |
msgstr ""
|
7446 |
|
7447 |
+
#: assets/js/dist/frontend/quiz.js:191
|
7448 |
msgid "Correct"
|
7449 |
msgstr ""
|
7450 |
|
7451 |
+
#: assets/js/dist/frontend/quiz.js:195
|
7452 |
msgid "Wrong"
|
7453 |
msgstr ""
|
7454 |
|
7455 |
+
#: assets/js/dist/frontend/quiz.js:199
|
7456 |
msgid "Skipped"
|
7457 |
msgstr ""
|
7458 |
|
7459 |
+
#: assets/js/dist/frontend/quiz.js:67
|
7460 |
msgid "Are you sure to submit quiz?"
|
7461 |
msgstr ""
|
7462 |
|
7463 |
+
#: assets/js/dist/frontend/quiz.js:106
|
7464 |
msgid "Question <span>%d to %d of %d</span>"
|
7465 |
msgstr ""
|
7466 |
|
7467 |
+
#: assets/js/dist/frontend/quiz.js:108
|
7468 |
msgid "Question <span>%d of %d</span>"
|
7469 |
msgstr ""
|
7470 |
|
7471 |
+
#: assets/js/dist/frontend/quiz.js:111
|
7472 |
msgid "Question <span>%d to %d</span>"
|
7473 |
msgstr ""
|
7474 |
|
7475 |
+
#: assets/js/dist/frontend/quiz.js:120
|
7476 |
msgid "Earned Point: %s"
|
7477 |
msgstr ""
|
7478 |
|
7479 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7480 |
msgid "Finish Quiz"
|
7481 |
msgstr ""
|
7482 |
|
7483 |
+
#: assets/js/dist/frontend/quiz.js:129
|
7484 |
msgid "Submitting..."
|
7485 |
msgstr ""
|
7486 |
+
|
7487 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7488 |
+
msgid "LP Error: can not set answers"
|
7489 |
+
msgstr ""
|
7490 |
+
|
7491 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7492 |
+
msgid "Render function should be overwritten from base."
|
7493 |
+
msgstr ""
|
7494 |
+
|
7495 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7496 |
+
msgid "Incorrect"
|
7497 |
+
msgstr ""
|
7498 |
+
|
7499 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7500 |
+
msgid "%d/%d point"
|
7501 |
+
msgstr ""
|
7502 |
+
|
7503 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7504 |
+
msgid "point"
|
7505 |
+
msgstr ""
|
7506 |
+
|
7507 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7508 |
+
msgid "%d/%d point"
|
7509 |
+
msgstr ""
|
7510 |
+
|
7511 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7512 |
+
msgid "Check answer"
|
7513 |
+
msgstr ""
|
7514 |
+
|
7515 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7516 |
+
msgid "You need to answer the question before check answer."
|
7517 |
+
msgstr ""
|
7518 |
+
|
7519 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7520 |
+
msgid "Are you sure you want to retake quiz?"
|
7521 |
+
msgstr ""
|
7522 |
+
|
7523 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7524 |
+
msgid "Start"
|
7525 |
+
msgstr ""
|
7526 |
+
|
7527 |
+
#: assets/js/dist/frontend/quiz.js:1
|
7528 |
+
msgid "Hint:"
|
7529 |
+
msgstr ""
|
learnpress.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: http://thimpress.com/learnpress
|
5 |
* Description: LearnPress is a WordPress complete solution for creating a Learning Management System (LMS). It can help you to create courses, lessons and quizzes.
|
6 |
* Author: ThimPress
|
7 |
-
* Version: 4.0.
|
8 |
* Author URI: http://thimpress.com
|
9 |
* Requires at least: 3.8
|
10 |
* Tested up to: 5.7
|
@@ -134,7 +134,7 @@ if ( ! class_exists( 'LearnPress' ) ) {
|
|
134 |
/**
|
135 |
* @var string
|
136 |
*/
|
137 |
-
public $thim_core_version_require = '2.0.0
|
138 |
|
139 |
/**
|
140 |
*
|
@@ -205,8 +205,9 @@ if ( ! class_exists( 'LearnPress' ) ) {
|
|
205 |
*
|
206 |
* @return LP_Abstract_Background_Process|bool
|
207 |
* @since 3.0.8
|
|
|
208 |
*/
|
209 |
-
public function add_background_task( $data, $background = 'global' ) {
|
210 |
if ( isset( $this->backgrounds[ $background ] ) ) {
|
211 |
$this->backgrounds[ $background ]->push_to_queue( $data );
|
212 |
|
@@ -214,7 +215,7 @@ if ( ! class_exists( 'LearnPress' ) ) {
|
|
214 |
}
|
215 |
|
216 |
return false;
|
217 |
-
}
|
218 |
|
219 |
/**
|
220 |
* Return a background instance.
|
@@ -550,29 +551,29 @@ if ( ! class_exists( 'LearnPress' ) ) {
|
|
550 |
*/
|
551 |
public function on_deactivate() {
|
552 |
do_action( 'learn-press/deactivate', $this );
|
553 |
-
|
554 |
}
|
555 |
|
556 |
-
protected function add_cron() {
|
557 |
add_filter( 'cron_schedules', array( $this, 'cron_schedules' ) );
|
558 |
|
559 |
if ( ! wp_next_scheduled( 'learn_press_schedule_items' ) ) {
|
560 |
wp_schedule_event( time(), 'lp_cron_schedule_items', 'learn_press_schedule_items' );
|
561 |
}
|
562 |
-
}
|
563 |
|
564 |
-
protected function remove_cron() {
|
565 |
wp_clear_scheduled_hook( 'learn_press_schedule_items' );
|
566 |
-
}
|
567 |
|
568 |
-
public function cron_schedules( $schedules ) {
|
569 |
$schedules['lp_cron_schedule_items'] = array(
|
570 |
'interval' => 15,
|
571 |
'display' => esc_html__( 'Every 3 Minutes', 'learnpress' ),
|
572 |
);
|
573 |
|
574 |
return $schedules;
|
575 |
-
}
|
576 |
|
577 |
/**
|
578 |
* Trigger WP loaded actions.
|
@@ -776,21 +777,9 @@ if ( ! class_exists( 'LearnPress' ) ) {
|
|
776 |
*
|
777 |
* @return LP_Cart
|
778 |
*/
|
779 |
-
public function get_cart() {
|
780 |
if ( ! $this->cart ) {
|
781 |
-
$
|
782 |
-
if ( is_object( $cart_class ) ) {
|
783 |
-
$this->cart = $cart_class;
|
784 |
-
} else {
|
785 |
-
if ( class_exists( $cart_class ) ) {
|
786 |
-
$this->cart = is_callable(
|
787 |
-
array(
|
788 |
-
$cart_class,
|
789 |
-
'instance',
|
790 |
-
)
|
791 |
-
) ? call_user_func( array( $cart_class, 'instance' ) ) : new $cart_class();
|
792 |
-
}
|
793 |
-
}
|
794 |
}
|
795 |
|
796 |
return $this->cart;
|
@@ -891,9 +880,16 @@ if ( ! class_exists( 'LearnPress' ) ) {
|
|
891 |
unset( $_GET['activate'] );
|
892 |
}
|
893 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
894 |
?>
|
895 |
<div class="notice notice-error">
|
896 |
-
<p><?php echo
|
897 |
</div>
|
898 |
<?php
|
899 |
die;
|
4 |
* Plugin URI: http://thimpress.com/learnpress
|
5 |
* Description: LearnPress is a WordPress complete solution for creating a Learning Management System (LMS). It can help you to create courses, lessons and quizzes.
|
6 |
* Author: ThimPress
|
7 |
+
* Version: 4.0.6
|
8 |
* Author URI: http://thimpress.com
|
9 |
* Requires at least: 3.8
|
10 |
* Tested up to: 5.7
|
134 |
/**
|
135 |
* @var string
|
136 |
*/
|
137 |
+
public $thim_core_version_require = '2.0.0';
|
138 |
|
139 |
/**
|
140 |
*
|
205 |
*
|
206 |
* @return LP_Abstract_Background_Process|bool
|
207 |
* @since 3.0.8
|
208 |
+
* @editor tungnx | comment this function
|
209 |
*/
|
210 |
+
/*public function add_background_task( $data, $background = 'global' ) {
|
211 |
if ( isset( $this->backgrounds[ $background ] ) ) {
|
212 |
$this->backgrounds[ $background ]->push_to_queue( $data );
|
213 |
|
215 |
}
|
216 |
|
217 |
return false;
|
218 |
+
}*/
|
219 |
|
220 |
/**
|
221 |
* Return a background instance.
|
551 |
*/
|
552 |
public function on_deactivate() {
|
553 |
do_action( 'learn-press/deactivate', $this );
|
554 |
+
//$this->remove_cron();
|
555 |
}
|
556 |
|
557 |
+
/*protected function add_cron() {
|
558 |
add_filter( 'cron_schedules', array( $this, 'cron_schedules' ) );
|
559 |
|
560 |
if ( ! wp_next_scheduled( 'learn_press_schedule_items' ) ) {
|
561 |
wp_schedule_event( time(), 'lp_cron_schedule_items', 'learn_press_schedule_items' );
|
562 |
}
|
563 |
+
}*/
|
564 |
|
565 |
+
/*protected function remove_cron() {
|
566 |
wp_clear_scheduled_hook( 'learn_press_schedule_items' );
|
567 |
+
}*/
|
568 |
|
569 |
+
/*public function cron_schedules( $schedules ) {
|
570 |
$schedules['lp_cron_schedule_items'] = array(
|
571 |
'interval' => 15,
|
572 |
'display' => esc_html__( 'Every 3 Minutes', 'learnpress' ),
|
573 |
);
|
574 |
|
575 |
return $schedules;
|
576 |
+
}*/
|
577 |
|
578 |
/**
|
579 |
* Trigger WP loaded actions.
|
777 |
*
|
778 |
* @return LP_Cart
|
779 |
*/
|
780 |
+
public function get_cart() : LP_Cart {
|
781 |
if ( ! $this->cart ) {
|
782 |
+
$this->cart = LP_Cart::instance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
783 |
}
|
784 |
|
785 |
return $this->cart;
|
880 |
unset( $_GET['activate'] );
|
881 |
}
|
882 |
|
883 |
+
$message = sprintf(
|
884 |
+
'%s %s You can download %s. Read guide on %s',
|
885 |
+
'LP4 require version Thim-core:',
|
886 |
+
$this->thim_core_version_require,
|
887 |
+
'<a href="https://thimpresswp.github.io/thim-core/thim-core.zip">latest version</a>',
|
888 |
+
'<a href="https://bit.ly/2SrsxUf">here</a>'
|
889 |
+
);
|
890 |
?>
|
891 |
<div class="notice notice-error">
|
892 |
+
<p><?php echo $message; ?></p>
|
893 |
</div>
|
894 |
<?php
|
895 |
die;
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: elearning, education, course, lms, learning management system
|
|
5 |
Requires at least: 5.6
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 7.0
|
8 |
-
Stable tag: 4.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -15,7 +15,7 @@ A WordPress LMS Plugin to create WordPress Learning Management System. Turn your
|
|
15 |
|
16 |
**<a href="https://thimpress.com/learnpress" target="_blank">WordPress LMS Plugin</a>** - LearnPress is a comprehensive *WordPress LMS Plugin* for WordPress, like WordPress Moodle or Moodle for WordPress if you know what Moodle is. This is one of the best WordPress LMS Plugins which can be used to easily create & sell courses online. You can create a course curriculum with lessons & quizzes included which is managed with an easy-to-use interface for users. Having this WordPress LMS Plugin, now you have a chance to quickly and easily create education, online school, online-course websites with no coding knowledge required.
|
17 |
|
18 |
-
<a href="https://demo-learnpress.thimpress.com/" target="_blank">Live Demo</a> | <a href="https://thimpress.com/product-category/themes/education-themes/" target="_blank">LearnPress Themes</a> | <a href="https://thimpress.com/forums/forum/plugins/learnpress-plugin/" target="_blank">Support</a>
|
19 |
|
20 |
LearnPress is free and always will be, but it is still a premium high-quality WordPress Plugin that definitely helps you with making money from your **WordPress based LMS**. Just try and see how it is. LearnPress WordPress Online Course plugin is lightweight and super powerful with lots of Add-Ons to empower its core system.
|
21 |
|
@@ -32,8 +32,8 @@ Take a look at Premium **[Eduma - Education WordPress Theme](https://themeforest
|
|
32 |
|
33 |
- **[How to create a Udemy or Coursera clone easily with LearnPress](https://thimpress.com/create-udemy-coursera-clone-easily-learnpress/?utm_source=wporg&utm_medium=learnpress&ref=thimpress&utm_campaign=learnpress)**
|
34 |
|
35 |
-
- Step-by-step Youtube guide on setting up your own Online Course site. **[Click here >>](https://www.youtube.com/watch?v=
|
36 |
-
[youtube https://www.youtube.com/watch?v=
|
37 |
|
38 |
Are you looking for *the best LMS WordPress Plugin*?
|
39 |
|
@@ -197,6 +197,17 @@ https://www.transifex.com/projects/p/learnpress/
|
|
197 |
|
198 |
== Changelog ==
|
199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
= 4.0.5 =
|
201 |
~ Fixed: error "Duplicate entry" for case upgrade LP4, if user install LP4 and save setting before Upgrade Database
|
202 |
~ Fixed: get option 'avatar_dimensions' set default value if user not set
|
5 |
Requires at least: 5.6
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 7.0
|
8 |
+
Stable tag: 4.0.6
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
15 |
|
16 |
**<a href="https://thimpress.com/learnpress" target="_blank">WordPress LMS Plugin</a>** - LearnPress is a comprehensive *WordPress LMS Plugin* for WordPress, like WordPress Moodle or Moodle for WordPress if you know what Moodle is. This is one of the best WordPress LMS Plugins which can be used to easily create & sell courses online. You can create a course curriculum with lessons & quizzes included which is managed with an easy-to-use interface for users. Having this WordPress LMS Plugin, now you have a chance to quickly and easily create education, online school, online-course websites with no coding knowledge required.
|
17 |
|
18 |
+
<a href="https://demo-learnpress.thimpress.com/" target="_blank">Live Demo</a> | <a href="https://thimpress.com/product-category/themes/education-themes/" target="_blank">LearnPress Themes</a> | <a href="https://thimpress.com/forums/forum/plugins/learnpress-plugin/" target="_blank">Support</a> | <a href="https://docspress.thimpress.com/learnpress-4-0/" target="_blank">Documentation</a>
|
19 |
|
20 |
LearnPress is free and always will be, but it is still a premium high-quality WordPress Plugin that definitely helps you with making money from your **WordPress based LMS**. Just try and see how it is. LearnPress WordPress Online Course plugin is lightweight and super powerful with lots of Add-Ons to empower its core system.
|
21 |
|
32 |
|
33 |
- **[How to create a Udemy or Coursera clone easily with LearnPress](https://thimpress.com/create-udemy-coursera-clone-easily-learnpress/?utm_source=wporg&utm_medium=learnpress&ref=thimpress&utm_campaign=learnpress)**
|
34 |
|
35 |
+
- Step-by-step Youtube guide on setting up your own Online Course site. **[Click here >>](https://www.youtube.com/watch?v=0mJBC9IpiS0&t=1891s)**
|
36 |
+
[youtube https://www.youtube.com/watch?v=0mJBC9IpiS0&t=1891s]
|
37 |
|
38 |
Are you looking for *the best LMS WordPress Plugin*?
|
39 |
|
197 |
|
198 |
== Changelog ==
|
199 |
|
200 |
+
= 4.0.6 =
|
201 |
+
~ Fixed: Page profile not show login/register form
|
202 |
+
~ Fixed: translated text on js function "Quiz"
|
203 |
+
~ Fixed: js scroll to item viewing
|
204 |
+
~ Fixed: show html title question
|
205 |
+
~ Fixed: Order change status from "completed" to "pending" => user can't learn courses in this order
|
206 |
+
~ Added: Option "Logout Redirect"
|
207 |
+
~ Fixed: Set default sidebar curriculumn will be hide on mobile
|
208 |
+
~ Modify: Remove course on Overview tab when enable "Publish Profile"
|
209 |
+
~ Fixed: Elementor pro make archive course show wrong
|
210 |
+
|
211 |
= 4.0.5 =
|
212 |
~ Fixed: error "Duplicate entry" for case upgrade LP4, if user install LP4 and save setting before Upgrade Database
|
213 |
~ Fixed: get option 'avatar_dimensions' set default value if user not set
|
templates/content-single-item.php
CHANGED
@@ -26,17 +26,16 @@ do_action( 'learn-press/before-main-content' );
|
|
26 |
* LP Hook
|
27 |
*/
|
28 |
do_action( 'learn-press/before-single-item' );
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Get cookie stored for sidebar state
|
32 |
-
*/
|
33 |
-
$show_sidebar = learn_press_cookie_get( 'sidebar-toggle' );
|
34 |
?>
|
35 |
<div id="popup-course" class="course-summary">
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
-
|
38 |
|
39 |
-
<?php
|
40 |
/**
|
41 |
* Get content item's course
|
42 |
*
|
26 |
* LP Hook
|
27 |
*/
|
28 |
do_action( 'learn-press/before-single-item' );
|
|
|
|
|
|
|
|
|
|
|
29 |
?>
|
30 |
<div id="popup-course" class="course-summary">
|
31 |
+
<?php
|
32 |
+
/**
|
33 |
+
* @since 4.0.6
|
34 |
+
* @see single-button-toggle-sidebar - 5
|
35 |
+
*/
|
36 |
|
37 |
+
do_action('learn-press/single-button-toggle-sidebar');
|
38 |
|
|
|
39 |
/**
|
40 |
* Get content item's course
|
41 |
*
|
templates/pages/profile.php
CHANGED
@@ -16,14 +16,9 @@ if ( ! isset( $profile ) ) {
|
|
16 |
|
17 |
<div id="learn-press-profile" <?php $profile->main_class(); ?>>
|
18 |
<?php if ( $profile->is_public() || $profile->get_user()->is_guest() ) : ?>
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
<?php do_action( 'learn-press/user-profile-account' ); ?>
|
23 |
-
</div>
|
24 |
-
<?php do_action( 'learn-press/before-user-profile', $profile ); ?>
|
25 |
-
</div>
|
26 |
-
</div>
|
27 |
<div class="lp-content-area">
|
28 |
<?php
|
29 |
if ( ! is_user_logged_in() ) {
|
16 |
|
17 |
<div id="learn-press-profile" <?php $profile->main_class(); ?>>
|
18 |
<?php if ( $profile->is_public() || $profile->get_user()->is_guest() ) : ?>
|
19 |
+
|
20 |
+
<?php do_action( 'learn-press/before-user-profile', $profile ); ?>
|
21 |
+
|
|
|
|
|
|
|
|
|
|
|
22 |
<div class="lp-content-area">
|
23 |
<?php
|
24 |
if ( ! is_user_logged_in() ) {
|
templates/profile/sidebar.php
CHANGED
@@ -10,6 +10,12 @@
|
|
10 |
defined( 'ABSPATH' ) || exit;
|
11 |
?>
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
<aside id="profile-sidebar">
|
14 |
|
15 |
<?php do_action( 'learn-press/user-profile-tabs' ); ?>
|
10 |
defined( 'ABSPATH' ) || exit;
|
11 |
?>
|
12 |
|
13 |
+
<div class="wrapper-profile-header wrap-fullwidth">
|
14 |
+
<div class="lp-content-area lp-profile-content-area">
|
15 |
+
<?php do_action( 'learn-press/user-profile-account' ); ?>
|
16 |
+
</div>
|
17 |
+
</div>
|
18 |
+
|
19 |
<aside id="profile-sidebar">
|
20 |
|
21 |
<?php do_action( 'learn-press/user-profile-tabs' ); ?>
|