diff --git a/app/coffeescripts/gradezilla/Gradebook.coffee b/app/coffeescripts/gradezilla/Gradebook.coffee
index 55166ce5e5dda..f7b5693681e9e 100644
--- a/app/coffeescripts/gradezilla/Gradebook.coffee
+++ b/app/coffeescripts/gradezilla/Gradebook.coffee
@@ -869,13 +869,12 @@ define [
else
cellAttributes = @submissionStateMap.getSubmissionState(submission)
if cellAttributes.hideGrade
- @lockedAndHiddenGradeCellFormatter(row, col, cellAttributes.tooltip)
+ @lockedAndHiddenGradeCellFormatter(row, col)
else
assignment = @assignments[submission.assignment_id]
student = @students[submission.user_id]
formatterOpts =
isLocked: cellAttributes.locked
- tooltip: cellAttributes.tooltip
if !assignment?
@staticCellFormatter(row, col, '')
@@ -889,17 +888,8 @@ define [
staticCellFormatter: (row, col, val) ->
"
#{htmlEscape(val)}
"
- lockedAndHiddenGradeCellFormatter: (row, col, tooltipKey) ->
- if tooltipKey
- tooltip = GRADEBOOK_TRANSLATIONS["submission_tooltip_#{tooltipKey}"]
- """
-
- #{htmlEscape(tooltip)}
-
-
- """
- else
- ""
+ lockedAndHiddenGradeCellFormatter: (row, col) ->
+ ""
groupTotalFormatter: (row, col, val, columnDef, student) =>
return '' unless val?
@@ -1003,46 +993,6 @@ define [
@assignmentsToHide = $.grep @assignmentsToHide, (el) -> el != columnDef.id
UserSettings.contextSet('hidden_columns', _.uniq(@assignmentsToHide))
- hoverMinimizedCell: (event) =>
- $hoveredCell = $(event.currentTarget)
- # get rid of hover class so that no other tooltips show up
- .removeClass('hover')
- cell = @grid.getCellFromEvent(event)
- # cell will be null when hovering a header cell
- return unless cell
- columnDef = @grid.getColumns()[cell.cell]
- assignment = columnDef.object
- offset = $hoveredCell.offset()
- htmlLines = [assignment.name]
- if $hoveredCell.hasClass('slick-cell')
- submission = @rows[cell.row][columnDef.id]
- if assignment.points_possible?
- htmlLines.push "#{submission.score ? '--'} / #{assignment.points_possible}"
- else if submission.score?
- htmlLines.push submission.score
- # add lines for dropped, late, resubmitted
- Array::push.apply htmlLines, $.map(SubmissionCell.classesBasedOnSubmission(submission, assignment), (c)-> GRADEBOOK_TRANSLATIONS["#submission_tooltip_#{c}"])
- else if assignment.points_possible?
- htmlLines.push htmlEscape(I18n.t('points_out_of', "out of %{points_possible}", points_possible: assignment.points_possible))
-
- $hoveredCell.data 'tooltip', $("",
- class: 'gradebook-tooltip'
- css:
- left: offset.left - 15
- top: offset.top
- zIndex: 10000
- display: 'block'
- html: $.raw(htmlLines.join('
'))
- ).appendTo('body')
- .css('top', (i, top) -> parseInt(top) - $(this).outerHeight())
-
- unhoverMinimizedCell: (event) ->
- if $tooltip = $(this).data('tooltip')
- if event.toElement == $tooltip[0]
- $tooltip.mouseleave -> $tooltip.remove()
- else
- $tooltip.remove()
-
# this is because of a limitation with SlickGrid,
# when it makes the header row it does this:
# $("")
@@ -1101,15 +1051,9 @@ define [
'mouseleave.gradebook' : @unhighlightColumns
'mouseenter' : (event) ->
grid.find('.hover, .focus').removeClass('hover focus')
- if $(this).parent().css('top') == '0px'
- $(this).find('div.gradebook-tooltip').addClass('first-row')
$(this).addClass (if event.type == 'mouseenter' then 'hover' else 'focus')
'mouseleave' : (event) ->
$(this).removeClass('hover focus')
- $(this).find('div.gradebook-tooltip').removeClass('first-row')
- .delegate '.minimized',
- 'mouseenter' : @hoverMinimizedCell,
- 'mouseleave' : @unhoverMinimizedCell
@$grid.addClass('editable') if @options.gradebook_is_editable
diff --git a/app/coffeescripts/gradezilla/SubmissionCell.coffee b/app/coffeescripts/gradezilla/SubmissionCell.coffee
index 4b39293ac08ae..30b450d6e0de6 100644
--- a/app/coffeescripts/gradezilla/SubmissionCell.coffee
+++ b/app/coffeescripts/gradezilla/SubmissionCell.coffee
@@ -133,7 +133,6 @@ define [
opts.editable = false if opts.student.isConcluded
submission_type = opts.submission.submission_type if opts.submission?.submission_type || null
styles = SubmissionCell.styles(opts.submission, opts.assignment)
- tooltips = SubmissionCell.tooltips(opts.submission, opts.assignment)
styles.push("grayed-out") if opts.student.isInactive || opts.student.isConcluded || opts.isLocked
styles.push("cannot_edit") if opts.student.isConcluded || opts.isLocked
@@ -149,10 +148,7 @@ define [
styles.push('turnitin')
innerContents += ""
- tooltipText = $.map(tooltips, (t)-> GRADEBOOK_TRANSLATIONS["submission_tooltip_#{t}"]).join(', ')
-
"""
- #{$.raw if tooltipText then ''+ htmlEscape(tooltipText) + '
' else ''}
#{$.raw innerContents}
@@ -165,18 +161,6 @@ define [
else
""
- @tooltips: (submission = {}, assignment = {}) ->
- classes = []
- classes.push('dropped') if submission.drop
- classes.push('excused') if submission.excused
- classes.push('resubmitted') if submission.grade_matches_current_submission == false
- classes.push('missing') if submission.missing
- classes.push('late') if submission.late
- classes.push('ungraded') if ''+assignment.submission_types is "not_graded"
- classes.push('muted') if assignment.muted
- classes.push(submission.submission_type) if submission.submission_type
- classes
-
@styles: (submission = {}, assignment = {}) ->
classes = []
diff --git a/app/jsx/gradezilla/SubmissionStateMap.js b/app/jsx/gradezilla/SubmissionStateMap.js
index d3186dc446791..8c395e0a10888 100644
--- a/app/jsx/gradezilla/SubmissionStateMap.js
+++ b/app/jsx/gradezilla/SubmissionStateMap.js
@@ -19,14 +19,6 @@
import _ from 'underscore';
import GradingPeriodsHelper from 'jsx/grading/helpers/GradingPeriodsHelper';
-const TOOLTIP_KEYS = {
- UNPUBLISHED_ASSIGNMENT: 'unpublished_assignment',
- NOT_IN_ANY_GP: 'not_in_any_grading_period',
- IN_ANOTHER_GP: 'in_another_grading_period',
- IN_CLOSED_GP: 'in_closed_grading_period',
- NONE: null
-};
-
function submissionGradingPeriodInformation (assignment, student) {
const submissionInfo = assignment.effectiveDueDates[student.id] || {};
return {
@@ -45,26 +37,26 @@ function cellMappingsForMultipleGradingPeriods (assignment, student, selectedGra
const { gradingPeriodID, inClosedGradingPeriod } = submissionGradingPeriodInformation(assignment, student);
if (specificPeriodSelected && !gradingPeriodID) {
- return { locked: true, hideGrade: true, tooltip: TOOLTIP_KEYS.NOT_IN_ANY_GP };
+ return { locked: true, hideGrade: true };
} else if (specificPeriodSelected && selectedGradingPeriodID !== gradingPeriodID) {
- return { locked: true, hideGrade: true, tooltip: TOOLTIP_KEYS.IN_ANOTHER_GP };
+ return { locked: true, hideGrade: true };
} else if (!isAdmin && inClosedGradingPeriod) {
- return { locked: true, hideGrade: false, tooltip: TOOLTIP_KEYS.IN_CLOSED_GP };
+ return { locked: true, hideGrade: false };
} else {
- return { locked: false, hideGrade: false, tooltip: TOOLTIP_KEYS.NONE };
+ return { locked: false, hideGrade: false };
}
}
function cellMapForSubmission (assignment, student, hasGradingPeriods, selectedGradingPeriodID, isAdmin) {
if (!assignment.published) {
- return { locked: true, hideGrade: true, tooltip: TOOLTIP_KEYS.UNPUBLISHED_ASSIGNMENT };
+ return { locked: true, hideGrade: true };
} else if (!visibleToStudent(assignment, student)) {
- return { locked: true, hideGrade: true, tooltip: TOOLTIP_KEYS.NONE };
+ return { locked: true, hideGrade: true };
} else if (hasGradingPeriods) {
return cellMappingsForMultipleGradingPeriods(assignment, student, selectedGradingPeriodID, isAdmin);
} else {
- return { locked: false, hideGrade: false, tooltip: TOOLTIP_KEYS.NONE };
+ return { locked: false, hideGrade: false };
}
}
diff --git a/spec/coffeescripts/gradezilla/SubmissionCellSpec.coffee b/spec/coffeescripts/gradezilla/SubmissionCellSpec.coffee
index 75def325dbacc..89422b582a063 100644
--- a/spec/coffeescripts/gradezilla/SubmissionCellSpec.coffee
+++ b/spec/coffeescripts/gradezilla/SubmissionCellSpec.coffee
@@ -110,10 +110,6 @@ define [
submissionCellResponse = SubmissionCell.formatter(0, 0, { grade: 73 }, {}, {}, { isLocked: false })
equal submissionCellResponse.indexOf("cannot_edit"), -1
- test "#class.formatter, tooltip adds your text to the special classes", ->
- submissionCellResponse = SubmissionCell.formatter(0, 0, { grade: 73 }, {}, {}, { tooltip: "dora_the_explorer" })
- ok submissionCellResponse.indexOf("dora_the_explorer") > -1
-
test "#class.formatter, isInactive: false doesn't add grayed-out", ->
student = { isInactive: false }
submissionCellResponse = SubmissionCell.formatter(0, 0, { grade: 10 }, { }, student)
@@ -160,10 +156,6 @@ define [
submissionCellResponse = SubmissionCell.letter_grade.formatter(0, 0, { grade: "A" }, {}, {}, { isLocked: false })
equal submissionCellResponse.indexOf("cannot_edit"), -1
- test "#letter_grade.formatter, tooltip adds your text to the special classes", ->
- submissionCellResponse = SubmissionCell.letter_grade.formatter(0, 0, { grade: "A" }, {}, {}, { tooltip: "dora_the_explorer" })
- ok submissionCellResponse.indexOf("dora_the_explorer") > -1
-
test "#gpa_scale.formatter, isLocked: true adds grayed-out", ->
submissionCellResponse = SubmissionCell.gpa_scale.formatter(0, 0, { grade: 3.2 }, {}, {}, { isLocked: true })
ok submissionCellResponse.indexOf("grayed-out") > -1
@@ -180,10 +172,6 @@ define [
submissionCellResponse = SubmissionCell.gpa_scale.formatter(0, 0, { grade: 3.2 }, {}, {}, { isLocked: false })
equal submissionCellResponse.indexOf("cannot_edit"), -1
- test "#gpa_scale.formatter, tooltip adds your text to the special classes", ->
- submissionCellResponse = SubmissionCell.gpa_scale.formatter(0, 0, { grade: 3.2 }, {}, {}, { tooltip: "dora_the_explorer" })
- ok submissionCellResponse.indexOf("dora_the_explorer") > -1
-
test "#pass_fail.formatter, isLocked: true adds grayed-out", ->
submissionCellResponse = SubmissionCell.pass_fail.formatter(0, 0, { grade: "complete" }, {}, {}, { isLocked: true })
ok submissionCellResponse.indexOf("grayed-out") > -1
@@ -200,10 +188,6 @@ define [
submissionCellResponse = SubmissionCell.pass_fail.formatter(0, 0, { grade: "complete" }, {}, {}, { isLocked: false })
equal submissionCellResponse.indexOf("cannot_edit"), -1
- test "#pass_fail.formatter, tooltip adds your text to the special classes", ->
- submissionCellResponse = SubmissionCell.pass_fail.formatter(0, 0, { grade: "complete" }, {}, {}, { tooltip: "dora_the_explorer" })
- ok submissionCellResponse.indexOf("dora_the_explorer") > -1
-
QUnit.module "Pass/Fail SubmissionCell",
setup: ->
opts =
@@ -354,54 +338,6 @@ define [
"online_text_entry"
]
- QUnit.module ".tooltips"
-
- test "given nothing, it returns nothing", ->
- deepEqual SubmissionCell.tooltips(), []
-
- test "given all criteria, everything is present", ->
- submission =
- drop: true
- excused: true
- grade_matches_current_submission: false
- missing: true
- late: true
- submission_type: "online_url"
- assignment =
- submission_types: ["not_graded"]
- muted: true
- deepEqual SubmissionCell.tooltips(submission, assignment), [
- "dropped",
- "excused",
- "resubmitted",
- "missing",
- "late",
- "ungraded"
- "muted",
- "online_url"
- ]
-
- test "given a dropped submission, it returns dropped", ->
- deepEqual SubmissionCell.tooltips({ drop: true }), ["dropped"]
-
- test "given an excused submission, it returns excused", ->
- deepEqual SubmissionCell.tooltips({ excused: true }), ["excused"]
-
- test "given a resubmitted submission, it returns resubmitted", ->
- deepEqual SubmissionCell.tooltips({ grade_matches_current_submission: false }), ["resubmitted"]
-
- test "given a missing submission, it returns missing", ->
- deepEqual SubmissionCell.tooltips({ missing: true }), ["missing"]
-
- test "given a late submission, it returns late", ->
- deepEqual SubmissionCell.tooltips({ late: true }), ["late"]
-
- test "given an ungraded assignment, it returns ungraded", ->
- deepEqual SubmissionCell.tooltips({}, { submission_types: ["not_graded"] }), ["ungraded"]
-
- test "given a muted assignment, it returns muted", ->
- deepEqual SubmissionCell.tooltips({}, { muted: true }), ["muted"]
-
QUnit.module "#cellWrapper",
setup: ->
@fixtures = document.querySelector('#fixtures')
@@ -452,17 +388,6 @@ define [
@fixtures.innerHTML = (new SubmissionCell(@params())).cellWrapper('', { isLocked: true })
strictEqual @fixtures.querySelectorAll('div.cannot_edit').length, 1
- test "if it has tooltip key, styles include that value", ->
- @fixtures.innerHTML = (new SubmissionCell(@params())).cellWrapper('', { tooltip: 'fake-tooltip' })
- strictEqual @fixtures.querySelectorAll('div.fake-tooltip').length, 1
-
- test "if it has tooltip key, tooltips includes that value", ->
- key = 'in_closed_grading_period'
- @fixtures.innerHTML = (new SubmissionCell(@params())).cellWrapper('', { tooltip: key })
- ok @fixtures.querySelector('.gradebook-tooltip').innerText.includes(
- GRADEBOOK_TRANSLATIONS["submission_tooltip_#{key}"]
- )
-
test "if it has turnitin data, styles includes 'turnitin'", ->
params = @params()
params.item.whatever.turnitin_data = { submission_1: 'none' }
diff --git a/spec/javascripts/jsx/gradezilla/SubmissionStateMapTooltipSpec.js b/spec/javascripts/jsx/gradezilla/SubmissionStateMapTooltipSpec.js
deleted file mode 100644
index cf632c6a63167..0000000000000
--- a/spec/javascripts/jsx/gradezilla/SubmissionStateMapTooltipSpec.js
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright (C) 2016 - 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 .
- */
-
-import SubmissionStateMap from 'jsx/gradezilla/SubmissionStateMap';
-
-const student = {
- id: '1',
- group_ids: ['1'],
- sections: ['1']
-};
-
-const TOOLTIP_KEYS = {
- UNPUBLISHED_ASSIGNMENT: 'unpublished_assignment',
- NOT_IN_ANY_GP: 'not_in_any_grading_period',
- IN_ANOTHER_GP: 'in_another_grading_period',
- IN_CLOSED_GP: 'in_closed_grading_period',
- NONE: null
-};
-
-function createMap (opts = {}) {
- const defaults = {
- hasGradingPeriods: false,
- selectedGradingPeriodID: '0',
- isAdmin: false,
- gradingPeriods: []
- };
-
- const params = Object.assign(defaults, opts);
- return new SubmissionStateMap(params);
-}
-
-function createAndSetupMap (assignment, opts = {}) {
- const map = createMap(opts);
- const assignments = {};
- assignments[assignment.id] = assignment;
- map.setup([student], assignments);
- return map;
-}
-
-// TODO: the spec setup above should live in a spec helper -- at the
-// time this is being written a significant amount of work is needed
-// to be able to require javascript files that live in the spec directory
-
-QUnit.module('SubmissionStateMap without grading periods');
-
-test('submission in an unpublished assignment has "unpublished assignment" tooltip', function () {
- const assignment = { id: '1', published: false, effectiveDueDates: {} };
- const map = createAndSetupMap(assignment, { hasGradingPeriods: false });
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.UNPUBLISHED_ASSIGNMENT);
-});
-
-test('submission in a published assignment has no tooltip', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {} };
- const map = createAndSetupMap(assignment, { hasGradingPeriods: false });
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.NONE);
-});
-
-test('submission has no tooltip for a student without assignment visibility', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {}, only_visible_to_overrides: true };
- const map = createAndSetupMap(assignment, { hasGradingPeriods: false });
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.NONE);
-});
-
-test('submission has no tooltip for a student with visibility', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {} };
- assignment.effectiveDueDates[student.id] = {
- due_at: null,
- grading_period_id: null,
- in_closed_grading_period: false
- };
-
- const map = createAndSetupMap(assignment, { hasGradingPeriods: false });
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.NONE);
-});
-
-QUnit.module('SubmissionStateMap with grading periods and all grading periods selected', {
- setup () {
- this.DATE_IN_CLOSED_PERIOD = '2015-07-15';
- this.DATE_NOT_IN_CLOSED_PERIOD = '2015-08-15';
- this.mapOptions = { hasGradingPeriods: true, selectedGradingPeriodID: '0' };
- }
-});
-
-test('submission has no tooltip for a student without assignment visibility', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {}, only_visible_to_overrides: true };
- const map = createAndSetupMap(assignment, this.mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.NONE);
-});
-
-test('submission shows "in closed period" tooltip for an assigned student with assignment due in a closed grading period', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {} };
- assignment.effectiveDueDates[student.id] = {
- due_at: this.DATE_IN_CLOSED_PERIOD,
- grading_period_id: '1',
- in_closed_grading_period: true
- };
-
- const map = createAndSetupMap(assignment, this.mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.IN_CLOSED_GP);
-});
-
-test('user is admin: submission has no tooltip for an assigned student with assignment due in a closed grading period', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {} };
- assignment.effectiveDueDates[student.id] = {
- due_at: this.DATE_IN_CLOSED_PERIOD,
- grading_period_id: '1',
- in_closed_grading_period: true
- };
-
- const mapOptions = Object.assign(this.mapOptions, { isAdmin: true });
- const map = createAndSetupMap(assignment, mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.NONE);
-});
-
-test('submission has no tooltip for an assigned student with assignment due outside of a closed grading period', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {} };
- assignment.effectiveDueDates[student.id] = {
- due_at: this.DATE_NOT_IN_CLOSED_PERIOD,
- grading_period_id: '2',
- in_closed_grading_period: false
- };
-
- const map = createAndSetupMap(assignment, this.mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.NONE);
-});
-
-QUnit.module('SubmissionStateMap with grading periods and a non-closed grading period selected', {
- setup () {
- this.SELECTED_PERIOD_ID = '1';
- this.DATE_IN_SELECTED_PERIOD = '2015-06-15';
- this.DATE_NOT_IN_SELECTED_PERIOD = '2015-07-15';
- this.mapOptions = { hasGradingPeriods: true, selectedGradingPeriodID: this.SELECTED_PERIOD_ID };
- }
-});
-
-test('submission has no tooltip for an assigned student with assignment due in the selected grading period', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {} };
- assignment.effectiveDueDates[student.id] = {
- due_at: this.DATE_IN_SELECTED_PERIOD,
- grading_period_id: this.SELECTED_PERIOD_ID,
- in_closed_grading_period: false
- };
-
- const map = createAndSetupMap(assignment, this.mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.NONE);
-});
-
-test('submission has no tooltip for a student without assignment visibility', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {}, only_visible_to_overrides: true };
- const map = createAndSetupMap(assignment, this.mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.NONE);
-});
-
-test('submission shows "not in any period" tooltip for an assigned student with a submission not in any grading period', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {} };
- assignment.effectiveDueDates[student.id] = {
- due_at: this.DATE_NOT_IN_SELECTED_PERIOD,
- grading_period_id: null,
- in_closed_grading_period: false
- };
-
- const map = createAndSetupMap(assignment, this.mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.NOT_IN_ANY_GP);
-});
-
-test('submission shows "in another period" tooltip for an assigned student ' +
- 'with assignment due in a non-selected grading period', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {} };
- assignment.effectiveDueDates[student.id] = {
- due_at: this.DATE_NOT_IN_SELECTED_PERIOD,
- grading_period_id: '2',
- in_closed_grading_period: false
- };
-
- const map = createAndSetupMap(assignment, this.mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.IN_ANOTHER_GP);
-});
-
-QUnit.module('SubmissionStateMap with grading periods and a closed grading period selected', {
- setup () {
- this.SELECTED_PERIOD_ID = '1';
- this.DATE_IN_SELECTED_PERIOD = '2015-07-15';
- this.DATE_NOT_IN_SELECTED_PERIOD = '2015-08-15';
- this.mapOptions = { hasGradingPeriods: true, selectedGradingPeriodID: this.SELECTED_PERIOD_ID };
- }
-});
-
-test('submission has no tooltip for a student without assignment visibility', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {}, only_visible_to_overrides: true };
- const map = createAndSetupMap(assignment, this.mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.NONE);
-});
-
-test('submission shows "in another period" tooltip for an assigned student ' +
- 'with assignment due in a non-selected grading period', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {} };
- assignment.effectiveDueDates[student.id] = {
- due_at: this.DATE_NOT_IN_SELECTED_PERIOD,
- grading_period_id: '2',
- in_closed_grading_period: false
- };
-
- const map = createAndSetupMap(assignment, this.mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.IN_ANOTHER_GP);
-});
-
-test('submission shows "not in any period" tooltip for an assigned student with assignment due in no grading period', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {} };
- assignment.effectiveDueDates[student.id] = {
- due_at: this.DATE_NOT_IN_SELECTED_PERIOD,
- grading_period_id: null,
- in_closed_grading_period: false
- };
-
- const map = createAndSetupMap(assignment, this.mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.NOT_IN_ANY_GP);
-});
-
-test('submission shows "in closed period" tooltip for an assigned student with assignment due in the selected grading period', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {} };
- assignment.effectiveDueDates[student.id] = {
- due_at: this.DATE_IN_SELECTED_PERIOD,
- grading_period_id: this.SELECTED_PERIOD_ID,
- in_closed_grading_period: true
- };
-
- const map = createAndSetupMap(assignment, this.mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.IN_CLOSED_GP);
-});
-
-test('user is admin: submission has no tooltip for an assigned student with assignment due in the selected grading period', function () {
- const assignment = { id: '1', published: true, effectiveDueDates: {} };
- assignment.effectiveDueDates[student.id] = {
- due_at: this.DATE_IN_SELECTED_PERIOD,
- grading_period_id: this.SELECTED_PERIOD_ID,
- in_closed_grading_period: true
- };
-
- const mapOptions = { ...this.mapOptions, isAdmin: true };
- const map = createAndSetupMap(assignment, mapOptions);
- const state = map.getSubmissionState({ user_id: student.id, assignment_id: assignment.id });
- equal(state.tooltip, TOOLTIP_KEYS.NONE);
-});
diff --git a/spec/selenium/grades/gradezilla/gradebook_a11y_spec.rb b/spec/selenium/grades/gradezilla/gradebook_a11y_spec.rb
index 526b3ea98ca4a..3dea236860fe2 100644
--- a/spec/selenium/grades/gradezilla/gradebook_a11y_spec.rb
+++ b/spec/selenium/grades/gradezilla/gradebook_a11y_spec.rb
@@ -121,20 +121,6 @@
end
end
- context 'cell tooltip' do
- before { Gradezilla.visit(@course) }
-
- it 'is shown on hover' do
- Gradezilla.cell_hover(0, 0)
- expect(Gradezilla.cell_tooltip(0, 0)).to be_displayed
- end
-
- it 'is shown on focus' do
- Gradezilla.cell_click(0, 0)
- expect(Gradezilla.cell_tooltip(0, 0)).to be_displayed
- end
- end
-
context 'keyboard shortcut "c"' do
before do
Gradezilla.visit(@course)