diff --git a/src/components/Gradebook/index.jsx b/src/components/Gradebook/index.jsx index aebc4d9..f00a50f 100644 --- a/src/components/Gradebook/index.jsx +++ b/src/components/Gradebook/index.jsx @@ -46,30 +46,29 @@ export default class Gradebook extends React.Component { this.setState({ [e.target.name]: e.target.value }); } - setNewModalState = (userEntry, subsection) => { - this.props.fetchGradeOverrideHistory( - subsection.module_id, - userEntry.user_id, - ); + setNewModalState = (userEntry, subsection) => { + this.props.fetchGradeOverrideHistory( + subsection.module_id, + userEntry.user_id, + ); - let adjustedGradePossible = '100'; - if (subsection.attempted) { - adjustedGradePossible = ` / ${subsection.score_possible}`; - } - this.setState({ - modalAssignmentName: `${subsection.subsection_name}`, - modalOpen: true, - updateModuleId: subsection.module_id, - updateUserId: userEntry.user_id, - updateUserName: userEntry.username, - todaysDate: formatDateForDisplay(new Date()), - originalGrade: subsection.score_earned, - adjustedGradePossible, - reasonForChange: '', - adjustedGradeValue: '', - - }); - } + let adjustedGradePossible = '100'; + if (subsection.attempted) { + adjustedGradePossible = ` / ${subsection.score_possible}`; + } + this.setState({ + modalAssignmentName: `${subsection.subsection_name}`, + modalOpen: true, + updateModuleId: subsection.module_id, + updateUserId: userEntry.user_id, + updateUserName: userEntry.username, + todaysDate: formatDateForDisplay(new Date()), + originalGrade: subsection.score_earned, + adjustedGradePossible, + reasonForChange: '', + adjustedGradeValue: '', + }); + } getLearnerInformation = entry => (
@@ -303,7 +302,7 @@ export default class Gradebook extends React.Component { render() { return (
- { this.props.showSpinner &&
} + {this.props.showSpinner &&
}

Gradebook

{this.props.courseId}

- { this.props.areGradesFrozen && + {this.props.areGradesFrozen &&
The grades for this course are now frozen. Editing of grades is no longer allowed.
} - { (this.props.canUserViewGradebook === false) && + {(this.props.canUserViewGradebook === false) &&
You are not authorized to view the gradebook for this course.
@@ -353,11 +352,11 @@ export default class Gradebook extends React.Component { className="mr-1" onClick={() => this.props.toggleFormat('absolute')} /> - Absolute + Absolute
- { this.props.assignmentTypes.length > 0 && + {this.props.assignmentTypes.length > 0 &&
Assignment Types: @@ -407,7 +406,7 @@ export default class Gradebook extends React.Component { inputLabel="Search for a learner" onChange={filterValue => this.setState({ filterValue })} onClear={() => - this.props.getUserGrades( + this.props.getUserGrades( this.props.courseId, this.props.selectedCohort, this.props.selectedTrack, @@ -448,7 +447,7 @@ export default class Gradebook extends React.Component {
Assignment:
{this.state.modalAssignmentName}
Student:
{this.state.updateUserName}
Original Grade:
{this.state.originalGrade}
-
Current Grade:
{this.props.gradeOverrideCurrentPossibleGradedOverride}
+
Current Grade:
{this.props.gradeOverrideCurrentEarnedGradedOverride}
- { !this.props.errorFetchingGradeOverrideHistory && ( - this.onChange(value)} - ref={(input) => { this.overrideReasonInput = input; }} - />), - adjustedGrade: ( - - this.onChange(value)} - /> {this.state.adjustedGradePossible} - ), - }]} - />)} + {!this.props.errorFetchingGradeOverrideHistory && ( +
this.onChange(value)} + ref={(input) => { this.overrideReasonInput = input; }} + />), + adjustedGrade: ( + + this.onChange(value)} + /> {this.state.adjustedGradePossible} + ), + }]} + />)}
Showing most recent actions(max 5). To see more, please contact support. @@ -555,7 +554,7 @@ Gradebook.defaultProps = { cohorts: [], grades: [], gradeOverrides: [], - gradeOverrideCurrentPossibleGradedOverride: null, + gradeOverrideCurrentEarnedGradedOverride: null, location: { search: '', }, @@ -602,7 +601,7 @@ Gradebook.propTypes = { reason: PropTypes.string, adjustedGrade: PropTypes.number, })), - gradeOverrideCurrentPossibleGradedOverride: PropTypes.number, + gradeOverrideCurrentEarnedGradedOverride: PropTypes.number, headings: PropTypes.arrayOf(PropTypes.string).isRequired, history: PropTypes.shape({ push: PropTypes.func,