QuizScreenOutro.prototype = {
initEvents: function () {
- this.animOk = false
-
$(document).on("click", ".toggle-answers-review", function () {
$(".score-answers-review_container").toggleClass("active")
})
//animer le texte d'intro
gsap.registerPlugin(DrawSVGPlugin);
let subtitle = new SplitType(".score-text .subtitle", {types: 'words, chars'})
- const $this = this
gsap.to(".active-screen #progress-circle", {drawSVG: 0, duration: 0})
gsap.timeline({delay: .4})
const counter = $("#progress-counter")
+ //
+ this.checkScorm()
+
if (score < (maxScore / 2)) {
counter.addClass("nok")
} else if (score >= (maxScore / 2)) {
animationOk: function() {
this.quiz.animations.load("CONFETTI", "#anime-ok", '', false);
+ },
+
+ checkScorm: function() {
+ const $this = this
+ if (this.quiz.scorm.enabled === true) {
+ $(document).on("click", "#leave-quiz", function () {
+ $this.quiz.scorm.quit()
+ })
+ } else {
+ $("#leave-quiz").hide()
+ }
}
};
<span data-icon="search"></span>
<span>{{$__('Review answers')}}</span>
</a>
- <a class="btn primary action">
+ <a id="leave-quiz" class="btn primary action">
<span>{{$__('Leave')}}</span>
<span class="access space">{{$__('space')}}</span>
</a>