// http://courses.bfwpub.com/arga/SVA/Child Obesity/index.html var Activity_manuscript = Activity.extend({ get_question_number: function(q) { // always use q.index here return q.index; }, submit_question: function(question_index) { this._super(question_index); var s = player.get_current_section(); // if all questions are answered (this is set by _super) if (s.all_questions_answered) { // if we're not on the final step if (s.index < player.sections.length - 1) { // then show the button UI_Elements.toggle_button("step_button", true); // otherwise we're done! } else { player.complete_activity(); } } }, grade_saved: function() { // if activity is complete and we're on the last section, show the completion div if (Get_ARGA_Data("complete") == "yes" && player.showing_last_section() == true) { $("#grade_submitted_message").show(); } } }); var Player_manuscript = Player.extend({ // use the standard arga initialization alert for these activities ARGA_custom_initialization_alert: false, activity_title: null, activity_thumbnail_src: null, // sections here are sequenced -- user has to go through them in order sequenced_sections: true, restore_last_viewed_section: true, section_sequence_message: "You must read each slide, and complete any questions on the slide, in sequence.", grade_save_complete: false, show_section_animate: function(section_to_show, direction) { // make sure modal window is closed $.modal.close(); // slide in using parent function this._super(section_to_show, direction); /* // hide currently showing section if (this.section_currently_showing != null) { this.get_current_section_jq().hide(); } this.section_currently_showing = section_to_show; // slide in?? this.get_current_section_jq().fadeIn(300); */ // update slide_number and title $("#slide_title").html(this.get_current_section().title); $("#slide_number").html((section_to_show+1) + " of " + this.sections.length); // if this is the first/last section, dim the previous/next button if (this.section_currently_showing == 0) { $("#previous_button").addClass("button_dimmed"); } else { $("#previous_button").removeClass("button_dimmed"); } if (this.section_currently_showing == (this.sections.length - 1)) { $("#next_button").addClass("button_dimmed"); } else { $("#next_button").removeClass("button_dimmed"); } // scroll to top window.scrollTo(0,0); }, show_navigation: function() { var html = "
" ; html += "" + UI_Elements.get_button_html({ id: "contents_button", label: "Contents", fn: 'player.show_toc()' }) + " | " + ""+ UI_Elements.get_button_html({ id: "previous_button", label: "Previous", fn: 'player.show_section("previous")' }) + " | " + ""+ UI_Elements.get_button_html({ id: "slide_number", label: "1 of " + this.sections.length, fn: 'player.slide_number_clicked()' }) + " | " + ""+ UI_Elements.get_button_html({ id: "next_button", label: "Next", fn: 'player.show_section("next")' }) + " | " + "