From 48cdc5c6629233c31e19b1f26599066c45ba8713 Mon Sep 17 00:00:00 2001 From: Steve Brownlee Date: Wed, 21 Feb 2024 09:59:34 -0600 Subject: [PATCH] Fix assessment dialog to use assessment ID --- src/components/dashboard/AssessmentStatusDialog.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/dashboard/AssessmentStatusDialog.js b/src/components/dashboard/AssessmentStatusDialog.js index 9ffc54a..79f895d 100644 --- a/src/components/dashboard/AssessmentStatusDialog.js +++ b/src/components/dashboard/AssessmentStatusDialog.js @@ -25,17 +25,17 @@ export const AssessmentStatusDialog = ({ toggleStatuses, statusIsOpen }) => { }, [activeStudent]) return -

{activeStudent?.name} is {activeStudent?.assessment_status === 0 ? "not assigned to the assessment" : `working on the self-assessment for ${activeStudent?.book?.name}`}

+

{activeStudent?.name} is {activeStudent?.assessment_status_id === 0 ? "not assigned to the assessment" : `working on the self-assessment for ${activeStudent?.book_name}`}

Update Self-Assessment Status

{ statuses.map(status => { - if ((activeStudent?.assessment_status > 0 && status.status !== "In Progress") || - (activeStudent?.assessment_status === 0 && status.status === "In Progress")) { + if ((activeStudent?.assessment_status_id > 0 && status.status !== "In Progress") || + (activeStudent?.assessment_status_id === 0 && status.status === "In Progress")) { return