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B,GAGV,GAFA8G,MAAM2oB,WAAWzvB,IAEb+Q,EAAAA,EAAAA,UAASpX,KAAKqG,QAAQ/F,UAAW,CACnC,MAAMA,EAAWN,KAAKqG,QAAQ/F,SAAS+W,OACvCrX,KAAKM,SAAWc,EAAEd,EACpB,CACF,CAEAygD,WAAAA,GACE5zC,MAAM4zC,cAEN/gD,KAAKwhD,WAAWxhD,KAAKM,UACrBN,KAAKM,SAASmG,MAChB,E,YCtBF,SAASi7C,EAAoBC,GAC5B,IAAIC,EAAI,IAAIjwB,MAAM,uBAAyBgwB,EAAM,KAEjD,MADAC,EAAElf,KAAO,mBACHkf,CACP,CACAF,EAAoBn4B,KAAO,IAAM,GACjCm4B,EAAoBG,QAAUH,EAC9BA,EAAoBh/C,GAAK,MACzBhG,EAAOC,QAAU+kD,C,YCRjB,SAASA,EAAoBC,GAC5B,IAAIC,EAAI,IAAIjwB,MAAM,uBAAyBgwB,EAAM,KAEjD,MADAC,EAAElf,KAAO,mBACHkf,CACP,CACAF,EAAoBn4B,KAAO,IAAM,GACjCm4B,EAAoBG,QAAUH,EAC9BA,EAAoBh/C,GAAK,MACzBhG,EAAOC,QAAU+kD,C","sources":["webpack://app/./app/javascript/init/moment-timezone.userPref.js","webpack://app/./app/assets/javascripts/helpers/date.js","webpack://app/./app/assets/javascripts/templates/environment_templates/new.jst.eco","webpack://app/./app/assets/javascripts/helpers/environment.js","webpack://app/./app/assets/javascripts/helpers/lti.js","webpack://app/./app/assets/javascripts/helpers/metadata.js","webpack://app/./app/assets/javascripts/helpers/modal.js","webpack://app/./app/assets/javascripts/templates/select_values.jst.eco","webpack://app/./app/assets/javascripts/helpers/model.js","webpack://app/./app/assets/javascripts/helpers/model_binder.js","webpack://app/./app/assets/javascripts/helpers/zendesk.js","webpack://app/./app/assets/javascripts/models/adaptive_pathway.js","webpack://app/./app/assets/javascripts/models/adaptive_review.js","webpack://app/./app/assets/javascripts/models/assessment.js","webpack://app/./app/assets/javascripts/models/part_answer.js","webpack://app/./app/assets/javascripts/models/attempt.js","webpack://app/./app/assets/javascripts/models/issue.js","webpack://app/./app/assets/javascripts/models/assessment_item.js","webpack://app/./app/assets/javascripts/models/assessment_session.js","webpack://app/./app/assets/javascripts/models/assignment.js","webpack://app/./app/assets/javascripts/models/assignment_prerequisite.js","webpack://app/./app/assets/javascripts/models/assignment_template.js","webpack://app/./app/assets/javascripts/models/assignment_view_fields.js","webpack://app/./app/assets/javascripts/models/bit_field.js","webpack://app/./app/assets/javascripts/models/cart_item.js","webpack://app/./app/assets/javascripts/models/cart.js","webpack://app/./app/assets/javascripts/models/environment.js","webpack://app/./app/assets/javascripts/models/environment_template.js","webpack://app/./app/assets/javascripts/models/grade.js","webpack://app/./app/assets/javascripts/models/grade_book_category.js","webpack://app/./app/assets/javascripts/models/grade_book.js","webpack://app/./app/assets/javascripts/models/hotspot.js","webpack://app/./app/assets/javascripts/models/manual_problem_score.js","webpack://app/./app/assets/javascripts/models/modules/assessable.js","webpack://app/./app/assets/javascripts/models/modules/exportable.js","webpack://app/./app/assets/javascripts/models/transaction.js","webpack://app/./app/assets/javascripts/models/section_license.js","webpack://app/./app/assets/javascripts/models/student_license.js","webpack://app/./app/assets/javascripts/models/order.js","webpack://app/./app/assets/javascripts/models/modules/insights_answers.js","webpack://app/./app/assets/javascripts/models/part.js","webpack://app/./app/assets/javascripts/models/parts/free_response.js","webpack://app/./app/assets/javascripts/models/parts/multiple_choice.js","webpack://app/./app/assets/javascripts/models/parts/multiple_answer.js","webpack://app/./app/assets/javascripts/models/parts/matching.js","webpack://app/./app/assets/javascripts/models/parts/either_or.js","webpack://app/./app/assets/javascripts/models/parts/informational.js","webpack://app/./app/assets/javascripts/models/parts/essay.js","webpack://app/./app/assets/javascripts/models/parts/show_work.js","webpack://app/./app/assets/javascripts/collections/hotspot.js","webpack://app/./app/assets/javascripts/models/parts/hotspot_interaction.js","webpack://app/./app/assets/javascripts/models/parts/label_image.js","webpack://app/./app/assets/javascripts/models/parts/select_point.js","webpack://app/./app/assets/javascripts/models/parts/file_upload.js","webpack://app/./app/assets/javascripts/models/parts/reported_unit_test.js","webpack://app/./app/assets/javascripts/models/parts/unit_testing.js","webpack://app/./app/assets/javascripts/models/parts/generated_part.js","webpack://app/./app/assets/javascripts/models/parts/webwork.js","webpack://app/./app/assets/javascripts/models/parts/webwork_subpart.js","webpack://app/./app/assets/javascripts/models/parts/draggable_sequence.js","webpack://app/./app/assets/javascripts/models/part_factory.js","webpack://app/./app/assets/javascripts/collections/part.js","webpack://app/./app/assets/javascripts/models/parts/chunk.js","webpack://app/./app/assets/javascripts/models/parts/container.js","webpack://app/./app/assets/javascripts/models/parts/part_table.js","webpack://app/./app/assets/javascripts/models/pool.js","webpack://app/./app/assets/javascripts/models/print_variation.js","webpack://app/./app/assets/javascripts/models/content_license.js","webpack://app/./app/assets/javascripts/models/difficulty.js","webpack://app/./app/assets/javascripts/models/problem.js","webpack://app/./app/assets/javascripts/models/problem_annotation.js","webpack://app/./app/assets/javascripts/models/problem_set.js","webpack://app/./app/assets/javascripts/models/question.js","webpack://app/./app/assets/javascripts/models/registration.js","webpack://app/./app/assets/javascripts/models/school.js","webpack://app/./app/assets/javascripts/models/collaboration.js","webpack://app/./app/assets/javascripts/models/policy.js","webpack://app/./app/assets/javascripts/models/section.js","webpack://app/./app/assets/javascripts/models/session_environment.js","webpack://app/./app/assets/javascripts/models/sketch.js","webpack://app/./app/assets/javascripts/models/sketch_reveal.js","webpack://app/./app/assets/javascripts/models/sketch_step.js","webpack://app/./app/assets/javascripts/models/taxonomy_node.js","webpack://app/./app/assets/javascripts/models/user_settings.js","webpack://app/./app/assets/javascripts/utils/dateFormats.js","webpack://app/./app/assets/javascripts/utils/problem.js","webpack://app/./app/assets/javascripts/utils/user.js","webpack://app/./app/assets/javascripts/views/dialogs/input.js","webpack://app/./app/assets/javascripts/views/dialogs/message.js","webpack://app/./app/assets/javascripts/templates/dialogs/phrase_confirm.jst.eco","webpack://app/./app/assets/javascripts/views/dialogs/phrase_confirm.js","webpack://app/./app/assets/javascripts/views/dialogs/template.js","webpack://app/./node_modules/moment-timezone/node_modules/moment/locale/ sync \\b\\B","webpack://app/./node_modules/moment/locale/ sync \\b\\B"],"sourcesContent":["/* global I18n */\nconst moment = require('moment-timezone')\n\nmoment.tz.setDefault(I18n.timeZone)\n\nmodule.exports = moment\n","/* global I18n, moment */\nimport { humanizeDuration } from 'utils/dateFormats'\n\nexport const dateFormat = function (date, format) {\n if (format == null) {\n format = I18n.t('time.formats.js.moment-datetime')\n }\n if (date) {\n return moment.tz(date, I18n.timeZone).format(format)\n } else {\n return ''\n }\n}\n\nexport const momentWithTz = (date) => {\n return date != null ? moment.tz(date, I18n.timeZone) : null\n}\n\nexport const currentTzDate = () => moment().tz(I18n.timeZone)\n\nexport const duration = (seconds) => humanizeDuration(seconds)\n\nexport const timeZone = (date) => {\n date ||= currentTzDate()\n const zone = date.format('z')\n\n return zone == 'Invalid date' ? timeZone() : zone\n}\n\nexport const sameDate = (date1, date2) => moment(date1).diff(date2) === 0\n\n// given a Moment date, returns the end of that date to the nearest minute\nexport const endOfDay = (date) =>\n date.endOf('day').set('second', 0).set('millisecond', 0)\n\n// given a time string in the format '23:59', sets the time of the given moment date to the\n// given time.\nexport const setTimeFrom24HourString = (date, timeStr) => {\n if (!timeStr) return null\n\n const timeParts = timeStr.split(':')\n\n if (timeParts.length == 2) {\n const hours = parseInt(timeParts[0])\n const minutes = parseInt(timeParts[1])\n date.hour(hours).minutes(minutes).seconds(0)\n }\n\n return date\n}\n\nexport const sortableDateKey = function (dateStr) {\n const date = dateStr ? new Date(dateStr) : new Date(2050, 1, 1)\n return date.getTime()\n}\n\nexport const formattedUTCOffset = (date) => {\n const offset = date.utcOffset()\n const sign = offset >= 0 ? '+' : '-'\n const hours = Math.floor(Math.abs(offset) / 60)\n const minutes = Math.abs(offset) % 60\n\n return `${sign}${hours.toString().padStart(2, '0')}:${minutes\n .toString()\n .padStart(2, '0')}`\n}\n\nexport const outsideRange = (date, minDate, maxDate) => {\n return (\n date != null &&\n ((minDate && !date.isSameOrAfter(minDate)) ||\n (maxDate && !date.isSameOrBefore(maxDate)))\n )\n}\n","export default function(__obj) {\n if (!__obj) __obj = {};\n var __out = [], __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n }, __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;\n __safe = __obj.safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n if (!__escape) {\n __escape = __obj.escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"');\n };\n }\n (function() {\n (function() {\n this.templateLabel || (this.templateLabel = 'Copy existing values from');\n \n __out.push('\\n\\n
\\n \\n \\n
\\n\\n
\\n \\n \\n
\\n');\n \n }).call(this);\n \n }).call(__obj);\n __obj.safe = __objSafe, __obj.escape = __escape;\n return __out.join('');\n}","import _templates_environment_templates_new_ from 'templates/environment_templates/new'\n/* global $, JST */\nimport Backbone from 'backbone'\nimport { flashError, flash } from 'helpers/flash'\nimport { confirmDelete } from 'helpers/modal'\nimport { showModelModal, loadSelectValues } from 'helpers/model'\nimport EnvironmentTemplate from 'models/environment_template'\nimport TemplateDialog from 'views/dialogs/template'\n\nexport const deleteEnvironmentTemplate = (template) =>\n confirmDelete(\n `Are you sure you want to delete the ${template.get(\n 'name'\n )} default controls?`,\n () => {\n template.destroy({\n success () {\n flash('success', 'Default controls deleted')\n window.location = '/environment_templates'\n },\n error (model, error) {\n flashError(error, 'Unable to delete')\n },\n })\n }\n )\n\nexport const createEnvironmentTemplate = function (\n collection,\n callback = $.noop\n) {\n const params = new Backbone.Model()\n\n const modal = new TemplateDialog({\n template: _templates_environment_templates_new_(),\n title: 'Create default controls',\n buttonOk: 'Create',\n overflow: 'inherit',\n callback (success) {\n if (success) {\n const template = new EnvironmentTemplate(params.attributes)\n template.save(null, { success: callback })\n }\n },\n })\n showModelModal(params, modal)\n\n loadSelectValues(\n collection,\n modal.getBody().find('select.selected-template'),\n {\n afterInitialize (el) {\n params.attributes.template_id = collection.first()?.id\n },\n }\n )\n}\n\nexport const scoringMethodLabel = (method) => {\n let label\n\n switch (method) {\n case 'score_last_submission':\n label = 'last'\n break\n case 'score_best_submission':\n label = 'highest'\n break\n default:\n label = 'average'\n }\n\n return label\n}\n","import {\n helpUrl as zendeskUrl,\n helpSectionUrl as zendeskSectionUrl,\n} from 'helpers/zendesk'\nimport { capitalize } from 'underscore.string'\nimport { alertInfo, alertWarning } from 'helpers/dom'\n\nexport const addLtiConnectionMessage = function (section, messages) {\n const providerName = platformName(section.get('lms_provider'))\n const helpHref = helpUrl(section.get('lms_provider'), true)\n const helpMessage = `Please consult our Help Center\n for more information.`\n\n if (section.get('ltia_linked')) {\n messages.add(\n alertInfo(\n `This course is connected to ${\n section.get('lms_course_name') ?? 'a course'\n } in ${providerName}. ${helpMessage}`\n )\n )\n } else if (section.school.get('ltia_enabled')) {\n if (!section.get('coordinator')) {\n messages.add(\n alertWarning(\n `
Your institution's ${providerName} system is integrated with Edfinity using LTI Advantage. However, this\n course has not yet been connected to a ${providerName} course. ${helpMessage}
`\n )\n )\n }\n } else if (section.school.get('lti_enabled')) {\n messages.add(\n alertInfo(\n `Your institution's ${providerName} system is integrated with Edfinity using LTI 1.1. ${helpMessage}`\n )\n )\n } else {\n const url = ltiUnconnectedHelpUrl()\n messages.add(\n alertWarning(\n `Your institution's learning management system (LMS) is not integrated with Edfinity.\n Get started here or contact us at\n support@edfinity.com for more information.`\n )\n )\n }\n}\n\nexport const helpUrl = function (provider, isLtia) {\n if (isLtia) {\n switch (provider) {\n case 'blackboard':\n return zendeskUrl('4414471440013')\n case 'canvas':\n return zendeskUrl('4413344249101')\n case 'd2l':\n return zendeskUrl('4424239092365')\n default:\n return zendeskUrl('360032290592')\n }\n } else {\n switch (provider) {\n case 'blackboard':\n return zendeskUrl('360037449331')\n case 'canvas':\n return zendeskUrl('360031963532')\n case 'd2l':\n return zendeskUrl('360045338151')\n case 'moodle':\n return zendeskUrl('360035613111')\n case 'sakai':\n return zendeskUrl('360044895792')\n default:\n return zendeskUrl('360032290592')\n }\n }\n}\n\nexport const ltiUnconnectedHelpUrl = function () {\n return zendeskSectionUrl('360009329791')\n}\n\nexport const isBlackboard = (platformName) => platformName.match(/Blackboard/i)\nexport const isCanvas = (platformName) => platformName.match(/Canvas/i)\nexport const isMoodle = (platformName) => platformName.match(/Moodle/i)\n\nexport const platformName = function (lmsProvider) {\n switch (lmsProvider) {\n case 'd2l':\n return 'Brightspace'\n case 'unknown':\n return 'your LMS'\n default:\n return capitalize(lmsProvider)\n }\n}\n","import { each, compact } from 'underscore'\nimport { isBlank } from 'utils/common'\n\nconst buildSourceRow = function (metadata, key, label) {\n if (label == null) {\n label = key\n }\n if (metadata[key]) {\n return buildRow(label, metadata[key])\n }\n}\n\nconst buildChapterTitleRow = function (metadata) {\n if (metadata.ChapterTitle) {\n return buildRow('Chapter', chapterTitleLabel(metadata))\n }\n}\n\nconst buildRow = (label, value) => `
\\\n
${label}
\\\n
${value}
\\\n
`\n\nconst chapterTitleLabel = function (metadata) {\n const chapter = []\n if (metadata.ChapterNumber) {\n chapter.push(metadata.ChapterNumber)\n }\n chapter.push(metadata.ChapterTitle)\n return chapter.join(': ')\n}\n\nconst sourceLabel = function (source) {\n const rows = []\n rows.push(buildSourceRow(source, 'GradeLevel', 'Grade level'))\n rows.push(buildSourceRow(source, 'CodeInstitution', 'Institution'))\n rows.push(buildSourceRow(source, 'Author'))\n rows.push(buildSourceRow(source, 'CodeAuthor', 'WeBWorK Author'))\n rows.push(buildSourceRow(source, 'Publisher'))\n rows.push(buildSourceRow(source, 'Title'))\n rows.push(buildChapterTitleRow(source))\n rows.push(buildSourceRow(source, 'ChapterSection', 'Section'))\n rows.push(buildSourceRow(source, 'ProblemNumber', 'Problem #'))\n rows.push(buildSourceRow(source, 'Subject'))\n rows.push(buildSourceRow(source, 'CCSS', 'Common Core'))\n rows.push(buildSourceRow(source, 'FileName', 'File'))\n rows.push(buildSourceRow(source, 'Comment'))\n\n const body = compact(rows).join('')\n\n if (isBlank(body)) {\n return ''\n } else {\n return `
${body}
`\n }\n}\n\nexport const sourceLabels = function (sources) {\n return compact(sources.map((source) => sourceLabel(source)))\n .map((label) => `
${label}
`)\n .join('')\n}\n\nexport const creatorLabel = function (problem) {\n let author, codeAuthor, institution\n let publisher = (codeAuthor = institution = author = null)\n\n if (!isBlank(problem.get('sources'))) {\n each(problem.get('sources'), function (source) {\n if (!author) {\n author = source?.Author\n }\n if (!codeAuthor) {\n codeAuthor = source?.CodeAuthor\n }\n if (!publisher) {\n publisher = source?.Publisher\n }\n return institution || (institution = source?.CodeInstitution)\n })\n }\n\n return codeAuthor || publisher || institution || problem.get('author')\n}\n","/* global $ */\nimport { defaults } from 'underscore'\nimport MessageDialog from 'views/dialogs/message'\nimport InputDialog from 'views/dialogs/input'\nimport PhraseConfirmDialog from 'views/dialogs/phrase_confirm'\n\nexport const alert = function (message, options = {}) {\n defaults(options, {\n message,\n title: options.title || 'Alert',\n buttonCancelShow: false,\n })\n return new MessageDialog(options).show()\n}\n\nexport const confirm = function (message, callback, options = {}) {\n options.callback = function (result) {\n if (result || options.cancelCallback) {\n return callback(result)\n }\n }\n const defaultValues = {\n message,\n title: 'Confirm',\n buttonOk: 'Yes',\n role: 'alertdialog',\n }\n return new MessageDialog(defaults(options, defaultValues)).show()\n}\n\nexport const prompt = (message, required, callback) =>\n new InputDialog({\n callback,\n label: message,\n required,\n }).show()\n\nexport const confirmDelete = function (\n message,\n callback = $.noop,\n options = {}\n) {\n options.callback = function (result) {\n if (result) {\n return callback()\n }\n }\n const defaultValues = {\n message,\n buttonOk: 'Delete',\n buttonOkClass: 'btn-red',\n title: 'Confirm delete',\n role: 'alertdialog',\n }\n return new MessageDialog(defaults(options, defaultValues)).show()\n}\n\nexport const confirmPhrase = function (options = {}) {\n return new PhraseConfirmDialog(options).show()\n}\n\nexport const create = function (message, title, callback, options = {}) {\n const defaultValues = {\n callback,\n label: message,\n buttonOk: 'Create',\n title,\n }\n\n return new InputDialog(defaults(options, defaultValues)).show()\n}\n","export default function(__obj) {\n if (!__obj) __obj = {};\n var __out = [], __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n }, __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;\n __safe = __obj.safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n if (!__escape) {\n __escape = __obj.escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"');\n };\n }\n (function() {\n (function() {\n if (this.empty) {\n __out.push('\\n \\n');\n } else {\n __out.push('\\n ');\n this.values.forEach((function(_this) {\n return function(model, index) {\n var select;\n __out.push('\\n ');\n select = model.id === _this.options.defaultValue || (index === 1 && !_this.options.defaultValue && _this.options.selectFirst);\n __out.push('\\n \\n ');\n __out.push(__sanitize(_this.options.label(model.get('name'))));\n return __out.push('\\n \\n ');\n };\n })(this));\n __out.push('\\n');\n }\n \n __out.push('\\n');\n \n }).call(this);\n \n }).call(__obj);\n __obj.safe = __objSafe, __obj.escape = __escape;\n return __out.join('');\n}","import _templates_select_values_ from 'templates/select_values'\n/* global $, JST */\nimport { defaults, isEmpty } from 'underscore'\nimport ModelBinder from 'backbone.modelbinder'\nimport DOMPurify from 'dompurify'\nimport InputDialog from 'views/dialogs/input'\nimport BaseCollection from 'collections/base'\n\nexport const showModelModal = function (model, modal, bindingEl, body = true) {\n const modelBinder = new ModelBinder()\n\n modal.show()\n modal.modelBinder = modelBinder\n\n let boundEl = body ? modal.getBody() : modal.modal\n if (bindingEl) {\n boundEl = boundEl.find(bindingEl)\n }\n\n modelBinder.bind(model, boundEl)\n modal.getRequiredFields().trigger('change')\n}\n\nexport const cloneModel = function (ModelClass, attrs) {\n const model = new ModelClass(attrs)\n model.id = null\n model.set('id', null)\n return model\n}\n\nexport const modelIcon = function (type) {\n if (type === 'ProblemSet') {\n return 'fa fa-book-open'\n } else if (type === 'Section') {\n return 'fa fa-chalkboard-teacher'\n } else if (type === 'Assessment') {\n return 'fa fa-pencil-alt'\n } else {\n // Assignment\n return 'fa fa-book-open'\n }\n}\n\nexport const collection = function (klass, url, data, comparator) {\n if (data == null) {\n data = []\n }\n if (comparator == null) {\n comparator = (model) => model.get('name')?.toLowerCase()\n }\n\n const c = new BaseCollection(data, { model: klass, parse: true, comparator })\n c.url = url\n return c\n}\n\nexport const loadSelectValues = function (collection, el, options = {}) {\n defaults(options, { template: _templates_select_values_ })\n\n return loadValues(collection, el, options)\n}\n\nexport const loadValues = function (collection, el, options = {}) {\n defaults(options, {\n filter () {\n return true\n },\n label (value) {\n return value\n },\n emptyValue: null,\n })\n\n var render = function () {\n const values = collection.filter(options.filter)\n\n if (options.emptyValue != null) {\n values.unshift(options.emptyValue)\n }\n\n const empty = isEmpty(values)\n el.html(options.template({ values, empty, options }))\n el.attr('disabled', empty)\n\n if (collection.isEmpty()) {\n collection.fetch({\n success () {\n render()\n options.afterFetch?.()\n if (options.afterFetchSetParameter) {\n options.afterFetchSetParameter(el)\n }\n options.afterInitialize?.()\n },\n })\n } else {\n options.afterInitialize?.()\n }\n }\n\n render()\n}\n\nexport const rename = function (model, options = {}) {\n defaults(options, { callback: $.noop, autosave: false, title: true })\n new InputDialog({\n title: 'Rename',\n buttonOk: 'Rename',\n label: null,\n value: model.get('name'),\n callback (value) {\n const sanitizedName = DOMPurify.sanitize(value)\n\n if (options.autosave) {\n model.save({ name: sanitizedName })\n } else {\n model.set({ name: sanitizedName })\n }\n\n if (options.title) {\n document.title = `${value} - Edfinity`\n }\n\n options.callback()\n },\n }).show()\n}\n","import ExpectedRound from 'expected-round'\nimport { dateFormat } from 'helpers/date'\nimport { isBlank } from 'utils/common'\n\nexport const toIntWithMinAndMax = function (min, max) {\n if (min == null) {\n min = -Number.MAX_SAFE_INTEGER\n }\n if (max == null) {\n max = Number.MAX_SAFE_INTEGER\n }\n return function (direction, value) {\n if (direction === 'ViewToModel') {\n const val = parseInt(value)\n switch (false) {\n case !isNaN(val):\n return min\n case !(val > max):\n return max\n case !(val < min):\n return min\n default:\n return val\n }\n } else {\n return value\n }\n }\n}\n\nexport const toNullOrLowerBoundedInt = (min, outOfBoundsNull = false) =>\n function (direction, value) {\n if (direction === 'ViewToModel') {\n if (value != null) {\n if (value == '') {\n return null\n }\n\n const val = parseInt(value)\n\n if (val < min) {\n return outOfBoundsNull ? null : min\n } else {\n return val\n }\n }\n } else {\n return value\n }\n }\n\nexport const toInt = function (direction, value) {\n if (direction === 'ViewToModel') {\n const intValue = parseInt(value)\n\n return intValue === 0 ? 0 : intValue || null\n } else {\n return value\n }\n}\n\nexport const toFloatWithPrecision = (precision) =>\n function (direction, value) {\n value = parseFloat(value)\n\n if (isNaN(value)) {\n return null\n } else if (direction === 'ViewToModel') {\n return ExpectedRound.round10(value, -2)\n } else {\n return value\n }\n }\n\nexport const toFloatWithMinAndMax = function ({\n min = -Number.MIN_VALUE,\n max = Number.MAX_VALUE,\n allowNull = false,\n}) {\n return function (direction, value) {\n if (direction === 'ViewToModel') {\n if (allowNull && (value == null || value == '')) {\n return null\n } else {\n const val = parseFloat(value)\n\n switch (false) {\n case !isNaN(val):\n return 0\n case !(val > max):\n return max\n case !(val < min):\n return min\n default:\n return val\n }\n }\n } else {\n return value\n }\n }\n}\n\nexport const toFloat = function (direction, value) {\n if (direction === 'ViewToModel') {\n return parseFloat(value) || null\n } else {\n return value\n }\n}\n\nexport const toDate = function (direction, value) {\n if (direction === 'ModelToView') {\n return dateFormat(value)\n } else {\n return value\n }\n}\n\nexport const toPercent = function (direction, value) {\n if (direction === 'ModelToView') {\n return value * 100\n } else {\n if (isBlank(value)) {\n return 0.02\n } else {\n const val = parseFloat(value) / 100\n switch (false) {\n case !(val < 0):\n return 0\n case !(val > 1):\n return 1\n default:\n return val\n }\n }\n }\n}\n\nexport const toPercentWithoutDefault = function (direction, value) {\n if (isBlank(value)) {\n return ''\n }\n if (direction === 'ModelToView') {\n return value * 100\n } else {\n return parseFloat(value) / 100\n }\n}\n\nexport const toBoolean = function (direction, value) {\n if (direction === 'ModelToView') {\n return '' + value\n } else if (value === 'false') {\n return false\n } else {\n return true\n }\n}\n\nexport const toRadio = function (direction, value) {\n if (direction === 'ModelToView') {\n if (value === true) {\n return '1'\n } else {\n return '0'\n }\n } else {\n if (value === '1') {\n return true\n } else {\n return false\n }\n }\n}\n\nexport const trueFalseNullBinder = function (direction, value) {\n if (direction === 'ModelToView') {\n switch (value) {\n case true:\n return 'true'\n case false:\n return 'false'\n case null:\n return 'null'\n case undefined:\n return 'null'\n }\n } else {\n switch (value) {\n case 'true':\n return true\n case 'false':\n return false\n case 'null':\n return null\n }\n }\n}\n","const zendeskRootUrl = 'https://edfinity.zendesk.com/hc/en-us'\n\nexport const helpUrl = (page) => {\n return `${zendeskRootUrl}/articles/${page}`\n}\n\nexport const helpSectionUrl = (section) => {\n return `${zendeskRootUrl}/sections/${section}`\n}\n\nexport const helpLink = (page, content = 'Learn more.', underline = true) => {\n const underlineClass = underline ? ' underline' : ''\n\n return `${content}`\n}\n","import BaseModel from 'models/base'\nimport { Skill } from 'models/taxonomy_node'\n\nexport default class AdaptivePathway extends BaseModel {\n message () {\n if (!this.active_item.get('answerable')) {\n if (this.adaptive_review.previous_pathway) {\n return `Let's review another concept, ${this.skill.get(\n 'name'\n )}.`\n } else {\n return `Let's start by reviewing ${this.skill.get(\n 'name'\n )}.`\n }\n } else if (this.active_item.isAttempted()) {\n if (this.active_item.isClosed()) {\n if (this.active_item.showSketch) {\n return \"Let's solve a similar problem step-by-step to understand the concepts better.\"\n } else if (!this.active_item.isCorrect()) {\n return \"That's not correct. Here's the correct answer.\"\n } else if (this.adaptive_review.get('mastered')) {\n return \"Well done! You've mastered the review concepts.\"\n } else {\n return \"Well done! You've mastered the concept.\"\n }\n } else if (this.active_item.attempt.get('submitted')) {\n return \"That's not correct. Please try again.\"\n }\n } else if (this.previous_item) {\n if (!this.previous_item.get('answerable')) {\n return 'Try this problem.'\n } else {\n return \"Let's try another problem.\"\n }\n } else if (this.adaptive_review.previous_pathway) {\n return `Let's review another concept, ${this.skill.get(\n 'name'\n )}. Try this problem.`\n } else if (this.adaptive_review.get('previously_correct')) {\n return `Well done! Let's review the next concept, ${this.skill.get(\n 'name'\n )}. Try this problem.`\n } else if (this.get('previously_correct')) {\n return \"Well done! Here's another problem.\"\n } else {\n if (this.get('instructions_read')) {\n return `Let's start by reviewing ${this.skill.get(\n 'name'\n )}. Try this problem.`\n } else {\n return 'Try this problem.'\n }\n }\n }\n\n iconClass () {\n if (this.active_item.showSketch) {\n return null\n } else if (this.active_item.isAttempted()) {\n if (this.active_item.isCorrect()) {\n return 'fa-check'\n } else {\n return 'fa-times'\n }\n } else if (\n this.previous_item == null &&\n (this.adaptive_review.get('previously_correct') ||\n this.get('previously_correct'))\n ) {\n return 'fa-check'\n } else {\n return null\n }\n }\n\n alertClass () {\n if (this.active_item.showSketch) {\n return 'alert-primary'\n } else if (this.active_item.isAttempted()) {\n if (this.active_item.isCorrect()) {\n return 'alert-success'\n } else {\n return 'alert-danger'\n }\n } else if (\n this.previous_item == null &&\n (this.adaptive_review.get('previously_correct') ||\n this.get('previously_correct'))\n ) {\n return 'alert-success'\n } else {\n return 'alert-primary'\n }\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n this.skill = this.hasOne('skill', Skill, resp)\n\n return resp\n }\n\n afterParentSet () {\n if (this.get('current_item_id') != null) {\n this.current_item = this.adaptive_review.assessment_session.findItem(\n this.get('current_item_id')\n )\n }\n if (\n !this.current_item?.isClosed() &&\n this.get('previous_item_id') != null\n ) {\n this.previous_item = this.adaptive_review.assessment_session.findItem(\n this.get('previous_item_id')\n )\n }\n this.active_item = this.previous_item || this.current_item\n }\n}\n","import BaseModel from 'models/base'\nimport Assessment from 'models/assessment'\nimport { Skill } from 'models/taxonomy_node'\nimport AdaptivePathway from 'models/adaptive_pathway'\nimport AssessmentSession from 'models/assessment_session'\n\nexport default class AdaptiveReview extends BaseModel {\n parentName () {\n return 'adaptive_review'\n }\n\n url () {\n if (this.id) {\n return `/adaptive_reviews/${this.id}`\n } else {\n return `/adaptive_assessments/${this.get(\n 'assessment_id'\n )}/adaptive_reviews`\n }\n }\n\n displayedScore () {\n return `${this.skillsMastered()}/${this.skills.size()}`\n }\n\n skillsMastered () {\n return this.skills.filter((skill) => skill.get('progress') === 'mastered')\n .length\n }\n\n percentCorrect () {\n const pct = parseFloat(this.skillsMastered()) / this.skills.size()\n return Math.round(pct * 100)\n }\n\n message () {\n if (this.get('mastered')) {\n return \"Well done! You've mastered the review concepts. Let's go back to your assignment.\"\n } else {\n return \"You're all done! You can go back to your assignment or review the concepts again.\"\n }\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n this.assessment_session = this.hasOne(\n 'assessment_session',\n AssessmentSession,\n resp\n )\n this.remediated_assessment = this.hasOne(\n 'remediated_assessment',\n Assessment,\n resp\n )\n this.adaptive_assessment = this.hasOne(\n 'adaptive_assessment',\n Assessment,\n resp\n )\n this.current_pathway = this.hasOne('current_pathway', AdaptivePathway, resp)\n this.previous_pathway = this.hasOne(\n 'previous_pathway',\n AdaptivePathway,\n resp\n )\n this.active_pathway = this.previous_pathway || this.current_pathway\n this.skills = this.hasMany('skills', Skill, resp)\n return resp\n }\n\n next () {\n this.active_pathway = this.current_pathway\n return (this.active_pathway.active_item = this.active_pathway.current_item)\n }\n\n isFinished () {\n return (\n this.get('closed') &&\n this.current_pathway.active_item === this.current_pathway.current_item\n )\n }\n\n findSkillForItem (itemId) {\n return this.skills.find((skill) => skill.get('item_ids').includes(itemId))\n }\n}\n","/* global $, I18n */\nimport { defaults, extend } from 'underscore'\nimport { pluralize, isBlank } from 'utils/common'\nimport { dateFormat } from 'helpers/date'\nimport { scoringMethodLabel } from 'helpers/environment'\nimport Assessable from 'models/modules/assessable'\nimport BaseModel from 'models/base'\nimport Registration from 'models/registration'\n// eslint-disable-next-line no-unused-vars\nimport Section from 'models/section' // hack to force circular dependency load\nimport AssessmentSession from 'models/assessment_session'\nimport Assignment from 'models/assignment'\nimport AdaptiveReview from 'models/adaptive_review'\nimport Grade from 'models/grade'\nimport User from 'models/user'\nimport SessionEnvironment from 'models/session_environment'\nimport Product from 'models/product'\nimport Subscription from 'models/subscription'\nimport CreditUsage from 'models/credit_usage'\nimport { Skill } from 'models/taxonomy_node'\n\nexport default class Assessment extends BaseModel {\n parentName () {\n return 'assessment'\n }\n\n url () {\n if (this.id) {\n return `/assessments/${this.id}`\n } else {\n return `/${this.get('type')}s/${this.originator.id}/assessments`\n }\n }\n\n userUrl () {\n return `/registrations/${this.registration.id}`\n }\n\n afterCloseUrl () {\n if (this.get('preview')) {\n return this.assignment.url()\n } else if (this.assignment.get('requires_respondus')) {\n return `${this.userUrl}?rldbxb=1&rldbqn=1` // closes browser\n } else if (this.isEnrolled()) {\n return this.userUrl()\n }\n }\n\n activeSession () {\n return this.sessions.find((session) => !session.isClosed())\n }\n\n isUnderway () {\n return this.get('state') === 'underway'\n }\n\n isClosed () {\n return this.get('state') === 'closed'\n }\n\n isClosedAndTimed () {\n return (\n (this.lastSession()?.isClosed() || this.isClosed()) &&\n this.get('timed') &&\n !this.get('suspended')\n )\n }\n\n isProblemPreview () {\n return this.get('type') === 'problem' && this.get('preview') // redundant\n }\n\n showScores () {\n return this.grade?.get('show_scores')\n }\n\n availableDate () {\n if (this.get('override_availability')) {\n return this.get('available_date')\n } else {\n return this.assignment?.get('available_date')\n }\n }\n\n availableDateOverridden () {\n return (\n this.get('override_availability') &&\n this.get('available_date') !== this.assignment.get('available_date')\n )\n }\n\n dueDate () {\n if (this.get('override_availability')) {\n return this.get('due_date')\n } else {\n return this.assignment?.get('due_date')\n }\n }\n\n dueDateOverridden () {\n return (\n this.get('override_availability') &&\n this.get('due_date') !== this.assignment.get('due_date')\n )\n }\n\n earlyWorkDate () {\n if (this.get('override_availability')) {\n return this.get('early_work_date')\n } else {\n return this.assignment?.get('early_work_date')\n }\n }\n\n lateWorkDate () {\n if (this.get('override_availability')) {\n return this.get('late_work_date')\n } else {\n return this.assignment?.get('late_work_date')\n }\n }\n\n hasAvailabilityDate () {\n return (\n this.get('due_date') ||\n this.get('available_date') ||\n this.get('late_work_date') ||\n this.assignment?.hasAvailabilityDate()\n )\n }\n\n hasInstructions () {\n return !isBlank(this.get('instructions'))\n }\n\n hasAdditionalInfo () {\n return !isBlank(this.get('additional_info'))\n }\n\n isAssigned () {\n return (\n this.hasAssignment() ||\n ((this.get('type') === 'problem_set' ||\n this.get('type') === 'assignment') &&\n this.get('preview'))\n )\n }\n\n isEnrolled () {\n return this.registration != null\n }\n\n hasAssignment () {\n return this.assignment != null\n }\n\n submissionsRemaining () {\n return Math.max(0, this.get('max_submissions') - this.get('num_sessions'))\n }\n\n hasSubmissionsRemaining () {\n return !this.get('max_submissions') || this.submissionsRemaining() > 0\n }\n\n showRemainingSubmissionsMessage () {\n return (\n this.grade &&\n (this.numSessions() > 1 || this.scoredSession?.isClosed()) &&\n this.get('allows_multiple_sessions') &&\n !this.grade.get('excused')\n )\n }\n\n parse (resp, options) {\n extend(this, Assessable)\n\n // ensure our formats match\n if (resp.due_date) {\n resp.due_date = new Date(resp.due_date).toISOString()\n }\n if (resp.available_date) {\n resp.available_date = new Date(resp.available_date).toISOString()\n }\n if (resp.late_work_date) {\n resp.release_date = new Date(resp.late_work_date).toISOString()\n }\n\n super.parse(resp, options)\n\n this.scoredSession = this.hasOne('scored_session', AssessmentSession, resp)\n this.session = this.scoredSession\n this.sessions = this.hasMany('sessions', AssessmentSession, resp)\n\n if (this.sessions) {\n this.sessions.fetched = true\n }\n\n this.registration = this.hasOne('registration', Registration, resp)\n this.assignment = this.hasOne('assignment', Assignment, resp)\n\n if (this.assignment) {\n this.assignment.assessment = this\n }\n if (this.grade == null) {\n this.grade = this.hasOne('grade', Grade, resp)\n }\n this.remediation_review = this.hasOne(\n 'remediation_review',\n AdaptiveReview,\n resp\n )\n\n this.skills = this.hasMany('skills', Skill, resp)\n this.creditUsage = this.hasOne('credit_usage', CreditUsage, resp)\n this.subscription = this.hasOne('subscription', Subscription, resp)\n this.user = this.hasOne('user', User, resp)\n this.product = this.hasOne('product', Product, resp)\n\n // only used when creating a new session\n this.env = this.hasOne('session_environment', SessionEnvironment, resp)\n\n this.parseEnvironment(resp, options)\n\n return resp\n }\n\n restart (success, sync) {\n if (sync == null) {\n sync = true\n }\n this.command(`${this.url()}/restart`, {\n sync,\n success: () => {\n this.trigger('restart', this)\n success?.(this)\n },\n })\n }\n\n close (callback) {\n this.command(`${this.url()}/close`, { sync: true, success: callback })\n }\n\n startSession (options = {}) {\n defaults(options, {\n success: $.noop,\n errors: $.noop,\n })\n\n const session = AssessmentSession.create(\n { assessment_id: this.id },\n options\n )\n session.once('sync', () => {\n if (this.sessions) {\n this.sessions.add(session)\n }\n session.assessment = this\n this.readonly.set('num_sessions', this.get('num_sessions') + 1)\n this.trigger('new_session', session)\n })\n }\n\n reload () {\n this.fetch({ success: () => this.trigger('reload') })\n }\n\n lastSession () {\n return this.sessions?.last() || this.scoredSession\n }\n\n numSessions () {\n return this.sessions?.size() || (this.scoredSession ? 1 : 0)\n }\n\n releasability () {\n return this.assignment?.releasability()\n }\n\n displayedScore () {\n return (this.grade || this.scoredSession).displayedScore()\n }\n\n displayedPercent () {\n return (this.grade || this.scoredSession).displayedPercent()\n }\n\n percentCorrect () {\n return (this.grade || this.scoredSession)?.percentCorrect() || 0\n }\n\n availability (showScore = true) {\n let msg = []\n const format = I18n.t('time.formats.js.moment-datetime-no-tz')\n const dueInFuture = this.get('due_date') && !this.get('due')\n const gradeSubmitted = this.grade?.get('status') == 'submitted'\n\n if (this.isClosed()) {\n const status = this.grade\n ? (this.grade.get('status') !== 'not started' &&\n this.grade.get('status')) ||\n 'closed'\n : this.get('status')\n msg.push(`This ${this.get('display_type')} is ${status}.`)\n\n if (dueInFuture) {\n msg.push(\n `Due ${dateFormat(\n this.get('due_date'),\n format\n )}.`\n )\n }\n\n if (this.get('due')) {\n if (this.get('late_work_date')) {\n msg.push(\n `The late work date of ${dateFormat(\n this.get('late_work_date'),\n format\n )} has passed.`\n )\n } else {\n msg.push(\n `The due date of ${dateFormat(\n this.get('due_date'),\n format\n )} has passed.`\n )\n }\n }\n\n if (showScore && this.grade?.get('show_scores')) {\n if (this.grade.get('excused')) {\n msg.push(\n `This ${this.get(\n 'display_type'\n )} has been excused, and no grade was recorded.`\n )\n } else {\n msg.push(\n `The score is ${this.grade.displayedScore()} (${this.grade.displayedPercent()}).`\n )\n }\n }\n } else {\n if (this.get('status') !== 'open' || gradeSubmitted) {\n msg.push(\n `This ${this.get('display_type')} is ${this.grade.get('status')}.`\n )\n }\n\n const available = this.availableDate()\n if (!this.get('available') && available) {\n msg.push(\n `Available ${dateFormat(\n available,\n format\n )}.`\n )\n }\n\n if (this.get('late')) {\n msg.push(\n `The due date has passed, but late work is permitted until ${dateFormat(\n this.get('late_work_date'),\n format\n )}.`\n )\n } else if (this.get('due_date')) {\n msg.push(\n `Due ${dateFormat(\n this.get('due_date'),\n format\n )}.`\n )\n\n if (!this.scoredSession?.canClose() && !gradeSubmitted) {\n if (this.get('late_work_date')) {\n msg.push(\n `Late work is permitted until ${dateFormat(\n this.get('late_work_date'),\n format\n )}. It will be turned in automatically after the late work period ends.`\n )\n } else {\n msg.push('It will be turned in automatically after the due date.')\n }\n } else if (this.get('late_work_date')) {\n msg.push(\n `Late work is permitted until ${dateFormat(\n this.get('late_work_date'),\n format\n )}.`\n )\n }\n }\n }\n\n if (!this.get('released')) {\n msg.push(this.releasability())\n }\n\n if (this.showRemainingSubmissionsMessage()) {\n msg.push(this.remainingSubmissionsMessage())\n }\n\n msg = msg.flat().filter((n) => n)\n if (msg.length > 1) {\n msg = msg.map((m) => `
  • ${m}
  • `).join('')\n return ``\n } else {\n return msg.join('')\n }\n }\n\n remainingSubmissionsMessage () {\n const scoreLabel = scoringMethodLabel(this.assignment.get('scoring_method'))\n const remaining = this.submissionsRemaining() || 0\n const verb = remaining === 1 ? 'is' : 'are'\n const msg = []\n\n if (\n this.grade.get('show_scores') &&\n (this.get('num_sessions') > 1 ||\n (this.isUnderway() && this.get('allows_multiple_sessions')))\n ) {\n msg.push(\n `The ${scoreLabel} score (currently ${this.grade\n .get('score')\n .toFixed(1)}) will be recorded.`\n )\n }\n\n if (!this.get('due')) {\n msg.push(\n `There ${verb} ${remaining} ${pluralize(\n 'submission',\n remaining\n )} remaining.`\n )\n }\n\n return msg.join(' ')\n }\n\n allPrerequisitesSatisfied () {\n return (\n this.registration == null ||\n this.get('waive_prerequisites') ||\n this.assignment.allPrerequisitesSatisfied()\n )\n }\n\n setSubscription (subscription) {\n this.subscription = subscription\n this.creditUsage = subscription.currentUsage\n }\n\n synchAvailability (newValues) {\n this.set('override_availability', newValues.get('override_availability'))\n this.set('available_date', newValues.get('available_date'))\n this.set('due_date', newValues.get('due_date'))\n }\n\n updateExtraTimeAwarded (val) {\n const deltaMinutes = (this.get('extra_time_awarded') || 0) - (val ?? 0)\n\n this.readonly.set({ time_limit: this.get('time_limit') + deltaMinutes })\n this.save({ extra_time_awarded: val })\n this.trigger('extra_time_awarded_changed', this, -deltaMinutes)\n }\n\n canEditAccommodations () {\n return (\n this.env.get('time_limit') > 0 &&\n !this.isClosed() &&\n this.can('supervise')\n )\n }\n}\n","/* global $ */\nimport { isString, all, select, detect } from 'underscore'\nimport { isBlank } from 'utils/common'\nimport BaseModel from 'models/base'\n\nexport default class PartAnswer extends BaseModel {\n url () {\n return `/assessment_items/${\n this.attempt.assessment_item.id\n }/parts/${this.get('part_id')}`\n }\n\n parse (resp, options) {\n if (options.type === 'POST') {\n // answer has been set already and with lag this can cause a race condition\n delete resp.answer\n delete resp.answer_alt\n }\n super.parse(resp, options)\n return resp\n }\n\n answerText () {\n return this.get('answer_text')?.replace(/\\n/g, '
    ')\n }\n\n part () {\n return detect(\n this.attempt.question.container.flatParts(),\n (p) => p.get('part_id') === this.get('part_id')\n )\n }\n\n multiparts () {\n const part = this.part()\n const re = new RegExp(part.multiAnswerName())\n return select(\n this.attempt.question.container.flatParts(),\n (p) => p.container === part.container && re.test(p.get('answer_name'))\n )\n }\n\n multianswers () {\n return this.multiparts().map((part) =>\n this.attempt.findAnswer(part.get('part_id'))\n )\n }\n\n isAnswered () {\n const isStr = isString(this.get('answer'))\n\n return (\n !this.isBlank() &&\n (!isStr || this.get('answer').toLowerCase().trim() != 'no_answer') &&\n this.attempt.get('submitted')\n )\n }\n\n needsScoring () {\n return this.isAnswered() && !this.get('scored')\n }\n\n warning () {\n return this.get('warning').replace('\\n', '
    ')\n }\n\n hasLocalWarning () {\n if (\n this.part().get('extra') ||\n (this.part().get('multipart') &&\n /In entry|In answer/.test(this.get('warning')))\n ) {\n const r = new RegExp(\n `(In entry|In answer) ${this.attempt.answers.findIndex(this) + 1}`\n )\n return r.test(this.get('warning'))\n } else {\n return this.hasWarning()\n }\n }\n\n hasWarning () {\n return !isBlank(this.get('warning'))\n }\n\n showMarks () {\n return (\n this.get('gradable') &&\n this.attempt.showMarks() &&\n this.attempt.get('submitted')\n )\n }\n\n answeredClass () {\n if (this.isBlank()) {\n return 'unanswered'\n } else {\n return 'answered'\n }\n }\n\n markedClass () {\n if (this.get('scored')) {\n if (this.get('correct')) {\n return 'correct'\n } else {\n if (this.get('score') > 0) {\n return 'partially-correct'\n } else {\n return 'incorrect'\n }\n }\n } else {\n return 'unscored'\n }\n }\n\n markedIcon () {\n if (this.get('scored')) {\n if (this.get('correct')) {\n return 'far fa-check-circle'\n } else {\n return 'far fa-times-circle'\n }\n } else {\n return 'far fa-circle'\n }\n }\n\n textScore () {\n if (\n this.attempt.get('submitted') &&\n (this.get('scored') || !this.isBlank())\n ) {\n return this.get('score')\n } else {\n return '-'\n }\n }\n\n displayedScore () {\n return `${this.textScore()} / ${this.get('points')}`\n }\n\n isBlank () {\n if ($.isArray(this.get('answer'))) {\n return all(this.get('answer'), (val) => isBlank(val))\n } else {\n return isBlank(this.get('answer')) && isBlank(this.get('answer_text'))\n }\n }\n\n setAnswer (value, unparsedValue) {\n if (this.attempt.assessment_item.canAnswer()) {\n this.set('answer', value)\n this.set('answer_alt', unparsedValue)\n this.attempt.set('timestamp', new Date().getTime())\n }\n }\n\n manuallyScore (score, explanation) {\n this.command(`${this.url()}/score`, {\n sync: true,\n data: {\n manual_score: {\n score,\n explanation,\n part_id: this.get('part_id'),\n },\n assessment_item_id: this.attempt.assessment_item.id,\n },\n success: (model, resp) => {\n this.readonly.set({\n manual_score: score,\n manual_score_explanation: explanation,\n })\n this.attempt.assessment_item.set(\n { score: this.get('assessment_item_score') },\n { silent: true }\n )\n this.attempt.assessment_item.trigger(\n 'manual_score_override',\n this.attempt.assessment_item\n )\n this.attempt.assessment_item.assessment_session.trigger(\n 'manual_score_override',\n this.attempt.assessment_item\n )\n },\n })\n }\n\n clear () {\n if ($.isArray(this.get('answer'))) {\n this.set({ answer: [] }, { silent: true })\n } else {\n this.set({ answer: '' }, { silent: true })\n }\n this.readonly.set(\n { warning: '', answer_alt: '', answer_text: '' },\n { silent: true }\n )\n }\n\n reset () {\n this.set({ success: false, submitted: false }, { silent: true })\n }\n}\n","/* global $ */\nimport { defaults, detect } from 'underscore'\nimport BaseModel from 'models/base'\nimport PartAnswer from 'models/part_answer'\n\nexport default class Attempt extends BaseModel {\n parentName () {\n return 'attempt'\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n\n this.env = options.env\n this.answers = this.hasMany('answers', PartAnswer, resp, {\n retry: options.retry,\n })\n this.question = options.question\n return resp\n }\n\n gradableAnswers () {\n return this.answers.filter((answer) => answer.get('gradable'))\n }\n\n scoredAnswers () {\n return this.answers.filter((answer) => answer.get('scored'))\n }\n\n toAnswerArray () {\n return this.answers.map((answer) => answer.get('answer'))\n }\n\n number () {\n return this.assessment_item.attempts.indexOf(this) + 1\n }\n\n displayedNumber () {\n if (this.assessment_item.attemptsFetched) {\n return this.number()\n } else {\n return this.assessment_item.numAttempts()\n }\n }\n\n numParts () {\n return this.answers.length\n }\n\n numAnswered () {\n return this.answers.filter((answer) => answer.isAnswered()).length\n }\n\n numCorrect () {\n return this.gradableAnswers().filter((answer) => answer.get('correct'))\n .length\n }\n\n numScored () {\n return this.gradableAnswers().filter((answer) => answer.get('scored'))\n .length\n }\n\n isAnswered () {\n return this.answers.some((answer) => answer.isAnswered())\n }\n\n isBlank () {\n return this.answers.every((answer) => answer.isBlank())\n }\n\n isFullyAnswered () {\n return this.gradableAnswers().every((answer) => answer.isAnswered())\n }\n\n isCorrect () {\n return (\n this.assessment_item.get('correct') ||\n this.gradableAnswers().every((answer) => answer.get('correct'))\n )\n }\n\n isScored () {\n return this.answers.some((answer) => answer.get('scored'))\n }\n\n isAutoscored () {\n return this.gradableAnswers().every((answer) => answer.get('scored'))\n }\n\n isMostlyCorrect () {\n return parseFloat(this.numCorrect()) / this.numParts() >= 0.5\n }\n\n isMultipart () {\n return this.numParts() > 1\n }\n\n isSubmitted () {\n return this.get('submitted')\n }\n\n hasManuallyScoredAnswers () {\n return this.answers.some((answer) => answer.get('manual_score'))\n }\n\n isReadonly () {\n return this.env.isReleased() || !this.assessment_item.canAnswer()\n }\n\n hidesPartialCorrectness () {\n return (\n !this.showMarks() &&\n this.assessment_item.assessment_session.env.get('show_marks') &&\n this.env.get('hide_partial_correctness') &&\n !this.isCorrect()\n )\n }\n\n answerFor (part) {\n return this.answers.findWhere({ part_id: part.get('part_id') })\n }\n\n answerForPartId (partId) {\n return this.answers.findWhere({ part_id: partId })\n }\n\n canSubmit () {\n return this.assessment_item.canSubmit() && !this.get('submitted')\n }\n\n canTryAgain () {\n return this.assessment_item.canSubmit() && this.get('submitted')\n }\n\n canReview () {\n return (\n !this.assessment_item.assessment_session.get('retaking') ||\n this.assessment_item.canRetake() || // retaking and have yet to try again\n this != this.assessment_item.attempt ||\n (this.assessment_item.isClosed() && this.assessment_item.isCorrect())\n )\n }\n\n showWarnings () {\n return (\n this.env.get('show_warnings') &&\n this.answers.some((answer) => answer.hasWarning())\n )\n }\n\n showSolutions () {\n return this.env.get('show_solutions')\n }\n\n showMarks () {\n if (this.assessment_item.get('error')) return false\n\n if (!this.assessment_item.assessment_session.get('retake_supported')) {\n return this.env.get('show_marks') && this.get('submitted')\n }\n\n return this.env.get('show_marks') && this.canReview()\n }\n\n showAnswerTable () {\n const session = this.assessment_item.assessment_session\n\n return (\n session.get('retaking') ||\n session.isClosed() ||\n (session.inEducatorMode() && this.get('answerable')) ||\n (!this.assessment_item.get('error') &&\n this.assessment_item.get('answerable'))\n )\n }\n\n showAnswers () {\n return (\n this.env.get('show_answers') ||\n this.assessment_item.assessment_session.inEducatorMode()\n )\n }\n\n showScores () {\n return this.env.get('show_scores') && this.canReview()\n }\n\n findAnswer (partId) {\n return this.answers.find((answer) => answer.get('part_id') === partId)\n }\n\n actAsSubmitted () {\n if (this.env.isSingleAttempt()) {\n return this.assessment_item.isClosed() || this.assessment_item.canRetake()\n } else {\n return (\n this.get('submitted') ||\n this.assessment_item.isClosed() ||\n (!this.assessment_item.isOwned() &&\n this.assessment_item.assessment_session.assessment.can('supervise'))\n )\n }\n }\n\n countsForItemScore () {\n return (\n this.assessment_item.attempt === this ||\n this.assessment_item.scoredAttempt() === this\n )\n }\n\n needsScoring () {\n return this.gradableAnswers().some((answer) => answer.needsScoring())\n }\n\n displayedScore () {\n if (this.countsForItemScore()) {\n return this.assessment_item.displayedScore()\n } else {\n return `${this.get('score')} / ${this.assessment_item.get('points')}`\n }\n }\n\n markedIcon () {\n if (this.isCorrect()) {\n return 'far fa-check-circle'\n } else if (this.numCorrect() > 0) {\n return 'fa fa-adjust fa-rotate-90'\n } else {\n return 'far fa-times-circle'\n }\n }\n\n markedLabel () {\n if (this.assessment_item.get('error')) {\n return 'unscored'\n } else if (this.needsScoring() || !this.assessment_item.get('answerable')) {\n return 'unscored'\n } else if (this.isCorrect()) {\n return 'correct'\n } else if (this.numCorrect() > 0) {\n return 'partially correct'\n } else {\n return 'incorrect'\n }\n }\n\n markedClass () {\n return this.markedLabel().split(' ').join('-')\n }\n\n answeredClass () {\n if (this.isFullyAnswered()) {\n return 'answered'\n } else if (this.isAnswered()) {\n return 'partially-answered'\n } else if (this.assessment_item.canRetake()) {\n return 'incorrect'\n } else {\n return 'not-answered'\n }\n }\n\n statusClass () {\n if ((this.isScored() || this.isCorrect()) && this.showMarks()) {\n return this.markedClass()\n } else {\n return this.answeredClass()\n }\n }\n\n alertClass () {\n if (this.isScored() && this.showMarks()) {\n if (this.isCorrect()) {\n return 'alert-success'\n } else if (this.numCorrect() > 0) {\n return 'alert-info'\n } else {\n return 'alert-danger'\n }\n } else {\n return 'alert-info'\n }\n }\n\n firstAnswerablePart () {\n return this.question.container.answerableParts()[0]\n }\n\n hasStatusMessage () {\n return (\n this.assessment_item.isClosed() ||\n this.answers.some((answer) => answer.get('scored'))\n )\n }\n\n populateAnswers () {\n this.question.answerableParts().forEach((part) => {\n let answer = this.answerFor(part)\n\n if (answer == null) {\n answer = new PartAnswer(\n { part_id: part.get('part_id') },\n { parse: true }\n )\n answer.attempt = this\n this.answers.add(answer)\n }\n })\n }\n\n isScaffoldProblem () {\n return this.question.hasScaffoldParts()\n }\n\n answer (options = {}) {\n const answers = this.answersToJSON()\n\n defaults(options, {\n sync: false,\n lazy: true,\n attemptingScaffold: false,\n error: $.noop,\n success: (model, resp) => {\n const answerResps = resp.attempts[resp.attempts.length - 1].answers\n const id = resp.attempts[resp.attempts.length - 1].id\n\n this.id = id\n this.set('id', id, { silent: true }) // backbone needs this\n\n this.answers.each(function (answer) {\n const attrs = detect(\n answerResps,\n (attrResp) => attrResp.part_id === answer.get('part_id')\n )\n attrs.success = true\n delete attrs.answer\n delete attrs.answer_alt\n answer.set(answer.parse(attrs, options))\n })\n\n if (\n JSON.stringify(this.savedAnswers) !== JSON.stringify(answers) ||\n options.attemptingScaffold\n ) {\n // stop duplicate triggers\n this.savedAnswers = answers\n\n if (options.attemptingScaffold) {\n // update HTML and re-render item\n this.assessment_item.question.container.synchronizeInteractiveHtml(\n resp.question.parts\n )\n this.assessment_item.trigger('answered')\n } else {\n this.trigger('answered')\n }\n\n if (this.env.isSingleAttempt()) {\n this.set('submitted', true)\n }\n }\n this.assessment_item.checkVersion(resp.problem_version)\n\n // eslint-disable-next-line camelcase\n const attrs = resp?.session_attributes?.readonly\n if (attrs) {\n this.assessment_item.assessment_session.handleTimeLimitChange(\n attrs.time_limit,\n attrs.time_remaining\n )\n }\n },\n })\n options.data = {\n answers: this.answersToJSON(),\n timestamp: this.get('timestamp'),\n }\n\n if (this.assessment_item.canAnswer()) {\n this.command(`${this.assessment_item.url()}/answer`, options)\n this.trigger('answering')\n }\n }\n\n reset () {\n this.set('submitted', false)\n this.answers.each((answer) => answer.reset())\n }\n\n answersToJSON () {\n const fn = function (hash, answer) {\n hash[answer.get('part_id')] = {\n answer: answer.get('answer'),\n answer_alt: answer.get('answer_alt'),\n }\n return hash\n }\n return this.answers.reduce(fn, {})\n }\n}\n","import BaseModel from 'models/base'\n\nexport default class Issue extends BaseModel {}\n","import { defaults, last } from 'underscore'\nimport BaseModel from 'models/base'\nimport Assessment from 'models/assessment'\nimport Attempt from 'models/attempt'\nimport Issue from 'models/issue'\nimport Question from 'models/question'\nimport Problem from 'models/problem'\nimport SketchReveal from 'models/sketch_reveal'\nimport SessionEnvironment from 'models/session_environment'\nimport { featureAccess, isSupport } from 'utils/user'\n\nexport default class AssessmentItem extends BaseModel {\n parentName () {\n return 'assessment_item'\n }\n\n url () {\n return `/assessment_items/${this.id}`\n }\n\n lastAttempt () {\n return this.submittedAttempt || this.attempt\n }\n\n scoredAttempt () {\n return this.lastAttempt()\n }\n\n answerFor (part) {\n return this.attempt.answerFor(part)\n }\n\n attemptAt (index) {\n return this.attempts.at(index)\n }\n\n number () {\n return this.collection.indexOf(this) + 1\n }\n\n displayedNumber () {\n return this.get('problem_number') || this.number()\n }\n\n displayedScore () {\n return `${this.question.get('extra_credit') ? '+' : ''}${this.get(\n 'score'\n )} / ${this.get('points')}`\n }\n\n attemptsRemaining () {\n return Math.max(0, this.env.get('max_attempts') - this.get('num_attempts'))\n }\n\n assignmentManualScore () {\n return this.assignment().manualProblemScoreFor(\n this.get('working_problem_id')\n )\n }\n\n assignment () {\n return this.assessment_session.assessment.assignment\n }\n\n statusClass () {\n if (\n this.assessment_session.get('retaking') &&\n (!this.attempt || this.canRetake())\n ) {\n return 'incorrect'\n } else {\n return this.attempt?.statusClass() || ''\n }\n }\n\n alertClass () {\n return this.attempt?.alertClass() || ''\n }\n\n canSubmit () {\n return (\n this.env &&\n this.env.isMultipleAttempts() &&\n this.get('answerable') &&\n this.isOwned() &&\n !this.isClosed() &&\n !this.get('error') &&\n this.hasAttemptsRemaining()\n )\n }\n\n hasAttemptsRemaining () {\n return !this.env.get('max_attempts') || this.attemptsRemaining() > 0\n }\n\n canAnswer () {\n return (\n this.isOwned() &&\n !this.isClosed() &&\n ((this.env.isSingleAttempt() && !this.canRetake()) ||\n (this.env.isMultipleAttempts() && !this.attempt.get('submitted')))\n )\n }\n\n canRetake () {\n return (\n this.isOpen() &&\n this.assessment_session.get('retaking') &&\n !this.get('retaking')\n )\n }\n\n canRestart () {\n return (\n this.assessment_session.isUnderway() &&\n this.assessment_session.assessment.can('restart') &&\n this.isOwned() &&\n !this.isStandalone() &&\n this.attempt.isAnswered()\n )\n }\n\n canCreateReveal () {\n const minAllow = this.env.get('oh_min_attempts')\n\n return (\n this.allowOH() &&\n (minAllow == null ||\n this.get('num_attempts') >= minAllow ||\n this.assessment_session.isClosed() ||\n this.isClosed())\n )\n }\n\n allowOH () {\n return featureAccess('oh') && this.can('create_reveal')\n }\n\n hasLimitedTries () {\n return this.env.isMultipleAttempts() && !!this.env.get('max_attempts')\n }\n\n showPreviousAttempts () {\n return (\n this.env.get('show_previous_attempts') || (!this.isOwned() && isSupport())\n )\n }\n\n hasOverriddenScore () {\n return this.get('score_overridden') || this.get('manual_score_explanation')\n }\n\n numAttempts () {\n return this.attemptsFetched\n ? this.attempts.size()\n : this.get('num_current_attempts')\n }\n\n isFirst () {\n return this.number() === 1\n }\n\n isLast () {\n return this.number() === this.collection.size()\n }\n\n isStandalone () {\n return (\n this.collection.size() === 1 || this.assessment_session.isStandalone()\n )\n }\n\n isAdaptive () {\n return this.assessment_session.isAdaptive()\n }\n\n isOpen () {\n return this.get('state') === 'open'\n }\n\n isClosed () {\n return !this.isOpen()\n }\n\n isOwned () {\n return this.assessment_session.assessment.get('owned')\n }\n\n isPractice () {\n return this.assessment_session.assessment.get('practice')\n }\n\n unlimitedPractice () {\n return (\n this.isPractice() &&\n this.assessment_session.assessment.get('unlimited_practice')\n )\n }\n\n allowPractice () {\n const minAllow = this.env.get('practice_min_attempts')\n\n return (\n this.practiceEnabled() &&\n (minAllow == null ||\n this.get('num_attempts') >= minAllow ||\n this.assessment_session.isClosed() ||\n this.isClosed())\n )\n }\n\n practiceEnabled () {\n return this.isOwned() && this.env.get('allow_practice')\n }\n\n isTryingAgain () {\n return this.attempts.contains(this.preservedAttempt)\n }\n\n previewedAssignment () {\n return (\n this.assessment_session.assessment?.assignment ||\n this.assessment_session.assessment.problem?.assignment\n )\n }\n\n ohPreviewDisabledForSection () {\n const assignment = this.previewedAssignment()\n return (\n assignment &&\n assignment.get('section_oh_enabled') != null &&\n !assignment.get('section_oh_enabled')\n )\n }\n\n isAttempted () {\n return this.get('num_attempts') > 0\n }\n\n isCorrect () {\n return this.lastAttempt()?.isCorrect() || false\n }\n\n isIncorrect () {\n return this.isAttempted() && this.isAnswered() && !this.isCorrect()\n }\n\n isFullyAnswered () {\n return this.lastAttempt()?.isFullyAnswered() || false\n }\n\n isAnswered () {\n return this.lastAttempt()?.isAnswered() || false\n }\n\n isSubmitted () {\n return this.lastAttempt()?.isSubmitted() || false\n }\n\n shouldAdvanceToNextItem () {\n return this.isCorrect() && this.next() && !this.next().isCorrect()\n }\n\n needsOHNudge () {\n const struggling = this.isIncorrect() && this.numAttempts() >= 3\n\n return this.canCreateReveal() && !this.get('oh_educator') && struggling\n }\n\n linkTo () {\n return `/assessments/${\n this.assessment_session.assessment.id\n }/items#${this.number()}`\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n\n this.env = this.hasOne('environment', SessionEnvironment, resp, {\n parentEnv: options.env || this.assessment_session?.env,\n })\n\n if (!resp.shallow) {\n this.question = this.hasOne('question', Question, resp, {\n env: this.env,\n })\n this.reveal = this.hasOne('sketch_reveal', SketchReveal, resp)\n this.issues = this.hasMany('issues', Issue, resp, { allowEmpty: true })\n\n this.buildAttempts(resp, options)\n this.parseSessionAttributes(resp)\n }\n\n if (isSupport()) {\n this.parseSupport(resp)\n }\n\n return resp\n }\n\n parseSupport (resp) {\n this.problem = this.hasOne('problem', Problem, resp)\n\n if (resp.working_problem) {\n this.working_problem = this.hasOne('working_problem', Problem, resp)\n }\n\n if (resp.origin_problem) {\n this.origin_problem = this.hasOne('origin_problem', Problem, resp)\n }\n }\n\n restart (options = {}) {\n const success = () => {\n this.set('shallow', true, { silent: true })\n\n if (this.get('error')) {\n options.unwrappedError()\n } else {\n this.trigger('restart', this)\n }\n }\n defaults(options, { sync: true, success, error: options.error })\n this.trigger('restarting', this)\n this.command(`${this.url()}/restart`, options)\n }\n\n recover (options = {}) {\n const success = () => {\n this.set('shallow', true, { silent: true })\n\n if (this.get('error')) {\n options.unwrappedError()\n } else {\n this.trigger('restart', this)\n }\n }\n defaults(options, { sync: true, success, error: options.error })\n this.command(`${this.url()}/recover`, options)\n }\n\n submit (options = {}) {\n defaults(options, {\n sync: true,\n success: (model, resp) => {\n this.trigger('submitted', this, options)\n },\n successBeforeSync: (model, resp) => {\n this.checkVersion(resp.problem_version)\n },\n env: this.env,\n flash: true,\n })\n options.data = {\n answers: this.attempt.answersToJSON(),\n timestamp: new Date().getTime(),\n }\n this.command(`${this.url()}/submit`, options)\n }\n\n reopen (options = {}) {\n defaults(options, {\n sync: true,\n success: () => {\n this.trigger('reopen', this, options)\n },\n })\n this.command(`${this.url()}/reopen`, options)\n }\n\n reset () {\n if (this.preservedAttempt) {\n this.set('num_current_attempts', this.get('num_current_attempts') + 1, {\n silent: true,\n })\n this.addSavedAttempt()\n }\n\n this.attempt.reset()\n this.trigger('reset', this)\n }\n\n retake () {\n this.set('retaking', true)\n this.reset()\n }\n\n practice (options) {\n const commandOptions = {\n sync: false,\n success (model, resp) {\n const assessment = new Assessment(resp, { parse: true })\n options.success(assessment)\n },\n error () {\n options.error()\n },\n }\n this.command(`${this.url()}/practice`, commandOptions)\n }\n\n fetchAttempts (selectedIdx, callback) {\n this.command(`${this.url()}/attempts`, {\n method: 'GET',\n sync: false,\n success: (model, resp) => {\n const tryingAgain = this.isTryingAgain()\n\n this.attemptsFetched = true\n this.attempts = this.hasMany(false, Attempt, resp, {\n env: this.env,\n question: this.question,\n })\n\n this.reconcileFetchedAttempts(tryingAgain)\n callback?.()\n },\n })\n }\n\n revealSketch (options = {}) {\n this.reveal = new SketchReveal()\n this.reveal.assessment_item = this\n this.reveal.save(\n {},\n {\n success: (model, resp) => {\n const usage = this.assessment_session.assessment.creditUsage\n if (usage?.free()) {\n usage.fetch({\n success: () => {\n this.trigger('sketch_revealed', { reveal: this.reveal })\n options.success?.(this.reveal)\n },\n })\n } else {\n this.trigger('sketch_revealed', { reveal: this.reveal })\n options.success?.(this.reveal)\n }\n },\n error: (model, resp) => {\n this.reveal = null\n options.error?.(resp)\n },\n }\n )\n }\n\n addExtraAttempts (num, callback) {\n this.command(`${this.url()}/add_extra_attempts`, {\n sync: false,\n data: {\n num,\n },\n success: (model, resp) => {\n this.set('shallow', true, { silent: true })\n callback?.()\n },\n })\n }\n\n next () {\n if (this.isLast()) {\n return null\n } else {\n return this.assessment_session.itemAt(this.number() + 1)\n }\n }\n\n prev () {\n if (this.isFirst()) {\n return null\n } else {\n return this.assessment_session.itemAt(this.number() - 1)\n }\n }\n\n close (callback) {\n this.command(`${this.url()}/close`, {\n success: (model, resp) => {\n this.trigger('closed', this)\n callback?.()\n },\n })\n }\n\n checkVersion (version) {\n if (\n this.get('problem_version') != null &&\n this.get('problem_version') !== version\n ) {\n this.trigger('outdated')\n }\n }\n\n manuallyScore (score, explanation) {\n this.command(`${this.url()}/score`, {\n sync: true,\n data: {\n score,\n explanation,\n },\n success: (model, resp) => {\n const item = this.attempt.assessment_item\n item.trigger('manual_score_override', this.attempt.assessment_item)\n item.assessment_session.trigger(\n 'manual_score_override',\n this.attempt.assessment_item\n )\n },\n })\n }\n\n bulkScore (options) {\n this.command(\n `/assignments/${this.assignment().get('id')}/assessment_items/bulk_score`,\n {\n data: {\n problem_id: this.get('working_problem_id'),\n score: options.score,\n explanation: options.explanation,\n },\n success: (model, resp) => {\n options.callback(resp)\n },\n }\n )\n }\n\n parseSessionAttributes (resp) {\n if (resp.session_attributes && this.assessment_session) {\n this.assessment_session.parseAttributes(resp.session_attributes)\n this.assessment_session.env.parseAttributes(\n resp.session_environment_attributes\n )\n }\n }\n\n // keep a deep copy of the current attempt so we can add it into the answer\n // table if the user tries again and the current attempt is used for the next attempt\n preserveAttempt (resp) {\n const attemptData = resp.attempts[resp.attempts.length - 1]\n\n if (attemptData.submitted) {\n this.preservedAttempt = new Attempt(\n JSON.parse(JSON.stringify(attemptData)),\n {\n parse: true,\n question: this.question,\n env: this.env,\n }\n )\n this.preservedAttempt.assessment_item = this\n this.preservedAttempt.set('id', 'saved') // hack to allow the duplicate to add added to the collection\n }\n }\n\n buildAttempts (resp, options) {\n if (this.attempt) {\n this.stopListening(this.attempt)\n }\n\n this.preserveAttempt(resp)\n this.attempts = this.hasMany('attempts', Attempt, resp, {\n env: this.env,\n retry: options.retry,\n question: this.question,\n })\n this.submittedAttempt = last(this.attempts.where({ submitted: true }))\n this.attempt = this.attempts.last()\n this.attemptsFetched = resp.num_attempts == 1\n\n this.attempt.populateAnswers()\n this.listenTo(this.attempt, 'answering', () =>\n this.trigger('answering', { attempt: this.attempt })\n )\n }\n\n // ensure model and UI stay synchronized after attempts are lazily loaded\n reconcileFetchedAttempts (tryingAgain) {\n const match = this.attempts.findIndex(\n (attempt) => attempt.id == this.attempt.id\n )\n\n if (match != -1) {\n // replace fetched copy with current one\n this.attempts.remove(this.attempts.at(match), { silent: true })\n this.attempts.add(this.attempt, { silent: true, at: match })\n }\n\n if (tryingAgain) {\n // re-add saved attempt in addition to current one\n this.addSavedAttempt()\n }\n }\n\n addSavedAttempt () {\n if (this.attempts.last().id == this.attempt.id) {\n // we're trying again, but have yet to save an answer\n this.attempts.add(this.preservedAttempt, {\n at: this.attempts.findIndex((attempt) => attempt.id == this.attempt.id),\n })\n }\n }\n}\n","/* global $, _E, I18n */\nimport { defaults } from 'underscore'\nimport Backbone from 'backbone'\nimport BaseModel from 'models/base'\nimport Assessment from 'models/assessment'\nimport AssessmentItem from 'models/assessment_item'\nimport SessionEnvironment from 'models/session_environment'\nimport User from 'models/user'\nimport { isSupport } from 'utils/user'\nimport { dateFormat } from 'helpers/date'\nimport { isBlank } from 'utils/common'\n\nexport default class AssessmentSession extends BaseModel {\n parentName () {\n return 'assessment_session'\n }\n\n static create (attrs, options) {\n const session = new this(attrs)\n session.save({}, options)\n\n return session\n }\n\n url () {\n if (this.id) {\n return `/assessment_sessions/${this.id}`\n } else {\n return `/assessments/${this.get('assessment_id')}/assessment_sessions`\n }\n }\n\n userUrl () {\n return `/registrations/${this.assessment.registration.id}`\n }\n\n name () {\n const names = []\n\n if (!this.get('owned') && this.user) {\n if (this.assessment.registration) {\n names.push(\n `${this.user.get(\n 'full_name'\n )}`\n )\n } else {\n names.push(this.user.get('full_name'))\n }\n }\n\n if (\n this.assessment.get('allows_multiple_sessions') &&\n this.assessment.numSessions() > 1\n ) {\n names.push(\n `${this.get(\n 'name'\n )}`\n )\n names.push(`${name} #${this.get('number')}`)\n } else {\n names.push(this.get('name'))\n }\n\n return names.join(' — ')\n }\n\n percentComplete () {\n if (this.items.size() === 0) {\n return 0\n } else {\n return Math.round((this.itemsAnswered() / this.items.size()) * 100)\n }\n }\n\n percentCorrect () {\n if (this.get('adjusted_score') && this.get('points')) {\n return Math.round(\n (this.get('adjusted_score') * 100.0) / this.get('points')\n )\n } else {\n return 0\n }\n }\n\n displayedProgress () {\n return `${this.percentComplete()}% (${this.itemsAnswered()}/${this.items.size()})`\n }\n\n ariaProgress () {\n return `${this.itemsAnswered()} out of ${this.items.size()} (${this.percentComplete()}%)`\n }\n\n displayedScore () {\n return `${this.get('adjusted_score')}/${this.get('points')}`\n }\n\n displayedPercent () {\n return `${this.percentCorrect()}%`\n }\n\n displayExtraActions () {\n return (\n this.env.get('show_scores') ||\n this.can('restart') ||\n this.can('update') ||\n (this.isClosed() && this.can('create'))\n )\n }\n\n status () {\n return this.get('status')\n }\n\n title () {\n if (this.isStandalone() && isBlank(this.assessment.get('name'))) {\n return 'Try this problem'\n } else {\n return this.assessment.get('name')\n }\n }\n\n submittedAt () {\n return this.get('end_time') || this.get('created_at')\n }\n\n currentItem () {\n return this.findItem(this.get('current_item_id')) || this.itemAt(1)\n }\n\n itemAt (itemNumber) {\n return this.items?.at(itemNumber - 1)\n }\n\n findItem (id) {\n return this.items.findWhere({ id })\n }\n\n numItems () {\n return this.items.size()\n }\n\n hasItems () {\n return this.numItems() > 0\n }\n\n itemsSkipped () {\n return this.numItems() - this.itemsPartiallyAnswered()\n }\n\n itemsRemaining () {\n return this.numItems() - this.itemsAnswered()\n }\n\n itemsCorrect () {\n return this.items.filter((item) => item.isCorrect()).length\n }\n\n itemsIncorrect () {\n return this.items.filter((item) => item.isIncorrect()).length\n }\n\n itemsAnswered () {\n return this.items.filter((item) => item.isFullyAnswered()).length\n }\n\n itemsPartiallyAnswered () {\n return this.items.filter((item) => item.isAnswered()).length\n }\n\n itemsLate () {\n return this.items.filter((item) => item.get('late')).length\n }\n\n itemsEarly () {\n return this.items.filter((item) => item.get('early')).length\n }\n\n isOwned () {\n return this.assessment.get('owned')\n }\n\n isUnderway () {\n return this.get('state') === 'underway'\n }\n\n isClosed () {\n return !this.isUnderway()\n }\n\n isStandalone () {\n return this.numItems() === 1 || this.get('appear_adaptive')\n }\n\n isAttempted () {\n return this.items.some(\n (item) => item.isClosed() || item.lastAttempt()?.get('submitted')\n )\n }\n\n isAnswered () {\n return this.items.some((item) => item.isAnswered())\n }\n\n canViewItems () {\n return !this.get('reviewing') && this.env.get('can_view_items')\n }\n\n isGettingStarted () {\n return (\n this.isOwned() &&\n !this.isClosed() &&\n this.assessment.hasInstructions() &&\n !this.isAnswered() &&\n (this.currentItem() == null || this.currentItem() === this.items.first())\n )\n }\n\n isSuccessfulScore () {\n return this.percentCorrect() >= 80\n }\n\n inEducatorMode () {\n return (\n this.assessment.get('type') !== 'problem_set' &&\n ((!this.isOwned() && (this.assessment.can('supervise') || isSupport())) ||\n (this.assessment.get('preview') &&\n (_E.currentUser.educator || _E.currentUser.ta)))\n )\n }\n\n hasTimeRemaining () {\n return this.get('time_remaining') != null && this.get('time_remaining') > 0\n }\n\n isAssigned () {\n return this.assessment.isAssigned()\n }\n\n isAdaptive () {\n return this.assessment.get('type') === 'adaptive_assignment'\n }\n\n showResults () {\n return (\n (this.isAssigned() &&\n this.get('released') &&\n (this.env.get('show_scores') || this.env.get('show_marks'))) ||\n this.get('reviewing')\n )\n }\n\n showPerformanceResults () {\n return (\n this.assessment.can('supervise') ||\n this.get('reviewing') ||\n (this.isClosed() && this.env.get('show_scores'))\n )\n }\n\n showReviewWorkButton () {\n return (\n (this.isAssigned() && this.isClosed()) ||\n (!this.assessment.get('owned') && this.showLateWorkNotice())\n )\n }\n\n showCompletionStats () {\n return (\n this.get('reviewing') ||\n (this.canViewItems() &&\n !this.isStandalone() &&\n this.env.get('show_marks'))\n )\n }\n\n showScoreBreakdown () {\n return (\n this.get('late_penalty') > 0 ||\n this.get('early_credit') > 0 ||\n this.get('curve') ||\n this.get('extra_credit') > 0\n )\n }\n\n availability () {\n let msg = []\n const format = I18n.t('time.formats.js.moment-datetime-no-tz')\n\n if (this.isClosed()) {\n if (this.get('suspended') && !this.isOwned()) {\n msg.push('This submission is suspended until resumed by the student.')\n } else {\n const closedMsg = []\n if (this.get('status') === 'not started') {\n closedMsg.push('This submission is closed') // weird case of unstarted and closed\n } else {\n closedMsg.push(`This submission is ${this.get('status')}`)\n }\n if (this.env.get('show_scores')) {\n closedMsg.push(\n `with a score of ${this.displayedScore()} (${this.displayedPercent()})`\n )\n }\n\n msg.push(`${closedMsg.join(' ')}.`)\n if (!this.assessment.get('released')) {\n msg.push(this.assessment.releasability())\n }\n }\n } else {\n if (this.assessment.get('due')) {\n const dueMsg = ['The due date has passed.']\n if (this.get('late_work_date')) {\n dueMsg.push('Late work is no longer permitted.')\n }\n msg.push(dueMsg.join(' '))\n } else if (this.assessment.get('late')) {\n msg.push(\n `The due date has passed, but late work is permitted until ${dateFormat(\n this.assessment.get('late_work_date'),\n format\n )}.`\n )\n } else if (this.assessment.get('due_date')) {\n msg.push(\n `Due ${dateFormat(\n this.assessment.get('due_date'),\n format\n )}.`\n )\n\n if (!this.isClosed() && this.isAssigned()) {\n if (this.assessment.get('late_work_date')) {\n msg.push(\n `Late work is permitted until ${dateFormat(\n this.assessment.get('late_work_date'),\n format\n )}. It will be turned in automatically after the late work period ends.`\n )\n } else {\n msg.push('It will be turned in automatically after the due date.')\n }\n }\n }\n\n if (this.assessment.grade?.get('excused')) {\n msg.push(\n `This ${this.assessment.get(\n 'display_type'\n )} is excused. No grade will be recorded.`\n )\n }\n }\n\n if (this.assessment.showRemainingSubmissionsMessage()) {\n msg.push(this.assessment.remainingSubmissionsMessage())\n }\n\n msg = msg.flat().filter((n) => n)\n if (msg.length > 1) {\n msg = msg.map((m) => `
  • ${m}
  • `).join('')\n return ``\n } else {\n return msg.join('')\n }\n }\n\n canCreate () {\n return this.isClosed() && this.can('create')\n }\n\n canClose () {\n return (\n !this.isClosed() &&\n this.isAssigned() &&\n (this.can('close') ||\n this.assessment.assignment?.get('requires_respondus'))\n )\n }\n\n restart (options = {}) {\n defaults(options, {\n sync: true,\n success: $.noop,\n reload: true,\n })\n const { success } = options\n options.success = () => {\n this.trigger('restart', this)\n success(this)\n }\n\n this.command(`${this.url()}/restart`, options)\n }\n\n reopen (options = {}) {\n defaults(options, {\n sync: true,\n success: $.noop,\n reload: true,\n })\n const { success } = options\n options.success = () => {\n this.trigger('reopen', this)\n success(this)\n }\n this.command(`${this.url()}/reopen`, options)\n }\n\n retake (callback) {\n this.command(`/assessment_sessions/${this.id}/retake`, {\n success: callback,\n })\n }\n\n close (options = {}) {\n defaults(options, {\n sync: true,\n silent: false,\n success: $.noop,\n error: $.noop,\n })\n const { success } = options\n options.success = () => {\n if (!options.silent) {\n this.trigger('close', this, options)\n }\n success(this)\n }\n this.command(`${this.url()}/close`, options)\n }\n\n destroy (options = {}) {\n defaults(options, {\n sync: false,\n success: $.noop,\n error: $.noop,\n method: 'DELETE',\n })\n\n this.command(this.url(), options)\n }\n\n parse (resp, options) {\n if (options.sync == null) {\n options.sync = true\n }\n if (options.sync) {\n super.parse(resp, options)\n this.assessment = this.hasOne('assessment', Assessment, resp)\n\n if (this.assessment) {\n this.assessment.scoredSession = this\n }\n\n this.env = this.hasOne('environment', SessionEnvironment, resp)\n this.items =\n this.hasMany('items', AssessmentItem, resp, { env: this.env }) ||\n new Backbone.Collection()\n this.user = this.hasOne('user', User, resp)\n }\n return resp\n }\n\n setCurrentItem (itemId) {\n const item = this.findItem(itemId)\n this.set({ current_item_id: item.id })\n this.trigger('current_item_changed', this) // don't listen to change:current_item_id; listen to this instead\n\n if (this.isUnderway() && this.assessment.get('owned')) {\n // do not call save here; backbone always synchronizes the model when using patch and that can cause a race condition\n this.command(`/assessment_sessions/${this.id}`, {\n method: 'PUT',\n data: { current_item_id: item.id },\n hideProgress: true,\n success: (model, resp) => {\n const attrs = resp.readonly\n this.handleTimeLimitChange(attrs.time_limit, attrs.time_remaining)\n },\n error: (model, resp) => {\n if (resp.status === 403 && resp.responseJSON.state === 'closed') {\n this.trigger('close_remote')\n }\n },\n })\n }\n }\n\n closedUponItemSubmission () {\n // hacks to avoid reload\n this.readonly.set('time_remaining', 0)\n if (this.assessment.get('practice')) {\n this.readonly.get('abilities').push('restart')\n }\n if (this.assessment.get('preview')) {\n this.readonly.set('released', true)\n this.env.set('show_scores', true)\n }\n this.trigger('close', this)\n }\n\n // synchronize score after it's changed by the instructor\n syncSessionScore (session) {\n const tempSession = new this.constructor()\n tempSession.id = this.id\n tempSession.fetch({\n success: (model, resp) => {\n this.readonly.set({\n score: tempSession.get('score'),\n adjusted_score: tempSession.get('adjusted_score'),\n points: tempSession.get('points'),\n })\n this.trigger('score_updated', this)\n },\n })\n }\n\n handleTimeLimitChange (newTimeLimit, newTimeRemaining) {\n if (newTimeLimit && newTimeLimit != this.get('time_limit')) {\n const deltaMinutes = newTimeLimit - this.get('time_limit')\n\n this.set(\n { time_limit: newTimeLimit, time_remaining: newTimeRemaining },\n { silent: true }\n )\n this.trigger(\n 'time_limit_changed',\n this,\n deltaMinutes,\n newTimeLimit,\n newTimeRemaining\n )\n }\n }\n}\n","/* global I18n, $ */\nimport { defaults, extend, compact } from 'underscore'\nimport { humanize } from 'underscore.string'\nimport Backbone from 'backbone'\nimport ModelBinder from 'backbone.modelbinder'\nimport { momentWithTz, dateFormat, sameDate } from 'helpers/date'\nimport { isBlank } from 'utils/common'\nimport { isSupport } from 'utils/user'\nimport BaseModel from 'models/base'\nimport ManualProblemScore from 'models/manual_problem_score'\nimport Assessable from 'models/modules/assessable'\nimport Exportable from 'models/modules/exportable'\nimport { Skill } from 'models/taxonomy_node'\nimport Grade from 'models/grade'\nimport Assessment from 'models/assessment'\nimport PrintVariation from 'models/print_variation'\nimport ProblemSet, { initC } from 'models/problem_set'\nimport User from 'models/user'\nimport BitField from 'models/bit_field'\nimport { VIEW_FIELDS } from 'models/assignment_view_fields'\nimport AssignmentPrerequisite from 'models/assignment_prerequisite'\nimport { toIntWithMinAndMax } from 'helpers/model_binder'\n\ninitC()\n// eslint-disable-next-line import/first\nimport Section from 'models/section'\n\nclass Assignment extends BaseModel {\n parentName () {\n return 'assignment'\n }\n\n url () {\n if (this.id) {\n return `/assignments/${this.id}`\n } else {\n return `/sections/${this.get('section_id')}/assignments`\n }\n }\n\n diffUrl () {\n return `${this.url()}/diff`\n }\n\n subtitle () {\n return `In ${this.section.get('name')}`\n }\n\n icon () {\n if (\n this.get('display_type') === 'homework' ||\n this.get('display_type') == 'assignment'\n ) {\n return 'fa fa-book'\n } else {\n return 'fa fa-certificate'\n }\n }\n\n hasAvailabilityDate () {\n return (\n this.get('due_date') ||\n this.get('available_date') ||\n this.get('late_work_date')\n )\n }\n\n isSynchronizedMember () {\n return this.get('member') && this.get('synchronize_member_availability')\n }\n\n needsAttention () {\n return (\n this.assessment?.get('suspended') ||\n (!this.get('due') &&\n (this.assessment == null ||\n !this.assessment.get('available') ||\n !this.assessment.isClosed()))\n )\n }\n\n showScores () {\n return this.assessment?.showScores()\n }\n\n hasWorkPolicy () {\n return this.get('allow_early_work') || this.get('allow_late_work')\n }\n\n isPublishedOrMember () {\n return this.get('published') || this.get('member')\n }\n\n allPrerequisitesSatisfied () {\n return (\n this.prerequisitesReleased() || this.prerequisitesPersonallySatisfied()\n )\n }\n\n hasPrerequisites () {\n return this.prerequisites.size() > 0\n }\n\n isLocal () {\n return (\n (this.section.coordinatorSection || this.section.get('member')) &&\n !this.get('member')\n )\n }\n\n displayedScore () {\n return this.assessment?.displayedScore()\n }\n\n displayedPercent () {\n return this.assessment?.displayedPercent()\n }\n\n percentCorrect () {\n return (\n (!this.get('excused') ? this.assessment?.percentCorrect() : undefined) ||\n 0\n )\n }\n\n listStatus () {\n if (this.get('visible')) {\n return 'available'\n } else {\n return 'unavailable'\n }\n }\n\n status () {\n let msg =\n this.assessment?.scoredSession?.status() ||\n this.assessment?.get('status') ||\n ''\n if (this.get('excused')) {\n msg = ['excused', msg].join('; ')\n }\n return msg\n }\n\n statusClass () {\n return (\n this.assessment?.scoredSession?.get('state') ||\n this.assessment?.get('state') ||\n (this.isTakable() ? 'not-started' : '')\n )\n }\n\n tableWidth () {\n return '100%'\n }\n\n lateWorkMode () {\n if (this.get('allow_late_work')) {\n if (this.get('late_work_end_date')) {\n return 'end_date'\n } else {\n return 'duration'\n }\n } else {\n return 'none'\n }\n }\n\n workPolicyLabel () {\n const label = []\n\n if (this.get('allow_early_work')) {\n label.push('early')\n }\n if (this.get('allow_late_work')) {\n label.push('late')\n }\n\n return `${label.join(' and ')} work`\n }\n\n displayType () {\n return humanize(this.get('display_type')).toLowerCase()\n }\n\n // this is duplicated here to save a server round-trip after auto-save\n autodetectedDisplayType () {\n if (this.get('designated_type') != 'autodetect') return null\n\n const env = this.environment()\n\n if (this.get('category') == 'exam' || this.get('category') == 'quiz') {\n return this.get('category')\n } else if (env.isSingleAttempt() || env.get('timed') || env.get('locked')) {\n return 'test'\n } else {\n return 'assignment'\n }\n }\n\n summary (fields = 3) {\n if (fields == 3 || !this.can('update')) {\n return this.shortSummary()\n } else {\n const bits = new BitField(fields)\n const others = []\n\n Object.keys(VIEW_FIELDS).forEach((key) => {\n const field = VIEW_FIELDS[key]\n\n if (!field.hide && bits.getBit(field.index)) {\n const value = field.value?.(this) || this.get(key)\n\n if (value !== undefined) {\n others.push(`\n \n \n ${field.label}: \n \n \n ${value}\n \n `)\n }\n }\n })\n\n return others.length > 0\n ? `${others.join('')}
    `\n : ''\n }\n }\n\n shortSummary () {\n return compact([\n VIEW_FIELDS.type.value(this),\n VIEW_FIELDS.points.value(this, true),\n ]).join(' • ')\n }\n\n availability () {\n const available = this.get('available')\n const availableDate = this.get('available_date')\n const dueDate = this.get('due_date')\n const lines = []\n\n if (!available) {\n if (availableDate) {\n lines.push(`${this.availableDateLabel()}: available`)\n }\n }\n\n if (this.get('early_work_date')) {\n lines.push(\n `${this.workDateLabel(\n 'early'\n )}: early period ends`\n )\n }\n\n if (dueDate) {\n lines.push(`${this.dueDateLabel()}: due`)\n if (this.get('late_work_date')) {\n lines.push(`${this.workDateLabel('late')}: late period ends`)\n }\n }\n\n if (\n this.get('displayed_release_date') &&\n !sameDate(this.get('displayed_release_date'), this.get('due_date'))\n ) {\n lines.push(\n `${this.dateLabel(\n this.get('displayed_release_date')\n )}: results released`\n )\n }\n\n return lines.join('
    ')\n }\n\n dateLabel (date) {\n if (date) {\n return dateFormat(date, I18n.t('time.formats.js.moment-datetime-no-tz'))\n } else {\n return ''\n }\n }\n\n availableDateLabel () {\n return this.dateLabel(this.get('available_date'))\n }\n\n dueDateLabel () {\n return this.dateLabel(this.get('due_date'))\n }\n\n // used by list group item\n dueDateCellLabel () {\n const lines = []\n\n if (this.get('allow_early_work') && this.get('early_work_date')) {\n lines.push(\n `${this.workDateLabel('early')}: early period ends`\n )\n }\n\n if (this.get('allow_late_work')) {\n if (this.get('due_date'))\n lines.push(`${this.dueDateLabel()}: due`)\n if (this.get('late_work_date'))\n lines.push(`${this.workDateLabel('late')}: late period ends`)\n } else {\n if (this.get('due_date')) lines.push(`${this.dueDateLabel()}: due`)\n }\n\n if (\n this.get('displayed_release_date') &&\n !sameDate(this.get('displayed_release_date'), this.get('due_date'))\n ) {\n lines.push(\n `${this.dateLabel(\n this.get('displayed_release_date')\n )}: results released`\n )\n }\n\n return lines.join('
    ')\n }\n\n workDateLabel (policy) {\n return this.dateLabel(this.get(`${policy}_work_date`))\n }\n\n datesLabel () {\n const lines = []\n\n if (this.get('available_date'))\n lines.push(`${this.availableDateLabel()}: available`)\n lines.push(this.dueDateCellLabel())\n\n return lines.join('
    ')\n }\n\n reorderKey () {\n return [\n (this.get('due_date') && dateFormat(this.get('due_date'))) || '-',\n (this.get('available_date') && dateFormat(this.get('available_date'))) ||\n '-',\n ].join('-')\n }\n\n localVisibility () {\n if (!this.get('locally_startable')) {\n return `Launch from ${this.registration.get('lms_provider_name')} to open`\n }\n }\n\n releasability () {\n const msg = []\n const format = I18n.t('time.formats.js.moment-datetime-no-tz')\n const session = this.assessment?.scoredSession\n\n if (\n (this.assessment == null || session?.isClosed()) &&\n !this.isReleased()\n ) {\n if (\n this.get('displayed_release_date') &&\n this.get('displayed_release_date') !== this.get('due_date')\n ) {\n msg.push(\n 'Results released on ' +\n dateFormat(this.get('displayed_release_date'), format) +\n '.'\n )\n } else if (this.get('release_method') === 'release_never') {\n msg.push('Results are not currently available.')\n }\n }\n\n return msg.join(' ')\n }\n\n problemSet () {\n return this.workingSet || this.masterSet\n }\n\n isTakable () {\n return (\n this.registration.get('accessible') &&\n this.get('locally_startable') &&\n (this.isReleased() || (this.get('available') && !this.get('due')))\n )\n }\n\n isAccessible () {\n return this.registration.get('accessible')\n }\n\n isUnscheduled () {\n return !(this.get('available_date') || this.get('due_date'))\n }\n\n isPastDue () {\n if (this.get('due_date') == null) {\n return false\n }\n\n const current = momentWithTz(new Date())\n const due = momentWithTz(this.get('due_date'))\n return current.unix() >= due.unix()\n }\n\n isActive () {\n if (!this.get('visible')) {\n return false\n }\n\n const current = momentWithTz(new Date())\n const due = this.get('due_date') && momentWithTz(this.get('due_date'))\n const available =\n this.get('available_date') && momentWithTz(this.get('available_date'))\n\n return (\n (!due || (due && due > current)) &&\n (!available || (available && available <= current))\n )\n }\n\n isReleased () {\n return this.get('released')\n }\n\n canRetake () {\n return this.assessment && this.assessment.scoredSession.can('create')\n }\n\n hasAvailabilityDates () {\n return !(\n isBlank(this.get('due_date')) && isBlank(this.get('available_date'))\n )\n }\n\n manualProblemScoreFor (problemId) {\n return this.manualProblemScores.findWhere({ problemId })\n }\n\n ltiToolURL () {\n return `${window.location.origin}/lti/assess?assignment_id=${this.id}`\n }\n\n parse (resp, options) {\n extend(this, Exportable)\n extend(this, Assessable)\n\n // ensure our formats match or we'll get a double server save after every change\n this.ensureMatchedDateFormats(resp, 'due_date')\n this.ensureMatchedDateFormats(resp, 'available_date')\n this.ensureMatchedDateFormats(resp, 'release_date')\n\n if (resp.release_duration_value) {\n resp.release_duration_value = parseInt(resp.release_duration_value)\n }\n const assignment = super.parse(resp, options)\n\n this.grades = new Backbone.Collection([], { model: Grade })\n this.grades.url = `/assignments/${resp.id}/grades`\n this.assessment = this.hasOne('assessment', Assessment, resp)\n this.variations ||= this.hasMany('variations', PrintVariation, resp)\n\n if (this.section == null) {\n this.section = this.hasOne('section', Section, resp)\n }\n delete resp.section\n\n if (resp.working_set && this.workingSet == null) {\n this.workingSet = this.hasOne('working_set', ProblemSet, resp)\n }\n delete resp.working_set\n\n if (resp.master_set && this.masterSet == null) {\n this.masterSet = this.hasOne('master_set', ProblemSet, resp)\n }\n delete resp.master_set\n\n if (this.prerequisites == null) {\n this.prerequisites = this.hasMany(\n 'assignment_prerequisites',\n AssignmentPrerequisite,\n resp,\n { allowEmpty: true }\n )\n }\n if (this.remediation_skills == null) {\n this.remediation_skills = this.hasMany(\n 'remediation_skills',\n Skill,\n resp,\n { allowEmpty: true }\n )\n }\n if (this.manualProblemScores == null) {\n this.manualProblemScores = this.hasMany(\n 'manual_problem_scores',\n ManualProblemScore,\n resp,\n { allowEmpty: true }\n )\n }\n this.parseEnvironment(resp, options)\n this.parseTotals(resp)\n this.user = this.hasOne('user', User, resp)\n\n this.initPreview()\n\n if (options.autosave) {\n // these values can change if visibility changes or the parent assignment changes\n this.set(\n {\n available_date: resp.available_date,\n due_date: resp.due_date,\n release_date: resp.release_date,\n release_method: resp.release_method,\n visible: resp.visible,\n live: resp.live,\n password: resp.password,\n allow_late_work: resp.allow_late_work,\n late_work_duration_units: resp.late_work_duration_units,\n late_work_duration_value: resp.late_work_duration_value,\n late_work_credit_pct: resp.late_work_credit_pct,\n late_work_end_date: resp.late_work_end_date,\n allow_early_work: resp.allow_early_work,\n early_work_duration_units: resp.early_work_duration_units,\n early_work_duration_value: resp.early_work_duration_value,\n early_work_credit_pct: resp.early_work_credit_pct,\n early_work_end_date: resp.early_work_end_date,\n release_duration_value: resp.release_duration_value,\n release_duration_units: resp.release_duration_units,\n },\n { silent: true }\n )\n this.trigger('post_save', this)\n\n this.section?.assignments.each((assignment) =>\n assignment.notifyLive(resp.live && assignment.id === this.id)\n )\n }\n\n if (isSupport()) {\n this.instructor = this.hasOne('instructor', User, resp)\n\n if (resp.member) {\n this.coordinator = this.hasOne('coordinator', User, resp)\n }\n }\n\n return assignment\n }\n\n parseTotals () {\n this.problemSet()?.syncTotals(this)\n }\n\n initPreview () {\n if (this.preview == null) {\n this.preview = new Assessment({ type: 'assignment', preview: true })\n this.preview.originator = this\n }\n }\n\n bindModel () {\n this.modelBinder = new ModelBinder()\n this.modelBinder.bind(this.model, '.bound')\n\n const bindings = ModelBinder.createDefaultBindings(this.$('.bound'), 'name')\n\n bindings.release_duration_value.converter = toIntWithMinAndMax(0, 1000)\n }\n\n notifyLive (live) {\n this.set({ live }, { silent: true })\n this.trigger('live')\n }\n\n canPublish () {\n return (\n this.can('publish') &&\n (this.get('republishable') || !this.get('published'))\n )\n }\n\n publish (options = {}) {\n const { success } = options\n\n options.success = (model, resp, options) => {\n success(model, resp, options)\n this.updatePublishingInfo(resp.publishing_info)\n }\n\n if (options.override) {\n options.data = { override: true }\n }\n\n this.command(`/assignments/${this.id}/publish`, options)\n this.readonly.set({ published: true })\n }\n\n publishStatus () {\n if (!this.get('published')) {\n const msg = 'Not yet published'\n return msg\n } else if (this.get('republishable')) {\n return 'Changed since last published'\n } else {\n return 'Published'\n }\n }\n\n showPublishButton () {\n return (\n (this.get('published') && this.get('republishable')) ||\n (this.section?.get('coordinator') && !this.get('published'))\n )\n }\n\n addProblem (problem, options = {}) {\n defaults(options, { sync: false })\n problem.add(this.id, options)\n }\n\n copy (sectionId, name, deep, keepDates, callback) {\n this.command(`/sections/${sectionId}/assignments/${this.id}/copy`, {\n data: { name, deep, keep_dates: keepDates },\n success: (model, resp, options) => {\n const copy = new Assignment(resp, { parse: true })\n callback(copy, resp, options)\n },\n })\n }\n\n syncToLMS (options) {\n defaults(options, {\n sync: false,\n success: $.noop,\n error: $.noop,\n })\n this.command(`/assignments/${this.id}/lti_sync`, options)\n }\n\n bulkAdd (items, deep, callback = $.noop) {\n this.command(`/assignments/${this.id}/problems/bulk_add`, {\n data: {\n ids: items.map((item) => item.id),\n deep,\n },\n success: callback,\n })\n }\n\n move (sectionId, callback) {\n this.command(`/sections/${sectionId}/assignments/${this.id}/move`, {\n success: callback,\n sync: true,\n })\n }\n\n score (callback) {\n this.command(`${this.url()}/score`, {\n success: callback,\n })\n }\n\n prerequisitesPersonallySatisfied () {\n return this.prerequisites.all((prerequisite) =>\n prerequisite.get('satisfied')\n )\n }\n\n prerequisitesReleased () {\n return (\n this.get('prerequisite_release_date') &&\n new Date(this.get('prerequisite_release_date')) < Date.now()\n )\n }\n\n updatePublishingInfo (info) {\n this.readonly.set(info)\n this.trigger('republishable')\n }\n\n saveRemediationSkills () {\n this.set('remediation_skill_ids', this.remediation_skills.pluck('id'))\n }\n\n bulkUpdateAssessments (attrs, callback = $.noop) {\n this.command(`/assignments/${this.get('id')}/assessments/bulk_update`, {\n data: extend({ id: this.get('id') }, attrs),\n success: callback,\n method: 'PUT',\n })\n }\n\n bulkResetAssessments (attrs, callback = $.noop) {\n this.command(`/assignments/${this.get('id')}/assessments/bulk_reset`, {\n data: extend({ id: this.get('id') }, attrs),\n success: callback,\n method: 'PUT',\n })\n }\n\n applyTemplate (templateId, callback) {\n this.command(`/assignments/${this.id}/apply_template`, {\n data: { template_id: templateId },\n success: callback,\n })\n }\n\n ensureMatchedDateFormats (resp, field) {\n if (resp[field]) {\n resp[field] = new Date(resp[field]).toISOString()\n }\n }\n\n updateRepublishability (val) {\n this.readonly.set('republishable', val)\n this.trigger('publishable', this)\n }\n}\n\nexport { Assignment as default }\n","import BaseModel from 'models/base'\n\nexport default class AssignmentPrerequisite extends BaseModel {\n url () {\n if (this.id) {\n return `/assignments/${this.get(\n 'assignment_id'\n )}/assignment_prerequisites/${this.id}`\n } else {\n return `/assignments/${this.get(\n 'assignment_id'\n )}/assignment_prerequisites`\n }\n }\n\n satisfiedIconClass () {\n if (this.get('satisfied')) {\n return 'fa fa-w fa-check green'\n } else {\n return 'fa fa-w fa-times red'\n }\n }\n\n conditionLabel () {\n if (this.get('condition') === 'must_start') {\n return 'Start'\n } else if (this.get('condition') === 'must_have_minimum_pct_complete') {\n return `Complete at least ${this.get('minimum_pct_complete')}% of`\n } else {\n return `Score at least ${this.get('minimum_score')}% on`\n }\n }\n\n assessmentUrl (registration) {\n if (this.get('assessment_id')) {\n return `/assessments/${this.get('assessment_id')}`\n } else {\n return `/assessments/new?assignment_id=${this.get(\n 'required_assignment_id'\n )}®istration_id=${registration.get('id')}`\n }\n }\n\n assessmentAction (registration, supervised) {\n if (this.get('assessment_state') === 'underway') {\n return 'Continue'\n } else if (\n this.get('satisfied') ||\n supervised ||\n this.get('assessment_state') === 'closed'\n ) {\n return 'Open'\n } else {\n return 'Start'\n }\n }\n\n srOnlyLabel () {\n if (this.get('satisfied')) {\n return 'You have satisfied this prerequisite.'\n } else {\n return 'You have not satisfied this prerequisite.'\n }\n }\n}\n","import BaseModel from 'models/base'\n\nexport default class AssignmentTemplate extends BaseModel {\n url () {\n if (this.id) {\n return `/sections/${this.get('section_id')}/assignment_templates/${\n this.id\n }`\n } else {\n return `/sections/${this.get('section_id')}/assignment_templates`\n }\n }\n\n // polymorphic override\n isSynchronizedMember () {\n return false\n }\n\n isDefault () {\n return this == this.section.defaultAssignmentTemplate()\n }\n}\n","import { pluralize } from 'utils/common'\n\nexport const VIEW_FIELDS = {\n type: {\n index: 0,\n label: 'Type',\n value: (assignment) => {\n let category = assignment.displayType()\n const templateName = assignment.environment_template?.get('name')\n\n if (\n templateName &&\n templateName != 'test' &&\n templateName != 'homework' &&\n category.toLowerCase() !== templateName.toLowerCase()\n ) {\n category = category + ` (${templateName})`\n }\n\n return category\n },\n },\n points: {\n index: 1,\n label: 'Points',\n value: (assignment, includeWord = false) => {\n const cnt = assignment.problemSet().get('total_assigned_points')\n\n if (cnt > 0) {\n const points = assignment.problemSet().get('total_assigned_points')\n return includeWord ? `${points} ${pluralize('point', points)}` : points\n }\n },\n },\n release_method: {\n index: 2,\n label: 'Release method',\n value: (assignment) =>\n assignment.get('release_method').split('_').join(' '),\n },\n mode: {\n index: 3,\n label: 'Mode',\n value: (assignment) => assignment.environment().mode(),\n },\n max_submissions: {\n index: 4,\n label: 'Max. submissions',\n value: (assignment) => assignment.environment().get('max_submissions'),\n },\n max_attempts: {\n index: 5,\n label: 'Max. attempts/item',\n value: (assignment) => assignment.environment().get('max_attempts'),\n },\n password: {\n index: 6,\n label: 'Restrictions',\n value: (assignment) => {\n return (\n [\n assignment.get('password') ? 'password' : null,\n assignment.get('requires_respondus')\n ? 'Respondus lockdown browser'\n : null,\n ]\n .filter(Boolean)\n .join(', ') || 'none'\n )\n },\n },\n time_limit: {\n index: 7,\n label: 'Time limit',\n value: (assignment) => {\n const timeLimit = assignment.environment().timeLimit()\n\n return timeLimit\n ? `${timeLimit} ${pluralize('minute', timeLimit)}`\n : 'none'\n },\n },\n locked: {\n index: 8,\n label: 'Locked',\n value: (assignment) => {\n if (assignment.environment().get('locked')) {\n return 'yes'\n }\n },\n },\n grade_category: {\n index: 9,\n label: 'Grade book category',\n value: (assignment) => assignment.get('category'),\n },\n}\n","export default class BitField {\n constructor (initialValue = 0) {\n this.value = initialValue\n }\n\n getBit (index) {\n this.checkIndex(index)\n return (this.value & (1 << index)) !== 0\n }\n\n setBit (index, isSet) {\n this.checkIndex(index)\n\n if (isSet) {\n this.value |= 1 << index\n } else {\n this.value &= ~(1 << index)\n }\n }\n\n getValue () {\n return this.value\n }\n\n setValue (newValue) {\n this.checkValue(newValue)\n this.value = newValue\n }\n\n checkIndex (index) {\n if (index < 0 || index >= 32) {\n throw new Error('Index out of range (must be between 0 and 31).')\n }\n }\n\n checkValue (value) {\n if (typeof value !== 'number' || value < 0 || value > 0xffffffff) {\n throw new Error(\n 'Value must be a non-negative integer within the 32-bit range.'\n )\n }\n }\n}\n","import BaseModel from 'models/base'\nimport Product from 'models/product'\n\nexport default class CartItem extends BaseModel {\n parentName () {\n return 'cart_item'\n }\n\n url () {\n if (this.id) {\n return `/cart/cart_items/${this.id}`\n } else {\n return '/cart/cart_items'\n }\n }\n\n hasDiscountedPrice () {\n return this.get('price') !== this.get('original_price')\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n this.product = this.hasOne('product', Product, resp)\n\n if (this.cart) {\n this.cart.set(resp.cart.readonly, { silent: true })\n }\n\n return resp\n }\n}\n","import Backbone from 'backbone'\nimport BaseModel from 'models/base'\nimport Product from 'models/product'\nimport CartItem from 'models/cart_item'\nimport Order from 'models/order'\n\nexport default class Cart extends BaseModel {\n url () {\n return `/carts/${this.id}`\n }\n\n parentName () {\n return 'cart'\n }\n\n empty () {\n return this.items.size() === 0\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n this.recommendations = this.hasMany('recommendations', Product, resp)\n this.items = this.hasMany('cart_items', CartItem, resp)\n this.paymentIntent = this.hasOne('payment_intent', Backbone.Model, resp)\n this.order = this.hasOne('order', Order, resp)\n return resp\n }\n\n addItem (productId, quantity, callback) {\n this.command('/cart/add_item', {\n success: callback,\n data: { product_id: productId, quantity, recommendations: 1 },\n sync: true,\n })\n }\n\n removeItem (productId, quantity, callback) {\n const params = { product_id: productId }\n if (quantity) {\n params[quantity] = quantity\n }\n params.recommendations = 1\n\n this.command('/cart/remove_item', {\n success: callback,\n data: params,\n sync: true,\n })\n }\n\n findItem (product) {\n return this.items.find((item) => item.product.id === product.id)\n }\n\n findItemByProductName (name) {\n const regex = new RegExp(name, 'i')\n return this.items.find((item) => regex.test(item.product.get('name')))\n }\n}\n","import BaseModel from 'models/base'\n\nexport default class Environment extends BaseModel {\n url () {\n return `/${this.get('parent_type')}s/${this.get('parent_id')}/environment`\n }\n\n isAssessmentScoped () {\n return this.get('submission_scope') === 'assessment_scoped'\n }\n\n isRetakeScoped () {\n return this.get('submission_scope') === 'retake_scoped'\n }\n\n isSingleAttempt () {\n return (\n this.get('submission_scope') === 'assessment_scoped' ||\n this.get('submission_scope') === 'retake_scoped'\n )\n }\n\n isMultipleAttempts () {\n return this.get('submission_scope') === 'item_scoped'\n }\n\n mode () {\n if (this.isMultipleAttempts()) {\n return 'multiple attempts'\n } else if (this.isAssessmentScoped()) {\n return 'single attempt'\n } else {\n return 'single attempt with retakes'\n }\n }\n\n timeLimit () {\n const rawValue = this.get('time_limit')\n\n if (rawValue !== null) return parseInt(parseFloat(rawValue)) / 60.0\n }\n\n copy () {\n const env = new this.constructor(this.attributes, { parse: true })\n env.readonly.set('abilities', this.get('abilities').slice(0))\n return env\n }\n\n parse (resp, options) {\n // environment is embedded so id isn't used directly and a changing id can\n // produce undesirable autosaves\n if (this.id) {\n delete resp.id\n }\n return super.parse(resp, options)\n }\n}\n","import BaseModel from 'models/base'\nimport Environment from 'models/environment'\nimport User from 'models/user'\n\nexport default class EnvironmentTemplate extends BaseModel {\n parentName () {\n return 'environment_template'\n }\n\n url () {\n if (this.id) {\n return `/environment_templates/${this.id}`\n } else {\n return '/environment_templates'\n }\n }\n\n parse (resp, options) {\n const ret = super.parse(resp, options)\n if (this.environment == null) {\n this.environment = this.hasOne('environment', Environment, resp)\n }\n this.user ||= this.hasOne('user', User, resp)\n\n return ret\n }\n\n toJSON (options) {\n const wrapper = {}\n\n if (this.get('template_id')) {\n wrapper.template_id = this.get('template_id')\n delete this.attributes.template_id\n }\n wrapper.environment_template = super.toJSON(options)\n return wrapper\n }\n}\n","import { compact } from 'underscore'\nimport BaseModel from 'models/base'\nimport Assessment from 'models/assessment'\nimport AdaptiveReview from 'models/adaptive_review'\n\nexport default class Grade extends BaseModel {\n url () {\n return `/registrations/${this.get('registration_id')}/grades/${this.get(\n 'assignment_id'\n )}`\n }\n\n percentCorrect () {\n if (this.get('score') != null && this.get('points')) {\n return Math.round((this.get('score') * 100.0) / this.get('points'))\n } else {\n return 0\n }\n }\n\n displayedScore () {\n if (this.get('excused')) {\n return '-'\n } else {\n return `${this.get('score')}/${this.get('points')}`\n }\n }\n\n displayedPercent () {\n if (this.get('excused')) {\n return '-'\n } else {\n return `${this.percentCorrect()}%`\n }\n }\n\n displayedProgress () {\n return `${this.get('pct_complete')}% (${this.get('num_submitted')})`\n }\n\n displayedShortScore () {\n if (this.get('grade_using_points')) {\n return this.displayedScore()\n } else {\n return this.displayedPercent()\n }\n }\n\n gradeBookStatus () {\n if (this.get('dropped')) {\n return 'dropped'\n } else {\n return 'used'\n }\n }\n\n isAnnotated () {\n return this.get('excused') || this.get('overridden') || !this.get('posted')\n }\n\n description () {\n if (this.get('override_score')) {\n return 'Adjusted'\n } else {\n return 'Recorded'\n }\n }\n\n adjustScore (override, excused, excusedReason, scoreExplanation) {\n this.save(\n {\n override_score: override,\n excused_reason: excusedReason,\n score_explanation: scoreExplanation,\n excused,\n },\n {\n success: () => {\n this.trigger('adjust_score', this)\n },\n }\n )\n }\n\n title () {\n const registration =\n this.registration || this.assessment?.assignment?.registration\n const assignmentName =\n this.get('assignment_name') || registration.get('assignment_name')\n const names = compact([\n assignmentName,\n !registration.get('owned') &&\n (registration.get('full_name') || registration.get('title')),\n ])\n return names.join(' — ')\n }\n\n statusLabel () {\n const status = this.get('status')\n let klass\n\n switch (status) {\n case 'incomplete':\n klass = 'incorrect'\n break\n case 'submitted':\n case 'completed':\n klass = 'correct'\n break\n default:\n klass = ''\n break\n }\n if (klass) klass = ` class=\"${klass}\"`\n\n return `${this.get('status')}`\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n if (this.assessment == null) {\n this.assessment = this.hasOne('assessment', Assessment, resp)\n }\n if (this.assessment) {\n this.assessment.grade = this\n }\n\n if (this.review == null) {\n this.review = this.hasOne('remediation_review', AdaptiveReview, resp)\n }\n return resp\n }\n\n synchAvailability (newValues) {\n this.set('override_availability', newValues.get('override_availability'))\n this.readonly.set('due_date', newValues.get('due_date'))\n this.readonly.set('available_date', newValues.get('available_date'))\n this.set('status', newValues.get('status'))\n }\n}\n","import { sortBy } from 'underscore'\nimport { capitalize } from 'underscore.string'\nimport BaseModel from 'models/base'\n// eslint-disable-next-line no-unused-vars\nimport Section from 'models/section' // needed for circular dependency\nimport Assignment from 'models/assignment'\nimport Grade from 'models/grade'\n\nclass GradeBookCategory extends BaseModel {\n parse (resp, options) {\n super.parse(resp, options)\n this.assignments = this.hasMany('assignments', Assignment, resp)\n this.used_grades = this.hasMany('used_grades', Grade, resp)\n this.dropped_grades = this.hasMany('dropped_grades', Grade, resp)\n\n if (this.assignments) {\n this.assignmentMap = this.assignments.reduce(function (map, assignment) {\n map[assignment.id] = assignment\n return map\n }, {})\n this.grades = this.mergeWithAssignments(\n this.used_grades,\n this.dropped_grades\n )\n }\n\n return resp\n }\n\n title () {\n return capitalize(this.get('name'))\n }\n\n copySettings (category) {\n this.set(category.attributes)\n this.id = category.id\n }\n\n mergeWithAssignments (usedGrades, droppedGrades) {\n // sort grades according to assignment due dates; have chosen to do this on\n // the client rather than the server because it is a small collection size\n this.grades = usedGrades.models.concat(droppedGrades.models)\n this.grades.forEach((grade) => {\n grade.assignment =\n this.assignmentMap[grade.get('assignment_id')] ||\n new Assignment({\n id: grade.get('assignment_id'),\n name: grade.get('assignment_name'),\n })\n })\n sortBy(this.grades, (grade) => grade.get('due_date'))\n }\n}\n\nexport { GradeBookCategory as default }\n","import { clone } from 'underscore'\nimport Backbone from 'backbone'\nimport BaseModel from 'models/base'\nimport GradeBookCategory from 'models/grade_book_category'\nimport Registration from 'models/registration'\n\nexport default class GradeBook extends BaseModel {\n url () {\n return `/grade_books/${this.get('id')}`\n }\n\n tableWidth () {\n return (this.activeCategories().length + 1) * 128\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n this.registration = this.hasOne('registration', Registration, resp)\n this.categories = this.hasMany('categories', GradeBookCategory, resp)\n return resp\n }\n\n activeCategories () {\n return this.categories.filter((category) => category.get('active'))\n }\n\n gradingMethodLabel () {\n if (this.get('grading_method') === 'grade_using_weighted_average') {\n return 'Overall grades are calculated based on the weighted average of specified assignment categories.'\n } else {\n return 'Overall grades are based on the weighted point values of each assignment.'\n }\n }\n\n copySettings (gradeBook) {\n this.set(gradeBook.attributes)\n\n if (this.categories == null) {\n this.categories = new Backbone.Collection()\n }\n gradeBook.categories.each((gbCategory) => {\n let category = this.categoryFor(gbCategory.get('name'))\n\n if (category == null) {\n category = new GradeBookCategory()\n this.categories.push(category)\n }\n category.copySettings(gbCategory)\n })\n }\n\n categoryFor (name) {\n return this.categories.find((category) => category.get('name') === name)\n }\n\n studentName () {\n return this.registration.get('full_name')\n }\n\n totalWeight () {\n return this.categories.reduce(\n (total, category) => (total = total + category.get('weight')),\n 0\n )\n }\n\n showPercentage () {\n return (\n this.get('grading_method') === 'grade_using_points' &&\n this.get('up_to_date') &&\n this.get('num_points') !== 100\n )\n }\n\n toJSON () {\n const attrs = clone(this.attributes)\n const categoryAttrs = {}\n\n this.categories.each((category, index) => {\n const cAttrs = {}\n const fields = ['drop_lowest_grades', 'active', 'weight']\n\n fields.forEach((field) => (cAttrs[field] = category.get(field)))\n cAttrs.id = category.id\n categoryAttrs[index] = cAttrs\n })\n\n attrs.grade_categories_attributes = categoryAttrs\n\n return { grade_book: attrs }\n }\n}\n","import Base from 'models/base'\n\nexport default class Hotspot extends Base {\n initialize (attributes, options) {}\n\n label () {\n return String.fromCharCode(65 + this.get('hotspot_id'))\n }\n\n isSelected () {\n return this.get('selected')\n }\n}\n","import BaseModel from 'models/base'\n\nexport default class ManualProblemScore extends BaseModel {}\n","import { capitalize } from 'underscore.string'\nimport Environment from 'models/environment'\nimport EnvironmentTemplate from 'models/environment_template'\n\nexport default {\n environmentLabel () {\n if (this.environment_template) {\n return capitalize(this.environment_template.get('name'))\n } else {\n return 'Custom'\n }\n },\n environment () {\n return this.environment_template?.environment || this.custom_environment\n },\n\n parseEnvironment (resp, options) {\n if (this.environment_template == null) {\n this.environment_template = this.hasOne(\n 'environment_template',\n EnvironmentTemplate,\n resp\n )\n }\n delete resp.environment_template\n if (this.custom_environment == null) {\n this.custom_environment = this.hasOne(\n 'custom_environment',\n Environment,\n resp\n )\n }\n delete resp.custom_environment\n },\n\n saveEnvironment (env) {\n env.set('parent_id', this.id, { silent: true })\n env.set('parent_type', this.parentName(), { silent: true })\n this.relateTo(env)\n this.custom_environment = env\n this.environment_template = null\n env.save(null, { success: () => this.trigger('change_environment') })\n },\n\n setEnvironmentTemplate (template) {\n this.environment_template = template\n this.set({ environment_template_id: template.id }, { silent: true })\n this.save({})\n },\n}\n","/* global $ */\nimport { defaults } from 'underscore'\n\nexport default {\n exportAsCSV (options) {\n defaults(options, {\n sync: false,\n success: $.noop,\n error: $.noop,\n url: `/${this.parentName()}s/${this.id}/export`,\n })\n this.command(options.url, options)\n },\n}\n","import BaseModel from 'models/base'\n\nexport default class Transaction extends BaseModel {\n parse (resp, options) {\n super.parse(resp, options)\n this.payment = this.hasOne('payment', this.constructor, resp)\n return resp\n }\n}\n","import { isBlank } from 'utils/common'\nimport BaseModel from 'models/base'\n\nexport default class SectionLicense extends BaseModel {\n url () {\n if (!isBlank(this.id)) {\n return `/section_licenses/${this.id}`\n } else {\n return '/section_licenses'\n }\n }\n}\n","import BaseModel from 'models/base'\n\nexport default class StudentLicense extends BaseModel {\n label () {\n return this.get('transferred')\n ? `${this.get('section_name')} (transferred from ${this.get(\n 'source_section_name'\n )})`\n : this.get('section_name')\n }\n}\n","import BaseModel from 'models/base'\nimport User from 'models/user'\nimport Cart from 'models/cart'\nimport Transaction from 'models/transaction'\nimport SectionLicense from 'models/section_license'\nimport StudentLicense from 'models/student_license'\n\nexport default class Order extends BaseModel {\n url () {\n if (this.id) {\n return `/orders/${this.id}`\n } else {\n return '/orders'\n }\n }\n\n parentName () {\n return 'order'\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n this.transactions = this.hasMany('transactions', Transaction, resp, {\n allowEmpty: true,\n })\n this.section_licenses = this.hasMany(\n 'section_licenses',\n SectionLicense,\n resp,\n { allowEmpty: true }\n )\n this.student_licenses = this.hasMany(\n 'student_licenses',\n StudentLicense,\n resp,\n { allowEmpty: true }\n )\n this.cart = this.hasOne('cart', Cart, resp)\n this.user = this.hasOne('user', User, resp)\n\n return resp\n }\n\n requiresAction () {\n return this.get('state') === 'requires action'\n }\n\n cancel (callback) {\n this.command(`/orders/${this.id}/cancel`, {\n sync: true,\n success: (model, resp, options) => callback?.(model, resp, options),\n })\n }\n}\n","import { groupBy, pairs, sortBy } from 'underscore'\n\nconst answerStatus = (answer) => {\n if (answer.scored) {\n if (answer.correct) {\n return 'correct'\n } else {\n return 'incorrect'\n }\n } else {\n return 'unscored'\n }\n}\n\nexport default {\n // returns an array of \"responses\", grouping student answers according to correctness\n correctnessResponses (answers, breakdown = false) {\n return pairs(groupBy(answers, (answer) => answerStatus(answer))).map(\n (pair) => {\n const status = pair[0]\n const answers = sortBy(pair[1], (aa) => aa.user_name)\n\n return {\n label: status,\n answers: answers,\n correct: status === 'correct',\n scored: status != 'unscored',\n breakdown: this.reportIndividualAnswers(),\n }\n }\n )\n },\n\n // returns an array of \"responses\", grouping student answers according whether their\n // value matches an enumerated set of choices as defined by the part\n enumeratedResponses (answers) {\n return this.enumeratedChoices(answers).map((choice) => {\n return {\n ...choice,\n scored: true,\n breakdown: this.reportIndividualAnswers(),\n }\n })\n },\n\n responses (answers) {\n if (this.hasEnumeratedChoices()) {\n return this.enumeratedResponses(answers)\n } else {\n return this.correctnessResponses(answers)\n }\n },\n}\n","import { any, compact, isEqual, extend } from 'underscore'\nimport InsightsAnswers from 'models/modules/insights_answers'\nimport { isBlank } from 'utils/common'\nimport BaseModel from 'models/base'\n\nexport default class Part extends BaseModel {\n initialize (attributes, options) {\n extend(this, InsightsAnswers)\n super.initialize(attributes, options)\n }\n\n submitButtonLabel () {\n return 'Submit answer'\n }\n\n identifier () {\n return `part${this.index}`\n }\n\n // affects how part is displayed within the editor\n mappedToTaxonomy () {\n return true\n }\n\n isSequenced () {\n return true\n }\n\n isAnswerable () {\n return true\n }\n\n // whether this part should always size to its container\n isFullSize () {\n return false\n }\n\n // whether this part can be sized to its container\n allowFullSize () {\n return true\n }\n\n canShowWork () {\n return true\n }\n\n canFocus () {\n return true\n }\n\n isGradable () {\n return this.isAnswerable()\n }\n\n isManuallyGradable () {\n return false\n }\n\n isDeferrable () {\n return false\n }\n\n displayInlineAnswer () {\n return false\n }\n\n // override to customize how an answer is displayed within the answers panel\n answerText (answer) {\n return answer.answerText()\n }\n\n flatParts () {\n return [this]\n }\n\n // Given an array of answers (via Insights reports), returns a list of \"reported\" parts.\n // Needed to accommodate cases where the problem doesn't know about the dynamically created\n // parts, e.g. UnitTestingPart.\n reportedParts (_answers) {\n return this.flatParts()\n }\n\n selectableParts () {\n return [this]\n }\n\n nextPart () {\n return this.collection.at(this.collection.indexOf(this) + 1)\n }\n\n isFlatPart () {\n return isEqual(this.flatParts(), [this])\n }\n\n isFormat (format) {\n return any(format.split(' '), (f) => this.get('format') === f)\n }\n\n hasAnswer () {\n return !isBlank(this.get('answer'))\n }\n\n hasAnswerablePart () {\n return this.answerableParts().length > 0\n }\n\n hasScaffold () {\n return false\n }\n\n // whether there are a set of enumerated choices as possible answers; used in Insights\n hasEnumeratedChoices () {\n return false\n }\n\n answerableParts () {\n return compact([this.isAnswerable() ? this : undefined])\n }\n\n calculatedPoints () {\n if (this.get('points') != null) {\n return this.get('points')\n } else {\n return 1\n }\n }\n\n hasSolution () {\n return !isBlank(this.get('solution'))\n }\n\n comment () {\n return this.get('comment')\n }\n\n hasShowWorkPart () {\n return this.nextPart()?.isFormat('sw')\n }\n\n showWorkPart () {\n if (this.hasShowWorkPart()) {\n return this.nextPart()\n }\n }\n\n // whether to show each student answer in the Student answers Insights report\n reportIndividualAnswers () {\n return false\n }\n\n parentPart () {\n if (this.isFormat('sw')) {\n return this.prevPart()\n }\n }\n\n canDelete () {\n return (\n this.isFormat('sw') ||\n this.container.container ||\n this.container.isMultiChunk()\n )\n }\n\n designation () {\n if (this.container && this.container.parts.size() === 1) {\n return this.container.designation()\n } else {\n return compact([this.container?.designation(), this.letter()]).join('-')\n }\n }\n\n description () {\n return (this.get('description') || '').replace('\\n', '
    ')\n }\n\n letter (index) {\n if (this.container) {\n if (index) {\n return this.container.letterFor(index, this)\n } else {\n return this.container.letterForPart(this)\n }\n }\n }\n\n showLetter () {\n return (\n this.container.isFormat('pt ww ut') &&\n this.isSequenced() &&\n (this.container.parts.size() > 1 || this.container.isFormat('ut'))\n )\n }\n\n multiAnswerName () {\n return this.uniqueId()\n }\n\n answerHtml (_answer) {\n return this.get('answer_text') || ''\n }\n\n solutionHtml () {\n return this.get('solution') || ''\n }\n\n answerIndexToLetter (answerIndex) {\n return String.fromCharCode(65 + answerIndex)\n }\n\n synchronize (resp) {\n if (this.get('part_id') == null) {\n this.set('part_id', resp.part_id, { silent: true })\n }\n }\n}\n","import Part from 'models/part'\n\nexport default class FreeResponsePart extends Part {\n label () {\n return 'Short Answer'\n }\n\n defaults () {\n return {\n format: 'fr',\n answer_validation: { type: 'number' },\n }\n }\n\n displayInlineAnswer () {\n return true\n }\n\n // whether to show each student answer in the Student answers Insights report\n reportIndividualAnswers () {\n return true\n }\n\n isManuallyGradable () {\n return this.get('answer') == null\n }\n\n toJSON () {\n const attrs = super.toJSON()\n delete attrs.validation_expression\n delete attrs.validation_failure_message\n\n return attrs\n }\n\n disallowedPattern () {\n switch (this.get('answer_validation')?.type) {\n case 'number':\n return /[^0-9\\-.]/g\n case '3dnn':\n return /[^0-9]/g\n default:\n // eslint-disable-next-line no-useless-escape\n return /$../ // never matches due to characters after end of string\n }\n }\n\n answerFormatType () {\n const type = this.get('answer_validation')?.type\n\n if (type == null || type === 'text') {\n return type\n } else {\n return 'number'\n }\n }\n}\n","import { clone } from 'underscore'\nimport Part from 'models/part'\n\nexport default class MultipleChoicePart extends Part {\n label () {\n return 'Multiple Choice'\n }\n\n defaults () {\n return {\n format: 'mc',\n choices: ['', '', '', ''],\n answer: 0,\n layout: 'newline',\n }\n }\n\n // whether there are a set of enumerated choices as possible answers; used in Insights\n hasEnumeratedChoices () {\n return true\n }\n\n displayInlineAnswer () {\n return true\n }\n\n // given an array of answers, returns a list of possible choices for the part;\n // used in Insights; when overriding this method, you must include an 'answer' key\n // in each choice that returns the answers that match that choice.\n enumeratedChoices (answers) {\n return this.get('choices').map((choice, i) => {\n const matchingAnswers = answers.filter((answer) => answer.answer === i)\n\n return {\n label: `
    ${String.fromCharCode(\n 65 + i\n )}:${choice}
    `,\n answers: matchingAnswers,\n correct: i === this.get('answer'),\n }\n })\n }\n\n reinsertChoice (originIndex, destinationIndex) {\n const choices = clone(this.get('choices'))\n const [choice] = choices.splice(originIndex, 1)\n choices.splice(destinationIndex, 0, choice)\n\n const answer =\n this.get('answer') === originIndex\n ? destinationIndex\n : this.get('answer') > originIndex &&\n this.get('answer') < destinationIndex\n ? this.get('answer') - 1\n : this.get('answer') < originIndex &&\n this.get('answer') > destinationIndex\n ? this.get('answer') + 1\n : this.get('answer')\n\n return this.set({ choices, answer })\n }\n}\n","import { clone } from 'underscore'\nimport Part from 'models/part'\n\nexport default class MultipleAnswerPart extends Part {\n label () {\n return 'Multiple Answer'\n }\n\n defaults () {\n return {\n format: 'ma',\n choices: ['', '', '', ''], // has to match answer\n answer: [true, false, false, false], // has to match choices\n layout: 'newline',\n }\n }\n\n // whether there are a set of enumerated choices as possible answers; used in Insights\n hasEnumeratedChoices () {\n return true\n }\n\n reinsertChoice (originIndex, destinationIndex) {\n const choices = clone(this.get('choices'))\n const [choice] = choices.splice(originIndex, 1)\n choices.splice(destinationIndex, 0, choice)\n\n const answers = clone(this.get('answer'))\n const [answer] = Array.from(answers.splice(originIndex, 1))\n answers.splice(destinationIndex, 0, answer)\n\n return this.set({ choices, answer: answers })\n }\n\n // given an array of answers, returns a list of possible choices for the part;\n // used in Insights; when overriding this method, you must include an 'answer' key\n // in each choice that returns the answers that match that choice.\n enumeratedChoices (answers) {\n return this.get('choices').map((choice, i) => {\n const matchingAnswers = answers.filter((answer) => answer.answer?.[i])\n\n return {\n label: `
    ${String.fromCharCode(\n 65 + i\n )}:${choice}
    `,\n answers: matchingAnswers,\n correct: this.get('answer')[i],\n }\n })\n }\n}\n","import {\n clone,\n findWhere,\n indexOf,\n invert,\n object,\n pairs,\n reject,\n sortBy,\n without,\n} from 'underscore'\nimport Part from 'models/part'\nconst { v4: uuidv4 } = require('uuid')\n\nexport default class MatchingPart extends Part {\n label () {\n return 'Matching'\n }\n\n defaults () {\n const blocks = Array(3)\n .fill()\n .map(() => ({\n id: uuidv4(),\n premise: '',\n response: '',\n }))\n\n return {\n format: 'mt',\n answer: blocks.map((block) => block.id),\n blocks,\n distractors: [],\n }\n }\n\n canShowWork () {\n return false\n }\n\n isFullSize () {\n return true\n }\n\n // whether there are a set of enumerated choices as possible answers; used in Insights\n hasEnumeratedChoices () {\n return true\n }\n\n answerText (answer) {\n return 'see above'\n }\n\n answerHtml (_answer) {\n return this.get('blocks')\n .map(\n (block) =>\n `
    ${block.response}
    `\n )\n .join('')\n }\n\n addAnswer () {\n const block = this.addBlock('blocks')\n this.set('answer', this.get('answer').concat([block.id]))\n\n return block\n }\n\n removeAnswer (id) {\n this.removeBlock('blocks', id)\n this.set('answer', without(this.get('answer'), id))\n this.trigger('change', this)\n }\n\n addDistractor () {\n return this.addBlock('distractors')\n }\n\n removeDistractor (id) {\n this.removeBlock('distractors', id)\n this.trigger('change', this)\n }\n\n addBlock (type) {\n const blocks = clone(this.get(type))\n\n const newBlock = { id: uuidv4(), premise: '', response: '' }\n blocks.push(newBlock)\n\n this.set(type, blocks)\n return newBlock\n }\n\n removeBlock (type, id) {\n this.set(\n type,\n reject(this.get(type), (block) => block.id === id)\n )\n }\n\n sortByIds (type, ids) {\n const blocks = sortBy(clone(this.get(type)), (block) =>\n indexOf(ids, block.id)\n )\n this.set(type, blocks)\n }\n\n getResponses () {\n const allBlocks = this.get('blocks').concat(this.get('distractors'))\n const startingIds = this.get('starting_ids')\n\n if (startingIds) {\n const sortKeys = invert(object(pairs(startingIds)))\n return sortBy(allBlocks, (block) => sortKeys[block.id])\n } else {\n return allBlocks\n }\n }\n\n getResponse (id) {\n return findWhere(this.get('distractors').concat(this.get('blocks')), {\n id,\n })\n }\n\n // given an array of answers, returns a list of possible choices for the part;\n // used in Insights; when overriding this method, you must include an 'answer' key\n // in each choice that returns the answers that match that choice.\n enumeratedChoices (answers) {\n return this.get('blocks').map((block) => {\n const matchingAnswers = answers.filter((answer) => {\n return answer.answer[block.id] == block.id\n })\n\n return {\n label: block.premise,\n answers: matchingAnswers,\n correct: true,\n }\n })\n }\n}\n","import Part from 'models/part'\n\nexport default class EitherOrPart extends Part {\n label () {\n return 'True/False'\n }\n\n defaults () {\n return {\n format: 'eo',\n choices: ['True', 'False'],\n answer: 0,\n }\n }\n\n displayInlineAnswer () {\n return true\n }\n}\n","import Part from 'models/part'\n\nexport default class InformationalPart extends Part {\n label () {\n return 'Text/Media'\n }\n\n defaults () {\n return { format: 'in' }\n }\n\n mappedToTaxonomy () {\n return false\n }\n\n isSequenced () {\n return false\n }\n\n isAnswerable () {\n return false\n }\n\n isDeferrable () {\n return true\n }\n\n canShowWork () {\n return false\n }\n\n canFocus () {\n return false\n }\n}\n","import Part from 'models/part'\n\nexport default class EssayPart extends Part {\n label () {\n return 'Essay'\n }\n\n defaults () {\n return {\n automatic_manual_credit: true,\n format: 'es',\n no_rows: 5,\n }\n }\n\n displayInlineAnswer () {\n return false\n }\n\n canShowWork () {\n return false\n }\n\n isManuallyGradable () {\n return true\n }\n\n isFullSize () {\n return true\n }\n}\n","import Part from 'models/part'\nimport { isBlank } from 'utils/common'\n\nexport default class ShowWorkPart extends Part {\n label () {\n return 'Show Work'\n }\n\n defaults () {\n return {\n format: 'sw',\n no_rows: 5,\n question: 'Show your work',\n automatic_manual_credit: true,\n display_type: 'steps',\n points: 0,\n }\n }\n\n displayTypeDescription () {\n return this.get('display_type') == 'text'\n ? 'The student types in a single text field'\n : 'The student can create multiple steps that can contain either math, entering using an equation editor, or text.'\n }\n\n mappedToTaxonomy () {\n return false\n }\n\n isSequenced () {\n return false\n }\n\n isGradable () {\n return true\n }\n\n isManuallyGradable () {\n return true\n }\n\n canShowWork () {\n return false\n }\n\n // whether this part should always size to its container\n isFullSize () {\n return true\n }\n\n isText () {\n return this.get('display_type') == 'text'\n }\n\n isSteps () {\n return this.get('display_type') == 'steps'\n }\n\n answerText (answer) {\n return isBlank(answer.get('answer')) ? '-' : 'see above'\n }\n}\n","import BaseCollection from 'collections/base'\nimport Hotspot from 'models/hotspot'\n\nexport default class HotspotCollection extends BaseCollection {\n model (attrs, options) {\n return new Hotspot(attrs, options)\n }\n}\n","import HotspotCollection from 'collections/hotspot'\nimport Part from 'models/part'\n\nexport default class HotspotInteractionPart extends Part {\n label () {\n return 'Hotspot Interaction'\n }\n\n defaults () {\n return {\n format: 'hi',\n multiple_selections: false,\n }\n }\n\n initialize (attributes, options) {\n super.initialize(attributes, options)\n this.hotspots = new HotspotCollection(attributes.hotspots, {\n parse: true,\n })\n }\n\n toJSON () {\n const attrs = super.toJSON()\n\n attrs.hotspot_attributes = this.hotspots.map((p) => p.toJSON())\n delete attrs.hotspots\n delete attrs.idAttribute\n\n return attrs\n }\n\n isMultiSelection () {\n return this.get('multiple_selections')\n }\n\n needsCompleteHotspot () {\n return true\n }\n\n // whether this part can be sized to its container\n allowFullSize () {\n return true\n }\n\n // whether there are a set of enumerated choices as possible answers; used in Insights\n hasEnumeratedChoices () {\n return true\n }\n\n // given an array of answers, returns a list of possible choices for the part;\n // used in Insights; when overriding this method, you must include an 'answer' key\n // in each choice that returns the answers that match that choice.\n enumeratedChoices (answers) {\n return this.hotspots.map((hotspot, i) => {\n // answers are recorded as arrays of number strings\n // with indexes starting at 1\n const hotspotAnswer = i + 1\n const matchingAnswers = answers.filter((answer) => {\n return answer.answer.includes(hotspotAnswer.toString())\n })\n\n return {\n label: this.answerIndexToLetter(i),\n answers: matchingAnswers,\n correct: this.get('answer').includes(hotspotAnswer),\n }\n })\n }\n}\n","import {\n clone,\n findWhere,\n flatten,\n indexOf,\n intersection,\n sortBy,\n} from 'underscore'\nimport HotspotCollection from 'collections/hotspot'\nimport Part from 'models/part'\nconst { v4: uuidv4 } = require('uuid')\n\nexport default class LabelImagePart extends Part {\n initialize (attributes, options) {\n this.hotspots = new HotspotCollection(attributes.hotspots, {\n parse: true,\n })\n this.bind('change:image_url', this.clearHotspots)\n\n super.initialize()\n }\n\n label () {\n return 'Label Image'\n }\n\n defaults () {\n return {\n format: 'li',\n solution: '',\n hotspots: [],\n answer: [],\n }\n }\n\n canShowWork () {\n return false\n }\n\n // whether this part can be sized to its container\n allowFullSize () {\n return false\n }\n\n // whether there are a set of enumerated choices as possible answers; used in Insights\n hasEnumeratedChoices () {\n return true\n }\n\n toJSON () {\n const attrs = super.toJSON()\n\n attrs.hotspot_attributes = this.hotspots.map((p) => p.toJSON())\n delete attrs.hotspots\n\n return attrs\n }\n\n answerText (answers) {\n return 'see above'\n }\n\n alphabetIndexed (id) {\n return []\n .concat(id)\n .map((i) => String.fromCharCode(65 + parseInt(i)))\n .join(', ')\n }\n\n answerHtml (_answer) {\n // map hotspot id to original index of hotspot in list\n const hotspotIndexes = {}\n this.hotspots.map((hotspot, i) => {\n return (hotspotIndexes[hotspot.attributes.hotspot_id] = i)\n })\n\n return [\n '',\n this.get('answer')\n .map((answer, i) => {\n if (answer.hotspotIds.length) {\n return (\n `` +\n `` +\n ''\n )\n } else {\n return ''\n }\n })\n .join(''),\n '
    ${answer.text}${answer.hotspotIds\n .map((id) => this.alphabetIndexed(hotspotIndexes[id]))\n .join(', ')}
    ',\n ].join('')\n }\n\n addAnswer () {\n const answers = clone(this.get('answer'))\n const emptyAnswer = { id: uuidv4(), text: '', hotspotIds: [] }\n answers.push(emptyAnswer)\n this.set('answer', answers)\n\n return emptyAnswer\n }\n\n usedHotspotIds () {\n return flatten(this.get('answer').map((a) => a.hotspotIds))\n }\n\n // called after hotspot is removed, will remove that id from any of the answers' hotspotIds (referential integrity ftw)\n cleanupAnswers () {\n const allHotspotIds = this.hotspots.map((hotspot) =>\n String(hotspot.attributes.hotspot_id)\n )\n this.get('answer').forEach((answer) => {\n answer.hotspotIds = intersection(answer.hotspotIds, allHotspotIds)\n })\n }\n\n removeAnswer (id) {\n const res = this.get('answer').filter((ans) => ans.id !== id)\n this.set('answer', res)\n this.trigger('change', this)\n }\n\n setResponseAnswer (selectedHotspots, answerId) {\n const answer = findWhere(this.get('answer'), { id: answerId })\n answer.hotspotIds = selectedHotspots\n this.trigger('change', this)\n return answer\n }\n\n needsCompleteHotspot () {\n return true\n }\n\n clearHotspots () {\n this.hotspots = new HotspotCollection([])\n this.set({ hotspots: [], answer: [] })\n this.trigger('change', this)\n }\n\n sortAnswersByIds (ids) {\n const labels = sortBy(clone(this.get('answer')), (label) =>\n indexOf(ids, label.id)\n )\n this.set('answer', labels)\n this.trigger('change', this)\n }\n\n getResponses () {\n return this.get('hotspots')\n }\n\n // given an array of answers, returns a list of possible choices for the part;\n // used in Insights; when overriding this method, you must include an 'answer' key\n // in each choice that returns the answers that match that choice.\n enumeratedChoices (answers) {\n return this.hotspots.map((hotspot, i) => {\n const id = hotspot.get('hotspot_id').toString()\n const matchingAnswers = answers.filter((answer) => {\n return Object.keys(answer.answer).includes(id)\n })\n\n return {\n label: String.fromCharCode(65 + parseInt(i)),\n answers: matchingAnswers,\n correct: this.get('answer').some((answer) =>\n answer.hotspotIds.includes(id)\n ),\n }\n })\n }\n}\n","import HotspotCollection from 'collections/hotspot'\nimport Part from 'models/part'\n\nexport default class SelectPointPart extends Part {\n label () {\n return 'Select Point'\n }\n\n defaults () {\n return {\n format: 'sp',\n max_answers: 1,\n min_correct_answers: 1,\n }\n }\n\n initialize (attributes, options) {\n super.initialize(attributes, options)\n\n this.hotspots = new HotspotCollection(attributes.hotspots, {\n parse: true,\n })\n }\n\n toJSON () {\n const attrs = super.toJSON()\n\n attrs.hotspot_attributes = this.hotspots.map((p) => p.toJSON())\n delete attrs.hotspots\n\n return attrs\n }\n\n needsCompleteHotspot () {\n return true\n }\n\n // whether this part can be sized to its container\n allowFullSize () {\n return false\n }\n\n singleSelect () {\n return this.maxAnswers() === 1\n }\n\n maxAnswers () {\n return this.get('max_answers')\n }\n}\n","import Part from 'models/part'\n\nconst fileTypes = {\n gif: 'image/gif',\n jpg: 'image/jpg',\n jpeg: 'image/jpg',\n png: 'image/png',\n doc: 'application/msword',\n docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n xls: 'application/vnd.ms-excel',\n xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n pdf: 'application/pdf',\n svg: 'image/svg+xml',\n}\n\nexport default class FileUploadPart extends Part {\n label () {\n return 'File Upload'\n }\n\n defaults () {\n return {\n automatic_manual_credit: true,\n format: 'fu',\n size: 1024,\n mime_types: ['jpg', 'jpeg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'pdf'],\n }\n }\n\n canShowWork () {\n return false\n }\n\n isManuallyGradable () {\n return true\n }\n\n fileTypesAccepted () {\n return this.get('mime_types')\n .map((type) => fileTypes[type])\n .join(',')\n }\n\n answerText (answer) {\n let match\n const answerText = super.answerText(answer)\n if (\n (match = answerText?.match(\n /^https:\\/\\/[a-z0-9]+\\.cloudfront\\.net.*\\/(.*)/\n ))\n ) {\n return `${match[1]}`\n } else {\n return answerText\n }\n }\n}\n","import Part from 'models/part'\n\n// only used in insights reporting\nexport default class ReportedUnitTest extends Part {\n designation () {\n return this.get('test')\n }\n}\n","import PartContainer from 'models/parts/container'\nimport ReportedUnitTest from 'models/parts/reported_unit_test'\n\nexport default class UnitTestingPart extends PartContainer {\n label () {\n return 'Code Correctness'\n }\n\n defaults () {\n return {\n format: 'ut',\n language: 'python',\n unit_tests_code: 'class TestCase(EdfinityTestCase):\\n\\t',\n }\n }\n\n submitButtonLabel () {\n return 'Run'\n }\n\n // Given an array of answers (via Insights reports), returns a list of \"reported\" parts.\n // Needed to accommodate cases where the problem doesn't know about the dynamically created\n // parts, e.g. this UnitTestingPart.\n reportedParts (answers) {\n if (answers.size() == 0) {\n return []\n }\n\n const sample = answers.at(0)\n\n // extract the names of the tests from the part ids (yes, a bit hacky)\n return sample\n .get('part_answers')\n .filter((pa) => {\n const id = pa.part_id.split('-')[0]\n return id == this.get('part_id')\n })\n .map((pa) => {\n const test = pa.part_id.split('-')[1]\n return new ReportedUnitTest({ test }, { parse: true })\n })\n }\n\n canShowWork () {\n return false\n }\n\n displayInlineAnswer () {\n return false\n }\n\n isMultiChunk () {\n return false\n }\n\n // whether this part should always size to its container\n isFullSize () {\n return true\n }\n\n isAnswerable () {\n return true\n }\n\n // TODOX\n // sequenceChunks: -> [@parts.models]\n\n calculatedPoints () {\n // somewhat of a hack because points in the part on the server is 0, but\n // \"default_points\" used during assessment item construction is 1.\n return 1\n }\n\n error () {\n if (this.get('error')) {\n return JSON.parse(this.get('error'))\n }\n }\n\n errorDetails () {\n return this.error()?.error?.replace('\\n', '
    ')\n }\n\n solutionHtml () {\n return `${this.get('solution')}`\n }\n\n letterFor (index) {\n return this.parts.at(index).description() || ''\n }\n\n errorLabel () {\n if (this.error()) {\n const code = this.error().functionResultCode\n if (code === 1 || code === 5) {\n return 'student code'\n } else if (code === 2) {\n return 'solution code'\n } else if (code === 3) {\n return 'unit tests'\n } else {\n return ''\n }\n } else {\n return ''\n }\n }\n}\n","import Part from 'models/part'\nimport UnitTestingPart from 'models/parts/unit_testing'\n\nexport default class GeneratedPart extends Part {\n label () {\n return ''\n }\n\n defaults () {\n return { format: 'ge' }\n }\n\n displayInlineAnswer () {\n return true\n }\n\n initialize (options) {\n return super.initialize(options)\n }\n\n answerHtml (answer) {\n let html = (\n answer.get('correct_answer') || super.answerHtml(answer)\n )?.replace(/\\n/g, '
    ')\n if (this.container instanceof UnitTestingPart) {\n html = `
    ${html}
    `\n }\n return html\n }\n\n letter (index, partAnswer) {\n let parts\n return (\n partAnswer?.get('description') ||\n // handle parent/child part ids\n ((parts = this.get('part_id').split('-')),\n parts.length > 1 ? parts[1] : parts[0])\n )\n }\n\n answerText (answer) {\n const answerText = super.answerText(answer)\n if (this.container instanceof UnitTestingPart) {\n return `
    ${answerText}
    `\n } else {\n return super.answerText(answerText)\n }\n }\n}\n","/* global $, MathQuill, _E */\nimport PartContainer from 'models/parts/container'\n\nexport default class WebworkPart extends PartContainer {\n label () {\n return 'Algorithmic (WeBWorK)'\n }\n\n defaults () {\n return { format: 'ww' }\n }\n\n selectableParts () {\n return [this]\n }\n\n initialize (attributes, options) {\n if (this.get('pg') == null) {\n this.set('pg', $('#ww-template').text() || '# Problem Definition')\n }\n return (this.MQ = MathQuill.getInterface(2))\n }\n\n letterFor (index, part) {\n return part.letterFromAnswerName()\n }\n\n letterForPart (part) {\n return part.letterFromAnswerName()\n }\n\n isMultiChunk () {\n return false\n }\n\n hasErrors () {\n return !!this.get('errors')\n }\n\n // whether this part can be sized to its container\n allowFullSize () {\n return false\n }\n\n // TODOX\n // sequenceChunks: -> [@parts.models]\n\n multiAnswerName () {\n if (this.get('extra')) {\n return this.get('answer_name')\n .replace('MuLtIaNsWeR_', '')\n .replace('MaTrIx_', '')\n .split('_')[0]\n } else {\n return this.get('answer_name')\n }\n }\n\n hasEdfinityGeogebraApplet () {\n return this.parts.some((part) => part.hasEdfinityGeogebraApplet())\n }\n\n hasScaffold () {\n var html = this.get('interactive_html') || ''\n return html.includes('.canopen()')\n }\n\n interactiveHtml () {\n return this.get('interactive_html').replace(\n ' this.flattenAnswers())\n this.on('change:distractor_blocks', () => this.flattenDistractors())\n }\n\n startingIds () {\n return this.get('starting_ids') || keys(this.get('blocks'))\n }\n\n // whether this part should always size to its container\n isFullSize () {\n return true\n }\n\n answerText (answer) {\n const answerText = super.answerText(answer)\n const empty = '
    '\n if (!isBlank(answerText) && answerText !== empty) {\n return 'see above'\n }\n }\n\n startingBlocks () {\n return map(this.startingIds(), (id) => ({\n id,\n }))\n }\n\n deleteBlock (blockId) {\n let answerText, answers, availables\n const blocks = clone(this.get('blocks'))\n if (this.get('answer')) {\n answers = this.removeBlockWithChildren(clone(this.get('answer')), blockId)\n }\n if (this.get('answer_text')) {\n answerText = this.removeBlockWithChildren(\n clone(this.get('answer_text')),\n blockId\n )\n }\n if (this.get('distractor_blocks')) {\n availables = this.removeBlockWithChildren(\n clone(this.get('distractor_blocks')),\n blockId\n )\n }\n\n const usedBlockIds = flatten([\n this.blockIds(answers),\n this.blockIds(availables),\n ])\n const unusedBlocks = difference(\n map(keys(blocks), (key) => parseInt(key)),\n usedBlockIds\n )\n each(unusedBlocks, (id) => {\n delete blocks[id]\n })\n\n this.set({\n blocks,\n answer: answers,\n answerText,\n distractor_blocks: availables,\n })\n }\n\n removeBlockWithChildren (blocks, blockId) {\n const filtered = filter(blocks, (block) => block.id !== blockId)\n return map(filtered, (block) => {\n if (block.children) {\n return {\n id: block.id,\n index: block.index,\n children: this.removeBlockWithChildren(block.children, blockId),\n }\n } else {\n return { id: block.id, index: block.index }\n }\n })\n }\n\n blockIds (blocks) {\n return flatten(\n map(blocks, (block) => {\n if (block.children) {\n return [block.id, this.blockIds(block.children)]\n } else {\n return block.id\n }\n })\n )\n }\n\n blockText (id, displayNumber = false) {\n const index = indexOf(this.startingIds(), id.toString()) + 1\n\n if (displayNumber && index != null && this.get('numbered')) {\n return `
    ${index}: ${\n this.get('blocks')[id]\n }
    `\n } else {\n return this.get('blocks')[id]\n }\n }\n\n blockIndex (block) {\n return indexOf(this.get('starting_ids'), block.id.toString()) + 1\n }\n\n setBlockText (blockId, text) {\n const blocks = clone(this.get('blocks'))\n blocks[blockId] = text\n this.set({ blocks })\n }\n\n flattenAnswers () {\n this.set({\n answer: this.flattenToDepth(\n clone(this.get('answer')),\n this.get('indentation_depth')\n ),\n })\n this.trigger('refresh')\n }\n\n flattenDistractors () {\n this.set({\n distractor_blocks: this.flattenToDepth(\n clone(this.get('distractor_blocks')),\n 0\n ),\n })\n this.trigger('refresh')\n }\n\n flattenToDepth (blocks, depth) {\n if (blocks == null) {\n return null\n }\n let result = []\n for (const block of blocks) {\n if (block.children) {\n if (depth > 0) {\n result.push({\n id: block.id,\n index: block.index,\n children: this.flattenToDepth(block.children, depth - 1),\n })\n } else {\n result.push({ id: block.id, index: block.index })\n result = result.concat(this.flattenToDepth(block.children, 0))\n }\n } else {\n result.push(block)\n }\n }\n return result\n }\n\n blocksWithIndexes (blocks) {\n return blocks.map((block) => ({\n id: block.id,\n index: this.blockIndex(block),\n children: block.children\n ? this.blocksWithIndexes(block.children)\n : undefined,\n }))\n }\n\n answerHtml (_answer) {\n const blocks = this.get('numbered')\n ? this.blocksWithIndexes(this.get('answer'))\n : this.get('answer')\n return this.nestedBlockHtml(blocks)\n }\n\n nestedListHtml (listName, editable = false) {\n return this.nestedBlockHtml(this.get(listName), editable)\n }\n\n nestedBlockHtml (blocks, editable = false) {\n if (isBlank(blocks)) {\n return ''\n }\n\n let result = \"
      \"\n const tag =\n !this.editing && this.get('theme') === 'code_block' ? 'code' : 'div'\n\n if (blocks) {\n for (const block of blocks) {\n let editElement\n\n if (editable) {\n editElement = `\\\n \\\n`\n } else {\n editElement = ''\n }\n\n result += `
    1. \\\n
      \\\n<${tag} class='no-selection'> \\\n${this.blockText(block.id, !editable)} \\\n
      \\\n${editElement} \\\n \\\n${block.children ? this.nestedBlockHtml(block.children, editable) : ''} \\\n
    2. `\n }\n }\n result += '
    '\n return result\n }\n}\n","import { defaults } from 'underscore'\nimport FreeResponse from 'models/parts/free_response'\nimport MultipleChoice from 'models/parts/multiple_choice'\nimport MultipleAnswer from 'models/parts/multiple_answer'\nimport Matching from 'models/parts/matching'\nimport EitherOr from 'models/parts/either_or'\nimport Informational from 'models/parts/informational'\nimport Essay from 'models/parts/essay'\nimport ShowWork from 'models/parts/show_work'\nimport HotspotInteraction from 'models/parts/hotspot_interaction'\nimport LabelImage from 'models/parts/label_image'\nimport SelectPoint from 'models/parts/select_point'\nimport FileUpload from 'models/parts/file_upload'\nimport GeneratedPart from 'models/parts/generated_part'\nimport PartTable from 'models/parts/part_table'\nimport Webwork from 'models/parts/webwork'\nimport WebworkSubpart from 'models/parts/webwork_subpart'\nimport DraggableSequence from 'models/parts/draggable_sequence'\nimport UnitTesting from 'models/parts/unit_testing'\n\nexport default {\n models: {\n mc: MultipleChoice,\n ma: MultipleAnswer,\n fr: FreeResponse,\n eo: EitherOr,\n in: Informational,\n es: Essay,\n sw: ShowWork,\n hi: HotspotInteraction,\n li: LabelImage,\n sp: SelectPoint,\n fu: FileUpload,\n pt: PartTable,\n ww: Webwork,\n ws: WebworkSubpart,\n ds: DraggableSequence,\n ut: UnitTesting,\n ge: GeneratedPart,\n mt: Matching,\n },\n\n build (format, attrs, opts) {\n if (this.models[format]) {\n const Model = this.models[format]\n return new Model(attrs, opts)\n }\n },\n\n fromAttributes (attrs, options = {}) {\n defaults(options, { parse: true })\n const part = this.build(attrs.format, attrs, options)\n\n if (part) {\n return part\n } else {\n console.log(`Unknown format: ${attrs.format}`)\n return null\n }\n },\n}\n","import BaseCollection from 'collections/base'\n\nexport default class PartCollection extends BaseCollection {\n initialize (models, options = {}) {\n super.initialize(models, options)\n this.container = options.container\n }\n\n model (attrs, options) {\n return options.partFactory.fromAttributes(attrs, options)\n }\n\n flatParts () {\n return this.chain()\n .map((p) => p.flatParts())\n .flatten()\n .value()\n }\n\n selectableParts () {\n return this.chain()\n .map((p) => p.selectableParts())\n .flatten()\n .uniq()\n .value()\n }\n\n reportedParts (answers) {\n return this.chain()\n .map((p) => p.reportedParts(answers))\n .flatten()\n .value()\n }\n}\n","import BaseModel from 'models/base'\nimport BaseCollection from 'collections/base'\n\nexport default class PartChunk extends BaseModel {\n initialize (options) {\n super.initialize(options)\n this.parts = new BaseCollection([])\n }\n\n primaryPart () {\n return this.parts.at(0)\n }\n\n secondaryParts () {\n return this.parts.models.slice(1)\n }\n\n uid () {\n return this.primaryPart().uid()\n }\n\n lastPart () {\n return this.parts.at(this.parts.length - 1)\n }\n\n isMultipart () {\n return this.parts.size() > 1\n }\n\n hasShowWorkPart () {\n return this.primaryPart().hasShowWorkPart()\n }\n\n addPart (part) {\n part.problem = this.problem\n part.chunk = this\n part.container = this.container\n this.parts.add(part)\n }\n\n removePart (part) {\n if (!this.parts.contains(part)) {\n return\n }\n\n if (this.primaryPart() == part) {\n this.container.removeChunk(this)\n } else {\n this.parts.remove(part)\n }\n }\n\n rebuildParts () {\n this.parts.each((part) => part.rebuildParts?.())\n }\n}\n","import { defaults, select } from 'underscore'\nimport { lowerAlphaIndex } from 'utils/problem'\nimport PartCollection from 'collections/part'\nimport BaseCollection from 'collections/base'\nimport Part from 'models/part'\nimport PartChunk from 'models/parts/chunk'\n\nexport default class PartContainer extends Part {\n letterForPart (part) {\n const index = this.chunks.indexOf(part.chunk)\n return this.letterFor(index, part)\n }\n\n letterFor (index) {\n return lowerAlphaIndex(index)\n }\n\n chunkFn (part, lastChunk) {\n if (this.editable) {\n return part.get('format') !== 'sw' && lastChunk.parts.size() > 0\n } else {\n return part.isSequenced() && lastChunk.parts.some((p) => p.isSequenced())\n }\n }\n\n isAnswerable () {\n return false\n }\n\n hasAnswer () {\n return super.hasAnswer() || this.parts.some((part) => part.hasAnswer())\n }\n\n hasSolution () {\n return super.hasSolution() || this.parts.some((part) => part.hasSolution())\n }\n\n hasNestedParts () {\n return this.parts.some((part) => part instanceof this.constructor)\n }\n\n last () {\n return this.parts.last()\n }\n\n at (idx) {\n return this.parts.at(idx)\n }\n\n each (fn) {\n return this.parts.each(fn)\n }\n\n size () {\n return this.parts.size()\n }\n\n flatParts () {\n return this.parts.flatParts()\n }\n\n // subset of parts that can be selected in the problem editor\n selectableParts () {\n return this.parts.selectableParts()\n }\n\n answerableParts () {\n return select(this.flatParts(), (part) => part.isAnswerable())\n }\n\n reportedParts (answers) {\n return select(this.parts.reportedParts(answers), (part) =>\n part.isAnswerable()\n )\n }\n\n gradableParts () {\n return select(this.flatParts(), (part) => part.isGradable())\n }\n\n isMultipart () {\n return this.parts.size() > 1\n }\n\n isMultiChunk () {\n return this.chunks.size() > 1\n }\n\n chunkIndex (part) {\n return this.chunks.indexOf(part.chunk)\n }\n\n calculatedPoints () {\n return this.gradableParts()\n .map((part) => {\n const points = part.get('points') != null && part.get('points')\n\n return points === null ? 1 : points\n })\n .reduce((total, a) => total + a, 0)\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n defaults(options, { editable: false })\n\n this.problem = options.problem\n this.editable = options.editable\n this.parts = new PartCollection(resp.part_attributes || resp.parts, {\n parse: true,\n problem: options.problem,\n partFactory: options.partFactory,\n container: this,\n editable: this.editable,\n })\n\n this.buildChunks()\n return resp\n }\n\n // called before saving model to rebuild the container from modified chunks\n rebuildParts () {\n this.chunks.each((chunk) => chunk.rebuildParts())\n this.parts.reset(this.chunks.map((chunk) => chunk.parts.models).flat())\n }\n\n // called after saving model to populate any changed values into parts without having to rebuild\n // the container\n synchronizeParts (resp) {\n if (this.get('part_id') == null) {\n this.set('part_id', resp.part_id, { silent: true })\n }\n\n // check for non-existent part is necessary in the case where a show-work part is deleted\n // along with another part; in this case, two parts are removed, but two separate 'updates'\n // are issued and synchronize gets called twice, once with a part that has already been removed.\n resp.part_attributes.forEach((p, i) => this.parts.at(i)?.synchronize(p))\n }\n\n synchronizeInteractiveHtml (resp) {\n this.parts.each((part, i) => {\n part.set('interactive_html', resp[i].interactive_html, { silent: true })\n })\n }\n\n addPart (part, options = {}) {\n const chunk = new PartChunk()\n chunk.problem = this.problem\n chunk.container = this\n chunk.addPart(part)\n return this.addChunk(chunk, options)\n }\n\n addChunk (chunk, options = {}) {\n chunk.problem = this.problem\n chunk.container = this\n chunk.parts.forEach((part) => {\n part.container = this\n })\n return this.chunks.add(chunk, options)\n }\n\n removePart (part) {\n return part.chunk.removePart(part)\n }\n\n removeChunk (chunk) {\n return this.chunks.remove(chunk)\n }\n\n // used to edit the container; only built once, and when chunks are modified, parts are rebuilt\n // for auto-saves\n buildChunks () {\n if (!this.chunks) {\n this.chunks = new BaseCollection([])\n }\n\n let chunk = null\n for (let i = 0; i < this.parts.size(); i++) {\n const part = this.parts.at(i)\n if (!chunk || this.chunkFn(part, chunk)) {\n chunk = this.addPart(part)\n } else {\n chunk.addPart(part)\n }\n }\n }\n\n toJSON () {\n const attrs = super.toJSON()\n attrs.part_attributes = this.parts.map((p) => p.toJSON())\n return attrs\n }\n}\n","import { upperAlphaIndex } from 'utils/problem'\nimport PartContainer from 'models/parts/container'\n\nexport default class PartTable extends PartContainer {\n label () {\n return 'Table Layout'\n }\n\n defaults () {\n return {\n format: 'pt',\n flow: 'rows',\n table_wrap: 3,\n primary_table_headers: [],\n secondary_table_headers: [],\n }\n }\n\n chunkFn (part, lastChunk) {\n return part.get('format') !== 'sw' && lastChunk.parts.size() > 0\n }\n\n indexToRow (index) {\n if (this.get('flow') === 'rows') {\n return Math.floor(index / this.getTableWrap())\n } else {\n return index % this.getTableWrap()\n }\n }\n\n indexToColumn (index) {\n if (this.get('flow') === 'rows') {\n return index % this.getTableWrap()\n } else {\n return Math.floor(index / this.getTableWrap())\n }\n }\n\n rowCount () {\n if (this.get('flow') === 'rows') {\n return Math.ceil((this.chunks.size() * 1.0) / this.getTableWrap())\n } else {\n return this.getTableWrap()\n }\n }\n\n columnCount () {\n if (this.get('flow') === 'rows') {\n return this.getTableWrap()\n } else {\n return Math.ceil((this.chunks.size() * 1.0) / this.getTableWrap())\n }\n }\n\n rowHeaderField () {\n if (this.get('flow') === 'rows') {\n return 'primary_table_headers'\n } else {\n return 'secondary_table_headers'\n }\n }\n\n rowHeaders () {\n return this.get(this.rowHeaderField())\n }\n\n columnHeaderField () {\n if (this.get('flow') === 'rows') {\n return 'secondary_table_headers'\n } else {\n return 'primary_table_headers'\n }\n }\n\n columnHeaders () {\n return this.get(this.columnHeaderField())\n }\n\n getTableWrap () {\n return Math.min(this.get('table_wrap'), this.chunks.size())\n }\n\n letterFor (index) {\n return (\n upperAlphaIndex(this.indexToColumn(index)) + (this.indexToRow(index) + 1)\n )\n }\n\n letterAt (x, y) {\n if (this.get('flow') === 'rows') {\n const x2 = x\n x = y\n y = x2\n }\n return upperAlphaIndex(x) + (y + 1)\n }\n}\n","import { defer, extend } from 'underscore'\nimport BaseCollection from 'collections/base'\nimport BaseModel from 'models/base'\nimport Problem from 'models/problem'\n\nexport default class Pool extends BaseModel {\n url () {\n return `/problem_sets/${this.problemSet.id}/pools/${this.id || ''}`\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n if (this.problems == null) {\n this.problems = new BaseCollection([], { model: Problem })\n }\n if (this.problemSet) {\n this.syncProblemSet()\n }\n return resp\n }\n\n assignedProblems () {\n return this.problems.filter((problem) =>\n this.problemSet.assignsProblem(problem)\n )\n }\n\n problemCount () {\n return this.problems.size()\n }\n\n points () {\n const cnt = Math.min(\n this.get('sample_count'),\n this.assignedProblems().length\n )\n return this.get('points_override') * cnt\n }\n\n poolNumber () {\n return this.collection.indexOf(this) + 1\n }\n\n problemNumber (problem) {\n return this.problems.indexOf(problem) + 1\n }\n\n selectionVerb () {\n if (this.get('randomize')) {\n return 'randomly'\n } else {\n return 'sequentially'\n }\n }\n\n isAssigned () {\n return this.assignedProblems().length > 0\n }\n\n overCapacity () {\n return this.assignedProblems().length < this.get('sample_count')\n }\n\n matches (query) {\n return this.problems.some((problem) => problem.matches(query))\n }\n\n cannotRestoreSelection () {\n return true\n }\n\n // used for polymorphic match of Problem#remove\n remove (assignmentId, callback) {\n return this.destroy({ success: callback })\n }\n\n addProblem (problem, beforeProblem, options = {}) {\n this.beforeAddProblem(\n problem,\n beforeProblem,\n Object.assign({}, { sync_on_update: true }, options) // preserve existing value\n )\n this.problemSet.cacheInternalState()\n problem.trigger('add_to_pool')\n\n this.command(`${this.url()}/add_problem`, {\n data: {\n problem_id: problem.id,\n before_problem_id: beforeProblem?.id,\n },\n sync: true,\n success: () => {\n this.syncProblemSet()\n },\n })\n }\n\n removeProblem (problem, beforeItem, options = {}) {\n this.beforeRemoveProblem(\n problem,\n beforeItem,\n Object.assign({}, { sync_on_update: true }, options) // preserve existing value\n )\n\n // translate between items and problems for server-side API\n if (beforeItem instanceof Pool) {\n beforeItem = beforeItem.problems.at(0)\n }\n\n this.problemSet.cacheInternalState()\n this.command(`${this.url()}/remove_problem`, {\n data: {\n problem_id: problem.id,\n before_problem_id: beforeItem?.id,\n },\n sync: true,\n success: () => {\n options.callback?.()\n this.syncProblemSet()\n },\n })\n }\n\n moveProblem (oldIndex, newIndex) {\n if (oldIndex === newIndex) {\n return\n }\n\n if (newIndex === -1) {\n newIndex = 0\n } // dragging in bar too far can produce a -1 index\n const problem = this.problems.at(oldIndex)\n\n if (problem == null) {\n return\n }\n\n this.problems.remove(problem, { silent: true })\n this.problems.add(problem, { at: newIndex, silent: true })\n\n this.problemSet.reorder()\n this.problems.trigger('move', { oldIndex, newIndex })\n }\n\n bulkAddProblems (problems, callback) {\n this.command(`${this.url()}/bulk_add_problems`, {\n sync: false,\n data: {\n ids: problems.map((problem) => problem.id),\n },\n success: (pool, resp) => {\n // returns a task id (long running)\n callback?.(resp)\n\n defer(() => {\n problems.forEach((problem) => {\n this.beforeAddProblem(problem)\n })\n\n this.problemSet.manualReset()\n this.syncProblemSet()\n })\n },\n })\n }\n\n bulkRemoveProblems (problems, callback) {\n problems.forEach((problem) => {\n this.beforeRemoveProblem(problem)\n })\n this.problemSet.manualReset()\n\n this.command(`${this.url()}/bulk_remove_problems`, {\n sync: false,\n data: {\n ids: problems.map((problem) => problem.id),\n },\n success: (pool, resp) => {\n // returns a task id (long running)\n callback?.(resp)\n this.syncProblemSet()\n },\n })\n }\n\n handleProblemRemoval (problem, options) {\n this.problems.remove(problem, options)\n\n if (this.problems.size() === 0) {\n this.problemSet.handleItemRemoval(this, options)\n }\n }\n\n beforeAddProblem (problem, beforeProblem, options) {\n this.problemSet.handleItemRemoval(problem, options)\n problem.pool = this\n\n let idx = this.insertionIndex(beforeProblem)\n if (idx == null || idx === -1) {\n idx = this.problems.size()\n }\n this.problems.add(problem, extend(options, { at: idx }))\n }\n\n problemIndex (problem) {\n return this.problems.findIndex((p) => p.id === problem.id)\n }\n\n // can return a valid index or -1 (not found) or null\n insertionIndex (beforeProblem) {\n if (beforeProblem) {\n return this.problemIndex(beforeProblem)\n }\n }\n\n beforeRemoveProblem (problem, beforeItem, options = {}) {\n let idx\n this.problems.remove(problem, options)\n\n if (beforeItem) {\n idx = this.problemSet.insertionIndex(beforeItem)\n }\n if (idx == null || idx === -1) {\n idx = this.problemSet.items.size()\n }\n\n problem.pool = null\n this.problemSet.items.add(problem, extend({ at: idx }, options))\n if (this.problems.size() === 0) {\n this.problemSet.handleItemRemoval(this, {\n ...options,\n sync_on_update: true,\n })\n }\n problem.trigger('remove_from_pool')\n }\n\n afterProblemCopiedIntoPool (originalProblem, copiedProblem) {\n this.beforeAddProblem(\n copiedProblem,\n originalProblem,\n Object.assign({}, { sync_on_update: true })\n )\n this.problemSet.cacheInternalState()\n copiedProblem.trigger('add_to_pool')\n this.syncProblemSet()\n }\n\n syncProblemSet () {\n this.problemSet.syncTotals(this)\n this.problemSet.assignment.updatePublishingInfo(this.get('publishing_info'))\n }\n}\n","import { defaults } from 'underscore'\nimport BaseModel from 'models/base'\nimport AssessmentSession from 'models/assessment_session'\n\nexport default class PrintVariation extends BaseModel {\n url () {\n if (this.id) {\n return `/assignments/${this.assignment.id}/print_variations/${this.id}`\n } else {\n return `/assignments/${this.get('assignment_id')}/print_variations`\n }\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n\n this.session = this.hasOne('session', AssessmentSession, resp)\n\n return resp\n }\n\n print (options) {\n defaults(options, {\n sync: false,\n })\n this.command(`${this.url()}/print`, options)\n }\n\n exportKey (options) {\n defaults(options, {\n sync: false,\n })\n this.command(`${this.url()}/export_key`, options)\n }\n}\n","import BaseModel from 'models/base'\n\nexport default class ContentLicense extends BaseModel {}\n","import BaseModel from 'models/base'\n\nexport default class Difficulty extends BaseModel {\n url () {\n if (this.id) {\n return `/problems/${this.get('problem_id')}/difficulties/${this.id}`\n } else {\n return `/problems/${this.get('problem_id')}/difficulties`\n }\n }\n}\n","/* global $, _E */\nimport { clone } from 'underscore'\nimport { isBlank } from 'utils/common'\nimport PartContainer from 'models/parts/container'\n\n// see https://stackoverflow.com/questions/38841469/how-to-fix-this-es6-module-circular-dependency\nimport BaseModel from 'models/base'\nimport ProblemSet from 'models/problem_set'\nimport Assignment from 'models/assignment'\nimport Assessment from 'models/assessment'\nimport ContentLicense from 'models/content_license'\nimport Difficulty from 'models/difficulty'\nimport Sketch from 'models/sketch'\nimport Product from 'models/product'\nimport User from 'models/user'\nimport PartModelFactory from 'models/part_factory'\nimport BaseCollection from 'collections/base'\nimport { Skill } from 'models/taxonomy_node'\nimport { creatorLabel } from 'helpers/metadata'\n\nexport default class Problem extends BaseModel {\n url () {\n const prefix = this.problemSet ? `/problem_sets/${this.problemSet.id}` : ''\n const url = this.id ? `/problems/${this.id}` : '/problems'\n return prefix + url\n }\n\n assignmentUrl (assignment) {\n // url with problem set specific to the assignment (in the case of inclusion in\n // multiple assignments); special case\n return `/problem_sets/${assignment.get('problem_set_id')}/problems/${\n this.id\n }`\n }\n\n modelPrefix () {\n return 'problem'\n }\n\n parentName () {\n return 'problem'\n }\n\n isDerived () {\n return this.remote != null\n }\n\n inContest () {\n return !isBlank(this.get('contest_event_ids'))\n }\n\n hasTaxonomy () {\n return this.skills?.length > 0\n }\n\n tagArray () {\n return this.get('tags').split(',')\n }\n\n subjects () {\n return this.skills\n .chain()\n .map((skill) => skill.subject())\n .uniq(false, (subject) => subject.id)\n .value()\n }\n\n nonZeroDifficulties () {\n return this.difficulties.filter((d) => d.get('rating') > 0)\n }\n\n problemCount () {\n return 1\n }\n\n creatorLabel () {\n return creatorLabel(this)\n }\n\n typeLabel () {\n if (this.get('instructional')) {\n return 'content'\n } else {\n return 'problem'\n }\n }\n\n openButtonLabel () {\n if (this.can('edit')) {\n return 'Edit'\n } else {\n return 'Open'\n }\n }\n\n name () {\n if (this.problemSet) {\n if (this.pool) {\n return `${this.problemSet.assignment.get(\n 'name'\n )} — pool ${this.pool.get('name')}`\n } else if (this.problemSet.assignsProblem(this)) {\n return `${this.problemSet.assignment.get(\n 'name'\n )} #${this.problemSet.getNumber(this)}`\n } else {\n return this.problemSet.assignment.get('name')\n }\n } else if (this.assignment) {\n return `${this.assignment.get('name')} #${this.get('problem_number')}`\n } else {\n return this.get('name')\n }\n }\n\n navToNumber () {\n if (this.problemSet) {\n if (this.pool) {\n return `P${this.pool.poolNumber()}`\n } else {\n return this.problemSet.getNumber(this)\n }\n } else {\n return this.get('problem_number')\n }\n }\n\n comment () {\n return this.problemSet?.getAnnotationValue(this, 'comment')\n }\n\n cleanupStatus () {\n if (this.get('cleanup_version')) {\n if (this.get('cleanup_version') == this.get('version')) {\n return 'Problem has not changed since the last cleanup.'\n } else {\n return 'Problem has changed since the last cleanup.'\n }\n } else {\n return 'Problem has never been cleaned up.'\n }\n }\n\n initialize () {\n return (this.taxonomy = _E.taxonomy)\n }\n\n parse (resp, options = {}) {\n super.parse(resp, options)\n\n if (this.container) {\n this.container.synchronizeParts(resp)\n } else {\n this.container = new PartContainer(resp, {\n parse: true,\n problem: this,\n partFactory: PartModelFactory,\n editable: true,\n })\n this.cacheParts()\n }\n delete resp.part_attributes\n\n this.user = this.hasOne('user', User, resp)\n if (this.problemSet == null) {\n this.problemSet = this.hasOne('problem_set', ProblemSet, resp)\n }\n delete resp.problem_set\n if (this.assignment == null) {\n this.assignment = this.hasOne('assignment', Assignment, resp)\n }\n delete resp.assignment\n this.skills = this.hasMany('skills', Skill, resp, { allowEmpty: true })\n this.difficulties = this.hasMany('difficulties', Difficulty, resp, {\n allowEmpty: true,\n })\n this.products = this.hasMany('products', Product, resp, {\n allowEmpty: true,\n })\n this.sketch = this.hasOne('digest_sketch', Sketch, resp)\n\n this.contentLicense = this.hasOne('content_license', ContentLicense, resp, {\n allowEmpty: true,\n })\n delete resp.content_license\n\n this.initAssessment(resp)\n return resp\n }\n\n defaultDifficulty () {\n return this.difficulties.first()\n }\n\n hasDifficulty () {\n return this.difficulties.size() > 0\n }\n\n difficultyFor (subjectId) {\n return (\n this.difficulties.findWhere({ subjectId }) || this.defaultDifficulty()\n )\n }\n\n editableDifficultyFor (subject) {\n let d = this.difficulties.findWhere({ subject_id: subject.id })\n if (d == null) {\n d = this.addDifficulty(\n { subject_id: subject.id },\n { subject: subject.get('name') }\n )\n }\n return d\n }\n\n matches (query) {\n return this.get('searchable_text')\n .toLowerCase()\n .includes(query.toLowerCase())\n }\n\n canOpen () {\n return this.can('edit') || this.can('open')\n }\n\n canEditPoints () {\n return !(this.get('instructional') || this.pool)\n }\n\n createEditableDifficulties () {\n this.subjects().forEach((subject) => this.editableDifficultyFor(subject))\n if (this.difficulties.isEmpty()) {\n this.addDifficulty()\n }\n }\n\n addDifficulty (attrs, readonly) {\n if (attrs == null) {\n attrs = {}\n }\n if (readonly == null) {\n readonly = {}\n }\n const d = new Difficulty(attrs, { parse: true })\n d.readonly.set(readonly)\n d.readonly.set('problem_id', this.id)\n this.difficulties.add(d)\n this.relateTo(d)\n return d\n }\n\n rebuildAndSave (callback) {\n this.container.rebuildParts()\n this.cacheParts()\n this.save(null, {\n autosave: true,\n success: () => {\n callback?.()\n },\n })\n }\n\n // cached, flattened copy of all parts in this problem\n cacheParts () {\n if (!this.cachedParts) {\n this.cachedParts = new BaseCollection([])\n }\n this.cachedParts.reset(this.container.selectableParts())\n }\n\n findPart (uid) {\n return this.cachedParts.findByUid(uid)\n }\n\n addPart (part, chunk, options = {}) {\n if (chunk) {\n chunk.addPart(part)\n } else {\n this.container.addPart(part, options)\n }\n this.rebuildAndSave(options.success)\n }\n\n movePart (part, container, options = {}) {\n const chunk = part.container.removeChunk(part.chunk)\n container.addChunk(chunk, options)\n this.rebuildAndSave(options.success)\n this.trigger('renumbered')\n }\n\n deletePart (part, options) {\n this.deleteParts([part], options)\n }\n\n deleteParts (parts, callback) {\n parts.forEach((part) => part.chunk.removePart(part))\n this.rebuildAndSave(callback)\n this.trigger('renumbered')\n }\n\n add (assignmentId, options = {}) {\n if (options.sync == null) {\n options.sync = true\n }\n if (options.deep == null) {\n options.deep = false\n }\n if (options.deep) {\n options.data = { deep: true }\n }\n const problem = new Problem()\n problem.command(\n `/assignments/${assignmentId}/problems/${this.id}/add`,\n options\n )\n }\n\n remove (assignmentId, callback) {\n this.removed = true\n this.command(`/assignments/${assignmentId}/problems/${this.id}/remove`, {\n sync: false,\n success: callback,\n })\n }\n\n copy (problemSet, pool, callback) {\n const options = {\n sync: true,\n success: (model, resp, options) => {\n model.problemSet = problemSet\n pool?.afterProblemCopiedIntoPool(this, model)\n problemSet.afterAddProblem(model, { pool })\n problemSet.triggerItemsUpdate()\n callback?.(model, resp, options)\n },\n }\n\n if (pool) {\n options.data = {\n pool_id: pool.id,\n }\n }\n\n this.command(\n `/assignments/${problemSet.assignment.id}/problems/${this.id}/copy`,\n options\n )\n }\n\n cleanup (callback) {\n if (callback == null) {\n callback = $.noop\n }\n this.command(`/problems/${this.id}/cleanup`, {\n success: callback,\n sync: false,\n })\n }\n\n touch () {\n this.command(`/problems/${this.id}/touch`)\n }\n\n syncSkills () {\n this.set(\n 'skill_ids',\n this.skills.map((skill) => skill.id)\n )\n }\n\n initAssessment (resp) {\n const previous = this.assessment != null\n\n this.assessment = this.hasOne('assessment', Assessment, resp)\n if (this.assessment) {\n this.assessment.originator = this\n this.assessment.problem = this\n\n if (previous) {\n this.trigger('assessment_updated')\n }\n }\n }\n\n toJSON () {\n const attrs = clone(this.attributes)\n attrs.part_attributes = JSON.stringify(\n this.container.parts.map((p) => p.toJSON())\n ) // double-stringify to get complicated structures past param validation\n return { problem: attrs }\n }\n}\n","import { clone } from 'underscore'\nimport BaseModel from 'models/base'\n\nexport default class ProblemAnnotation extends BaseModel {\n url () {\n return `/problem_sets/${this.get('problem_set_id')}/problem_annotations/${\n this.id || ''\n }`\n }\n\n toJSON () {\n return clone(this.attributes)\n } // we want all of them, not just the changed ones\n\n hasPointsDefined () {\n return this.id && this.get('points') != null\n }\n}\n","/* global $ */\nimport { invert, defaults, extend, defer, uniq } from 'underscore'\nimport Backbone from 'backbone'\nimport Assessable from 'models/modules/assessable'\nimport BaseModel from 'models/base'\nimport Section from 'models/section'\nimport Problem from 'models/problem'\nimport BaseCollection from 'collections/base'\nimport Assignment from 'models/assignment'\nimport Assessment from 'models/assessment'\nimport Pool from 'models/pool'\nimport ProblemAnnotation from 'models/problem_annotation'\n\nlet C = null\n\nconst initC = function () {\n if (C) {\n return\n }\n C = class ProblemSet extends BaseModel {\n parentName () {\n return 'problemSet'\n }\n\n url () {\n return `/problem_sets/${this.id}`\n }\n\n title (delta) {\n if (delta == null) {\n delta = 0\n }\n const cnt = this.problems.size() + delta // delta is used to report UI change ahead of model change\n let title = `
    Adding to ${this.assignment.get(\n 'name'\n )}
    `\n if (cnt > 0) {\n title += `${cnt}`\n }\n return `
    ${title} 0\n }\n\n findProblem (id) {\n return this.problems.findWhere({ id })\n }\n\n annotatesProblem (problem, key) {\n return (\n this.problem_annotations?.find(\n (annotation) =>\n annotation.get('problem_id') === problem.id && annotation.get(key)\n ) != null\n )\n }\n\n assignsProblem (problem) {\n return this.annotatesProblem(problem, 'assigned')\n }\n\n getNumAssignedProblems () {\n return this.assignedProblems.length\n }\n\n refetch (options = {}) {\n this.pools = null\n this.fetch({\n ...options,\n rerender: true,\n })\n }\n\n moveItem (oldIndex, newIndex) {\n if (oldIndex === newIndex) {\n return\n }\n\n if (newIndex === -1) {\n newIndex = 0\n } // dragging in bar too far can produce a -1 index\n const item = this.items.at(oldIndex)\n\n if (item == null) {\n return\n }\n\n this.items.remove(item, { silent: true })\n this.items.add(item, { at: newIndex, silent: true })\n\n this.reorder()\n this.items.trigger('move', { oldIndex, newIndex })\n }\n\n // moves all items at once using the position map (id: position)\n changePositions (positionMap, callback) {\n const positionKeyMap = invert(positionMap)\n\n this.items.forEach((item) => {\n const newPos = this.getAdjustedPosition(\n item,\n positionMap,\n positionKeyMap\n )\n item.readonly.set('position', newPos)\n })\n\n this.items.comparator = 'position'\n this.items.sort({ silent: true })\n this.items.comparator = null\n\n this.reorder(callback)\n this.items.trigger('sort', this.items, {}, {})\n }\n\n getAdjustedPosition (item, positionMap, positionKeyMap) {\n const oldPos = this.getPositionNumber(item)\n const newPos = positionMap[item.id] || oldPos\n\n if (newPos && newPos != oldPos) {\n if (positionKeyMap[newPos]) {\n // adjust so that any explicit numbering will take precedence\n return newPos < oldPos ? newPos - 0.1 : newPos + 0.1\n } else {\n return newPos\n }\n } else {\n return newPos\n }\n }\n\n reorder (callback) {\n this.cacheInternalState()\n this.command(`/problem_sets/${this.id}/reorder`, {\n data: { problem_ids: this.problems.map((problem) => problem.id) },\n success: (model, resp, options) => {\n this.assignment.updatePublishingInfo(resp.publishing_info)\n callback?.()\n },\n })\n }\n\n addProblem (problem, options = {}) {\n const success = options.success\n options.success = (model) => {\n this.afterAddProblem(model, options)\n success?.(model)\n }\n const addedProblem = new Problem({\n id: problem.id,\n })\n addedProblem.add(this.assignment.id, options)\n }\n\n afterAddProblem (problem, options = {}) {\n this.problem_annotations.add(\n new ProblemAnnotation({\n problem_id: problem.id,\n problem_set_id: this.id,\n assigned: true,\n })\n )\n\n if (!options.pool) {\n this.items.add(problem, options)\n }\n\n problem.problemSet = this\n this.cacheInternalState()\n }\n\n afterNewProblemSaved (problem) {\n this.problems.add(problem)\n this.afterAddProblem(problem, { sync_on_update: true })\n this.assignment.updatePublishingInfo(problem.get('publishing_info'))\n this.syncTotals(problem)\n }\n\n removeItem (item, callback) {\n item = this.flattenedItems.find({ id: item.id })\n this.handleItemRemoval(item, { sync_on_update: true })\n\n item.remove(this.assignment.id, (model, resp, options) => {\n this.problems.remove(item)\n this.cacheInternalState()\n this.syncTotals(item)\n\n this.assessment?.session?.restart()\n\n // eslint-disable-next-line camelcase\n this.assignment.updatePublishingInfo(resp.readonly?.publishing_info)\n\n callback?.(model, resp, options)\n })\n }\n\n // finds and replaces problem with matching id with the given problem\n // used in problem editor\n replaceProblem (problem) {\n const found = this.findProblem(problem.id)\n if (found) {\n const idx = this.problems.indexOf(found)\n this.problems.remove(found)\n this.problems.add(problem, { at: idx })\n this.buildItems()\n }\n }\n\n handleItemRemoval (item, options) {\n if (item.pool) {\n item.pool.handleProblemRemoval(item, {\n ...options,\n sync_on_update: true,\n })\n } else {\n this.items.remove(item, options)\n if (item instanceof Pool) {\n this.pools.remove(item, options)\n }\n }\n }\n\n handleBulkItemRemoval (items, task) {\n items.forEach((item) => this.handleItemRemoval(item))\n this.refetchTotals()\n this.manualReset()\n this.assignment.updatePublishingInfo(task.get('publishing_info'))\n }\n\n createPool (attrs, problems, options = {}) {\n defaults(options, { sync: true })\n\n const pool = new Pool(\n extend(attrs, { ids: problems.map((problem) => problem.id) }),\n { parse: true }\n )\n pool.problemSet = this\n this.pools.add(pool)\n pool.allow('update')\n\n pool.save(\n {},\n {\n sync: false,\n success: (pool, resp) => {\n options.callback?.(resp)\n\n if (options.sync) {\n pool.id = resp.id\n defer(() => {\n problems.forEach((problem) =>\n pool.beforeAddProblem(problem, null, { silent: true })\n )\n this.items.add(pool, { sync_on_update: true })\n this.cacheInternalState()\n })\n }\n },\n }\n )\n\n return pool\n }\n\n poolFor (problem) {\n return this.pools.find((pool) => pool.problemIndex(problem) !== -1)\n }\n\n setCurrentProblem (id, options = {}) {\n this.currentProblem = this.findProblem(id)\n this.trigger('current_problem_changed', this, options)\n }\n\n getPoints (problem) {\n const correctPoints = this.assignment.get('points_correct_response')\n\n return this.getAnnotationValue(\n problem,\n 'points',\n correctPoints != null ? correctPoints : problem.get('points')\n )\n }\n\n getNumberRange (item) {\n return this.numbers[item.id]\n }\n\n getNumber (item) {\n if (this.getNumberRange(item)) {\n const num = uniq([\n this.numbers[item.id].start,\n this.numbers[item.id].end,\n ]).join(' - ')\n return this.getAnnotationValue(item, 'problem_number', num)\n } else {\n return '-'\n }\n }\n\n getPositionNumber (item) {\n return parseFloat(this.items.indexOf(item) + 1)\n }\n\n getAnnotation (problem) {\n const id = typeof problem === 'string' ? problem : problem.id\n return this.problem_annotations?.find((a) => a.get('problem_id') === id)\n }\n\n getAnnotationValue (problem, key, defaultValue) {\n const value = this.getAnnotation(problem)?.get(key)\n if (value != null) {\n return value\n } else {\n return defaultValue\n }\n }\n\n setAnnotationValue (problem, key, value) {\n const annotation = this.getAnnotation(problem)\n annotation.set(key, value)\n annotation.save(null, {\n success: (model, resp) => {\n this.syncTotals(model)\n this.cacheInternalState()\n this.assignment.updatePublishingInfo(\n annotation.readonly.get('publishing_info')\n )\n },\n })\n }\n\n setAnnotationValues (problem, values, callback) {\n const annotation = this.getAnnotation(problem)\n annotation.set(values)\n annotation.save(null, {\n success: (model, resp) => {\n this.cacheInternalState()\n this.syncTotals(model)\n this.assignment.updatePublishingInfo(\n annotation.readonly.get('publishing_info')\n )\n problem.assessment?.session?.fetch()\n callback?.()\n },\n })\n }\n\n bulkUpdateAnnotations (values, callback) {\n $.ajax({\n url: `${this.url()}/problem_annotations/bulk_update`,\n method: 'PUT',\n data: {\n values: values,\n },\n dataType: 'json',\n success: (resp) => {\n Object.keys(values).forEach((id) => {\n const attrs = values[id]\n const annotation = this.getAnnotation(id)\n\n Object.keys(attrs).forEach((attr) => {\n annotation.set(attr, attrs[attr])\n })\n\n annotation.trigger('sync')\n })\n\n this.assignment.updatePublishingInfo(resp.publishing_info)\n this.cacheInternalState()\n this.refetchTotals()\n callback()\n },\n })\n }\n\n bulkRemove (items, callback) {\n this.command(`/assignments/${this.assignment.id}/problems/bulk_remove`, {\n sync: false,\n data: {\n ids: items.map((item) => item.id),\n },\n success: (model, resp) => {\n callback?.(resp)\n },\n })\n }\n\n syncTotals (model) {\n if (model.get('total_assigned') != null) {\n const attrs = [\n 'total_assigned',\n 'total_assigned_points',\n 'total_extra_credit',\n 'total_extra_credit_points',\n ]\n\n attrs.forEach((attr) => {\n this.readonly.set(attr, model.get(attr))\n })\n\n this.trigger('metricsChanged')\n }\n }\n\n parse (resp, options) {\n extend(this, Assessable)\n super.parse(resp, options)\n this.initProblems(resp)\n\n if (resp.problem_annotations) {\n this.problem_annotations = this.hasMany(\n 'problem_annotations',\n ProblemAnnotation,\n resp\n )\n }\n this.section = this.hasOne('section', Section, resp)\n\n if (this.assignment == null) {\n this.assignment = this.hasOne('assignment', Assignment, resp)\n }\n delete resp.assignment\n this.assignment?.updatePublishingInfo(resp.publishing_info)\n delete resp.publishing_info\n if (this.pools == null) {\n this.pools = this.hasMany('pools', Pool, resp, { allowEmpty: true })\n }\n delete resp.pools\n if (this.assessment == null) {\n this.assessment = this.hasOne('assessment', Assessment, resp)\n }\n delete resp.assessment\n\n this.parseEnvironment(resp, options)\n this.parseAssessment(resp)\n\n if (!this.get('shallow')) {\n this.buildItems(options)\n }\n\n return resp\n }\n\n parseAssessment (resp) {\n if (this.assessment == null) {\n this.assessment =\n this.hasOne('assessment', Assessment, resp) ||\n new Assessment({ type: 'problem_set', preview: true })\n this.assessment.originator = this\n }\n }\n\n initProblems (resp) {\n if (!this.problems) {\n this.problems = new BaseCollection([], { model: Problem })\n }\n if (!this.items) {\n this.items = new Backbone.Collection([])\n }\n\n if (resp.problems) {\n this.problems.reset(resp.problems, { parse: true })\n this.problems.each((problem) => this.relateTo(problem))\n delete resp.problems\n } else {\n this.readonly.set('shallow', true)\n }\n }\n\n // used to force a filtered collection to synchronize\n manualReset () {\n this.cacheInternalState()\n this.items.trigger('manual_reset', this.items)\n }\n\n // resets various read-only caches needed for rendering\n cacheInternalState (rebuildProblems = true) {\n if (rebuildProblems) {\n this.buildProblems()\n }\n\n this.buildFlattenedItems()\n this.buildNumbering()\n this.buildDigests()\n this.assignedProblems = this.problems.filter((problem) =>\n this.assignsProblem(problem)\n )\n\n this.trigger('cache_refresh')\n }\n\n // creates an integrated list of problems and pools in the correct order\n buildItems (options = {}) {\n this.items.fetched = true\n const items = this.problems.map((problem, index) => {\n const pool = this.pools.find((pool) =>\n pool.get('problem_ids').includes(problem.id)\n )\n if (pool) {\n pool.problems.add(problem)\n problem.pool = pool\n return pool\n } else {\n return problem\n }\n })\n this.items.reset(uniq(items), { parse: true, silent: true })\n this.cacheInternalState(false)\n\n if (!options.silent) {\n this.items.trigger('reset', this.items, {}, { routed: true })\n }\n }\n\n // creates an ordered list of problems\n buildProblems () {\n const problems = this.items.map(function (item) {\n if (item instanceof Problem) {\n return item\n } else {\n return item.problems.models\n }\n })\n this.problems.reset(problems.flat(), { parse: true })\n }\n\n buildFlattenedItems () {\n if (!this.flattenedItems) {\n this.flattenedItems = new BaseCollection([])\n }\n this.flattenedItems.fetched = true\n const items = this.items.map(function (item) {\n if (item instanceof Problem) {\n return item\n } else {\n return [item].concat(item.problems.models)\n }\n })\n this.flattenedItems.reset(items.flat())\n }\n\n // creates a map of start/end-keyed number ranges for each problem and pool\n buildNumbering () {\n this.numbers = {}\n let idx = 1\n\n this.items.each((item) => {\n if (item instanceof Problem) {\n if (this.assignsProblem(item)) {\n this.numbers[item.id] = { start: idx, end: idx }\n idx = idx + 1\n }\n } else {\n const incr =\n Math.min(item.get('sample_count'), item.assignedProblems().length) -\n 1\n if (incr >= 0) {\n this.numbers[item.id] = { start: idx, end: idx + incr }\n idx = idx + incr + 1\n }\n }\n })\n this.trigger('renumbered')\n }\n\n buildDigests () {\n this.digests = this.problems.reduce((hash, problem) => {\n hash[problem.get('current_digest')] = problem\n return hash\n }, {})\n }\n\n problemIndex (itemIndex) {\n let index = 0\n let i = 0\n\n while (i < itemIndex) {\n index += this.items.at(i).problemCount()\n i++\n }\n return index\n }\n\n // can return a valid index or -1 (not found) or null\n insertionIndex (beforeItem) {\n if (beforeItem) {\n return this.items.findIndex((p) => p.id === beforeItem.id)\n }\n }\n\n refetchTotals () {\n const tempSet = new ProblemSet({ id: this.id })\n tempSet.fetch({\n success: () => {\n this.syncTotals(tempSet)\n },\n })\n }\n\n // hack to trigger an update event after all collections are up-to-date\n triggerItemsUpdate () {\n this.items.trigger('update', this.items, { sync_on_update: true })\n }\n\n toJSON (options) {\n const wrapper = {}\n wrapper.problem_set = super.toJSON(options)\n return wrapper\n }\n }\n}\n\ninitC()\nexport { initC, C as default }\n","import { uniq, select } from 'underscore'\nimport { isBlank } from 'utils/common'\nimport BaseModel from 'models/base'\nimport PartFactory from 'models/part_factory'\nimport PartContainer from 'models/parts/container'\n\nexport default class Question extends BaseModel {\n parse (resp, options) {\n super.parse(resp, options)\n\n this.env = options.env\n this.container = new PartContainer(resp, {\n parse: true,\n partFactory: PartFactory,\n })\n delete resp.parts\n\n this.flatParts = this.container.parts.flatParts()\n this.flatParts.forEach((part, i) => (part.index = i))\n\n return resp\n }\n\n isFullSize () {\n return (\n this.container.parts.reject((part) => part.allowFullSize()).length == 0 &&\n this.container.parts.select((part) => part.isFullSize()).length > 0\n )\n }\n\n answerableParts () {\n return select(this.flatParts, (part) => part.isAnswerable())\n }\n\n numAnswerableParts () {\n return this.answerableParts().length\n }\n\n gradableParts () {\n return select(this.flatParts, (part) => part.isGradable())\n }\n\n numGradableParts () {\n return this.gradableParts().length\n }\n\n part (index) {\n return this.flatParts[index]\n }\n\n numParts () {\n return this.flatParts.length\n }\n\n hasSolution () {\n return this.hasTopLevelSolution() || this.hasPartSolutions()\n }\n\n hasTopLevelSolution () {\n return !isBlank(this.get('solution'))\n }\n\n hasPartSolutions () {\n return this.flatParts.some((part) => part.hasSolution())\n }\n\n hasScaffoldParts () {\n var scaffoldParts = this.container.parts.select((part) =>\n part.hasScaffold()\n )\n return scaffoldParts.length > 0\n }\n\n isWebwork () {\n return this.container.parts.some((part) => part.get('format') === 'ww')\n }\n\n submitButtonLabel () {\n if (this.hasScaffoldParts()) {\n return 'Submit entire answer'\n } else {\n const labels = this.container.parts.map((part) =>\n part.submitButtonLabel()\n )\n if (uniq(labels).length === 1) {\n return labels[0]\n } else {\n return 'Submit answer'\n }\n }\n }\n}\n","import BaseCollection from 'collections/base'\nimport BaseModel from 'models/base'\n// eslint-disable-next-line no-unused-vars\nimport Section from 'models/section' // needed for circular dependency\nimport Assignment from 'models/assignment'\nimport Grade from 'models/grade'\nimport GradeBook from 'models/grade_book'\nimport Order from 'models/order'\nimport User from 'models/user'\nimport { isBlank } from 'utils/common'\nimport { isEducatorOrTa } from 'utils/user'\nimport { sortableDateKey } from 'helpers/date'\n\n// returns a comparator used to sort a collection of assignments based on the given sort key\n// located in this file due to circular dependencies\nexport const assignmentComparator = (sortKey) =>\n function (model) {\n const availableDate =\n model.assessment?.get('available_date') || model.get('available_date')\n const dueDate = model.assessment?.get('due_date') || model.get('due_date')\n const due = sortableDateKey(dueDate)\n const available = sortableDateKey(availableDate)\n const order = model.get('sort_order').toString().padStart(8, '0')\n const name = model.get('name').toLowerCase()\n const score = model.percentCorrect().toString().padStart(8, '0')\n\n let key\n switch (sortKey) {\n case 'name':\n key = [name, due || available, available, order]\n break\n case 'score':\n key = [score, name, due]\n break\n default:\n key = [due || available, available, order, name]\n break\n }\n\n return key.join('-')\n }\n\nexport default class Registration extends BaseModel {\n url () {\n if (this.id) {\n return `/registrations/${this.id}`\n } else {\n return '/registrations'\n }\n }\n\n userUrl () {\n return this.url()\n }\n\n parentName () {\n return 'registration'\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n\n if (!this.assignments) {\n this.assignments = new BaseCollection([], {\n model: Assignment,\n parse: true,\n parentInstance: this,\n comparator: assignmentComparator('due_date'),\n })\n this.assignments.url = `/registrations/${resp.id}/assignments`\n }\n\n this.grades = this.hasMany('grades', Grade, resp)\n this.gradeBook = this.hasOne('grade_book', GradeBook, resp)\n this.user = this.hasOne('user', User, resp)\n this.equivalents = this.hasMany('equivalents', Section, resp)\n if ('order' in resp) this.order = this.hasOne('order', Order, resp)\n\n return resp\n }\n\n icon () {\n return 'fa-user-graduate'\n }\n\n hasAvailabilityDates () {\n return this.assignments.some((assignment) =>\n assignment.hasAvailabilityDates()\n )\n }\n\n findAssignment (id) {\n return this.assignments.find((a) => a.id === id)\n }\n\n gettingStarted () {\n return !this.get('started') && !isBlank(this.get('instructions'))\n }\n\n transfer (toSectionId, success, error) {\n this.command(`${this.url()}/transfer`, {\n data: { to_section_id: toSectionId },\n sync: false,\n success,\n error,\n })\n }\n\n showOfficeHoursIntro () {\n return (\n this.get('oh_enabled') && !this.get('oh_informed') && !isEducatorOrTa()\n )\n }\n\n showRegistrationIntro () {\n return (\n (!this.get('reminders_informed') || this.showOfficeHoursIntro()) &&\n !isEducatorOrTa()\n )\n }\n\n drop (options = {}) {\n options = {\n ...options,\n method: 'DELETE',\n }\n\n this.command(`${this.url()}/student_license`, options)\n }\n}\n","import { clone } from 'underscore'\nimport Backbone from 'backbone'\nimport BaseModel from 'models/base'\nimport { platformName, helpUrl, ltiUnconnectedHelpUrl } from 'helpers/lti'\n\nexport default class School extends BaseModel {\n url () {\n return '/schools'\n }\n\n initialize () {\n this.addresses = new Backbone.Collection()\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n this.termPrices = this.hasMany('term_prices', Backbone.Model, resp)\n\n return resp\n }\n\n toJSON () {\n const attrs = clone(this.attributes)\n\n attrs.addresses_attributes = {}\n this.addresses.each(\n (address, index) =>\n (attrs.addresses_attributes[index] = address.attributes)\n )\n\n return { school: attrs }\n }\n\n ltiConnectionMessage () {\n if (!this.get('lti_enabled')) {\n const url = ltiUnconnectedHelpUrl()\n return `Your institution's learning management system is not integrated with Edfinity.\n Get started here or contact us at\n support@edfinity.com for more information.`\n }\n\n const helpHref = helpUrl(this.get('lms_provider'), this.get('ltia_enabled'))\n const helpMessage = `Please consult our Help Center\n on how to link to Edfinity and pass grades back to your LMS.`\n\n if (this.get('ltia_enabled')) {\n return `Your institution's ${platformName(\n this.get('lms_provider')\n )} system is integrated with Edfinity using LTI Advantage.\n ${helpMessage}`\n } else {\n return `Your institution's ${platformName(\n this.get('lms_provider')\n )} system is integrated with Edfinity using LTI 1.1.\n ${helpMessage}`\n }\n }\n}\n","/* global _E */\nimport BaseModel from 'models/base'\n\nexport default class Collaboration extends BaseModel {\n url () {\n if (this.id) {\n return `/collaborations/${this.id}`\n } else {\n return '/collaborations'\n }\n }\n\n label () {\n if (this.get('collaborator_id') === _E.currentUser.id) {\n return 'You'\n } else if (this.get('collaborator_id')) {\n return `
    \\\n
    ${this.get('collaborator_name')}
    \\\n
    ${this.get('collaborator_email')}
    \\\n
    `\n } else {\n let label = `
    ${this.get('collaborator_email')}
    `\n if (this.can('invite')) {\n label += `
    Invitation sent \\\nresend \\\n
    `\n }\n label += '
    '\n return label\n }\n }\n\n invite (callback) {\n this.command(`${this.url()}/invite`, {\n method: 'PUT',\n success: callback,\n })\n }\n}\n","import BaseModel from 'models/base'\n\nexport default class Policy extends BaseModel {\n url () {\n return `/sections/${this.get('parent_id')}/policy`\n }\n\n isManaged () {\n return this.get('access') === 'managed'\n }\n\n isPublic () {\n return this.get('access') === 'view'\n }\n\n isPrivate () {\n return this.get('access') === 'private'\n }\n}\n","/* global $, I18n, moment, _E */\nimport { defaults, extend, clone } from 'underscore'\nimport GradeBook from 'models/grade_book'\n// eslint-disable-next-line no-unused-vars\nimport ProblemSet, { initC } from 'models/problem_set'\ninitC()\n/* eslint-disable import/first */\nimport BaseModel from 'models/base'\nimport UserSettings from 'models/user_settings'\nimport Exportable from 'models/modules/exportable'\nimport Product from 'models/product'\nimport Assignment from 'models/assignment'\nimport User from 'models/user'\nimport School from 'models/school'\nimport BaseCollection from 'collections/base'\nimport Collaboration from 'models/collaboration'\nimport Policy from 'models/policy'\nimport AssignmentTemplate from 'models/assignment_template'\nimport { sortableDateKey } from 'helpers/date'\n/* eslint-enable import/first */\n\n// returns a comparator used to sort a collection of assignments based on the given sort key\n// located in this file due to circular dependencies\nexport const assignmentComparator = (sortKey) =>\n function (model) {\n const due = sortableDateKey(model.get('due_date'))\n const available = sortableDateKey(model.get('available_date'))\n const order = model.get('sort_order').toString().padStart(8, '0')\n const name = model.get('name').toLowerCase()\n const count = model\n .problemSet()\n .get('total_assigned')\n .toString()\n .padStart(8, '0')\n\n let key\n switch (sortKey) {\n case 'available_date':\n key = [available, due, order, name]\n break\n case 'problems':\n key = [count, name]\n break\n case 'name':\n key = [name, due, available, order]\n break\n default:\n key = [due, available, order, name]\n break\n }\n return key.join('-')\n }\n\nclass Section extends BaseModel {\n parentName () {\n return 'section'\n }\n\n url () {\n if (this.id) {\n return `/sections/${this.id}`\n } else {\n return '/sections'\n }\n }\n\n defaultAssignmentTemplate () {\n return this.assignmentTemplates.find(\n (template) => template.id == this.get('default_assignment_template_id')\n )\n }\n\n isCurrent () {\n return true\n }\n\n tableWidth () {\n return this.assignments.size() * 16 * 8\n }\n\n hasStudents () {\n return this.get('num_students') > 0\n }\n\n canAddStudents () {\n return this.get('join_url') || this.get('can_add_licenses')\n }\n\n ltiDomainURL () {\n return `${window.location.origin}/lti/assess`\n }\n\n ltiToolURL () {\n return `${this.ltiDomainURL()}?course_id=${this.id}`\n }\n\n ltiExportPath () {\n return `/sections/${this.id}/export_cc.xml`\n }\n\n isLmsLinked () {\n return !!Number(this.get('lms_linked'))\n }\n\n isLmsMisconfigured () {\n return this.isLmsLinked() && !this.school.get('lti_enabled')\n }\n\n hideLti11Features () {\n return !this.get('lti11_linked') && this.school.get('ltia_enabled')\n }\n\n showLtiaFeatures () {\n return this.school.get('ltia_enabled') && !this.get('lti11_linked')\n }\n\n isLmsUndisconnectable () {\n return (\n this.get('lti_any_student_use') ||\n this.get('any_direct_student_use') ||\n !_E.currentUser.lms_enabled\n )\n }\n\n isAccessTypeFrozen () {\n return (\n this.isLmsUndisconnectable() ||\n this.get('ltia_linked') ||\n this.get('member')\n )\n }\n\n isEnrollmentOpen () {\n if (this.get('last_enrollment_at') == null) {\n return true\n }\n\n return moment.tz(this.get('last_enrollment_at'), I18n.timeZone).isAfter()\n }\n\n isLicensingFrozen () {\n return this.get('any_student_registrations')\n }\n\n isFull () {\n return (\n !(this.get('student_purchase') || this.get('permissive')) &&\n this.get('seats_available') === 0\n )\n }\n\n showMemberSections () {\n return (\n (this.can('update') &&\n this.coordinatorSection == null &&\n this.memberSections) ||\n (this.get('owned') && this.coordinatorSection == null)\n )\n }\n\n // accommodates weird case of model created by ES search results\n canCreateAssignment () {\n return this.can('create_assignment') || this.get('can_create_assignment')\n }\n\n hasSummaryGradeBook () {\n return (\n this.get('lms_linked') &&\n this.get('lti_summary_grade') &&\n this.get('use_grade_book')\n )\n }\n\n syncSummaryGradeBook () {\n // this is a hack to sync a server value during an auto-save\n if (this.get('lms_linked')) {\n return this.set(\n { use_grade_book: this.get('lti_summary_grade') },\n { silent: true }\n )\n }\n }\n\n syncToLMS (options) {\n defaults(options, {\n sync: false,\n success: $.noop,\n error: $.noop,\n })\n this.command(`/sections/${this.id}/lti_sync`, options)\n }\n\n subtitle () {\n return `Taught by ${this.get('owner_name')}`\n }\n\n icon () {\n return 'fa fa-chalkboard-teacher'\n }\n\n parse (resp, options) {\n extend(this, Exportable)\n super.parse(resp, options)\n\n if (this.assignments == null) {\n this.assignments = new BaseCollection([], {\n model: Assignment,\n parse: true,\n parentInstance: this,\n comparator: assignmentComparator('due_date'),\n })\n this.assignments.url = `/sections/${resp.id}/assignments`\n }\n if (this.collaborations == null) {\n this.collaborations = this.hasMany('collaborations', Collaboration, resp)\n }\n if (this.collaborations) {\n this.collaborations.url = `/sections/${resp.id}/collaborations`\n }\n this.collaboration = this.hasOne('collaboration', Collaboration, resp)\n if (this.gradeBookSettings == null) {\n this.gradeBookSettings = this.hasOne(\n 'grade_book_settings',\n GradeBook,\n resp\n )\n }\n this.user = this.hasOne('user', User, resp)\n if (this.product == null) {\n this.product = this.hasOne('product', Product, resp)\n }\n this.policy = this.hasOne('policy', Policy, resp)\n this.school = this.hasOne('school', School, resp)\n this.assignmentTemplates ||= this.hasMany(\n 'assignment_templates',\n AssignmentTemplate,\n resp\n )\n\n if (this.coordinatorSection == null) {\n this.coordinatorSection = this.hasOne(\n 'coordinator_section',\n Section,\n resp\n )\n }\n\n if (this.memberSections == null) {\n this.memberSections = this.hasMany('member_sections', Section, resp, {\n allowEmpty: true,\n })\n this.memberSections.fetched = true\n this.equivalentSections = this.get('coordinator')\n ? this.memberSections\n : this.hasMany('equivalent_sections', Section, resp)\n }\n\n return resp\n }\n\n addAssignment (assignment) {\n assignment.section = this\n this.assignments.add(assignment)\n }\n\n moveAssignment (oldIndex, newIndex) {\n if (newIndex === -1) {\n newIndex = 0\n } // dragging in bar too far can produce a -1 index\n const assignment = this.assignments.at(oldIndex)\n\n if (assignment) {\n // silent add/remove, choosing to ignore Backbone documentation saying this is rarely (if ever) good idea\n // because it's a \"move\" :)\n this.assignments.remove(assignment, { silent: true })\n this.assignments.add(assignment, { at: newIndex, silent: true })\n\n this.command(`/sections/${this.id}/reorder`, {\n data: { assignment_ids: this.assignments.map((a) => a.id) },\n success: () => {\n this.assignments.each((assignment) => {\n assignment.set(\n { sort_order: this.assignments.findIndex(assignment) },\n { silent: true }\n )\n })\n this.assignments.trigger('reset', this.assignments)\n },\n })\n }\n }\n\n educatorAssignmentCount () {\n const size = this.assignments?.size?.()\n return size || this.get('num_assignments')\n }\n\n hasAvailabilityDates () {\n return this.assignments.some((assignment) =>\n assignment.hasAvailabilityDates()\n )\n }\n\n copy (callback) {\n this.command(`${this.url()}/copy`, {\n data: this.attributes,\n success: callback,\n })\n }\n\n bulkCopyAssignments (assignments, deep, keepDates, callback = $.noop) {\n this.command(`${this.url()}/assignments/bulk_copy`, {\n data: {\n ids: assignments.map((assignment) => assignment.id),\n deep,\n keep_dates: keepDates,\n },\n success: callback,\n })\n }\n\n bulkDestroyAssignments (assignments, callback = $.noop) {\n this.command(`${this.url()}/assignments/bulk_destroy`, {\n data: {\n ids: assignments.map((assignment) => assignment.id),\n },\n success: callback,\n method: 'DELETE',\n })\n }\n\n bulkUpdateAssignments (assignments, attrs, callback = $.noop) {\n this.command(`${this.url()}/assignments/bulk_update`, {\n data: extend(\n { ids: assignments.map((assignment) => assignment.id) },\n attrs\n ),\n success: callback,\n method: 'PUT',\n })\n assignments.forEach(function (assignment) {\n const attrs2 = clone(attrs)\n if (assignment.get('member')) {\n attrs2.synchronize_member_availability = false\n }\n assignment.set(attrs2, { silent: true }) // when the task is complete, list will be re-rendered\n assignment.trigger('post_save', assignment)\n })\n }\n\n bulkUpdateAssignmentEnvironments (assignments, template, publish, callback) {\n this.command(`${this.url()}/assignments/bulk_publishable_update`, {\n data: extend(\n { ids: assignments.map((assignment) => assignment.id) },\n {\n environment_template_id: template.get('id'),\n publish,\n }\n ),\n success: callback,\n method: 'PUT',\n })\n }\n\n bulkPublishAssignments (assignments, callback) {\n this.command(`${this.url()}/assignments/bulk_publish`, {\n data: {\n ids: assignments.map((assignment) => assignment.id),\n },\n method: 'PUT',\n success: (model, resp, options) => {\n assignments.forEach((assignment) =>\n assignment.updatePublishingInfo({\n republishable: false,\n published: true,\n })\n )\n callback?.(model, resp, options)\n },\n })\n }\n\n bulkDestroyRegistrations (registrations, callback) {\n this.command(`${this.url()}/registrations/bulk_destroy`, {\n data: {\n ids: registrations.map((registrations) => registrations.id),\n },\n success: callback,\n method: 'DELETE',\n })\n }\n\n bulkDropRegistrations (registrations, callback) {\n this.command(`${this.url()}/registrations/bulk_drop`, {\n data: {\n ids: registrations.map((registrations) => registrations.id),\n },\n success: callback,\n method: 'DELETE',\n })\n }\n\n bulkReregister (registrations, callback) {\n this.command(`${this.url()}/registrations/bulk_reregister`, {\n data: {\n ids: registrations.map((registrations) => registrations.id),\n },\n success: callback,\n method: 'PUT',\n })\n }\n\n bulkScoreAssignments (assignments, callback) {\n this.command(`${this.url()}/assignments/bulk_score`, {\n data: {\n ids: assignments.map((assignment) => assignment.id),\n },\n success: callback,\n method: 'PUT',\n })\n }\n\n bulkApplyTemplates (assignments, sectionId, templateId, callback) {\n this.command(`${this.url()}/assignments/bulk_apply_template`, {\n data: {\n ids: assignments.map((assignment) => assignment.id),\n section_id: sectionId,\n template_id: templateId,\n },\n success: callback,\n method: 'PUT',\n })\n }\n\n exportGradeBooks (callback) {\n this.command(`${this.url()}/export_grade_books`, {\n method: 'GET',\n success: callback,\n })\n }\n\n renormalizeLtiaScores (normalize, callback) {\n return this.command(`${this.url()}/renormalize_ltia_scores`, {\n data: { normalize },\n method: 'POST',\n success: (model, resp, options) => {\n this.set('ltia_normalize_scores', normalize, { silent: true })\n return callback?.(resp)\n },\n })\n }\n\n findAssignment (id) {\n return this.assignments.find((a) => a.id === id)\n }\n\n allowedAccessTypes () {\n // view rights don't make sense when sharing a member section\n if (this.can('manage_content')) {\n return ['edit', 'ta', 'view']\n } else {\n return ['edit', 'ta']\n }\n }\n\n share (emails, access, callback) {\n if (access == null) {\n access = 'view'\n }\n this.command(`${this.url()}/collaborations/bulk_create`, {\n data: {\n emails,\n access,\n },\n success: callback,\n })\n }\n\n updateDisplayedAssignmentFields (newFields) {\n this.readonly.set('displayed_assignment_fields', newFields)\n this.trigger('update_assignment_fields', this)\n\n new UserSettings().save({\n displayed_assignment_fields: newFields,\n })\n }\n\n importAssignmentTemplates (sourceSectionId, callback) {\n this.command(`${this.url()}/import_assignment_templates`, {\n data: {\n source_id: sourceSectionId,\n },\n success: callback,\n })\n }\n\n lmsSyllabusInstructions () {\n if (this.get('ltia_linked')) {\n return `\\\nWe will be using Edfinity for this course, integrated with ${this.get(\n 'lms_provider_name'\n )}. To enroll in our Edfinity section, please follow the steps below:\n\n1. Important: Upgrade to the latest version of Google Chrome or Firefox on a Windows/Mac computer. Other browsers like Safari and devices like Chromebooks can cause issues when you access Edfinity via ${this.get(\n 'lms_provider_name'\n )}.\n2. If you already have created an account on Edfinity, make sure you are signed out of edfinity.com.\n3. Log into ${this.get('lms_provider_name')}.\n4. Click on the Edfinity link in the ${this.get(\n 'lms_provider_name'\n )} navigation menu to launch.\n5. You will be prompted to pay (if applicable) and enroll in our course.\n6. Start working on your assignments!\\\n`\n } else {\n return `\\\nWe will be using Edfinity for this course, integrated with ${this.get(\n 'lms_provider_name'\n )}. To enroll in our Edfinity section, please follow the steps below:\n\n1. Important: Upgrade to the latest version of Google Chrome or Firefox on a Windows/Mac computer. Other browsers like Safari and devices like Chromebooks can cause issues when you access Edfinity via ${this.get(\n 'lms_provider_name'\n )}.\n2. If you already have created an account on Edfinity, make sure you are signed out of edfinity.com.\n3. Log into ${this.get('lms_provider_name')}.\n4. Click on the links in ${this.get(\n 'lms_provider_name'\n )} to launch into Edfinity.\n5. You will be prompted to pay (if applicable) and enroll in our course.\n6. Start working on your assignments!\\\n`\n }\n }\n\n joinInstructions () {\n return `\\\nWe will be using Edfinity for ${this.get(\n 'name'\n )}. To enroll, please follow the steps below:\n\n1. If you already have an Edfinity account from a previous course, please sign into it. Otherwise, go to step 2.\n2. Go to the following registration link: ${this.get('join_url')}\n3. You will be prompted to pay (if applicable) and enroll in our course.\n4. Start working on your assignments!\\\n`\n }\n\n editingCollaboratorInfo () {\n return this.collaborations\n ? this.collaborations\n .map(\n (collaboration) =>\n `${collaboration.get(\n 'collaborator_name'\n )} (can ${collaboration.get('access')})`\n )\n .join(', ')\n : ''\n }\n}\n\nexport { Section as default }\n","import BaseModel from 'models/base'\n\nexport default class SessionEnvironment extends BaseModel {\n isAssessmentScoped () {\n return this.get('submission_scope') === 'assessment_scoped'\n }\n\n isRetakeScoped () {\n return this.get('submission_scope') === 'retake_scoped'\n }\n\n isSingleAttempt () {\n return (\n this.get('submission_scope') === 'assessment_scoped' ||\n this.get('submission_scope') === 'retake_scoped'\n )\n }\n\n isMultipleAttempts () {\n return this.get('submission_scope') === 'item_scoped'\n }\n\n isReleased () {\n return this.get('released')\n }\n\n mode () {\n if (this.isMultipleAttempts()) {\n return 'multiple attempts'\n } else if (this.isAssessmentScoped()) {\n return 'single attempt'\n } else {\n return 'single attempt with retakes'\n }\n }\n\n timeLimit () {\n const rawValue = this.get('time_limit')\n\n if (rawValue !== null) return parseInt(parseFloat(rawValue)) / 60.0\n }\n\n parse (resp, options) {\n const ret = super.parse(resp, options)\n\n if (options.parentEnv) {\n this.set(options.parentEnv.attributes)\n }\n\n return ret\n }\n}\n","import { extend, compact } from 'underscore'\nimport { isBlank } from 'utils/common'\nimport Exportable from 'models/modules/exportable'\nimport BaseModel from 'models/base'\nimport Problem from 'models/problem'\nimport Assessment from 'models/assessment'\nimport Question from 'models/question'\nimport SketchReveal from 'models/sketch_reveal'\nimport SketchStep from 'models/sketch_step'\n\nexport default class Sketch extends BaseModel {\n parentName () {\n return 'sketch'\n }\n\n url () {\n return `/sketches/${this.id}`\n }\n\n parse (resp, options) {\n extend(this, Exportable)\n super.parse(resp, options)\n\n if (this.steps == null) {\n this.steps = this.hasMany('sketch_steps', SketchStep, resp)\n }\n this.reveal = this.hasOne('sketch_reveal', SketchReveal, resp)\n this.question = this.hasOne('sketched_question', Question, resp)\n this.problem = this.hasOne('problem', Problem, resp)\n this.assessment = this.hasOne('assessment', Assessment, resp)\n this.overlappingSketches = this.hasMany(\n 'overlapping_sketches',\n this.constructor,\n resp,\n { allowEmpty: true }\n )\n\n return resp\n }\n\n isPublished () {\n return this.get('published_at') != null\n }\n\n hasEmptySteps () {\n return this.steps.some((step) => isBlank(step.get('content')))\n }\n\n addStep () {\n const step = new SketchStep({ sketch_id: this.id })\n step.save(\n {},\n {\n success: () => {\n this.steps.add(step)\n },\n }\n )\n }\n\n removeStepAt (id) {\n this.steps.find((step) => step.get('id') === id)?.destroy()\n }\n\n moveStep (oldIndex, newIndex) {\n if (newIndex === -1) {\n newIndex = 0\n } // dragging in bar too far can produce a -1 index\n const step = this.steps.at(oldIndex)\n\n if (step) {\n this.steps.remove(step, { silent: true })\n this.steps.add(step, { at: newIndex, silent: true })\n this.set({ ordered_step_ids: this.steps.map((s) => s.id) })\n }\n }\n\n description () {\n let unviable\n const published = this.get('request_publisher_name')\n ? `published by ${this.get('request_publisher_name')}`\n : this.get('published_at')\n ? 'published'\n : 'unpublished'\n const claimed =\n this.get('request_state') === 'open' &&\n ((this.get('request_user_name') &&\n `claimed by ${this.get('request_user_name')}`) ||\n 'unclaimed')\n if (!this.get('viable')) {\n unviable = 'unviable'\n }\n return compact([published, claimed, unviable]).join('; ')\n }\n\n ratingToString () {\n switch (this.get('rating')) {\n case 3:\n return 'Exact match'\n case 2:\n return 'Derived'\n case 1:\n return 'Shared history'\n }\n }\n\n mergeAway (betterSketch, callback) {\n this.command(`${this.url()}/dissolve`, {\n method: 'POST',\n data: { better_sketch_id: betterSketch.id },\n success: callback,\n })\n }\n}\n","import { extend } from 'underscore'\nimport Exportable from 'models/modules/exportable'\nimport BaseModel from 'models/base'\nimport Question from 'models/question'\nimport SketchStep from 'models/sketch_step'\n\nexport default class SketchReveal extends BaseModel {\n url () {\n if (this.id) {\n return `/sketch_reveals/${this.id}`\n } else {\n return `/assessment_items/${this.assessment_item.id}/sketch_reveals`\n }\n }\n\n parse (resp, options) {\n extend(this, Exportable)\n super.parse(resp, options)\n\n this.steps = this.hasMany('sketch_steps', SketchStep, resp)\n this.sketched_question = this.hasOne('sketched_question', Question, resp)\n this.assessed_question = this.hasOne('assessed_question', Question, resp)\n\n return resp\n }\n\n hasNext () {\n return this.get('current_step') < this.steps.size() - 1\n }\n\n hasPrev () {\n return this.get('current_step') > 0\n }\n\n next (callback) {\n this.set({ current_step: this.get('current_step') + 1 })\n this.trigger('next', this) // don't wait for server response\n this.save({}, { success: () => callback?.() })\n }\n\n prev (callback) {\n this.save(\n { current_step: this.get('current_step') - 1 },\n {\n success () {\n callback?.()\n },\n }\n )\n }\n\n unlock (options = {}) {\n this.command(`/sketch_reveals/${this.id}/unlock`, {\n method: 'PATCH',\n sync: false,\n path: 'reveal-solution',\n success: () => {\n this.set(\n {\n solution_shown: true,\n solution_shown_before_sketch: !this.get('ready'),\n },\n { silent: true }\n )\n options.success?.(this.reveal)\n },\n error (_, resp) {\n options.error?.(resp)\n },\n })\n }\n\n reset (callback) {\n this.command(`/sketch_reveals/${this.id}/reset`, {\n method: 'PATCH',\n sync: true,\n success () {\n callback?.()\n },\n })\n }\n\n canUnlock () {\n return this.get('credits_available') > 0 || !this.get('subscribed')\n }\n\n canShowSolutionButtons () {\n return (\n !this.get('preview') &&\n (this.assessment_item.isOpen() ||\n !this.assessment_item.env.get('show_answers')) &&\n this.get('unlockable')\n )\n }\n}\n","import BaseModel from 'models/base'\n\nexport default class SketchStep extends BaseModel {\n url () {\n if (this.id) {\n return `/sketches/${this.get('sketch_id')}/sketch_steps/${this.id}`\n } else {\n return `/sketches/${this.get('sketch_id')}/sketch_steps`\n }\n }\n}\n","import { defaults } from 'underscore'\nimport Backbone from 'backbone'\nimport { functionValue } from 'utils/common'\nimport BaseModel from 'models/base'\n\nexport default class TaxonomyNode extends BaseModel {\n url () {\n let u = '/taxonomy_nodes'\n if (this.id) {\n u = `${u}/${this.id}`\n }\n return u\n }\n\n searchUrl (assignment, publicScope) {\n if (publicScope == null) {\n publicScope = true\n }\n if (publicScope) {\n return `/assignments/${assignment.id}/add?taxonomy_node_id=${this.id}`\n } else {\n return `/assignments/${assignment.id}/add?taxonomy_node_id=${this.id}&scope=private`\n }\n }\n\n parent () {\n return this.ancestors.last()\n }\n\n validParent () {\n return functionValue(this.parent, null, this)\n }\n\n subject () {\n return this.ancestors.findWhere({ node_type: 'subject' })\n }\n\n isRoot () {\n return this.get('depth') === 0\n }\n\n selectableNodes () {\n if (this.get('leaf')) {\n return new Backbone.Collection([this])\n } else {\n return this.children\n }\n }\n\n parse (resp, options) {\n super.parse(resp, options)\n this.ancestors =\n this.hasMany('ancestors', Factory.fromAttributes, resp) ||\n new Backbone.Collection()\n this.children =\n this.hasMany('children', Factory.fromAttributes, resp) ||\n new Backbone.Collection()\n if (!this.get('can_change_position')) {\n this.children.comparator = (node) => node.get('name').toLowerCase()\n }\n this.children.fetched = true\n\n return resp\n }\n\n lastPosition () {\n const pos = this.children.last()?.get('position')\n return (pos || 0) + 1\n }\n\n reorder (oldIndex, newIndex) {\n if (newIndex === -1) {\n newIndex = 0\n }\n const node = this.children.at(oldIndex)\n\n this.children.remove(node, { silent: true })\n this.children.add(node, { at: newIndex, silent: true })\n\n const newPos =\n ((newIndex === 0 ? 0 : this.children.at(newIndex - 1)?.get('position')) ||\n 0) + 1\n node.save({ position: newPos }, { success: () => this.reposition() })\n }\n\n newChild (name, callback) {\n const child = Factory.fromAttributes({\n name,\n node_type: this.get('child_type'),\n position: this.lastPosition(),\n parent_id: this.id,\n })\n\n child.save(null, {\n success: () => {\n this.children.add(child)\n this.reposition()\n callback?.(child)\n },\n })\n }\n\n reposition () {\n let pos = 1000\n this.children.each(function (child) {\n child.set({ position: pos }, { silent: true })\n pos += 1000\n })\n }\n}\n\nexport class Skill extends TaxonomyNode {}\nexport class Subject extends TaxonomyNode {}\nexport class Taxonomy extends TaxonomyNode {\n label () {\n if (this.get('name').match(/textbooks/i)) {\n return 'Textbook'\n } else if (this.get('name').match(/webwork/i)) {\n return 'Directory'\n } else if (this.get('name').match(/common/i)) {\n return 'Grade'\n } else {\n return 'Subject'\n }\n }\n}\n\nclass Factory {\n static fromAttributes (attrs, options = {}) {\n defaults(options, { parse: true })\n const models = {\n skill: Skill,\n subject: Subject,\n taxonomy: Taxonomy,\n taxonomy_node: TaxonomyNode,\n }\n\n const type = attrs.node_type\n if (models[type]) {\n const Model = models[type]\n return new Model(attrs, options)\n } else {\n console.log(`Unknown type: ${attrs.node_type}`)\n return null\n }\n }\n}\n","import BaseModel from 'models/base'\n\nexport default class UserSettings extends BaseModel {\n url () {\n return '/users/user_settings'\n }\n\n isNew () {\n return false\n } // this is a singleton\n}\n","import moment from 'moment'\n\nexport const humanizeDuration = seconds => {\n if (seconds === 0) return ''\n else if (seconds < 60) return `${seconds}s`\n else if (seconds < 60 * 60)\n return `${Math.round(moment.duration(seconds, 'seconds').asMinutes(), 1)}m`\n else if (seconds < 60 * 60 * 24)\n return `${Math.round(moment.duration(seconds, 'seconds').asHours(), 1)}h`\n else return `${Math.round(moment.duration(seconds, 'seconds').asDays(), 1)}d`\n}\n","export const lowerAlphaIndex = (index) =>\n String.fromCharCode('a'.charCodeAt() + index)\nexport const upperAlphaIndex = (index) =>\n String.fromCharCode('A'.charCodeAt() + index)\n","/* global _E */\nimport { contains } from 'underscore'\nimport EdfinityCookie from 'models/cookie'\n\nexport const userType = () =>\n _E.currentUser.type ||\n new EdfinityCookie({ namespace: 'guest' }).get('user_type', false)\n\nexport const isOperator = () =>\n ['admin', 'superoperator', 'support', 'operator'].includes(\n _E.currentUser.role\n )\n\nexport const isSuperOperator = () =>\n ['admin', 'superoperator', 'support'].includes(_E.currentUser.role)\n\nexport const isSupport = () =>\n ['admin', 'support'].includes(_E.currentUser.role)\n\nexport const isAdmin = () => _E.currentUser.role == 'admin'\n\nexport const isGuest = () => _E.currentUser.role == 'guest'\n\nexport const isEducatorOrTa = () => _E.currentUser.educator || _E.currentUser.ta\n\nexport const isEducator = () => _E.currentUser.educator\n\nexport const isVerifiedEducator = () =>\n _E.currentUser.educator && _E.currentUser.state == 'verified_educator'\n\nexport const isTa = () => _E.currentUser.ta\n\nexport const featureAccess = (feature) =>\n contains(_E.currentUser.features, feature)\n","/* globals $ */\nimport { defaults } from 'underscore'\nimport Dialog from 'views/dialogs/dialog'\n\n//\n// Dialog with a single input field; value is returned on 'ok' click if\n// opts.callback function specified\n//\nexport default class InputDialog extends Dialog {\n initialize (options) {\n super.initialize(options)\n defaults(this.options, {\n label: 'Please specify a value.',\n required: true,\n })\n }\n\n createModal () {\n let label = ''\n let required = ''\n\n super.createModal()\n\n if (this.options.required) {\n required = 'required '\n }\n\n if (this.options.label) {\n label = ``\n }\n\n this.getBody().html(\n $(\n `
    \n ${label}\n
    `\n )\n )\n\n const input = this.getBody().find('.form-control')\n if (this.options.value) {\n input.val(this.options.value)\n }\n if (this.options.placeholder) {\n input.attr('placeholder', this.options.placeholder)\n }\n }\n\n handleCallback () {\n if (this.options.callback && this.okClicked()) {\n this.options.callback(this.modal.find('input').val())\n }\n }\n}\n","/* globals $ */\nimport { defaults } from 'underscore'\nimport Dialog from 'views/dialogs/dialog'\n\n//\n// Dialog that displays a simple message only\n//\nexport default class MessageDialog extends Dialog {\n initialize (options) {\n super.initialize(options)\n defaults(this.options, {\n message: 'Please specify a message.',\n describedBy: `${this.options.id}-desc`,\n })\n }\n\n createModal () {\n super.createModal()\n this.modal\n .find('.modal-body')\n .html(\n $(\n `

    ${this.options.message}

    `\n )\n )\n this.modal.attr('aria-describedby', this.options.describedBy)\n }\n}\n","export default function(__obj) {\n if (!__obj) __obj = {};\n var __out = [], __capture = function(callback) {\n var out = __out, result;\n __out = [];\n callback.call(this);\n result = __out.join('');\n __out = out;\n return __safe(result);\n }, __sanitize = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else if (typeof value !== 'undefined' && value != null) {\n return __escape(value);\n } else {\n return '';\n }\n }, __safe, __objSafe = __obj.safe, __escape = __obj.escape;\n __safe = __obj.safe = function(value) {\n if (value && value.ecoSafe) {\n return value;\n } else {\n if (!(typeof value !== 'undefined' && value != null)) value = '';\n var result = new String(value);\n result.ecoSafe = true;\n return result;\n }\n };\n if (!__escape) {\n __escape = __obj.escape = function(value) {\n return ('' + value)\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"');\n };\n }\n (function() {\n (function() {\n __out.push('
    \\n

    ');\n \n __out.push(this.options.message);\n \n __out.push('

    \\n \\n \\n
    \\n');\n \n }).call(this);\n \n }).call(__obj);\n __obj.safe = __objSafe, __obj.escape = __escape;\n return __out.join('');\n}","import _templates_dialogs_phrase_confirm_ from 'templates/dialogs/phrase_confirm'\n/* globals $, JST */\nimport { defaults } from 'underscore'\nimport Dialog from 'views/dialogs/dialog'\n\n//\n// Dialog that require the user to type in a phrase to confirm an action\n//\nexport default class PhraseConfirmDialog extends Dialog {\n initialize (options) {\n defaults(options, {\n message: 'Are you sure?',\n buttonOk: 'Delete',\n buttonOkClass: 'btn-red',\n phrase: 'DELETE',\n title: 'Confirm delete',\n role: 'alertDialog',\n callback: $.noop,\n describedBy: `${options.id}-desc`,\n template: _templates_dialogs_phrase_confirm_,\n })\n super.initialize(options)\n }\n\n createModal () {\n super.createModal()\n this.renderBody(this.options.template({ options: this.options }))\n }\n\n hasRequiredFieldValues () {\n const input = this.$('.required')\n return input.val() === this.options.phrase\n }\n\n handleCallback () {\n if (this.options.callback && this.okClicked()) {\n this.options.callback()\n }\n }\n}\n","/* globals $ */\nimport { isString } from 'underscore'\nimport Dialog from 'views/dialogs/dialog'\n\n//\n// Dialog that embeds a template\n//\nexport default class TemplateDialog extends Dialog {\n initialize (options) {\n super.initialize(options)\n\n if (isString(this.options.template)) {\n const template = this.options.template.trim()\n this.template = $(template)\n }\n }\n\n createModal () {\n super.createModal()\n\n this.renderBody(this.template)\n this.template.show()\n }\n}\n","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 44435;\nmodule.exports = webpackEmptyContext;","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 11137;\nmodule.exports = webpackEmptyContext;"],"names":["moment","require","tz","setDefault","I18n","timeZone","module","exports","dateFormat","date","format","t","momentWithTz","currentTzDate","duration","seconds","humanizeDuration","zone","sameDate","date1","date2","diff","setTimeFrom24HourString","timeStr","timeParts","split","length","hours","parseInt","minutes","hour","sortableDateKey","dateStr","Date","getTime","formattedUTCOffset","offset","utcOffset","sign","Math","floor","abs","toString","padStart","outsideRange","minDate","maxDate","isSameOrAfter","isSameOrBefore","__obj","__out","__objSafe","safe","__escape","escape","value","ecoSafe","result","String","replace","this","templateLabel","push","call","join","deleteEnvironmentTemplate","template","confirmDelete","get","destroy","success","flash","window","location","error","model","flashError","createEnvironmentTemplate","collection","callback","$","noop","params","Backbone","modal","TemplateDialog","_templates_environment_templates_new_","title","buttonOk","overflow","EnvironmentTemplate","attributes","save","showModelModal","loadSelectValues","getBody","find","afterInitialize","el","_collection$first","template_id","first","id","scoringMethodLabel","method","label","addLtiConnectionMessage","section","messages","providerName","platformName","helpMessage","helpUrl","_section$get","add","alertInfo","school","alertWarning","url","ltiUnconnectedHelpUrl","provider","isLtia","zendeskUrl","zendeskSectionUrl","isBlackboard","match","isCanvas","isMoodle","lmsProvider","capitalize","buildSourceRow","metadata","key","buildRow","chapterTitleLabel","chapter","ChapterNumber","ChapterTitle","sourceLabel","source","rows","buildChapterTitleRow","body","compact","isBlank","sourceLabels","sources","map","creatorLabel","problem","author","codeAuthor","institution","publisher","each","Author","CodeAuthor","Publisher","CodeInstitution","alert","message","options","defaults","buttonCancelShow","MessageDialog","show","confirm","cancelCallback","defaultValues","role","buttonOkClass","confirmPhrase","PhraseConfirmDialog","create","InputDialog","__sanitize","_this","empty","values","forEach","index","select","defaultValue","selectFirst","bindingEl","modelBinder","ModelBinder","boundEl","bind","getRequiredFields","trigger","modelIcon","type","klass","data","comparator","_model$get","toLowerCase","c","BaseCollection","parse","_templates_select_values_","loadValues","filter","emptyValue","render","unshift","isEmpty","_options$afterInitial2","html","attr","fetch","_options$afterFetch","_options$afterInitial","afterFetch","afterFetchSetParameter","rename","autosave","sanitizedName","DOMPurify","sanitize","name","set","document","toIntWithMinAndMax","min","max","Number","MAX_SAFE_INTEGER","direction","val","isNaN","toNullOrLowerBoundedInt","outOfBoundsNull","toInt","intValue","toFloatWithPrecision","precision","parseFloat","ExpectedRound","toFloatWithMinAndMax","MIN_VALUE","MAX_VALUE","allowNull","toFloat","toPercentWithoutDefault","toBoolean","toRadio","trueFalseNullBinder","undefined","zendeskRootUrl","page","helpSectionUrl","helpLink","content","underline","AdaptivePathway","BaseModel","active_item","isAttempted","isClosed","showSketch","isCorrect","adaptive_review","attempt","previous_item","previous_pathway","skill","iconClass","alertClass","resp","super","hasOne","Skill","afterParentSet","_this$current_item","current_item","assessment_session","findItem","AdaptiveReview","parentName","displayedScore","skillsMastered","skills","size","percentCorrect","pct","round","AssessmentSession","remediated_assessment","Assessment","adaptive_assessment","current_pathway","active_pathway","hasMany","next","isFinished","findSkillForItem","itemId","includes","originator","userUrl","registration","afterCloseUrl","assignment","isEnrolled","activeSession","sessions","session","isUnderway","isClosedAndTimed","_this$lastSession","lastSession","isProblemPreview","showScores","_this$grade","grade","availableDate","_this$assignment","availableDateOverridden","dueDate","_this$assignment2","dueDateOverridden","earlyWorkDate","_this$assignment3","lateWorkDate","_this$assignment4","hasAvailabilityDate","_this$assignment5","hasInstructions","hasAdditionalInfo","isAssigned","hasAssignment","submissionsRemaining","hasSubmissionsRemaining","showRemainingSubmissionsMessage","_this$scoredSession","numSessions","scoredSession","extend","Assessable","due_date","toISOString","available_date","late_work_date","release_date","fetched","Registration","Assignment","assessment","Grade","remediation_review","creditUsage","CreditUsage","subscription","Subscription","user","User","product","Product","env","SessionEnvironment","parseEnvironment","restart","sync","command","close","startSession","errors","assessment_id","once","readonly","reload","_this$sessions","last","_this$sessions2","releasability","_this$assignment6","displayedPercent","_ref","availability","showScore","_this$grade2","msg","dueInFuture","gradeSubmitted","_this$grade3","status","available","_this$scoredSession2","canClose","remainingSubmissionsMessage","flat","n","m","scoreLabel","remaining","verb","toFixed","pluralize","allPrerequisitesSatisfied","setSubscription","currentUsage","synchAvailability","newValues","updateExtraTimeAwarded","deltaMinutes","time_limit","extra_time_awarded","canEditAccommodations","can","PartAnswer","assessment_item","answer","answer_alt","answerText","_this$get","part","detect","question","container","flatParts","p","multiparts","re","RegExp","multiAnswerName","test","multianswers","findAnswer","isAnswered","isStr","isString","trim","needsScoring","warning","hasLocalWarning","answers","findIndex","hasWarning","showMarks","answeredClass","markedClass","markedIcon","textScore","isArray","all","setAnswer","unparsedValue","canAnswer","manuallyScore","score","explanation","manual_score","part_id","assessment_item_id","manual_score_explanation","silent","clear","answer_text","reset","submitted","Attempt","retry","gradableAnswers","scoredAnswers","toAnswerArray","number","attempts","indexOf","displayedNumber","attemptsFetched","numAttempts","numParts","numAnswered","numCorrect","numScored","some","every","isFullyAnswered","isScored","isAutoscored","isMostlyCorrect","isMultipart","isSubmitted","hasManuallyScoredAnswers","isReadonly","isReleased","hidesPartialCorrectness","answerFor","findWhere","answerForPartId","partId","canSubmit","canTryAgain","canReview","canRetake","showWarnings","showSolutions","showAnswerTable","inEducatorMode","showAnswers","actAsSubmitted","isSingleAttempt","isOwned","countsForItemScore","scoredAttempt","markedLabel","statusClass","firstAnswerablePart","answerableParts","hasStatusMessage","populateAnswers","isScaffoldProblem","hasScaffoldParts","answersToJSON","lazy","attemptingScaffold","_resp$session_attribu","answerResps","attrs","attrResp","JSON","stringify","savedAnswers","synchronizeInteractiveHtml","parts","checkVersion","problem_version","session_attributes","handleTimeLimitChange","time_remaining","timestamp","reduce","hash","Issue","AssessmentItem","lastAttempt","submittedAttempt","attemptAt","at","attemptsRemaining","assignmentManualScore","manualProblemScoreFor","_this$attempt","_this$attempt2","isMultipleAttempts","hasAttemptsRemaining","isOpen","canRestart","isStandalone","canCreateReveal","minAllow","allowOH","featureAccess","hasLimitedTries","showPreviousAttempts","isSupport","hasOverriddenScore","isFirst","isLast","isAdaptive","isPractice","unlimitedPractice","allowPractice","practiceEnabled","isTryingAgain","contains","preservedAttempt","previewedAssignment","_this$assessment_sess","_this$assessment_sess2","ohPreviewDisabledForSection","_this$lastAttempt","isIncorrect","_this$lastAttempt2","_this$lastAttempt3","_this$lastAttempt4","shouldAdvanceToNextItem","needsOHNudge","struggling","linkTo","_this$assessment_sess3","parentEnv","shallow","Question","reveal","SketchReveal","issues","allowEmpty","buildAttempts","parseSessionAttributes","parseSupport","Problem","working_problem","origin_problem","unwrappedError","recover","submit","successBeforeSync","reopen","addSavedAttempt","retake","practice","commandOptions","fetchAttempts","selectedIdx","tryingAgain","reconcileFetchedAttempts","revealSketch","usage","_options$success2","free","_options$success","_options$error","addExtraAttempts","num","itemAt","prev","version","item","bulkScore","problem_id","parseAttributes","session_environment_attributes","preserveAttempt","attemptData","stopListening","where","num_attempts","listenTo","remove","names","percentComplete","items","itemsAnswered","displayedProgress","ariaProgress","displayExtraActions","submittedAt","currentItem","itemNumber","_this$items","numItems","hasItems","itemsSkipped","itemsPartiallyAnswered","itemsRemaining","itemsCorrect","itemsIncorrect","itemsLate","itemsEarly","_item$lastAttempt","canViewItems","isGettingStarted","isSuccessfulScore","_E","currentUser","educator","ta","hasTimeRemaining","showResults","showPerformanceResults","showReviewWorkButton","showLateWorkNotice","showCompletionStats","showScoreBreakdown","closedMsg","_this$assessment$grad","dueMsg","canCreate","_this$assessment$assi","setCurrentItem","current_item_id","hideProgress","responseJSON","state","closedUponItemSubmission","syncSessionScore","tempSession","constructor","adjusted_score","points","newTimeLimit","newTimeRemaining","initC","diffUrl","subtitle","icon","isSynchronizedMember","needsAttention","_this$assessment","_this$assessment2","hasWorkPolicy","isPublishedOrMember","prerequisitesReleased","prerequisitesPersonallySatisfied","hasPrerequisites","prerequisites","isLocal","coordinatorSection","_this$assessment3","_this$assessment4","_this$assessment5","listStatus","_this$assessment6","_this$assessment7","_this$assessment8","_this$assessment9","isTakable","tableWidth","lateWorkMode","workPolicyLabel","displayType","humanize","autodetectedDisplayType","environment","summary","fields","bits","BitField","others","Object","keys","VIEW_FIELDS","field","hide","getBit","_field$value","shortSummary","lines","availableDateLabel","workDateLabel","dueDateLabel","dateLabel","dueDateCellLabel","policy","datesLabel","reorderKey","localVisibility","_this$assessment10","problemSet","workingSet","masterSet","isAccessible","isUnscheduled","isPastDue","current","due","unix","isActive","hasAvailabilityDates","problemId","manualProblemScores","ltiToolURL","origin","Exportable","ensureMatchedDateFormats","release_duration_value","_this$section","grades","variations","PrintVariation","Section","working_set","ProblemSet","master_set","AssignmentPrerequisite","remediation_skills","ManualProblemScore","parseTotals","initPreview","release_method","visible","live","password","allow_late_work","late_work_duration_units","late_work_duration_value","late_work_credit_pct","late_work_end_date","allow_early_work","early_work_duration_units","early_work_duration_value","early_work_credit_pct","early_work_end_date","release_duration_units","assignments","notifyLive","instructor","member","coordinator","_this$problemSet","syncTotals","preview","bindModel","converter","canPublish","publish","updatePublishingInfo","publishing_info","override","published","publishStatus","showPublishButton","_this$section2","addProblem","copy","sectionId","deep","keepDates","keep_dates","syncToLMS","bulkAdd","ids","move","prerequisite","now","info","saveRemediationSkills","pluck","bulkUpdateAssessments","bulkResetAssessments","applyTemplate","templateId","updateRepublishability","satisfiedIconClass","conditionLabel","assessmentUrl","assessmentAction","supervised","srOnlyLabel","AssignmentTemplate","isDefault","defaultAssignmentTemplate","_assignment$environme","category","templateName","environment_template","includeWord","mode","max_submissions","max_attempts","Boolean","timeLimit","locked","grade_category","initialValue","checkIndex","setBit","isSet","getValue","setValue","newValue","checkValue","Error","CartItem","hasDiscountedPrice","cart","Cart","recommendations","paymentIntent","order","Order","addItem","productId","quantity","product_id","removeItem","findItemByProductName","regex","Environment","isAssessmentScoped","isRetakeScoped","rawValue","slice","ret","toJSON","wrapper","displayedShortScore","gradeBookStatus","isAnnotated","description","adjustScore","excused","excusedReason","scoreExplanation","override_score","excused_reason","score_explanation","assignmentName","statusLabel","review","GradeBookCategory","used_grades","dropped_grades","assignmentMap","mergeWithAssignments","copySettings","usedGrades","droppedGrades","models","concat","sortBy","GradeBook","activeCategories","categories","gradingMethodLabel","gradeBook","gbCategory","categoryFor","studentName","totalWeight","total","showPercentage","clone","categoryAttrs","cAttrs","grade_categories_attributes","grade_book","Hotspot","Base","initialize","fromCharCode","isSelected","environmentLabel","_this$environment_tem","custom_environment","saveEnvironment","relateTo","setEnvironmentTemplate","environment_template_id","exportAsCSV","Transaction","payment","SectionLicense","StudentLicense","transactions","section_licenses","student_licenses","requiresAction","cancel","correctnessResponses","breakdown","pairs","groupBy","scored","correct","answerStatus","pair","aa","user_name","reportIndividualAnswers","enumeratedResponses","enumeratedChoices","choice","_objectSpread","responses","hasEnumeratedChoices","Part","InsightsAnswers","submitButtonLabel","identifier","mappedToTaxonomy","isSequenced","isAnswerable","isFullSize","allowFullSize","canShowWork","canFocus","isGradable","isManuallyGradable","isDeferrable","displayInlineAnswer","reportedParts","_answers","selectableParts","nextPart","isFlatPart","isEqual","isFormat","any","f","hasAnswer","hasAnswerablePart","hasScaffold","calculatedPoints","hasSolution","comment","hasShowWorkPart","_this$nextPart","showWorkPart","parentPart","prevPart","canDelete","isMultiChunk","designation","_this$container","letter","letterFor","letterForPart","showLetter","uniqueId","answerHtml","_answer","solutionHtml","answerIndexToLetter","answerIndex","synchronize","FreeResponsePart","answer_validation","validation_expression","validation_failure_message","disallowedPattern","answerFormatType","_this$get2","MultipleChoicePart","choices","layout","i","matchingAnswers","reinsertChoice","originIndex","destinationIndex","_slicedToArray","splice","MultipleAnswerPart","Array","from","_answer$answer","uuidv4","v4","MatchingPart","blocks","fill","premise","response","block","distractors","addAnswer","addBlock","removeAnswer","removeBlock","without","addDistractor","removeDistractor","newBlock","reject","sortByIds","getResponses","allBlocks","startingIds","sortKeys","invert","object","getResponse","EitherOrPart","InformationalPart","EssayPart","automatic_manual_credit","no_rows","ShowWorkPart","display_type","displayTypeDescription","isText","isSteps","HotspotCollection","HotspotInteractionPart","multiple_selections","hotspots","hotspot_attributes","idAttribute","isMultiSelection","needsCompleteHotspot","hotspot","hotspotAnswer","LabelImagePart","clearHotspots","solution","alphabetIndexed","hotspotIndexes","hotspot_id","hotspotIds","text","emptyAnswer","usedHotspotIds","flatten","a","cleanupAnswers","allHotspotIds","intersection","res","ans","setResponseAnswer","selectedHotspots","answerId","sortAnswersByIds","labels","SelectPointPart","max_answers","min_correct_answers","singleSelect","maxAnswers","fileTypes","gif","jpg","jpeg","png","doc","docx","xls","xlsx","pdf","svg","FileUploadPart","mime_types","fileTypesAccepted","ReportedUnitTest","UnitTestingPart","PartContainer","language","unit_tests_code","pa","errorDetails","_this$error","errorLabel","code","functionResultCode","GeneratedPart","partAnswer","WebworkPart","MQ","MathQuill","getInterface","letterFromAnswerName","hasErrors","hasEdfinityGeogebraApplet","interactiveHtml","nonce","WebworkSubpart","matches","hasGeogebraApplet","_answer$get","DraggableSequencePart","indentation_depth","numbered","validate_indentation","next_index","distractor_blocks","theme","on","flattenAnswers","flattenDistractors","startingBlocks","deleteBlock","blockId","availables","removeBlockWithChildren","usedBlockIds","blockIds","unusedBlocks","difference","filtered","children","blockText","displayNumber","blockIndex","setBlockText","flattenToDepth","depth","blocksWithIndexes","nestedBlockHtml","nestedListHtml","listName","editable","tag","editing","editElement","mc","MultipleChoice","ma","MultipleAnswer","fr","FreeResponse","eo","EitherOr","in","Informational","es","Essay","sw","ShowWork","hi","HotspotInteraction","li","LabelImage","sp","SelectPoint","fu","FileUpload","pt","PartTable","ww","Webwork","ws","ds","DraggableSequence","ut","UnitTesting","ge","mt","Matching","build","opts","Model","fromAttributes","console","log","PartCollection","partFactory","chain","uniq","PartChunk","primaryPart","secondaryParts","uid","lastPart","addPart","chunk","removePart","removeChunk","rebuildParts","_part$rebuildParts","chunks","lowerAlphaIndex","chunkFn","lastChunk","hasNestedParts","idx","fn","gradableParts","chunkIndex","part_attributes","buildChunks","synchronizeParts","_this$parts$at","interactive_html","addChunk","flow","table_wrap","primary_table_headers","secondary_table_headers","indexToRow","getTableWrap","indexToColumn","rowCount","ceil","columnCount","rowHeaderField","rowHeaders","columnHeaderField","columnHeaders","upperAlphaIndex","letterAt","x","y","x2","Pool","problems","syncProblemSet","assignedProblems","assignsProblem","problemCount","cnt","poolNumber","problemNumber","selectionVerb","overCapacity","query","cannotRestoreSelection","assignmentId","beforeProblem","beforeAddProblem","assign","sync_on_update","cacheInternalState","before_problem_id","removeProblem","beforeItem","_beforeItem","beforeRemoveProblem","_options$callback","moveProblem","oldIndex","newIndex","reorder","bulkAddProblems","pool","defer","manualReset","bulkRemoveProblems","handleProblemRemoval","handleItemRemoval","insertionIndex","problemIndex","afterProblemCopiedIntoPool","originalProblem","copiedProblem","print","exportKey","ContentLicense","Difficulty","assignmentUrl","modelPrefix","isDerived","remote","inContest","hasTaxonomy","_this$skills","tagArray","subjects","subject","nonZeroDifficulties","difficulties","d","typeLabel","openButtonLabel","getNumber","navToNumber","getAnnotationValue","cleanupStatus","taxonomy","PartModelFactory","cacheParts","problem_set","products","sketch","Sketch","contentLicense","content_license","initAssessment","defaultDifficulty","hasDifficulty","difficultyFor","subjectId","editableDifficultyFor","subject_id","addDifficulty","canOpen","canEditPoints","createEditableDifficulties","rebuildAndSave","cachedParts","findPart","findByUid","movePart","deletePart","deleteParts","removed","afterAddProblem","triggerItemsUpdate","pool_id","cleanup","touch","syncSkills","previous","ProblemAnnotation","hasPointsDefined","C","delta","containsProblem","containsEquivalentProblem","equivalentProblem","findProblem","digests","containsItem","hasPools","pools","annotatesProblem","_this$problem_annotat","problem_annotations","annotation","getNumAssignedProblems","refetch","rerender","moveItem","changePositions","positionMap","positionKeyMap","newPos","getAdjustedPosition","sort","oldPos","getPositionNumber","problem_ids","problem_set_id","assigned","afterNewProblemSaved","flattenedItems","_resp$readonly","replaceProblem","found","buildItems","handleBulkItemRemoval","task","refetchTotals","createPool","allow","poolFor","setCurrentProblem","currentProblem","getPoints","correctPoints","getNumberRange","numbers","start","end","getAnnotation","_this$problem_annotat2","_this$getAnnotation","setAnnotationValue","setAnnotationValues","_problem$assessment","bulkUpdateAnnotations","ajax","dataType","bulkRemove","initProblems","parseAssessment","rebuildProblems","buildProblems","buildFlattenedItems","buildNumbering","buildDigests","routed","incr","itemIndex","tempSet","PartFactory","numAnswerableParts","numGradableParts","hasTopLevelSolution","hasPartSolutions","isWebwork","assignmentComparator","sortKey","_model$assessment","_model$assessment2","parentInstance","equivalents","findAssignment","gettingStarted","transfer","toSectionId","to_section_id","showOfficeHoursIntro","isEducatorOrTa","showRegistrationIntro","drop","School","addresses","termPrices","addresses_attributes","address","ltiConnectionMessage","Collaboration","invite","Policy","isManaged","isPublic","isPrivate","count","assignmentTemplates","isCurrent","hasStudents","canAddStudents","ltiDomainURL","ltiExportPath","isLmsLinked","isLmsMisconfigured","hideLti11Features","showLtiaFeatures","isLmsUndisconnectable","lms_enabled","isAccessTypeFrozen","isEnrollmentOpen","isAfter","isLicensingFrozen","isFull","showMemberSections","memberSections","canCreateAssignment","hasSummaryGradeBook","syncSummaryGradeBook","use_grade_book","collaborations","collaboration","gradeBookSettings","equivalentSections","addAssignment","moveAssignment","assignment_ids","sort_order","educatorAssignmentCount","_this$assignments","_this$assignments$siz","bulkCopyAssignments","bulkDestroyAssignments","bulkUpdateAssignments","attrs2","synchronize_member_availability","bulkUpdateAssignmentEnvironments","bulkPublishAssignments","republishable","bulkDestroyRegistrations","registrations","bulkDropRegistrations","bulkReregister","bulkScoreAssignments","bulkApplyTemplates","section_id","exportGradeBooks","renormalizeLtiaScores","normalize","allowedAccessTypes","share","emails","access","updateDisplayedAssignmentFields","newFields","UserSettings","displayed_assignment_fields","importAssignmentTemplates","sourceSectionId","source_id","lmsSyllabusInstructions","joinInstructions","editingCollaboratorInfo","steps","SketchStep","overlappingSketches","isPublished","hasEmptySteps","step","addStep","sketch_id","removeStepAt","_this$steps$find","moveStep","ordered_step_ids","s","unviable","claimed","ratingToString","mergeAway","betterSketch","better_sketch_id","sketched_question","assessed_question","hasNext","hasPrev","current_step","unlock","path","solution_shown","solution_shown_before_sketch","_","canUnlock","canShowSolutionButtons","TaxonomyNode","u","searchUrl","publicScope","parent","ancestors","validParent","functionValue","node_type","isRoot","selectableNodes","Factory","node","lastPosition","_this$children$last","_this$children$at","position","reposition","newChild","child","parent_id","pos","Subject","Taxonomy","taxonomy_node","isNew","asMinutes","asHours","asDays","charCodeAt","userType","EdfinityCookie","namespace","isOperator","isAdmin","isGuest","isEducator","isVerifiedEducator","feature","features","Dialog","required","createModal","cid","input","placeholder","handleCallback","okClicked","describedBy","phrase","_templates_dialogs_phrase_confirm_","renderBody","hasRequiredFieldValues","webpackEmptyContext","req","e","resolve"],"sourceRoot":""}