//####################################################
//practice1
;(function () {
'use strict';
function slideInitHandler(section) {
// console.log('slideInitHandler');
section.points_possible = 1;
section.points_earned = 0;
section.section_completed = false;
var _elem = section.jq
_elem.addClass('practice1')
}
function completeTask(section) {
console.log('completeTask')
section.points_earned = 1;
section.section_completed = true;
player.activity.grade_activity();
player.update_section_status();
document.querySelector('.navigation_button.next_button').focus();
}
function slideShowHandler(section) {
// console.log('slideShowHandler', section);
//init step0 ---------------
var _elem = section.jq.focus()
var ariaContainer = $('
')
.addClass('hidden_element')
.attr('aria-live', 'polite')
var $steps = _elem.find('.step').hide()
var $step = _elem.find('.step0').show()
var $nextBtn = _elem.find('.step__btn').show()
var currentStep = 0
$nextBtn.unbind('click').bind('click', showNextPart)
function showNextPart() {
currentStep++
$step = _elem.find('.step' + currentStep)
if (currentStep>$steps.length-1) return
$steps.hide()
$step.fadeIn()
if (currentStep == $steps.length - 1) {
$('.footer>p').text('Select the NEXT button and move to Quiz 1.');
$nextBtn.fadeOut()
completeTask(section)
}
}
}
function slideHideHandler(section) {
//console.log('slideHideHandler', section)
//add navigation
}
window.mheContpract = window.mheContpract || {};
window.mheContpract['practice1'] = {
initialize: slideInitHandler,
show: slideShowHandler,
hide: slideHideHandler
};
})();