░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/canvas/ui/features/screenreader_gradebook/ember/views
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: assignments_view.js
// // Copyright (C) 2013 - present Instructure, Inc. // // This file is part of Canvas. // // Canvas is free software: you can redistribute it and/or modify it under // the terms of the GNU Affero General Public License as published by the Free // Software Foundation, version 3 of the License. // // Canvas is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR // A PARTICULAR PURPOSE. See the GNU Affero General Public License for more // details. // // You should have received a copy of the GNU Affero General Public License along // with this program. If not, see <http://www.gnu.org/licenses/>. import $ from 'jquery' import Ember from 'ember' import _ from 'underscore' import GradebookHeaderMenu from '../../jquery/GradebookHeaderMenu' import SubmissionDetailsDialog from '../../jquery/SubmissionDetailsDialog' const AssignmentsView = Ember.View.extend({ templateName: 'assignments', mergeObjects(old_ag, new_ag) { return Ember.setProperties(old_ag, new_ag) }, actions: { openDialog(dialogType) { const con = this.controller const assignment = con.get('selectedAssignment') const options = { assignment, students: con.studentsThatCanSeeAssignment(assignment), selected_section: __guard__(con.get('selectedSection'), x => x.id), context_id: ENV.GRADEBOOK_OPTIONS.context_id, context_url: ENV.GRADEBOOK_OPTIONS.context_url, speed_grader_enabled: ENV.GRADEBOOK_OPTIONS.speed_grader_enabled, change_grade_url: ENV.GRADEBOOK_OPTIONS.change_grade_url, isAdmin: _.includes(ENV.current_user_roles, 'admin'), show_message_students_with_observers_dialog: ENV.GRADEBOOK_OPTIONS.show_message_students_with_observers_dialog, messageAttachmentUploadFolderId: ENV.GRADEBOOK_OPTIONS.message_attachment_upload_folder_id, current_user_id: ENV.current_user.id, } const dialogs = { assignment_details: GradebookHeaderMenu.prototype.showAssignmentDetails, message_students: GradebookHeaderMenu.prototype.messageStudentsWho, set_default_grade(opts) { const onClose = () => $('#set_default_grade').focus() return GradebookHeaderMenu.prototype.setDefaultGrade.call(this, {...opts, onClose}) }, curve_grades: GradebookHeaderMenu.prototype.curveGrades, submission: SubmissionDetailsDialog.open, } switch (dialogType) { case 'submission': return dialogs[dialogType] != null ? dialogs[dialogType].call( this, con.get('selectedAssignment'), con.get('selectedStudent'), options ) : undefined default: return dialogs[dialogType] != null ? dialogs[dialogType].call(this, options) : undefined } }, }, }) export default AssignmentsView function __guard__(value, transform) { return typeof value !== 'undefined' && value !== null ? transform(value) : undefined }
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 assignments_view.js
JS
3 KB
2023-09-24 03:36
EDIT
📄 learning_mastery_view.js
JS
846 B
2023-09-24 03:36
EDIT
📄 screenreader_gradebook_view.js
JS
1020 B
2023-09-24 03:36
EDIT
📄 selection_buttons_view.js
JS
2.4 KB
2023-09-24 03:39
EDIT