webpackJsonp([0],{
/***/ 100:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var AYS_Figures = Figures.extend({
process_media: function() {
// we're not currently using this (jwplayer is not being included)
$("[data-mmtype='mp3']").each(function(index, element) {
var jq = $(element);
var id = jq.attr("data-figure-id");
var mmsrc = jq.attr("data-mmsrc");
// http://www.longtailvideo.com/jw/upload/bunny.mp3
// http://www.youtube.com/embed/CsGYh8AacgY
var src = jq.attr("src");
var attr = jq.attr("data-attr");
if (attr == null) {
attr = "";
}
attr = attr.split(/\s*,\s*/);
var params = new Object();
params.width = jq.width();
params.height = jq.height() + 24; // 24 is for the controler at the bottom
params.file = mmsrc;
params.image = src;
params.controlbar = "bottom";
params.screencolor = "ffffff";
params["viral.allowmenu"] = "false";
params["viral.onpause"] = "false";
params["viral.oncomplete"] = "false";
// determine url of flashplayer based on whether we're published or not
if (UI_Elements.in_preview_mode()) {
params.flashplayer = "/js/preview/player.swf";
}
else {
params.flashplayer = "js/player.swf";
}
safe_log(params.flashplayer);
for (var i = 0; i < attr.length; ++i) {
var a = attr[i].split(/\s*=\s*/);
params[a[0]] = a[1];
}
jwplayer(id).setup(params);
});
//AF: this is less than ideal, but i had to make this a global variable so it can be accessed by the video players when they fire the templateloaded event.
// we should look into changing it.
videos.templateReady = function(figureObjectID) {
var KEY_CODES = {
SPACE: 32,
ENTER: 13
};
var vidplayer = brightcove.api.getExperience(figureObjectID);
// var experienceModule = vidplayer.getModule(brightcove.api.modules.APIModules.EXPERIENCE);
var playerModule = vidplayer.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER);
var el = document.querySelector("[data-figure-id=" + figureObjectID + "]");
$(el).find('object').attr('aria-hidden', true);
$(el).find('iframe.BrightcoveExperience').attr('aria-hidden', true); // Fix for android
el.setAttribute("tabindex", "0");
el.setAttribute("role", "application");
el.setAttribute('aria-label',
'Press enter to start or pause video. Press the transcript button to see the content of the video');
el.addEventListener("keydown", (function(isPlay) {
return function(evt) {
var keyCode = evt.keyCode || evt.which;
if (keyCode === KEY_CODES.SPACE || keyCode === KEY_CODES.ENTER) {
if (isPlay) {
playerModule.pause();
isPlay = false;
return;
}
playerModule.play();
isPlay = true;
}
};
})(false));
var questionSequence = $("#" + figureObjectID).closest('[data-type="figure"]').nextAll(
'[data-block_type="question_sequence"], [data-block_type="question_sequence_one_at_a_time"]');
questionSequence.each(function(index, element) {
if ($(element).attr("data-block_type") == "figure") {
if ($(element).find(".BrightcoveExperience").size() > 0) { //we have found another video following the current one, so stop
return false;
}
}
var questionSequenceIndex = $(element).attr("question_sequence_index");
var questionSequenceMetaData = $(element).find('[data-type="box_inner"]').children(
'[data-type="metadata"]').find('[key="cuepoint"]').html();
$(element).hide();
if (questionSequenceMetaData != null) {
var cuePointsModule = vidplayer.getModule(brightcove.api.modules.APIModules.CUE_POINTS);
var CuePointType = brightcove.api.modules.CuePointsModule.CuePointType;
var cuePoints = [ {
name: figureObjectID,
metadata: questionSequenceIndex,
time: questionSequenceMetaData,
type: CuePointType.CODE
} ];
cuePointsModule.addCuePoints(videos[figureObjectID], cuePoints);
videos.question_sequence_to_video_map[questionSequenceIndex] = figureObjectID;
}
});
playerModule.addEventListener(brightcove.api.events.CuePointEvent.CUE, videos.cuePointEvent);
};
videos.cuePointEvent = function(e) {
//get the player - the name property of the cuePoint is set to the ID of the Brightcove experience
//so we can find the player here.
var vidplayer = brightcove.api.getExperience(e.cuePoint.name);
//var globalPlayer = brightcove.api.getExperience(e.cuePoint.name);
safe_log("got vid player");
var playerModule = vidplayer.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER);
safe_log("got module");
playerModule.pause(true);
safe_log("paused");
player.show_question_sequence(e.cuePoint.metadata, false);
};
$("[data-mmtype='mov']").each(function(index, element) {
var jq = $(element);
var id = jq.attr("data-figure-id");
var mmsrc = jq.attr("data-mmsrc");
// var src = jq.attr("src");
var attr = jq.attr("data-attr");
if (attr == null) {
attr = "";
}
attr = attr.split(/\s*,\s*/);
var params = new Object();
for (var i = 0; i < attr.length; ++i) {
var a = attr[i].split(/\s*=\s*/);
params[a[0]] = a[1];
safe_log("added param " + a[0] + ": " + a[1]);
}
params.autoStart = jq.attr("data-autoplay");
var videoPlayerID = "";
var videoPlayerKey = "";
//if(params.showVideoControls == 'true'){
//AF: This is the video player with playback controls. We are only using this one for right now.
videoPlayerID = "1513003547001";
if (jq.attr("data-playerid")) {
videoPlayerID = jq.attr("data-playerid");
}
videoPlayerKey = "AQ~~,AAABXVHBMdE~,bnY9CM55Z1MLPZuidy4KYEC_16wi-U8Q";
//}else{
// videoPlayerID = "1504927982001";
// videoPlayerKey = "AQ~~,AAABXVHBMdE~,bnY9CM55Z1PiqOYprq-NHmUPG2yKZ4U-";
//}
videos[id] = mmsrc;
var BCL = {};
BCL.markup = function(html, data) {
var m;
var i = 0;
var match = html.match(data instanceof Array ? /{{\d+}}/g : /{{\w+}}/g) || [];
// eslint-disable-next-line no-cond-assign
while (m = match[i++]) {
html = html.replace(m, data[m.substr(2, m.length - 4)]);
}
return html;
};
videos.templateLoad = function(e) {
//AF: For now, we are not using captions.
var vidplayer = brightcove.api.getExperience(e);
// var CuePointType = brightcove.api.modules.CuePointsModule.CuePointType;
var modExp = vidplayer.getModule(brightcove.api.modules.APIModules.EXPERIENCE);
modExp.addEventListener(brightcove.api.events.ExperienceEvent.TEMPLATE_READY,
function(_evt) {
videos.templateReady(e);
});
//captionsModule.loadDFXP(player.md.video_caption_url + videos[e] + ".xml", videos[e]);
//if needed, we can use these events to trigger code upon the success or error of loading captions.
//if there is an error, it fails silently and just doesn't show captions.
//captionsModule.addEventListener(brightcove.api.events.CaptionsEvent.DFXP_LOAD_SUCCESS, onDFXPLoadSuccess);
//captionsModule.addEventListener(brightcove.api.events.CaptionsEvent.DFXP_LOAD_ERROR, onDFXPLoadError);
};
BCL.playerData = {
"playerID": videoPlayerID,
"playerKey": videoPlayerKey,
"width": jq.width(),
"height": jq.height(),
"videoID": mmsrc,
"autoStart": params.autoStart
};
BCL.playerTemplate =
"
";
// console.log(BCL.playerTemplate);
var playerHTML = "";
playerHTML = BCL.markup(BCL.playerTemplate, BCL.playerData); //replaces placeholders with values
jq.replaceWith(playerHTML);
brightcove.createExperiences();
});
}
});
module.exports = AYS_Figures;
/***/ }),
/***/ 101:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var common = __webpack_require__(1);
var dom = __webpack_require__(2);
var jq_utils = __webpack_require__(3);
var platform = __webpack_require__(0).run_on;
var Activity_work_it_out = Activity.extend({
submit_question: function(question_index) {
this._super(question_index);
player.initImageDescriptions();
var section = player.get_current_section();
var qID = section.jq.find("[data-type=question]").attr("data-question_index");
player.activity.qID = qID;
player.show_video(section);
var $figure_text = section.jq.find("data-type=figure_text");
if ($figure_text.text().trim() == '') {
$figure_text.hide();
}
if (section.hasVideo) {
setTimeout(function() {
var videoPlayer = brightcove.api && brightcove.api.getExperience(section.video.id);
if (videoPlayer) {
var playerModule = videoPlayer.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER);
playerModule.seek(0);
playerModule.addEventListener(brightcove.api.events.MediaEvent.COMPLETE, function() {
section.video.isViewed = true;
player.update_section_status();
player.showing_last_section() && player.show_completion_dialog();
});
}
}, 5000);
}
/**
* dirty hack for TB on android, when radio-buttons where disabled
*/
if (platform.android) {
var _questionIndex = (typeof question_index === 'object') ? question_index.data.question_index : question_index;
var $question = player.activity.questions[_questionIndex].jq;
if (player.activity.questions[_questionIndex].is_complete()) {
$question.find('input[type="radio"]').each(function () {
this.addEventListener('click', function (e) {
e.preventDefault();
});
$(this).css('opacity', 0.5);
});
}
}
},
update_question_action_div: function(question_index) {
var question = this.questions[question_index];
// Calculate points_awarded and points_possible
var points_awarded = 0;
var points_possible = 0;
var points_provisional = false;
for (var i = 0; i < question.queries.length; ++i) {
var query = question.queries[i];
points_awarded += query.getPointsAwarded();
points_possible += query.getPointsPossible();
if (query.pointsAreProvisional()) {
points_provisional = true;
}
}
// Round to at most two decimal places
points_awarded = Math.round(points_awarded * 100) / 100;
points_possible = Math.round(points_possible * 100) / 100;
// Hide submit button (and any other similar buttons that might be added by subtypes), but show points earned
// we need to be able to focus on the feedback container, so add tabindex
var $questionAction = question.jq.find('#question_action_div_' + question.index);
// Add information about points
var pointsAwarded = '
Points awarded: ' + points_awarded + ' out of ' + points_possible;
if (points_provisional) {
pointsAwarded += ' (provisional)';
}
pointsAwarded += '
';
if (query.answer_was_just_entered && points_provisional) {
pointsAwarded +=
'
Your answer has been provisionally accepted. You\'ll get full credit for now,' +
' but your instructor may update your grade later after evaluating it.
';
}
var $button = $questionAction.find('.question_submit_button');
$button.attr({
'tabindex': '-1',
'aria-disabled': 'true'
}).addClass('disabled');
// Add points awarded
var $questionFeedback = $questionAction.find('.question_feedback');
$questionAction.find('.points_awarded_div').remove();
if ($questionFeedback.length > 0) {
$questionFeedback.append(pointsAwarded);
} else {
$questionAction.append(pointsAwarded);
}
$questionFeedback.show();
// Add space after period
var feedbackText = $questionAction.text().replace(/\./g, '. ');
// FF + NVDA doesn't read text in focused div automatically
player.shadow_speech.talk('');
player.shadow_speech.talk(feedbackText.replace('Feedback', 'Feedback. '));
},
show_question_feedback: function(question, is_correct, try_again) {
// Remove previous feedback if there
$('#question_feedback_' + question.index).remove();
// Get individual feedback for each choice, and add it after general feedback
var feedback_correct_incorrect = question.jq.find('.query_mc_feedback_correct_incorrect').text();
var html = '
' +
'
' + this.feedbackTitle + '
';
var feedback = '';
// GENERAL feedback if there
if (question.md.feedback) {
feedback += '
' + question.md.feedback + '
';
}
// CORRECT feedback if there and the answer is correct
if (is_correct && question.md.feedback_correct) {
feedback += '
';
}
// INCORRECT or HINT feedback if there and the answer is incorrect
if (!is_correct) {
var found_feedback_string = false;
// If user gets to try again
if (try_again) {
// Check for feedback_conditional's
if (question.md.feedback_conditional.length > 0) {
for (var i in question.md.feedback_conditional) {
var fbc = question.check_conditional(question.md.feedback_conditional[i]);
if (fbc) {
feedback += '
' + fbc + '
';
found_feedback_string = true;
break;
}
}
}
// Check for feedback HINT
if (!found_feedback_string && question.md.feedback_hint) {
feedback += '
' + question.md.feedback_hint + '
';
found_feedback_string = true;
}
}
// Check for feedback INCORRECT
if (!found_feedback_string && question.md.feedback_incorrect) {
feedback += '
';
html = dom.createHTML(html);
common.parseMathExpresions(html);
// append the div, then fade it in
$("#question_action_div_" + question.index).prepend(html);
}
});
module.exports = Activity_work_it_out;
/***/ }),
/***/ 102:
/***/ (function(module, exports, __webpack_require__) {
/**
* Created by Abdulnasyrova on 20.04.2017.
*/
var platform = __webpack_require__(0).run_on;
var Query = Essay_Query.extend({
/**
* Get correct HTML for query text and set id for following use
* @returns {string} Html for query text
*/
query_text_html: function() {
if (this.query_text !== '' && this.md._hide_query_text !== 'true') {
// Replace newlines with
var text = jQuery.trim(this.query_text).replace(/\n/g, ' ');
text = text.replace('[hidden]', '' + this.md.hidden +
'' + this.md.reader_only + '');
var id = 'query_text_' + this.query_index;
return '
' + text + '
';
} else {
return '';
}
},
/**
* Add aria-labelledby for textarea
* @param {string} mode
* @returns {string} Html for the question
*/
getHTML: function(mode) {
// Start with the query text, if there
var html = this.query_text_html();
var val = '';
var disabled = '';
if (this.userHasAnswered() && mode !== 'preview') {
// Make sure we convert double quotes to " for placement in 'value="xxx"' attributes
// Convert breaks to newlines
val = this.user_answer.replace(/ /g, '\n');
// Also disable the input if we're not in review_correct_incorrect mode
disabled = (mode !== 'review_correct_incorrect') ? 'disabled' : '';
}
var queryTextId = 'query_text_' + this.query_index;
var feedbackId = 'essay_question_evaluation_feedback_' + this.query_index;
// Add short label for mobile devices
var labelledBy = platform.mobile ? ' aria-label="Enter your answer for the question" aria-labelledby="' + feedbackId + '"' :
' aria-labelledby="' + feedbackId + ' ' + queryTextId + '"';
html += '';
return html;
},
/**
* Fix typo evaluation
* @param {string} html
*/
set_evaluation_feedback: function(html) {
// Set message below the textarea
html = '
' + html + '
';
$('#essay_question_evaluation_feedback_' + this.query_index).remove();
$('#query_answer_' + this.query_index).after(html);
if (platform.ios) {
player.shadow_speech.talk('');
player.shadow_speech.talk($(html).text());
}
}
});
module.exports = Query;
/***/ }),
/***/ 103:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var common = __webpack_require__( 1 );
var dom = __webpack_require__( 2 );
var UtilsShuffle = __webpack_require__( 4 );
var platform = __webpack_require__(0).run_on;
var Query = MC_Query.extend( {
parseSource: function() {
this._super.apply( this, arguments );
if ( UtilsShuffle.currentQuestionIsRandomize() ) {
var shuffleArr = UtilsShuffle.shuffleArrays( this.choices, this.choices_fb, function( choices, choices_fb ) {
this.choices = choices;
this.choices_fb = choices_fb;
}.bind( this ) );
this.correct_answer_index = shuffleArr.indexOf( this.correct_answer_index );
}
},
/**
* Get correct HTML for query text and set id for following use
* @returns {string} Html for query text
*/
query_text_html: function() {
if ( this.query_text != '' && this.md._hide_query_text !== 'true' ) {
// Replace newlines with
var text = jQuery.trim( this.query_text ).replace( /\n/g, ' ' );
// Set id for use it to associate query text with input radios
if ( platform.ios ) {
// iOS doesn't see legend
return '
' + text + '
';
}
else {
return '';
}
}
else {
return '';
}
},
getHTML: function( mode ) {
// Initialize image map elements
if ( this.imagemap_initialized === false ) {
var question_jq = this.jq.parent();
this.im_init( question_jq );
this.imagemap_initialized = true;
}
// Wrap answers in radio group
var html = '";
html = dom.createHTML( html );
common.parseMathExpresions( html );
return html;
},
/**
* If we have individual feedback for each mc option
* @returns {string} Html for the feedback
*/
correct_incorrect_feedback: function() {
// Try get individual feedback for option
var index = this.choice_order[this.user_answer_index]; // Get correct index, if choices are scrambled
var html = this.choices_fb[index] || '';
// If we got any feedback, enclose it in a div
if (html) {
html = '
' + html + '
';
}
return html;
}
} );
module.exports = Query;
/***/ }),
/***/ 104:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var CB_Shuffle = __webpack_require__(99);
var Q = Question.extend({
init: function() {
this._super.apply(this, arguments);
if (this.md["randomize-choices"]) {
CB_Shuffle.shuffle(this.jq);
}
}
});
module.exports = Q;
/***/ }),
/***/ 145:
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(45);
/***/ }),
/***/ 4:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var UtilsShuffle = {};
UtilsShuffle.currentQuestionIsRandomize = function() {
return Boolean(player.activity.question_being_initialized.md["randomize-choices"]);
};
UtilsShuffle.getFilledArr = function(maxValue) {
var arr = [];
for (var i = 0; i < maxValue; i++) {
arr[i] = i;
}
arr.shuffle();
return arr;
};
UtilsShuffle.shuffleArrays = function() {
var arrs = [];
var length = arguments[0].length;
var shuffleArr = UtilsShuffle.getFilledArr(length);
var lengthArguments = arguments.length;
var callBackFunctions = null;
if (typeof arguments[lengthArguments - 1] === 'function') {
lengthArguments--;
callBackFunctions = arguments[lengthArguments];
}
// create new example of arrays
for (var i = 0; i < lengthArguments; i++) {
arrs[i] = [];
}
// shuffle of this arrays
for (var index = 0; index < length; index++) {
var el = shuffleArr[index];
for (var countArrFirst = 0; countArrFirst < lengthArguments; countArrFirst++) {
arrs[countArrFirst].push(arguments[countArrFirst][el]);
}
}
// return this arrays example
if (callBackFunctions) {
callBackFunctions.apply(null, arrs);
}
else {
for (var countArrSecond = 0; countArrSecond < lengthArguments; countArrSecond++) {
arguments[countArrSecond] = arrs[countArrSecond];
}
}
// return array of shuffle index
return shuffleArr;
};
module.exports = UtilsShuffle;
/***/ }),
/***/ 45:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
(function () {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'https://fonts.googleapis.com/css?family=Kalam:700';
document.head.appendChild(link);
})();
(function ($) {
$.fn.changeElementType = function (newType) {
var attrs = {};
$.each(this[0].attributes, function (idx, attr) {
attrs[attr.nodeName] = attr.nodeValue;
});
this.replaceWith(function () {
return $('<' + newType + '/>', attrs).append($(this).contents());
});
};
})(jQuery);
Figures = __webpack_require__(93);
Question = __webpack_require__(96);
Essay_Query = __webpack_require__(92);
MC_Query = __webpack_require__(94);
Standard_Dialog = __webpack_require__(91);
var ProjectPlayer = __webpack_require__(95);
window.player = new ProjectPlayer();
/***/ }),
/***/ 89:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// -----{ Public: }--------->
/**
* Underlines
* @param {string} txt
* @return {*}
*/
function underlinedText (txt) {
var uText = txt.match(/(\__)([a-zA-Z0-9\s\-\’\+\[\]]+)(\__)/g);
if (uText) {
uText.forEach(function (value, i) {
txt = txt.replace(uText[i], '' +
uText[i].substr(2, uText[i].length - 4) + '');
});
}
return txt;
}
/**
* Set live-feedback
* @param {string} type
* @param {string} delay
* @param {string} html
*/
function setFeedbackAndClearAttr (type, delay, html) {
$('.ada-shadow-speech').attr('aria-live', type);
player.shadow_speech.talk(html);
setTimeout('player.shadow_speech.talk("");', delay);
setTimeout('$(".ada-shadow-speech").attr("aria-live", "off");', delay);
}
/**
* creating title
* @param {string} title
* @return {*}
*/
function createTitle (title) {
if (title) {
if (title.indexOf('<') > -1) {
return title.substring(title.indexOf('>') + 1, 0) +
title[title.indexOf('>') + 1].toUpperCase() +
title.substring(title.indexOf('>') + 2);
}
else {
if (title !== '') {
return title[0].toUpperCase() + title.substring(1);
}
else {
return '';
}
}
}
else {
return '';
}
}
var stringWithEmptySymbols = '';
/**
* Adding empty symbols to aria-live fjr mac
* @return {string}
*/
function emptySymbols () {
stringWithEmptySymbols += '\u00A0';
return stringWithEmptySymbols;
}
module.exports = {
underlinedText: underlinedText,
setFeedbackAndClearAttr: setFeedbackAndClearAttr,
emptySymbols: emptySymbols,
createTitle: createTitle
};
/***/ }),
/***/ 90:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var Activity = __webpack_require__(101);
/**
* Get_Correct_ARGA_Grade. There is a bug in Get_ARGA_Grade
* @param {object} query_text .
* @return {bool} it returns -1 when the grade is 0 due to
// use of lenient equality instead of strict equality.
*/
function Get_Correct_ARGA_Grade () {
if (!ARGA_API || ARGA_API.grade === null || ARGA_API.grade === '') {
return -1;
}
else {
return ARGA_API.grade;
}
}
var ProjectActivity = Activity.extend({
/* Need to override this method so we can remove the grade percentage
from the completed message pop-up */
ARGA_initialization_alert: function () {
// This overrides the standard ARGA initialization message, which
// doesn't tell the user he/she can resubmit (or tell him his grade)
// brb: get the correct arga grade (also, see first 'if' below)
// var grade = Get_ARGA_Grade();
var grade = Get_Correct_ARGA_Grade();
//safe_log('ARGA_initialization_alert: grade = ' + grade);
var due_date_passed = (Get_ARGA_Data('due_date_has_passed') == '1');
var msg = '';
var buttons;
due_date_passed = false;
// brb: first comparison must use strict equality otherwise '' is
// converted to 0 which will return false if grade is actually 0
if (grade !== '' && grade != null && grade >= 0) {
// if resubmissions are allowed...
if (player.md.allow_resubmission == 'true') {
if (!due_date_passed) {
msg = '
You have completed this activity, and your grade (' + grade
+ '%) has been submitted. Would you like to:
'
+ '
Keep your current grade '
+ 'and review your previous answers
'
+ '
Or reset your submission and '
+ 'try the activity again?
You have completed this activity, and your grade (' + grade
+ '%) has been submitted. Since the due date for the activity has '
+ 'now passed, you cannot re-submit answers to the activity '
+ 'questions.
';
buttons = [{
text: 'OK',
click: player.activity.ARGA_initialization_final
}];
}
// resubmissions are not allowed
}
else {
// Don't show grade percentage in this message since the
// instructor may have manually changed the grade in the grade
// book and we currently have no way of knowing what it is.
// brb: We can show the grade for these activities because all of
// the questions are MC
msg = '
You have completed this activity. '
+ 'Total Score: ' + grade + '%.
';
buttons = [{
text: 'OK',
click: player.activity.ARGA_initialization_final
}];
}
// grade has not been submitted
}
else {
if (due_date_passed) {
msg = '
The due date for this activity has passed. '
+ 'You can still review the activity, but no answers '
+ 'will be submitted and no grade will be recorded.
'
;
buttons = [{
text: 'OK',
click: player.activity.ARGA_initialization_final
}];
}
}
// if we need a message, show it in a jquery UI dialog
if (msg != '') {
Standard_Dialog.alert(msg, {title: 'Please Note', buttons: buttons});
}
else {
player.activity.ARGA_initialization_final();
}
},
// Redefine this so that the dialog will close (if opened)
ARGA_initialization_final: function (decision) {
// close dialog if open
$('#standard_dialog_div').dialog('close');
if (decision == 'reset') {
ARGA_API.data = [];
Set_ARGA_Grade(-1);
player.user_has_received_completion_alert = false;
Save_ARGA_Data({'show_progress': false});
// start on section 0
player.show_section(0);
// else if user is here for the first time...
}
else if (player.ARGA_submission_initialized == false) {
// initialize the questions
player.activity.ARGA_Initialize_Questions();
// and show the first questions
player.show_section(0);
// otherwise normal re-initialization
}
else {
// restore all saved answers
if (player.md.restore_previous_submissions == 'true') {
player.activity.restore_saved_answers();
}
// grade the activity
player.activity.grade_activity();
// set user_has_received_completion_alert to true
// if the user has already completed the activity
if (Get_ARGA_Data('complete') == 'yes') {
player.user_has_received_completion_alert = true;
}
// restore to previously-viewed section if appropriate
if (player.md.restore_last_viewed_section == 'true') {
player.restore_section();
// otherwise show section 0
}
else {
player.show_section(0);
}
}
},
question_submit_button: function (q) {
var button_html = '';
return button_html;
},
get_points_awarded_html: function (question_index) {
var question = this.questions[question_index];
// calculate points_awarded and points_possible
var points_awarded = 0;
var points_possible = 0;
var points_provisional = false;
for (var i = 0; i < question.queries.length; ++i) {
var query = question.queries[i];
points_awarded += query.getPointsAwarded();
points_possible += query.getPointsPossible();
if (query.pointsAreProvisional() == true) {
points_provisional = true;
}
}
// round to at most two decimal places
points_awarded = Math.round(points_awarded * 100) / 100;
points_possible = Math.round(points_possible * 100) / 100;
var points_html = 'Points awarded: '
+ points_awarded + ' out of ' + points_possible;
if (points_provisional) {
points_html += ' '
+ '('
+ 'provisional)';
}
points_html += '';
return points_html;
},
show_question_feedback: function (question, is_correct, try_again) {
// remove prior feedback if there
$('#question_feedback_' + question.index).remove();
// if question is not answered correctly and they get to try again, show
// hint above question
if (!is_correct && try_again) {
var hint_mesg = '';
if (question.queries[0].getQueryTypeForARGA() === 'multiple choice'
&& question.queries[0].choices_hint[question.queries[0].
user_answer_index]) {
hint_mesg += question.queries[0].choices_hint[question.
queries[0].user_answer_index]
+ ' ';
}
else if (question.md.feedback_hint) {
hint_mesg += question.md.feedback_hint + ' ';
}
question.display_alert_msg(hint_mesg, 'hint');
return;
}
// if this is an MC question then get specific feeback for answer
var mc_fb = '';
if (question.queries[0].getQueryTypeForARGA() == 'multiple choice') {
mc_fb = question.queries[0].correct_incorrect_feedback(null, is_correct);
}
// if we don't have any feedback at all, return
if (!question.md.feedback && !question.md.feedback_correct
&& !question.md.feedback_incorrect && !question.md.feedback_hint && mc_fb
=== '') {
// return;
if (is_correct) {
question.md.feedback_correct = 'Correct!';
}
else {
question.md.feedback_incorrect = 'Incorrect.';
}
}
var html = 'Question '
+ question.index + ' ' + this.feedbackTitle + '';
// if this is an MC question then get specific feeback for answer
if (question.queries[0].getQueryTypeForARGA() == 'multiple choice') {
html += question.queries[0].correct_incorrect_feedback(null, is_correct);
}
// include correct feedback if there and the answer is correct
if (is_correct && question.md.feedback_correct) {
if (question.queries[0].getQueryTypeForARGA() == 'multiple choice') {
html += '
'
+ question.md.feedback_correct + ' The answer is '
+ question.queries[0].choice_ids[question.queries[0].
feedback_correct_answer_index]
+ '.
';
}
else {
html += '
'
+ question.md.feedback_correct + '
';
}
}
// include incorrect or hint feedback if there and the answer is incorrect
if (!is_correct) {
var found_feedback_string = false;
// if user gets to try again...
if (try_again) {
// check for feedback_conditional's
if (question.md.feedback_conditional.length > 0) {
// for (var i in question.md.feedback_conditional) {
for (var i = 0; i < question.md.feedback_conditional.length; i++) {
var fbc = question.check_conditional(
question.md.feedback_conditional[i]);
if (fbc != '') {
html += '
' + fbc + '
';
found_feedback_string = true;
break;
}
}
}
}
// if we didn't find a feedback string to use above, check for
// feedback_incorrect
if (!found_feedback_string && question.md.feedback_incorrect) {
if (question.queries[0].getQueryTypeForARGA() == 'multiple choice') {
html += '
'
+ question.md.feedback_incorrect
+ ' The correct answer is '
+ question.queries[0].choice_ids[question.queries[0].
feedback_correct_answer_index]
+ '.
';
}
else {
html += '
'
+ question.md.feedback_incorrect + '
';
}
}
}
// include general feedback if there
if (question.md.feedback) {
html += '
' + question.md.feedback
+ '
';
}
// not displaying points
// html += player.activity.get_points_awarded_html(question.index);
// close question_feedback div
html += '';
// use display_feedback_mesg to add feedback to question
question.display_feedback_mesg(html);
},
restore_saved_answers: function () {
// skip page queries (questions[0])
for (var i = 1; i < this.questions.length; ++i) {
var question = this.questions[i];
// prepare for question_report_text questions
var query_responses;
if (question.md_set('question_report_text')) {
query_responses = '' + Get_ARGA_QuestionData(
this.get_question_number(question));
query_responses = query_responses.split(this.query_responses_separator);
}
var restored_all_answers = true;
var all_answers_correct = true;
for (var j = 0; j < question.queries.length; ++j) {
var query = question.queries[j];
var saved_answer;
var saved_grade;
if (question.md_set('question_report_text')) {
if (query_responses[j] != null) {
var arr = query_responses[j].split(
this.query_responses_grade_separator);
saved_answer = arr[0];
saved_grade = arr[1];
}
else {
saved_grade = saved_answer = '';
}
// or out of learnerResponse / questionData for single-query questions
}
else {
var ARGA_question_number = this.get_query_number(question, j);
saved_answer = Get_ARGA_LearnerResponse(ARGA_question_number);
// we stored the original grade in questionData
saved_grade = Get_ARGA_QuestionData(ARGA_question_number);
}
// if we found a grade...
if (saved_grade !== '' && saved_grade >= 0) {
// restore the answer
query.restoreAnswerFromARGA(saved_answer);
query.setGrade(saved_grade);
// then re-render the query in review mode
query.jq.html(query.getHTML('review'));
if (query.isCorrect() == false) {
all_answers_correct = false;
}
}
else {
restored_all_answers = false;
}
}
if (restored_all_answers) {
// update the submit div for the question
this.update_question_action_div(i);
// Show appropriate feedback. If the question responses were submitted,
// the student must have finished the question, so we don't have to worr
// y
// about hints.
this.show_question_feedback(question, all_answers_correct, false);
// if the item is in a sequence, show the next question
this.show_next_question(question);
// NEED TO CHECK TO MAKE SURE THIS IS WORKING PROPERLY
var qs = question.question_sequence;
if (qs != null && qs.sequence_complete == 'partial') {
this.show_closing_material(qs.index);
}
var $submit_button = $('#question_submit_button_' + i);
$submit_button.hide();
} // end restored_all_answers
} // end for loop
},
// We are not going to show this message but rather the message in
// show_completion_message
show_grade_saved_message: function () {
return;
// if the user has answered all queries AND the user hasn't been
// told this already, tell them now
},
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];
if (!question.$alert) {
question.$alert = null;
}
// Force all queries to be answered before doing anything
for (var i = 0; i < question.queries.length; i++) {
var query = question.queries[i];
if (query.jq[0].children[0].tagName == 'FIELDSET') {
var answered = query.user_has_answered();
}
else {
var answered = query.user_has_answered(query.jq[0].children[1].value);
}
if (!answered) {
var queryMatch = query.query_source.match(/^(.*)?:/);
var isEssayQuery = queryMatch && queryMatch[1] === 'ES';
var alertId = 'question-' + question_index + '-alert';
question.$alert = question.display_alert_msg('You must answer the question before submitting.', 'error', !isEssayQuery, alertId);
if (query.jq[0].children[1] !== undefined) {
if (isEssayQuery) {
query.focus_user_input(alertId);
}
}
return false;
}
else if (question.$alert) {
question.$alert.remove();
}
}
player.activity.disable_submit_button(question_index);
// if we made it here then remove any alert messages
question.remove_alert_mesg();
var all_answers_correct = true;
// for each query in the question...
for (var i = 0; i < question.queries.length; ++i) {
var query = question.queries[i];
var answer_submittable = query.evaluateAnswer(question_index);
if (answer_submittable === false) {
return;
}
/* for (var i=0; i<4; i++) {
if (question.queries[0].choice_order[i]==question.queries[0].
correct_answer_index) {
question.queries[0].correct_answer_index=i;
}
}*/
all_answers_correct = all_answers_correct && query.isCorrect();
}
for (var i = 0; i < question.queries.length; ++i) {
var query = question.queries[i];
query.jq.html(query.getHTML('review_correct_incorrect'));
}
// update question tries
++question.tries;
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);
}
$('[data-question_index="' + question_index + '"]').addClass('answered');
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 (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);
}
}
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;
}
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();
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();
// if we're on the last page and user has answered all queries,
// show completion message
var feedback_string = $('#question_' + question_index + '_fb_mesg').html();
if (player.showing_last_section() && player.activity.answered_all_queries) {
player.activity.show_completion_message(feedback_string);
}
else {
player.update_live_feedback(feedback_string);
}
},
show_completion_message: function (pre_text) {
var completion_text = 'You have completed this activity. Total Score: '
+ this.grade_percent + '%.';
var html = pre_text + ' ' + completion_text;
$('#manuscript').append('
Activity Completed
'
+ completion_text + '
');
player.update_live_feedback(html);
},
disable_submit_button: function (q_idx) {
var $submit_button = $('#question_submit_button_' + q_idx);
$submit_button.attr({
'tabindex': '-1',
'aria-disabled': 'true'
}).addClass('disabled');
$submit_button.unbind('click');
},
// we aren't going to use this one any more
update_question_action_div: function (question_index) {
return;
}
});
module.exports = ProjectActivity;
/***/ }),
/***/ 91:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var KEY_CODES = __webpack_require__(1).KEYCODES;
var Standard_Dialog = function () {
var $manuscript = $('#manuscript');
var $body = $('body');
var $dialog;
var $content;
var options = {};
return {
open: function (html, opt) {
// Extend default options
options = $.extend(true, (opt || {}), {
width: 450,
modal: true,
draggable: false,
resizable: false
});
// Set buttons
if (options.buttons === 'none') {
options.buttons = null;
}
else if (options.buttons === 'OK' || !options.buttons) {
options.buttons = [{text: 'OK', click: Standard_Dialog.close}];
}
// Remove previous dialog
$('#standard_dialog_div').dialog('close').remove();
if (options.modal) {
$body.css('overflow', 'hidden');
}
// Hide other content from reader for mobile devices
$manuscript.attr('aria-hidden', 'true');
$dialog = $('');
$content = $('
' + (html || '') + '
');
$dialog.append($content);
$dialog.dialog(options);
var $parentDialog = $dialog.parent().attr({
'tabindex': '0',
'role': 'alertdialog',
'aria-labelledby': 'ui-dialog-title-standard_dialog_div',
'aria-describedby': 'standard_dialog_div'
});
$parentDialog.find('#ui-dialog-title-standard_dialog_div').attr({
'role': 'heading',
'aria-level': '1'
});
// Remove close btn
$('.ui-dialog-titlebar-close').remove();
var $lastBtn = $parentDialog.find('button').last();
var $firstBtn = $parentDialog.find('button').first();
// Attach events
$parentDialog.bind('keydown', function (e) {
var code = e.keyCode || e.which;
if (code === KEY_CODES.ESC) {
if (typeof options.buttons[0].click === 'function') {
options.buttons[0].click();
$('#manuscript').click();
}
else {
Standard_Dialog.close(true);
}
}
if (e.target === this && e.shiftKey && code === KEY_CODES.TAB) {
e.preventDefault();
$lastBtn.focus();
}
});
$lastBtn.bind('keydown', function (e) {
var code = e.keyCode || e.which;
if (!e.shiftKey && code === KEY_CODES.TAB) {
$parentDialog.focus();
e.preventDefault();
}
});
$firstBtn.focus();
},
wait: function (html, opt) {
options = opt || {};
options.buttons = 'none';
Standard_Dialog.open(html, options);
},
alert: function (html, opt) {
Standard_Dialog.open(html, opt);
},
close: function () {
// Show other content
$manuscript.removeAttr('aria-hidden');
$dialog.dialog('close').remove();
if (options.from) {
options.from.focus();
}
if (options.modal) {
$body.css('overflow', 'auto');
}
}
};
}();
module.exports = Standard_Dialog;
/***/ }),
/***/ 92:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ES_Query = __webpack_require__(102);
var Auxiliary = __webpack_require__(89);
var platform = __webpack_require__(0).run_on;
var ProjectEssay = ES_Query.extend({
focus_user_input: function (alertId, delay) {
alertId = alertId || '';
delay = delay || 2000;
var $textArea = $('#query_answer_' + this.query_index);
var ariaLabelledBy = $textArea.attr('aria-labelledby') || '';
$textArea.attr('aria-labelledby', alertId + ' ' + ariaLabelledBy);
// TalkBack doesn't set focus own focus to the textarea, when the keyboard is already visible, and then textarea's label doesn't read
// So we set focus via 0 delay
if (platform.android) {
setTimeout(function () {
$textArea.focus();
}, 0);
}
else {
$textArea.focus();
}
if (platform.firefox) {
$textArea.bind('blur', function () {
setTimeout(function () {
$textArea.attr('aria-labelledby', ariaLabelledBy);
$textArea.unbind('blur');
}, 0);
});
}
else {
setTimeout(function () {
$textArea.attr('aria-labelledby', ariaLabelledBy);
}, delay);
}
},
user_has_answered: function (text) {
return (text != '' && text != null);
},
getHTML: function (mode) {
// Start with the query text, if there
var html = this.query_text_html();
var val = '';
var disabled = '';
if (this.userHasAnswered() && mode !== 'preview') {
val = this.user_answer.replace(/ /g, '\n');
// Also disable the input if we're not in review_correct_incorrect mode
disabled = (mode !== 'review_correct_incorrect') ? 'disabled' : '';
}
// var queryTextId = 'query_text';
// var feedbackId = 'essay_question_evaluation_feedback_' +
// this.query_index + ' question_feedback_' + (this.query_index + 1);
var labelledBy=' aria-labelledby=query_text_' + this.query_index;
/* var labelledBy = (platform.android || platform.ios) ?
' aria-labelledby="' + feedbackId + ' ' + queryTextId +
'"' : ' aria-labelledby="' + queryTextId + '"'; */
html += '';
if (this.answer_was_just_entered && this.grade == 100 &&
this.md.points_are_provisional == 'true') {
/* html += '
Your answer'
+ ' has been provisionally accepted. You will get full credit for now, '
+ 'but your instructor may update your grade later after evaluating '
+ 'it.
';*/
}
return html;
},
query_text_html: function () {
if (this.query_text !== '' && this.md._hide_query_text !== 'true') {
var text = jQuery.trim( this.query_text );
text = Auxiliary.underlinedText(text);
// Replace newlines with
text = jQuery.trim(text).replace(/\n/g, ' ');
var id = 'query_text_' + this.query_index;
// Old comment in sciam project by someone:
// "I don't know why question for textarea was changed by _
// and actual question is placed before textarea just in
,
// but we don't need this label"
if (text !== '_') {
return '
'
+ text + '
';
}
else {
return '';
}
}
}
});
module.exports = ProjectEssay;
/***/ }),
/***/ 93:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var Figures = __webpack_require__(100);
var ProjectFigures = Figures.extend({
bcVideo: {}, // holds all of the video players (by ID)
bcPlayerData: {'accountId': '1500315202001', 'playerId': 'B1AhVYg4l'},
process_media: function () {
var context = this; // safe off 'this'
// Process each video
$('[data-mmtype="mov"]').each(function () {
var $this = $(this);
var $parent = $this.parent('[data-type="figure"]');
var video_mmsrc = $this.attr('data-mmsrc');
var video_id = $parent.attr('data-figure-id');
// Replace the current figure HTML with the new HTML5 video HTML
var playerHTML = '
'
+ '
'
+ '
';
$parent.before(playerHTML);
$parent.remove();
bc(document.getElementById(video_id));
videojs(video_id).ready(function () {
context.bcVideo[video_id] = this;
/*
// reset the video to the beginning after it ends
context.bcVideo[video_id].on('ended', function() {
context.bcVideo[video_id].currentTime(0);
context.bcVideo[video_id].pause();
$('#' + video_id).removeClass('vjs-has-started');
});
context.bcVideo[video_id].on('play', function() {
$('#' + video_id).addClass('vjs-has-started');
});
*/
}); // end ready
});
}
});
module.exports = ProjectFigures;
/***/ }),
/***/ 94:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var MC_Query = __webpack_require__(103);
var platform = __webpack_require__(0).run_on;
var utils = __webpack_require__(97);
/**
* clean_query_text.
* @param {object} query_text .
* @return {object} .
*/
function clean_query_text (query_text) {
query_text = query_text.replace(/]+>/g, '');
query_text = query_text.replace(/<\/span>/g, '');
query_text = query_text.replace(//g, '');
query_text = query_text.replace(/<\/em>/g, '');
query_text = query_text.replace(/ /g, '');
query_text = query_text.replace(/ /g, '');
query_text = query_text.replace(/’/g, '\'');
query_text = query_text.replace(/“/g, '\"');
query_text = query_text.replace(/”/g, '\"');
query_text = query_text.replace(/—/g, '--');
query_text = query_text.replace(/–/g, '-');
query_text = query_text.replace(/<a .*?>/g, '');
query_text = query_text.replace(/<\/a>/g, '');
return query_text;
}
var ProjectMC = MC_Query.extend({
getQueryTextForARGA: function () {
if (this.query_text_for_ARGA != null &&
this.query_text_for_ARGA != '') {
return this.query_text_for_ARGA;
}
else if (this.query_text != null && this.query_text != '') {
var cleaned_text = clean_query_text(this.query_text);
return cleaned_text;
}
else {
return 'see page for question context';
}
},
user_has_answered: function () {
if ($('input:radio[name=query_answer_' + this.query_index
+ ']:checked').val() !== undefined) {
return true;
}
else {
return false;
}
},
parseSource: function () {
// initialize vars
this.choices = [];
this.choices_fb = [];
this.choices_hint = [];
this.choice_ids = [];
this.correct_answer_index = null;
this.user_answer_index = null;
this.queryId = 'mc-query-' + this.query_index;
// lines might start with 'MC:'; if so, strip it out
var s = this.query_source.replace(/^MC:\s*/, '');
// split and go through the lines
var lines = s.split(this.line_separator);
this.query_text = '';
// the first choice has to be 'a' or 'A'
var choice_re = /^[\*]?([aA])[\.:\)]/;
for (var i = 0; i < lines.length; ++i) {
// get line and trim whitespace
var l = $.trim(lines[i]);
// choice
if (l.search(choice_re) > -1) {
var ident = RegExp.$1;
var choice_text = l.replace(/^[\*]?\w[\.:\)]\s*/, '');
ident = ident.toUpperCase();
// extract feedback for the choice, if there
var choice_fb = null;
if (/\[\[/.test(choice_text)) {
choice_text = choice_text.replace(/\s*\[\[(.*?)\]\]\s*/, '');
choice_fb = RegExp.$1;
// if feedback is simply 'correct' or 'incorrect', ignore it.
if (choice_fb.toLowerCase() == 'correct' || choice_fb.toLowerCase()
== 'incorrect') {
choice_fb = null;
}
}
// extract choice hint
var choice_hint = null;
if (/{{/.test(choice_text)) {
choice_text = choice_text.replace(/\s*{{(.*?)}}\s*/, '');
choice_hint = RegExp.$1;
}
this.choices.push(choice_text);
this.choices_fb.push(choice_fb);
this.choices_hint.push(choice_hint);
this.choice_ids.push(ident);
// if line started with *, it's the correct answer
if (l.search(/^[\*]/) > -1) {
// correct_choice = ident;
this.correct_answer_index = this.choice_ids.length - 1;
}
// update choice_re so that any letter is OK from here on
choice_re = /^[\*]?(\w)[\.:\)]/;
// points_possible
}
else if (l.search(/^_points:\s*(\d+)/i) > -1) {
this.points_possible = RegExp.$1;
// metadata -- starts with '_[a-zA-Z]'
}
else if (l.search(/^\_[a-zA-Z]/) > -1) {
this.extractMetadata(l);
// by default add it to the query text
}
else {
this.query_text += l + '\n';
}
}
// now we should be done with the query text. Strip trailing white space
this.query_text = this.query_text.replace(/\s*$/, '');
// shuffle choices, unless md.never_scramble is true
this.choice_order = [];
for (var j = 0; j < this.choices.length; ++j) {
this.choice_order[j] = j;
}
if (this.md.never_scramble != 'true') {
this.choice_order.shuffle();
}
// if no correct answer was given, we need to explicitly note that.
if (this.correct_answer_index == null) {
this.md.no_correct_answer = 'true';
}
this.feedback_correct_answer_index = 0;
this.choice_order.forEach(function (item, index) {
if (item === this.correct_answer_index) {
this.feedback_correct_answer_index = index;
}
}.bind(this));
// replace any remaining \n's with
// NO: we're doing this in getHTML instead now
// this.query_text = this.query_text.replace(/\n/g, '
');
},
correct_incorrect_feedback: function (mode, is_correct) {
var html = '';
// get correct answer as presented to user
for (var i = 0; i < this.choices.length; ++i) {
if (this.choice_order[i] == this.correct_answer_index) {
break;
}
}
if (this.user_answer_index != null
&& this.choices_fb[this.user_answer_index] != null) {
html += this.choices_fb[this.user_answer_index];
}
// now, if we got any feedback, enclose it in a div
if (html != '') {
html = '' + html
+ '';
}
return html;
},
getHTML: function (mode) {
// initialize imagemap elements
if (this.imagemap_initialized === false) {
var question_jq = this.jq.parent();
this.im_init(question_jq);
this.imagemap_initialized = true;
}
// start with the query text, if there
// var html = ''
// + '
' + this.choice_ids[z] + '.
'
+ '<' + label_elem + ' class="label" id="query_answer_label_'
+ this.query_index + '_' + index + '"';
html += ' for="query_answer_' + this.query_index + '_' + index + '"';
html += '>'
+ '' + letters[z] + ' '
+ ''
+ choiceText
+ mc_answer_info
+ '' + label_elem + '> ';
}
}
html += '';
if (fieldset_disabled) {
html = '