webpackJsonp([14],{ /***/ 23: /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ 53: /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(7); /***/ }), /***/ 7: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(23); var modules = __webpack_require__(0); var Activity_chapter = modules.activity.extend( { // Overriding submit_question because we need to answer Q5 // automatically if the answer to Q4 is No. 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; } var t = player.activity; var question = t.questions[question_index]; var all_answers_correct = true; var query; var isComboBox = false; var answerSubmit = false; if ( question.queries.length ) { 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 ) { 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 ) { window.Local_Dialog.open( '
Check one or more options from the list.
', { 'draggable': false, 'title': 'Please note', 'width': 320, 'buttons': [ {text: 'OK', click: window.Local_Dialog.close} ], 'from': $(this)[0] } ); 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') ); $('.mc_query_group input') .focus(function () { $(this).parent().parent().addClass('outlined'); }) .blur(function () { $(this).parent().parent().removeClass('outlined'); }); } // 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' ) { 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 ); } // 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 ); // update section status player.update_section_status(); // re-call mathjax conversion here if (typeof MathJax !== 'undefined') { MathJax.Hub.Queue( ['Typeset', MathJax.Hub] ); } 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 if (typeof MathJax !== 'undefined') { MathJax.Hub.Queue( ['Typeset', MathJax.Hub] ); } // safe_log("submit_question: all_questions_answered = " + player.get_current_section().all_questions_answered); if ( (player.get_current_section().all_questions_answered == true) && player.get_current_section().index < player.sections.length - 1 ) { // safe_log("submit_question: showing next button"); $( '#next_button' ).show().focus(); } if ( (player.get_current_section().all_questions_answered == true) && (player.get_current_section().index == player.sections.length - 1) ) { // safe_log("submit_question: hide next button"); $( '#prev_button' ).focus(); player.show_completion_message(); } if (player.get_current_section().all_questions_answered == false && player.get_current_section().jq[0].classList[0] !== 'assessment' && player.get_current_section().jq[0].classList[0] !== 'question_sequence_section') { var feedback = question.jq.find( '.question_feedback_part' ); feedback.attr('tabindex', '-1').focus(); } // If this is question 4 and the answer is 'No' then we // need to answer question 5 behind the scenes so that // the activity can move on. if (question_index == 4) { var q4_question = player.activity.questions[4]; var q4_answer = q4_question.queries[0].user_answer_index; if (q4_answer == 1) { $('#query_answer_12').val('Did not find any famous female scientists.'); $('#question_submit_button_5').click(); } } }, update_question_action_div: function ( question_index ) { 'use strict'; if (question_index == 4) { var question = this.questions[question_index]; var answer = question.queries[0].user_answer_index; if (answer == 0) { $('[data-block_type="special_mc_es"]').addClass('yes_ans'); $('#query_answer_12').focus(); if (platform.firefox) { document.getElementById('live-feedback').innerHTML = document.getElementById('query_text_12').innerHTML + ' Edit multiline. blank'; } } else { $('[data-block_type="special_mc_es"]').addClass('no_ans'); $( '#next_button' ).show().focus(); } return; } if (question_index == 2) { var question = this.questions[question_index]; // var isESQuery = question.queries[0].query_source.search(/^ES:/) !== -1; var $nativeFeedback = question.jq.find('.question_feedback'); var $feedback = $nativeFeedback.length ? $nativeFeedback : $('#digfir_section_' + player.section_currently_showing + ' .mock_quiz_feedback'); // safe_log("update_question_action_div"); // safe_log("question_index = " + question_index); // safe_log(question); // calculate points_awarded and points_possible var points_provisional = false; for ( var i = 0; i < question.queries.length; ++i ) { var query = question.queries[i]; if ( query.pointsAreProvisional() == true ) { points_provisional = true; } } // hide submit button (and any other similar buttons that might be added by subtypes), but show points earned var jq = $( '#question_action_div_' + question.index ); jq.find( '.question_submit_button' ).hide(); var pointsText = 'Points awarded: ' + player.activity.total_points_earned + ' out of ' + player.activity.total_points_possible; var points_html = '