var Activity_subtype = Activity_manuscript_type.extend({
// number questions by the block title if possible
get_question_number: function(a) {
var num = a.jq.find('[data-type="title"]').first().text();
if (num != null) {
return num;
} else {
return this._super(a);
}
}
});
var Player_subtype = Player_manuscript_type.extend({
rq_note: function(question) {
var text = "Reflection Questions are free response questions inserted into e-book sections to help students reflect on what they're learning. Students will receive full credit as long as they write answers of five words or more.
Instructors can view the Results of the section to review the answers their students have given.";
Standard_Dialog.alert(text, {title:"Reflection Questions"});
},
question_notes: function(question) {
var text = "Quick Check and Comprehension Questions are inserted into e-book pages to keep students engaged—and aware of what they know and don't know—as they read.
Quick Check questions require students to enter answers of 5 or more words; a \"model answer\" is shown after the student has submitted his answer.
Most Comprehension Questions give students multiple attempts to answer before showing them the correct answer (the exception is true/false questions, for obvious reasons).
If you assign e-book sections to be graded, students will get full credit for the section (a grade of 100%) as long as they attempt to answer every question (that is, as long as they either enter the correct answer themselves or use all their attempts and therefore have the correct answer revealed to them).
Instructors can view the Results of the section to see the first answer each student gave to each question.";
Standard_Dialog.alert(text, {title:"Quick Check and Comprehension Questions"});
},
/*
// PW: test this...
update_last_viewed_section: function() {
// if ARGA is initialized and we need to restore the user to his last position when he returns,
if (this.ARGA_running && player.md.restore_last_viewed_section == "true") {
// if we're viewing a page other than the one currently saved as LVS (last-viewed section)
var lvs = Get_ARGA_Data("LVSX");
if (this.section_currently_showing != null && this.section_currently_showing != lvs) {
// store LVS/LAS to register the last-viewed/last-available page,
// and save ARGA so it gets registered
Set_ARGA_Data("LVSX", this.section_currently_showing);
Set_ARGA_Data("LASX", this.last_available_section);
this.activity.ARGA_submit_data(false);
}
}
},
*/
extract_activity_metadata: function() {
this._super();
this.required_metadata_val("restore_last_viewed_section", "true", true);
},
initialize: function() {
this._super();
// remove "Question" text from quick check question blocks (PW 6/27 -- moved from bottom of file)
$("[data-block_type=quick_check]").find("h3").each(function(index, element) {
var html = $(this).html();
html = html.replace(/^Question/, "");
$(this).html(html);
});
// PW: I don't think we have comprehension or reflection questions anymore, but leave code below just in case
// comprehension questions
$("[data-block_type=comprehension_question]").find("h3").each(function(index, element) {
var jq = $(this);
jq.html("Comprehension Question " + (index+1));
// set question index for activity.get_question_number
jq.parent().attr("question_type_index", (index+1));
var html = UI_Elements.get_button_html({
"label": "Instructor Notes"
, "fn": 'player.question_notes(this)'
, "extra_class": "instructor_guidance_button"
});
jq.before(html);
});
// reflection questions
$("[data-block_type=reflection_question]").find("h3").each(function(index, element) {
var jq = $(this);
jq.prepend("Reflection ");
// set question index for activity.get_question_number
jq.parent().attr("question_type_index", (index+1));
var html = UI_Elements.get_button_html({
"label": "Instructor Notes"
, "fn": 'player.rq_note(this)'
, "extra_class": "instructor_guidance_button"
});
jq.before(html);
});
// how do we know boxes
$("[data-block_type=how_know]").each(function(index, element) {
var jq = $(this);
var html = "