/* This is the standard template you should add to your book JS file before customizing. Uncomment any of the configuration options to change the default behavior (see https://macmillanhighered.atlassian.net/wiki/display/MP/Player+Configuration+Options for descriptions of the options). */ /************************************** Set this to the DF book ID (Subtype) **************************************/ xBookUtils.bookID = "mckayworldmapstimelines"; /* You only need to set the disciplines if you are using the HTML Quiz question delivery method, which only BSM ebooks are at this time (in other words, if this is a FW ebook then you don't need to do a thing). Change the zeros to the discipline number for each tier on PX. Discipline numbers: History: 6696 (all tiers) Composition: 6698 (all tiers) Communication: 6700 (all tiers) College Success: 6704 (all tiers) */ xBookUtils.discipline = { dev: 6696, qa: 6696, pr: 6696, www: 6696 } var Player_subtype = Player_manuscript_type.extend({ //cfg_removeRawHtmlDivs: "on", //cfg_showAnswer: "on", //cfg_showAnswerAutoWrapThis: "off", //cfg_Box_moveTitle: "all", //cfg_Box_moveTitleExclude: "", //cfg_Figures_targetDefault: "_blank", //cfg_Figures_resizeDivWidth: "off", cfg_Figures_autoHtml: "on", cfg_LH_autoHtml: "on", //cfg_LH_externalTargetDefault: "_pop", //cfg_LH_internalTargetDefault: "_pop", //cfg_LH_ebookTargetDefault: "_pop", //cfg_LH_imageTargetDefault: "_blank", //cfg_LH_useLinksFile: "on", //cfg_Glossary_hoverTerms: "on", //cfg_Glossary_useStickyDiv: "on", //cfg_Glossary_hoverTermsNoClick: "", initialize_sections: function() { // Do not delete this this._super(); // Anything that needs to be done before the page displays // should be done here. }, // end initialize_sections /* You will most likely not make any changes to the initialize method unless you know exactly what you are doing :-) */ initialize: function(id) { // Do not delete this this._super(id); this.activity = new Activity_subtype(); this.xrefs = new XRefs_manuscript_subtype(); this.glossary = new Glossary_manuscript_subtype(); this.figures = new Figures_manuscript_subtype(); }, // end initialize initialize2: function() { // Do not delete this this._super(); var link_handler = new LinkHandler(); // Anything that can be done after the page displays // should be done here. } // end initialize2 }); // end Player_subtype // Do not delete this player = new Player_subtype(); var Activity_subtype = Activity_manuscript_type.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; } //force all queries to be answered before doing anything. var allQueriesAnswered = true; for (var i = 0; i < player.activity.questions[question_index].queries.length; i++) { var x = player.activity.questions[question_index].queries[i].user_has_answered(); if (!x) { allQueriesAnswered = false; } } if (!allQueriesAnswered) { $("