webpackJsonp([8],{
/***/ 18:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(35);
var previousUserAnswerIndex = null, userAnswerIndex = null, result = 0;
var modules = __webpack_require__(0);
var A11y4myersActivity_ch_1 = modules.A11yActivity.extend({
submit_question: function( question_index ) {
this._super(question_index);
if ( typeof question_index == "object" ) {
// extract the question_index from the object
question_index = question_index.data.question_index;
}
var question = player.activity.questions[question_index];
var submitable = false;
if ( question_index === 7 ) {
for ( var i = 0; i < question.queries.length; ++i ) {
var query = question.queries[i];
submitable += query.evaluateAnswer(question_index);
}
if ( submitable === 21 ) {
var table = $('#digfir_section_20 table');
var newQueries = $('#digfir_section_20').find('input');
var newQueriesLength = (newQueries.length - 1) / 2;
var i = 0;
table.find('td').each(function(index, td) {
if ($(td).find('p').html()) {
if ( $(td).find('p').html().match('Miss') || $(td).find('p').html().match('Make') ) {
newQueries.eq(i).remove();
$(td).append( newQueries.eq(newQueriesLength + i) );
i++;
}
}
});
}
}
}
});
var A11y4myersPlayer_ch_1 = modules.A11y4myersPlayer.extend( {
show_section_animate: function( section_to_show, direction ) {
'use strict';
this._super( section_to_show, direction );
if( this.sections[section_to_show].md && this.sections[section_to_show].md.sectionid === 'screen3a-2' ) {
var queries = window.player.activity.questions[2].queries;
var answers = [,,,];
for( var i = 0; i < 4; i++ ){
answers[i] = document.querySelector('#question2_answer_' + (i+1));
}
var bold_text = [
' One person or a small group of people who regularly play basketball To know whether there is a hot hand in basketball, you would want to observe people who regularly play basketball. You will want to be able to compare apparent “streaks” in shooting performance with participants’ typical shooting performance. HOWEVER, you need to study a larger group, and not one individual or a small group of people, as you would in this Case Study approach, in order to determine if the idea of a hot hand may apply to a larger population.',
' One person or a small group of people who have never watched basketball To know if there is a hot hand in basketball, we would need to observe people who regularly play basketball, and we would need information about their basketball shooting history.',
' A talented swimmer who likes to watch basketball It is unclear whether this individual regularly plays basketball. To know if there is a hot hand in basketball, we would need to observe people who regularly play basketball, and we would need information about their basketball shooting history.',
' A basketball fan who believes in the hot hand It is unclear whether this individual regularly plays basketball. To know if there is a hot hand in basketball, we would need to observe people who regularly play basketball, and we would need information about their basketball shooting history.'
];
var normal_text = [
' One person or a small group of people who regularly play basketball To know whether there is a hot hand in basketball, you would want to observe people who regularly play basketball. You will want to be able to compare apparent “streaks” in shooting performance with participants’ typical shooting performance. HOWEVER, you need to study a larger group, and not one individual or a small group of people, as you would in this Case Study approach, in order to determine if the idea of a hot hand may apply to a larger population.',
' One person or a small group of people who have never watched basketball To know if there is a hot hand in basketball, we would need to observe people who regularly play basketball, and we would need information about their basketball shooting history.',
' A talented swimmer who likes to watch basketball It is unclear whether this individual regularly plays basketball. To know if there is a hot hand in basketball, we would need to observe people who regularly play basketball, and we would need information about their basketball shooting history.',
' A basketball fan who believes in the hot hand It is unclear whether this individual regularly plays basketball. To know if there is a hot hand in basketball, we would need to observe people who regularly play basketball, and we would need information about their basketball shooting history.'
];
for( var i = 0; i < 4; i++ ){
if (queries[0].user_answer_index == i){
answers[i].innerHTML = bold_text[i];
}else{
answers[i].innerHTML = normal_text[i];
}
}
}
if( this.sections[section_to_show].md && this.sections[section_to_show].md.sectionid === 'screen7' ) {
var queries = window.player.activity.questions[6].queries;
var answers = [,,,,];
for( var i = 0; i < 5; i++ ){
answers[i] = document.querySelector('#answer_' + (i+1));
}
for( var i = 0; i < 5; i++ ){
if (queries[i].user_answer_index == 0){
answers[i].setAttribute('checked','');
}else{
answers[i].checked = false;
}
answers[i].setAttribute('disabled','');
}
}
if( this.sections[section_to_show].md && this.sections[section_to_show].md.sectionid === 'screen9' ) {
var queries = window.player.activity.questions[7].queries;
for( var i = 0; i < queries.length; i++ ) {
previousUserAnswerIndex = userAnswerIndex;
userAnswerIndex = queries[i].user_answer_index;
var tNames = ['#check_' + (i + 1) +'-1', '#check_' + (i + 1) +'-2'];
var tNode = document.querySelector( tNames[0] );
var tNode2 = document.querySelector( tNames[1] );
var idName = 'check_answer_' + i + '_0';
var idName2 = 'check_answer_' + i + '_1';
//var input = '';
var input = document.createElement('input');
input.setAttribute('class','query_mc_choice_radio');
input.setAttribute('type','radio');
input.setAttribute('name', idName);
input.setAttribute('value','0');
input.setAttribute('disabled','');
tNode.parentNode.insertBefore(input, tNode);
var input2 = document.createElement('input');
input2.setAttribute('class','query_mc_choice_radio');
input2.setAttribute('type','radio');
input2.setAttribute('name', idName2);
input2.setAttribute('value','1');
input2.setAttribute('disabled','');
tNode2.parentNode.insertBefore(input2, tNode2);
if (queries[i].user_answer_index == 0){
input.setAttribute('checked','');
}
else{
input2.setAttribute('checked','');
}
if( previousUserAnswerIndex !== null ) {
if( previousUserAnswerIndex !== userAnswerIndex ) {
result++;
}
}
}
var textNode = document.querySelector( '[data-block_type=result_question_message] p');
var textNode2 = document.querySelector( '[data-block_type=result_question_message2] p');
textNode.innerHTML = 'You predicted that the next outcome would differ ' + result + ' times.';
if( result >= 11 ){
textNode2.innerHTML = 'You predicted more alternations, and fewer shooting streaks, than would normally occur in random data. Random sequences are streakier than most people expect.';
} else {
textNode2.innerHTML = 'Good job! You did not predict more alternations, or fewer streaks, than would normally occur in random data.';
}
result = 0;
previousUserAnswerIndex = null;
userAnswerIndex = null;
}
},
initialize: function() {
this._super();
this.activity = new A11y4myersActivity_ch_1();
},
initialize2: function() {
this._super();
var table = $('#digfir_section_20 table');
var queries = $('#digfir_section_20').find('input');
var counter = 0;
table.find('td').each(function(index, td) {
if ($(td).find('p').html()) {
if ( $(td).find('p').html().match('Miss') || $(td).find('p').html().match('Make') ) {
$(td).append(queries.eq(counter));
counter++;
}
}
});
}
} );
window.player = new A11y4myersPlayer_ch_1();
/***/ }),
/***/ 35:
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/***/ 59:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(18);
/***/ })
},[59]);
//# sourceMappingURL=a11y4myers_ch1.js.map