// insert Lato font definition
/*
document.write("
");
*/
(function () {
var link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('type', 'text/css');
link.setAttribute('href', 'https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Open+Sans:400italic,700italic,400,700');
document.getElementsByTagName('head')[0].appendChild(link);
})();
var Activity_subtype = Activity_manuscript_type.extend({
});
var Player_subtype = Player_manuscript_type.extend({
opened_from_portal: true,
show_activity_notes: function() {
var titlerr = $("h1.section-title [data-type=title]").html();
if (titlerr == "Membrane Potential") {
var text = "This simulation allows students to explore processes related to membrane potential (Chapter 35).";
}
else if (titlerr == "Passive Transport") {
var text = "This simulation allows students to explore processes related to diffusion and passive transport (Chapter 5).";
}
else {
var text = "The questions included below have been written to test students' understanding of the material presented in the animation. If you assign the Simulation Activity, students will get two chances to answer each question correctly (except for true/false questions).";
}
Standard_Dialog.alert(text, {title:"Instructor Notes"});
},
initialize: function() {
this._super();
// after we call this.super, re-initialize the activity to the custom
// activity type for this subtype
this.activity = new Activity_subtype();
},
initialize2: function() {
this._super();
// instructor notes at the top
if (player.activity.is_instructor()) {
var html = UI_Elements.get_button_html({
"label": "Instructor Notes"
, "fn": 'player.show_activity_notes()'
, "extra_class": "instructor_guidance_button"
});
$("[data-type=section]").prepend(html);
}
/*
// PW: We could put this extra full screen mode button in if we
// could access the brightcove player and call goFullScreen(true);
// but for now I'm not sure how to do that, and the user can always
// click the full-screen button in the player.
var html = UI_Elements.get_button_html({
"label": "Full Screen Mode"
, "fn": 'player.full_screen()'
, "extra_class": "instructor_guidance_button"
});
$("#activity_instructions").before(html);
*/
UI_Elements.activate_buttons();
// get reference to the iframe (not needed now, but might be later)
// this.iframe = $("[data-type=figure]").find("iframe")[0].contentWindow;
// anything that you want to do after *everything* has been set up
// should be done here.
try {
parent.PX.API.Content.ResetHeight()
} catch (e) {
}
}
});
player = new Player_subtype();