Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/components/academy/grading/GradingWorkspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,9 @@ export type DispatchProps = {
}

class GradingWorkspace extends React.Component<GradingWorkspaceProps> {
public componentWillMount() {
this.props.handleGradingFetch(this.props.submissionId)
this.checkWorkspaceReset(this.props)
}

public componentWillUpdate() {
public componentDidMount() {
this.checkWorkspaceReset(this.props)
this.props.handleGradingFetch(this.props.submissionId)
}

public render() {
Expand Down
8 changes: 2 additions & 6 deletions src/components/assessment/AssessmentWorkspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,13 @@ class AssessmentWorkspace extends React.Component<
> {
public state = { showOverlay: false }

public componentWillMount() {
public componentDidMount() {
this.checkWorkspaceReset(this.props)
/* Load assessment if it isn't passed as a prop. */
this.props.handleAssessmentFetch(this.props.assessmentId)
if (this.props.questionId === 0) {
this.setState({ showOverlay: true })
}
this.checkWorkspaceReset(this.props)
}

public componentWillUpdate() {
this.checkWorkspaceReset(this.props)
}

public render() {
Expand Down
2 changes: 1 addition & 1 deletion src/containers/assessment/AssessmentWorkspaceContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const mapDispatchToProps: MapDispatchToProps<DispatchProps, {}> = (dispatch: Dis
handleReplEval: () => evalRepl(location),
handleReplOutputClear: () => clearReplOutput(location),
handleReplValueChange: (newValue: string) => updateReplValue(newValue, location),
handleResetAssessmentWorkspace: () => resetAssessmentWorkspace,
handleResetAssessmentWorkspace: resetAssessmentWorkspace,
handleSideContentHeightChange: (heightChange: number) =>
changeSideContentHeight(heightChange, location),
handleUpdateCurrentAssessmentId: updateCurrentAssessmentId
Expand Down