var previousUserAnswerIndex = null, userAnswerIndex = null, result = 0;
var Player_chapter_1= window.Player_hwyk.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('#question3_answer_' + (i+1));
}
console.log(answers);
var bold_text = [
' A small group of people who have heart disease. This option does not allow you to test whether stress increases risk of heart disease, because you would have no way to compare with people who don’t have heart disease. To know whether stress increases risk of disease, you would need to study individuals who vary in their levels of disease. ',
' A small group of people who report having almost no stress in their lives. This is not the best option, because it would be difficult to examine the relationship between stress and risk of disease among people who experience little or no stress. To know whether stress increases risk of disease, you would need to study individuals who experience varying levels of stress. ',
' A small group of people who are stress-prone and hot-tempered. This is not the best option, because it would be difficult to examine the relationship between stress and risk of disease among only people who experience a lot of stress. You would have no way to compare with people who don’t experience a lot of stress. To know whether stress increases risk of disease, you would need to study individuals who experience varying levels of stress.',
' A small group of people that includes people who are stress-prone and also people who are relaxed and mellow. You were correct to study people with varying levels of stress. However, you would get more meaningful results by systematically testing the stress levels and rates of heart disease in different types of people over a long period of time, rather than all at once as in this naturalistic observation design.'
];
var normal_text = [
' A small group of people who have heart disease. This option does not allow you to test whether stress increases risk of heart disease, because you would have no way to compare with people who don’t have heart disease. To know whether stress increases risk of disease, you would need to study individuals who vary in their levels of disease. ',
' A small group of people who report having almost no stress in their lives. This is not the best option, because it would be difficult to examine the relationship between stress and risk of disease among people who experience little or no stress. To know whether stress increases risk of disease, you would need to study individuals who experience varying levels of stress. ',
' A small group of people who are stress-prone and hot-tempered. This is not the best option, because it would be difficult to examine the relationship between stress and risk of disease among only people who experience a lot of stress. You would have no way to compare with people who don’t experience a lot of stress. To know whether stress increases risk of disease, you would need to study individuals who experience varying levels of stress.',
' A small group of people that includes people who are stress-prone and also people who are relaxed and mellow. You were correct to study people with varying levels of stress. However, you would get more meaningful results by systematically testing the stress levels and rates of heart disease in different types of people over a long period of time, rather than all at once as in this naturalistic observation design.'
];
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 === 'screen8' ) {
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','');
}
}
}
} );
window.player = new Player_chapter_1();