Skip to content

Commit fffa634

Browse files
dyromaneframe
authored andcommitted
remove 'const' keyword from react-gradebook
closes CNVS-23962 test plan - open the gradebook in IE10 or below - ensure the gradebook loads - also ensure there are no errors thrown on the page by looking at the dev tools Change-Id: Ia217c2f702f9858f062e351c9ceeed28c8c16cbd Reviewed-on: https://gerrit.instructure.com/65048 Reviewed-by: Spencer Olson <solson@instructure.com> QA-Review: Steven Shepherd <sshepherd@instructure.com> Product-Review: Dylan Ross <dross@instructure.com> Tested-by: Jenkins
1 parent 8b4ce05 commit fffa634

9 files changed

Lines changed: 38 additions & 38 deletions

File tree

app/jsx/gradebook/grid/actions/settingsActions.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ define([
33
'jquery',
44
'jsx/gradebook/grid/constants'
55
], function (Reflux, $, GradebookConstants) {
6-
const SAVE_COLUMN_SIZE_URL = GradebookConstants.gradebook_column_size_settings_url;
6+
var SAVE_COLUMN_SIZE_URL = GradebookConstants.gradebook_column_size_settings_url;
77

88
var SettingsActions = Reflux.createActions([
99
'resize',

app/jsx/gradebook/grid/app.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ define([
44
'react',
55
'./components/gradebook'
66
], function (React, Gradebook) {
7-
const MOUNT_ELEMENT = document.getElementById('gradebook_grid');
7+
var MOUNT_ELEMENT = document.getElementById('gradebook_grid');
88

99
React.render(<Gradebook/>, MOUNT_ELEMENT);
1010
});

app/jsx/gradebook/grid/components/assignmentGradeCell.jsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ define([
44
'compiled/SubmissionDetailsDialog',
55
'jsx/gradebook/grid/constants'
66
], function (React, SubmissionDetailsDialog, GradebookConstants) {
7-
const GRADED = 'graded',
8-
ICON_CLASS = 'icon-',
9-
LATE_CLASS = 'late',
10-
RESUBMITTED_CLASS = 'resubmiited',
11-
SUBMISSION_TYPES = {
12-
discussion_topic: 'discussion',
13-
online_url: 'link',
14-
online_text_entry: 'text',
15-
online_upload: 'document',
16-
online_quiz: 'quiz',
17-
media_recording: 'media'
18-
};
7+
var GRADED = 'graded',
8+
ICON_CLASS = 'icon-',
9+
LATE_CLASS = 'late',
10+
RESUBMITTED_CLASS = 'resubmiited',
11+
SUBMISSION_TYPES = {
12+
discussion_topic: 'discussion',
13+
online_url: 'link',
14+
online_text_entry: 'text',
15+
online_upload: 'document',
16+
online_quiz: 'quiz',
17+
media_recording: 'media'
18+
};
1919

2020
var AssignmentGradeCell = React.createClass({
2121
propTypes: {

app/jsx/gradebook/grid/components/column_types/assignmentPassFail.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ define([
66
'../../actions/submissionsActions'
77
], function (React, _, GradeCellMixin, SubmissionsActions) {
88

9-
const GRADEBOOK_CHECKBOX_CLASS = 'gradebook-checkbox';
10-
const NEXT_GRADE_TYPE = {
9+
var GRADEBOOK_CHECKBOX_CLASS = 'gradebook-checkbox';
10+
var NEXT_GRADE_TYPE = {
1111
'' : 'complete',
1212
'complete' : 'incomplete',
1313
'incomplete': ''

app/jsx/gradebook/grid/components/dropdown_components/moveTotalColumnToggle.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ define([
88
'jsx/gradebook/grid/actions/gradebookToolbarActions'
99
], function (React, Reflux, I18n, HeaderDropdownOption, GradebookToolbarStore, GradebookToolbarActions) {
1010

11-
const TO_END = I18n.t("Move to end"),
12-
TO_FRONT = I18n.t("Move to front");
11+
var TO_END = I18n.t("Move to end"),
12+
TO_FRONT = I18n.t("Move to front");
1313

1414
var MoveTotalColumnToggle = React.createClass({
1515
mixins: [

app/jsx/gradebook/grid/components/dropdown_components/muteAssignmentOption.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ define([
2222
AssignmentGroupsActions
2323
) {
2424

25-
const MUTE = I18n.t('Mute Assignment'),
26-
UNMUTE = I18n.t('Unmute Assignment'),
27-
MUTING_EVENT = 'assignment_muting_toggled';
25+
var MUTE = I18n.t('Mute Assignment'),
26+
UNMUTE = I18n.t('Unmute Assignment'),
27+
MUTING_EVENT = 'assignment_muting_toggled';
2828

2929
var MuteAssignmentOption = React.createClass({
3030

app/jsx/gradebook/grid/components/gridCell.jsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ define([
55
'./assignmentGradeCell'
66
], function (React, _, AssignmentGradeCell) {
77

8-
const GRADEBOOK_CELL_CLASS = 'gradebook-cell',
9-
ACTIVE_CLASS = ' active',
10-
LATE_CLASS = ' late',
11-
RESUBMIITED_CLASS = ' resubmitted',
12-
ASSIGNMENT_TYPES = [
13-
'percent',
14-
'pass_fail',
15-
'letter_grade',
16-
'points',
17-
'gpa_scale',
18-
];
8+
var GRADEBOOK_CELL_CLASS = 'gradebook-cell',
9+
ACTIVE_CLASS = ' active',
10+
LATE_CLASS = ' late',
11+
RESUBMIITED_CLASS = ' resubmitted',
12+
ASSIGNMENT_TYPES = [
13+
'percent',
14+
'pass_fail',
15+
'letter_grade',
16+
'points',
17+
'gpa_scale',
18+
];
1919

2020
var GridCell = React.createClass({
2121
propTypes: {

app/jsx/gradebook/grid/constants.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
define([
22
'underscore'
33
], function (_) {
4-
const GRADEBOOK_CONSTANTS = {
4+
var GRADEBOOK_CONSTANTS = {
55
STUDENT_COLUMN_ID: 'student',
66
NOTES_COLUMN_ID: 'notes',
77
PERCENT_COLUMN_ID: 'percent',
@@ -49,7 +49,7 @@ define([
4949
}
5050
};
5151

52-
const CONSTANTS = _.extend({}, GRADEBOOK_CONSTANTS, ENV.GRADEBOOK_OPTIONS);
52+
var CONSTANTS = _.extend({}, GRADEBOOK_CONSTANTS, ENV.GRADEBOOK_OPTIONS);
5353

5454
return CONSTANTS;
5555
});

app/jsx/gradebook/grid/stores/settingsStore.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ define([
33
'jquery',
44
'../actions/settingsActions'
55
], function (Reflux, $, SettingsActions) {
6-
const MOUNT_ELEMENT = document.getElementById('gradebook-grid-wrapper'),
7-
PADDING = 20,
8-
TOOLBAR_HEIGHT = $('#gradebook-toolbar').height(),
9-
TOOLBAR_OFFSET = $('#gradebook-toolbar').offset().top;
6+
var MOUNT_ELEMENT = document.getElementById('gradebook-grid-wrapper'),
7+
PADDING = 20,
8+
TOOLBAR_HEIGHT = $('#gradebook-toolbar').height(),
9+
TOOLBAR_OFFSET = $('#gradebook-toolbar').offset().top;
1010

1111
var SettingsStore = Reflux.createStore({
1212
listenables: [SettingsActions],

0 commit comments

Comments
 (0)