EDUCATOR-4365 - display max grade for not started assignments

This commit is contained in:
atesker
2019-10-01 12:07:26 -04:00
parent c773c35bbc
commit 81601ca6ea
2 changed files with 8 additions and 3 deletions

View File

@@ -78,10 +78,12 @@ export default class Gradebook extends React.Component {
);
let adjustedGradePossible = '';
if (subsection.attempted) {
adjustedGradePossible = ` / ${subsection.score_possible}`;
// this check is necessary because there can be a delay between the very first time the grade
// is calculcated by the backend.
if (this.props.gradeOriginalPossibleGraded != null) {
adjustedGradePossible = ` / ${this.props.gradeOriginalPossibleGraded}`;
}
this.setState({
modalAssignmentName: `${subsection.subsection_name}`,
modalOpen: true,
@@ -948,6 +950,7 @@ Gradebook.defaultProps = {
gradeOverrides: [],
gradeOverrideCurrentEarnedGradedOverride: null,
gradeOriginalEarnedGraded: null,
gradeOriginalPossibleGraded: null,
location: {
search: '',
},
@@ -1009,6 +1012,7 @@ Gradebook.propTypes = {
})),
gradeOverrideCurrentEarnedGradedOverride: PropTypes.number,
gradeOriginalEarnedGraded: PropTypes.number,
gradeOriginalPossibleGraded: PropTypes.number,
headings: PropTypes.arrayOf(PropTypes.string).isRequired,
history: PropTypes.shape({
push: PropTypes.func,

View File

@@ -51,6 +51,7 @@ const mapStateToProps = (state, ownProps) => (
gradeOverrideCurrentPossibleGradedOverride:
state.grades.gradeOverrideCurrentPossibleGradedOverride,
gradeOriginalEarnedGraded: state.grades.gradeOriginalEarnedGraded,
gradeOriginalPossibleGraded: state.grades.gradeOriginalPossibleGraded,
headings: getHeadings(state),
tracks: state.tracks.results,
cohorts: state.cohorts.results,