ips.templates.set('courses.quiz.answers',"  <li class='ipsField_stackItem' data-role='stackItem'>  <span class='ipsField_stackDrag ipsDrag' data-action='stackDrag'>   <i class='fa fa-bars ipsDrag_dragHandle'></i>  </span>  <a href='#' class='ipsField_stackDelete ipsCursor_pointer' data-action='stackDelete'>   <i class='fa fa-times'></i>  </a>  <a href='#' class='ipsBadge ipsBadge_medium ipsBadge_neutral cQuestionCorrect' data-action='questionCorrect' title='{{#lang}}set_correct_answer{{/lang}}' data-ipsTooltip data-answer=''>{{#lang}}incorrect_answer{{/lang}}</a>  {{{field}}} </li>");ips.templates.set('courses.quiz.answer'," <a href='#' class='ipsBadge ipsBadge_medium {{#correct}}ipsBadge_positive{{/correct}}{{^correct}}ipsBadge_neutral{{/correct}} cQuestionCorrect' data-action='questionCorrect' title='{{#lang}}set_correct_answer{{/lang}}' data-ipsTooltip data-answer=''>{{#correct}}<i class='fa fa-check'></i> {{#lang}}correct_answer{{/lang}}{{/correct}}{{^correct}}{{#lang}}incorrect_answer{{/lang}}{{/correct}}</a>");;
;(function($,_,undefined){"use strict";ips.controller.register('courses.front.quiz.form',{initialize:function(){this.on('click','[data-action="nextQuestion"]',this.nextQuestion);this.on('click','[data-action="previousQuestion"]',this.previousQuestion);this.on('click','ul.ipsField_fieldList[role="radiogroup"] > li',this.selectAnswer);},nextQuestion:function(e){e.preventDefault();var thisQuestion=$(e.target).parents('[data-role="quizQuestion"]');$(thisQuestion).hide();var nextQuestion=$(thisQuestion).next('[data-role="quizQuestion"]');if(nextQuestion.length){$(nextQuestion).show();}},previousQuestion:function(e){e.preventDefault();var thisQuestion=$(e.target).parents('[data-role="quizQuestion"]');$(thisQuestion).hide();var previousQuestion=$(thisQuestion).prev('[data-role="quizQuestion"]');if(previousQuestion.length){$(previousQuestion).show();}},selectAnswer:function(e){$('li.ipsCourseQuiz--selected').removeClass('ipsCourseQuiz--selected');$(e.target).parents('li:first').addClass('ipsCourseQuiz--selected');}});}(jQuery,_));;