Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ json.assessment do
# If submitting with incorrect answers is not allowed, we must show the answer to students regardless
json.showMcqAnswer !@assessment.allow_partial_submission || @assessment.show_mcq_answer
json.showEvaluation @assessment.show_evaluation
json.blockStudentViewingAfterSubmitted @assessment.block_student_viewing_after_submitted
json.questionIds @submission.questions.pluck(:id)
json.passwordProtected @assessment.session_password_protected?
json.gamified @assessment.course.gamified?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,30 @@ class VisibleSubmissionEditIndex extends Component {
}

render() {
const { isSubmissionBlocked, isLoading } = this.props;
const { assessment, isSubmissionBlocked, isLoading, submission } =
this.props;

if (isLoading) return <LoadingIndicator />;
if (isSubmissionBlocked) return <BlockedSubmission />;

const isBlockedInStudentView =
!submission.graderView &&
assessment.blockStudentViewingAfterSubmitted &&
submission.workflowState !== workflowStates.Attempting &&
submission.workflowState !== workflowStates.Published;

return (
<Page className="space-y-5">
{this.renderTimeLimitBanner()}
{this.renderAssessment()}
{this.renderProgress()}
{this.renderContent()}
{isBlockedInStudentView ? (
<BlockedSubmission />
) : (
<>
{this.renderProgress()}
{this.renderContent()}
</>
)}
</Page>
);
}
Expand Down