webpackJsonp([12],{ /***/ 14: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(31); var modules = __webpack_require__(0); var platform = __webpack_require__(1).run_on; var dom = __webpack_require__( 3 ); var common = __webpack_require__(2); var ConcreteMC = __webpack_require__(4); MC_Query = ConcreteMC.extend({ getHTML: function( mode ) { // Initialize image map elements if ( this.imagemap_initialized === false ) { var question_jq = this.jq.parent(); this.im_init( question_jq ); this.imagemap_initialized = true; } // Wrap answers in radio group var html = '
"; html = dom.createHTML( html ); common.parseMathExpresions( html ); return html; }, evaluateAnswer: function() { var jq = this.parent_question.queries[0].jq.parent().find('input[type="button"]'); if ( $( 'input:radio[name=query_answer_' + this.query_index + ']:checked' ).val() !== undefined ) { // get the user's selected answer, which will be 0-based this.user_answer_index = $( 'input:radio[name=query_answer_' + this.query_index + ']:checked' ).val() * 1; // set grade accordingly (if this.md.no_correct_answer is true, any answer is correct) if ( this.user_answer_index == this.correct_answer_index || this.md.no_correct_answer == "true" ) { this.setGrade( 100 ); } else { this.setGrade( 0 ); } return true; } else { if (platform.ie) { if ( this.parent_question.queries.length != 1 ) { window.Local_Dialog.open( "You must answer the questions before proceeding.
", { "title": "Please answer questions", "draggable": false, "width": 400, "buttons": [ { text: 'OK', click: window.Standard_Dialog.close } ], from: jq }, "You must answer the questions before proceeding." ); } else { window.Local_Dialog.open( "You must answer the question before proceeding.
", { "title": "Please answer question", "draggable": false, "width": 400, "buttons": [ { text: 'OK', click: window.Standard_Dialog.close } ], from: jq }, "You must answer the questions before proceeding." ); } } else { if ( this.parent_question.queries.length != 1 ) { window.Standard_Dialog.open( "You must answer the questions before proceeding.
", { "title": "Please answer questions", "draggable": false, "width": 400, "buttons": [ { text: 'OK', click: window.Standard_Dialog.close } ], from: jq } ); } else { window.Standard_Dialog.open( "You must answer the question before proceeding.
", { "title": "Please answer question", "draggable": false, "width": 400, "buttons": [ { text: 'OK', click: window.Standard_Dialog.close } ], from: jq } ); } } return false; } } }); var Local_A11yActivity = modules.A11yActivity.extend({ submit_question: function (question_index) { // the arg may be a number or an event object; in the latter case... if (typeof question_index == "object") { // extract the question_index from the object question_index = question_index.data.question_index; } //remove any previously added show question again messages player.get_current_section().jq.find(".incorrect_message, .correct_message").remove(); var t = player.activity; var question = t.questions[question_index]; var all_answers_correct = true; var isComboBox = false; var answerSubmit = false; if (question.queries.length) { var query = question.queries[0]; if (query.query_source.match(/^CB.*/g)) { isComboBox = true; } } // for each query in the question... for (var i = 0; i < question.queries.length; ++i) { var query = question.queries[i]; // evaluate the answer. If evaluateAnswer returns false, the answer isn't submittable at this time -- // most likely because it's a free-response answer that needs to be evaluated via MAVE. var answer_submittable = query.evaluateAnswer(question_index); if (answer_submittable === false) { // as soon as we get an unsubmittable answer, we return. submit_question // will be called again, either by the callback fn of MAVE or because the student // resubmits. At that point we'll catch any additional free-response answers that need // checking, or we'll finish this loop here and move on. return; } if (query.user_answer_index === 0) { answerSubmit = true; } all_answers_correct = all_answers_correct && query.isCorrect(); } if (isComboBox && !answerSubmit) { var subBtn = query.jq.parent().parent().find('input[type="button"'); window.Local_Dialog.open("Check one or more options from the list.
", { "title": "Please check one or more options", "draggable": false, "width": 320, "buttons": [ {text: 'OK', click: window.Standard_Dialog.close} ], from: subBtn }, "Check one or more options from the list."); return; } // if we made it to here, we're at least going to show which items are correct and incorrect // we might overwrite with review mode below, but that's OK for (var i = 0; i < question.queries.length; ++i) { var query = question.queries[i]; query.jq.html(query.getHTML("review_correct_incorrect")); } // update question tries ++question.tries; // if answer is incorrect, and max_tries is set, and # of tries is less than max_tries // (and the user didn't just give up) if ((!all_answers_correct && question.md.max_tries != null && question.tries < question.md.max_tries) && question.gave_up != true) { // tell user he can try again t.show_question_feedback(question, false, true); return; } else { t.show_question_feedback(question, all_answers_correct, false); } // if we make it to here we need to set ARGA info for the question, and show queries in review mode // if md.question_report_text is set, we submit the question as a whole, rather than as individual queries var query_correct_answers = ""; var query_responses = ""; var query_responses_for_questionData = ""; var query_grade_sum = 0; // for each query in the question... for (var i = 0; i < question.queries.length; ++i) { var query = question.queries[i]; // establish a question number to use var query_number = t.get_query_number(question, i); // get a query weight var query_weight = question.get_weight(); // if the question has more than one query, divide weight accordingly if (question.queries.length > 1) { query_weight = Math.round(query_weight / question.queries.length); } // if credit_after_max_tries is set, give at least that credit now, as long as the student tried if (question.md.credit_after_max_tries != null) { var query_grade = query.getGradeForARGA(); if (query_grade >= 0 && query_grade < question.md.credit_after_max_tries) { query.overrideGrade(question.md.credit_after_max_tries * 1); } } // set the ARGA response, unless we're saving one response for the whole question if (!question.md_set("question_report_text")) { t.ARGA_set_query_response(query, query_number, query_weight); // otherwise compose query roll-ups } else { if (query_correct_answers != "") { query_correct_answers += " / "; query_responses += " / "; query_responses_for_questionData += t.query_responses_separator; } query_correct_answers += query.getCorrectAnswerForARGA(); query_responses += query.getUserAnswerForARGA(); // see restore_saved_answers for how this is used later query_responses_for_questionData += query.getUserAnswerForARGA() + t.query_responses_grade_separator + query.getOriginalGrade(); query_grade_sum += query.getGradeForARGA() * 1; } // show in review mode, unless question metadata says not to show correct answers if (question.md.show_correct_answers != "false") { if (isComboBox) { var jq = query.parent_question.jq.find('#query_answer_' + query.query_index).parent(); jq.html(query.getHTML("review")); } else { query.jq.html(query.getHTML("review")); } } } // if we're saving one response for the whole question, save here if (question.md_set("question_report_text")) { var question_grade = Math.round(query_grade_sum / question.queries.length); t.ARGA_set_question_response(question, query_correct_answers, query_responses, question_grade, query_responses_for_questionData); } // update section status player.update_section_status(); // grade the activity t.grade_activity(); // then if ARGA is running, submit data; show_grade_saved_message will be called on completion. if (player.ARGA_running) { t.ARGA_submit_data(); } // update the question_action_div t.update_question_action_div(question_index); // if the item is in a sequence, show the next question t.show_next_question(question); var s = player.get_current_section(); // if all questions are answered and all sequences are complete // (these are set by _super) if (s.all_questions_answered && s.all_question_sequences_completed) { // if we're not on the final step if (s.index < player.sections.length - 1) { // then show the buttona UI_Elements.toggle_button("step_button", true); // otherwise we're done! } else { player.show_completion_message(); player.on_last_page_message(); } } if (typeof question_index == "object") { // extract the question_index from the object question_index = question_index.data.question_index; } player.activity.questions[question_index].checkModelUpdateConditionals(question_index); // re-call mathjax conversion here MathJax.Hub.Queue(["Typeset", MathJax.Hub]); if ($("[data-question_index=" + question_index + "]").hasClass("resubmission")) { player.get_current_section().all_questions_answered = true; } if (player.get_current_section().all_questions_answered === undefined) { safe_log("all_questions_answered === undefined"); player.get_current_section().all_questions_answered = true; } if (player.get_current_section().all_questions_answered === true && player.section_currently_showing !== ( player.sections.length - 1 )) { $("#step_button").show(); $('#step_button').focus(); $(".hint_button").hide(); } var cur_question_md = $("[data-question_index=" + question_index + "]").children("[data-type=metadata]"); var branches = {}; if (cur_question_md) { var modelUpdateConditional = $(cur_question_md).find("[key=branches]"); if (modelUpdateConditional.length) { modelUpdateConditional = $(modelUpdateConditional).text(); modelUpdateConditional = modelUpdateConditional.split(','); for (var i = 0; i < modelUpdateConditional.length; i++) { var branch = modelUpdateConditional[i].split(':'); branches[branch[0]] = branch[1]; } if (!player.activity.questions[question_index].queries[0].user_answer_index) { player.activity.questions[question_index].queries[0].user_answer_index = 0; } var sectionID = branches[player.activity.questions[question_index].queries[0].user_answer_index]; player.get_current_section().md.next_section = sectionID; var section_index = player.lookup_section_index_by_sectionID(sectionID); if (isNaN(section_index)) { throw( 'There is not section with id ' + sectionID ); } $("#step_button")[0].onclick = function () { var section_jq = player.get_current_section_jq(); var figures = section_jq.find('[data-type="figure"]'); player.stopVideoPlayer(figures); player.show_section(section_index); }; } } } }); var A11y4myersPlayer_ch_13 = modules.A11y4myersPlayer.extend( { show_section_animate: function( section_to_show, direction ) { 'use strict'; this._super( section_to_show, direction ); if (platform.ie) { $('#manuscript').find('[data-type="termref"]').unbind('click').click(function() { player.local_glossary.show_definition( this ); }); } 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 live in Death Valley, California—one of the hottest places on Earth. This is not the best option, because your participants would not be exposed to different temperatures. In Death Valley, it is hot most of the time. These people might have a very unusual perception of what temperature constitutes “comfortable”! To know whether hot temperatures are related to aggression, you would need to study individuals from the general population who are exposed to different temperatures. ', ' A small group of people who live in Yakutsk, Russia—one of the coldest places on Earth. This is not the best option, because your participants would not be exposed to different temperatures. In Yakutsk, it is cold most of the time. These people might have a very unusual perception of what temperature constitutes “comfortable”! To know whether hot temperatures are related to aggression, you would need to study individuals from the general population who are exposed to different temperatures. ', ' A small group of people from the general population. You were right to choose a group of individuals from the general population, so that your participants would be exposed to different temperatures. However, you would need to study a larger group, and not a small group as in this Case Study approach, in order to determine whether the idea of hot temperatures affecting aggression may apply to a larger population. ', ' A small group of people who have a history of extreme violence. This is not the best option, because these individuals do not have different levels of aggressiveness. They are all extremely violent! To know whether hot temperatures are related to aggression, you would need to study individuals from the general population who have different levels of aggressiveness.' ]; var normal_text = [ ' A small group of people who live in Death Valley, California—one of the hottest places on Earth. This is not the best option, because your participants would not be exposed to different temperatures. In Death Valley, it is hot most of the time. These people might have a very unusual perception of what temperature constitutes “comfortable”! To know whether hot temperatures are related to aggression, you would need to study individuals from the general population who are exposed to different temperatures. ', ' A small group of people who live in Yakutsk, Russia—one of the coldest places on Earth. This is not the best option, because your participants would not be exposed to different temperatures. In Yakutsk, it is cold most of the time. These people might have a very unusual perception of what temperature constitutes “comfortable”! To know whether hot temperatures are related to aggression, you would need to study individuals from the general population who are exposed to different temperatures. ', ' A small group of people from the general population. You were right to choose a group of individuals from the general population, so that your participants would be exposed to different temperatures. However, you would need to study a larger group, and not a small group as in this Case Study approach, in order to determine whether the idea of hot temperatures affecting aggression may apply to a larger population. ', ' A small group of people who have a history of extreme violence. This is not the best option, because these individuals do not have different levels of aggressiveness. They are all extremely violent! To know whether hot temperatures are related to aggression, you would need to study individuals from the general population who have different levels of aggressiveness.' ]; 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',''); } } }, initialize: function() { this._super(); this.activity = new Local_A11yActivity(); }, initialize2: function() { this._super(); $('#digfir_section_22').find('fieldset').find('legend').find('strong').before('blank'); $('#digfir_section_22').find('fieldset').find('legend').find('strong').attr('aria-hidden', 'true'); }, show_completion_message: function() { // player.activity.grade_activity will always have been called before this fn // so we'll have access to the properly-calculated activity properties below var grade_percent; if ( player.quiz_data.points_possible == 0 ) { grade_percent = 100; // else calculate grade percent, rounded to nearest whole percentage } else { grade_percent = Math.round( (player.quiz_data.points_awarded / player.quiz_data.points_possible) * 100 ); } var html = "