PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.2.0
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.2.0
4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 4.2.1 All 138 releases
learnpress / assets / js / dist / frontend / custom.js

custom.js in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.2.0, at assets/js/dist/frontend/custom.js

31 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /******/ (() => { // webpackBootstrap
2 var __webpack_exports__ = {};
3 /*!***********************************************!*\
4 !*** ./assets/src/apps/js/frontend/custom.js ***!
5 \***********************************************/
6 /**
7 * Custom functions for frontend quiz.
8 */
9
10 const {
11 Hook
12 } = LP;
13 const $ = window.jQuery || jQuery;
14 Hook.addFilter('question-blocks', function (blocks) {
15 return blocks; ///[ 'answer-options', 'title', 'content', 'hint', 'explanation'];
16 });
17
18 Hook.addAction('before-start-quiz', function () {});
19 Hook.addAction('quiz-started', function (results, id) {
20 $(`.course-item-${id}`).removeClass('status-completed failed passed').addClass('has-status status-started');
21 window.onbeforeunload = function () {
22 return 'Warning!';
23 };
24 });
25 Hook.addAction('quiz-submitted', function (response, id) {
26 $(`.course-item-${id}`).removeClass('status-started passed failed').addClass(`has-status status-completed ${response.results.graduation}`);
27 window.onbeforeunload = null;
28 });
29 /******/ })()
30 ;
31 //# sourceMappingURL=custom.js.map