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OAAO,KAEnB,CACA,iBAAA0N,GACI,OAAItO,KAAKG,gBACEH,KAAKoO,wBAELpO,KAAKqO,uBAEpB,CACA,YAAAE,GACI,IAAK,IAAIxM,EAAI,EAAGA,EAAI/B,KAAK8N,kBAAkB9L,OAAQD,IAC/CzB,EAAEN,KAAK8N,kBAAkB/L,IAAI2L,MAErC,CAEA,qBAAAc,GACI,IAAItK,EAAOlE,KACPmE,EAAa,WACbD,EAAKE,YAAa,CACtB,EACA,IAAK,IAAIqK,KAAOzO,KAAK8D,YACjB2K,EAAI1J,MAAME,QAAUd,CAE5B,OAGoC,IAA7BwI,OAAO+B,oBACd/B,OAAO+B,kBAAoB,CAAC,GAGhC/B,OAAO+B,kBAAkBC,eAAiB,SAAU9O,GAChD,OAAIA,EAAK+O,MACE,IAAI/B,EAAQhN,GAEZ,IAAIF,EAAeE,EAElC,C","sources":["webpack://WebComponents/./runestone/mchoice/js/mchoice.js","webpack://WebComponents/./runestone/mchoice/js/timedmc.js"],"sourcesContent":["/*==========================================\n======== Master mchoice.js =========\n============================================\n=== This file contains the JS for the ===\n=== Runestone multiple choice component. ===\n============================================\n=== Created By ===\n=== Isaiah Mayerchak ===\n=== and ===\n=== Kirby Olson ===\n=== 6/4/15 ===\n==========================================*/\n\nimport RunestoneBase from \"../../common/js/runestonebase.js\";\n//import \"./../styles/runestone-custom-sphinx-bootstrap.css\";\nimport \"../css/mchoice.css\";\n\n// MC constructor\nexport default class MultipleChoice extends RunestoneBase {\n constructor(opts) {\n super(opts);\n opts = opts || {};\n var orig = opts.orig; // entire
``, put the label inside of it. (Sphinx 2.0 puts all content in a ``
``, while Sphinx 1.8 doesn't).\n var content = this.answerList[k].content;\n var prefix = \"\";\n if (content.startsWith(\"
\")) {\n prefix = \"
\";\n content = content.slice(3);\n }\n $(label).html(\n `${prefix}${String.fromCharCode(\n \"A\".charCodeAt(0) + j\n )}. ${content}`\n );\n // create the object to store in optionArray\n var optObj = {\n input: $(label).find(\"input\")[0],\n label: label,\n };\n optObj.input.onclick = answerFunc;\n\n this.optionArray.push(optObj);\n // add the option to the form\n this.optsForm.appendChild(label);\n this.optsForm.appendChild(document.createElement(\"br\"));\n }\n }\n\n renderMCFormButtons() {\n // submit and compare me buttons\n // Create submit button\n this.submitButton = document.createElement(\"button\");\n this.submitButton.textContent = \"Check Me\";\n $(this.submitButton).attr({\n class: \"btn btn-success\",\n name: \"do answer\",\n type: \"button\",\n });\n if (this.multipleanswers) {\n this.submitButton.addEventListener(\n \"click\",\n function() {\n this.processMCMASubmission(true);\n }.bind(this),\n false\n );\n } else {\n this.submitButton.addEventListener(\n \"click\",\n function(ev) {\n ev.preventDefault();\n this.processMCMFSubmission(true);\n }.bind(this),\n false\n );\n } // end else\n this.optsForm.appendChild(this.submitButton);\n // Create compare button\n if (this.useRunestoneServices && !eBookConfig.peer) {\n this.compareButton = document.createElement(\"button\");\n $(this.compareButton).attr({\n class: \"btn btn-default\",\n id: this.divid + \"_bcomp\",\n disabled: \"\",\n name: \"compare\",\n });\n this.compareButton.textContent = \"Compare me\";\n this.compareButton.addEventListener(\n \"click\",\n function() {\n this.compareAnswers(this.divid);\n }.bind(this),\n false\n );\n this.optsForm.appendChild(this.compareButton);\n }\n }\n\n renderMCfeedbackDiv() {\n this.feedBackDiv = document.createElement(\"div\");\n this.feedBackDiv.id = this.divid + \"_feedback\";\n this.containerDiv.appendChild(document.createElement(\"br\"));\n this.containerDiv.appendChild(this.feedBackDiv);\n }\n\n randomizeAnswers() {\n // Makes the ordering of the answer choices random\n var currentIndex = this.indexArray.length,\n temporaryValue,\n randomIndex;\n // While there remain elements to shuffle...\n while (currentIndex !== 0) {\n // Pick a remaining element...\n randomIndex = Math.floor(Math.random() * currentIndex);\n currentIndex -= 1;\n // And swap it with the current element.\n temporaryValue = this.indexArray[currentIndex];\n this.indexArray[currentIndex] = this.indexArray[randomIndex];\n this.indexArray[randomIndex] = temporaryValue;\n var temporaryFeedback = this.feedbackList[currentIndex];\n this.feedbackList[currentIndex] = this.feedbackList[randomIndex];\n this.feedbackList[randomIndex] = temporaryFeedback;\n }\n }\n\n /*===================================\n === Checking/loading from storage ===\n ===================================*/\n restoreAnswers(data) {\n // Restore answers from storage retrieval done in RunestoneBase\n // sometimes data.answer can be null\n if (!data.answer) {\n data.answer = \"\";\n }\n var answers = data.answer.split(\",\");\n for (var a = 0; a < answers.length; a++) {\n var index = answers[a];\n for (var b = 0; b < this.optionArray.length; b++) {\n if (this.optionArray[b].input.value == index) {\n $(this.optionArray[b].input).attr(\"checked\", \"true\");\n }\n }\n }\n if (this.multipleanswers) {\n this.processMCMASubmission(false);\n } else {\n this.processMCMFSubmission(false);\n }\n }\n\n checkLocalStorage() {\n // Repopulates MCMA questions with a user's previous answers,\n // which were stored into local storage.\n var storedData;\n var answers;\n if (this.graderactive) {\n return;\n }\n var len = localStorage.length;\n if (len > 0) {\n var ex = localStorage.getItem(this.localStorageKey());\n if (ex !== null) {\n try {\n storedData = JSON.parse(ex);\n answers = storedData.answer.split(\",\");\n } catch (err) {\n // error while parsing; likely due to bad value stored in storage\n console.log(err.message);\n localStorage.removeItem(this.localStorageKey());\n return;\n }\n for (var a = 0; a < answers.length; a++) {\n var index = answers[a];\n for (var b = 0; b < this.optionArray.length; b++) {\n if (this.optionArray[b].input.value == index) {\n $(this.optionArray[b].input).attr(\n \"checked\",\n \"true\"\n );\n }\n }\n }\n if (this.useRunestoneServices) {\n this.enableMCComparison();\n this.getSubmittedOpts(); // to populate givenlog for logging\n if (this.multipleanswers) {\n this.logMCMAsubmission();\n } else {\n this.logMCMFsubmission();\n }\n }\n }\n }\n }\n\n setLocalStorage(data) {\n var timeStamp = new Date();\n var storageObj = {\n answer: data.answer,\n timestamp: timeStamp,\n correct: data.correct,\n };\n localStorage.setItem(\n this.localStorageKey(),\n JSON.stringify(storageObj)\n );\n }\n\n /*===============================\n === Processing MC Submissions ===\n ===============================*/\n processMCMASubmission(logFlag) {\n // Called when the submit button is clicked\n this.getSubmittedOpts(); // make sure this.givenArray is populated\n this.scoreMCMASubmission();\n this.setLocalStorage({\n correct: this.correct ? \"T\" : \"F\",\n answer: this.givenArray.join(\",\"),\n });\n if (logFlag) {\n this.logMCMAsubmission();\n }\n if (!eBookConfig.peer || eBookConfig.isInstructor) {\n this.renderMCMAFeedBack();\n if (this.useRunestoneServices) {\n this.enableMCComparison();\n }\n } else {\n // acknowledge submission\n if (eBookConfig.peer &&\n eBookConfig.peerMode === \"async\" &&\n typeof studentVoteCount !== \"undefined\" &&\n studentVoteCount > 1) {\n this.renderMCMAFeedBack();\n } else {\n $(this.feedBackDiv).html(\"
Your Answer has been recorded
\");\n $(this.feedBackDiv).attr(\"class\", \"alert alert-info\");\n }\n }\n }\n\n getSubmittedOpts() {\n var given;\n this.singlefeedback = \"\"; // Used for MCMF questions\n this.feedbackString = \"\"; // Used for MCMA questions\n this.givenArray = [];\n this.givenlog = \"\";\n var buttonObjs = this.optsForm.elements.group1;\n for (var i = 0; i < buttonObjs.length; i++) {\n if (buttonObjs[i].checked) {\n given = buttonObjs[i].value;\n this.givenArray.push(given);\n this.feedbackString += `Your Answer has been recorded
\");\n $(this.feedBackDiv).attr(\"class\", \"alert alert-info\");\n }\n }\n }\n\n scoreMCMFSubmission() {\n this.answer = this.givenArray[0];\n if (this.givenArray[0] == this.correctIndexList[0]) {\n this.correct = true;\n this.percent = 1.0;\n } else if (this.givenArray[0] != null) {\n // if given is null then the question wasn\"t answered and should be counted as skipped\n this.correct = false;\n this.percent = 0.0;\n }\n }\n\n async logMCMFsubmission(sid) {\n // If there's no answer provided (the array is empty), use a blank for the answer.\n var answer = this.givenArray[0] || \"\";\n var correct =\n this.givenArray[0] == this.correctIndexList[0] ? \"T\" : \"F\";\n var logAnswer =\n \"answer:\" + answer + \":\" + (correct == \"T\" ? \"correct\" : \"no\"); // backward compatible\n let data = {\n event: \"mChoice\",\n act: logAnswer,\n answer: answer,\n correct: correct,\n div_id: this.divid,\n };\n if (eBookConfig.peer && typeof studentVoteCount !== \"undefined\") {\n data.act = data.act + `:vote${studentVoteCount}`;\n }\n if (typeof sid !== \"undefined\") {\n data.sid = sid;\n }\n await this.logBookEvent(data);\n }\n\n renderMCMFFeedback() {\n let correct = this.givenArray[0] == this.correctIndexList[0];\n let feedbackText = this.singlefeedback;\n\n if (correct) {\n $(this.feedBackDiv).html(\"✔️ \" + feedbackText);\n $(this.feedBackDiv).attr(\"class\", \"alert alert-info\"); // use blue for better red/green blue color blindness\n } else {\n if (feedbackText == null) {\n feedbackText = \"\";\n }\n $(this.feedBackDiv).html(\"✖️ \" + feedbackText);\n $(this.feedBackDiv).attr(\"class\", \"alert alert-danger\");\n }\n }\n enableMCComparison() {\n if (eBookConfig.enableCompareMe) {\n this.compareButton.disabled = false;\n }\n }\n instructorMchoiceModal(data) {\n // data.reslist -- student and their answers\n // data.answerDict -- answers and count\n // data.correct - correct answer\n var res = \"Student | Answer(s) |
---|---|
\" +\n data[i][0] +\n \" | \" +\n data[i][1] +\n \" |
Answer | Percent |
---|---|
\" + kl[k] + \" | \";\n var pct = answers[kl[k]] + \"%\";\n body += \" \";\n body +=\n \" \";\n body += \" |
You have \" +\n misc.yourpct +\n \"% correct for all questions
\";\n }\n if (datadict.reslist !== undefined) {\n body += this.instructorMchoiceModal(datadict.reslist);\n }\n var html =\n \"