diff --git a/devU-client/src/components/pages/assignments/assignmentDetailPage.tsx b/devU-client/src/components/pages/assignments/assignmentDetailPage.tsx index 1391a8e..15ab2d0 100644 --- a/devU-client/src/components/pages/assignments/assignmentDetailPage.tsx +++ b/devU-client/src/components/pages/assignments/assignmentDetailPage.tsx @@ -81,7 +81,7 @@ const AssignmentDetailPage = () => { } catch (err:any) { setError(err) - const message = Array.isArray(err) ? err.map((e) => `${e.param} ${e.msg}`).join(', ') : err.message + const message = "Submission past due date"//Array.isArray(err) ? err.map((e) => `${e.param} ${e.msg}`).join(', ') : err.message setAlert({autoDelete: false, type: 'error', message}) } finally { setLoading(false) @@ -146,6 +146,14 @@ const AssignmentDetailPage = () => { await fetchData() } } + const isSubmissionDisabled = () => { + if (assignment?.dueDate) { + const dueDate = new Date(assignment.dueDate); + const now = new Date(); + return now > dueDate; + } + return false; + }; return( @@ -172,7 +180,7 @@ const AssignmentDetailPage = () => {
{role.isInstructor() && } + }}>Add Assignment Question}
{role.isInstructor() && + ) : null} diff --git a/devU-client/src/components/pages/courses/courseDetailPage.tsx b/devU-client/src/components/pages/courses/courseDetailPage.tsx index b113283..5804bea 100644 --- a/devU-client/src/components/pages/courses/courseDetailPage.tsx +++ b/devU-client/src/components/pages/courses/courseDetailPage.tsx @@ -99,8 +99,8 @@ const CourseDetailPage = () => {
-

CSE{courseInfo.number}: {courseInfo.name} ({courseInfo.semester})

-

Instructor:

+

{courseInfo.number}: {courseInfo.name} ({courseInfo.semester})

+

Section: