Skip to content

Commit

Permalink
Fix assessment dialog to use assessment ID
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebrownlee committed Feb 21, 2024
1 parent 24cf79c commit 48cdc5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/dashboard/AssessmentStatusDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ export const AssessmentStatusDialog = ({ toggleStatuses, statusIsOpen }) => {
}, [activeStudent])

return <dialog id="dialog--statuses" className="dialog--statuses" open={statusIsOpen}>
<h2>{activeStudent?.name} is {activeStudent?.assessment_status === 0 ? "not assigned to the assessment" : `working on the self-assessment for ${activeStudent?.book?.name}`} </h2>
<h2>{activeStudent?.name} is {activeStudent?.assessment_status_id === 0 ? "not assigned to the assessment" : `working on the self-assessment for ${activeStudent?.book_name}`} </h2>
<h4>Update Self-Assessment Status</h4>
<section className="statusButtons">
{
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 <button className="statusButton isometric-button small blue" key={`st--${status.id}`}
onClick={() => {
let operation = null
if (activeStudent.assessment_status === 0) {
if (activeStudent.assessment_status_id === 0) {
operation = setStudentCurrentAssessment(activeStudent)
} else {
if (status.status === "Reviewed and Complete") {
Expand Down

0 comments on commit 48cdc5c

Please sign in to comment.