From b7dd0ccab690a2b43b512939e48f8ef30ca2bf90 Mon Sep 17 00:00:00 2001 From: Alex Mickelson Date: Fri, 1 Nov 2024 13:27:15 -0600 Subject: [PATCH] holidays implemented --- .../assignment/[assignmentName]/AssignmentButtons.tsx | 2 +- nextjs/src/app/newCourse/NewCourseForm.tsx | 2 +- nextjs/src/services/fileStorage/settingsFileStorageService.ts | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nextjs/src/app/course/[courseName]/modules/[moduleName]/assignment/[assignmentName]/AssignmentButtons.tsx b/nextjs/src/app/course/[courseName]/modules/[moduleName]/assignment/[assignmentName]/AssignmentButtons.tsx index 35d988d..aa2616a 100644 --- a/nextjs/src/app/course/[courseName]/modules/[moduleName]/assignment/[assignmentName]/AssignmentButtons.tsx +++ b/nextjs/src/app/course/[courseName]/modules/[moduleName]/assignment/[assignmentName]/AssignmentButtons.tsx @@ -123,7 +123,7 @@ export function AssignmentButtons({ {({ closeModal }) => (
- Are you sure you want to delete this quiz locally? + Are you sure you want to delete this assignment locally?

diff --git a/nextjs/src/app/newCourse/NewCourseForm.tsx b/nextjs/src/app/newCourse/NewCourseForm.tsx index 0058486..e23ae23 100644 --- a/nextjs/src/app/newCourse/NewCourseForm.tsx +++ b/nextjs/src/app/newCourse/NewCourseForm.tsx @@ -96,7 +96,7 @@ export default function NewCourseForm() { ], defaultFileUploadTypes: ["pdf", "png", "jpg", "jpeg"], defaultLockHoursOffset: 0, - holidays: {} + holidays: [] }, }) .then(() => { diff --git a/nextjs/src/services/fileStorage/settingsFileStorageService.ts b/nextjs/src/services/fileStorage/settingsFileStorageService.ts index a90895c..8e98987 100644 --- a/nextjs/src/services/fileStorage/settingsFileStorageService.ts +++ b/nextjs/src/services/fileStorage/settingsFileStorageService.ts @@ -47,7 +47,9 @@ const populateDefaultValues = (settingsFromFile: LocalCourseSettings) => { defaultSubmissionType, defaultFileUploadTypes: settingsFromFile.defaultFileUploadTypes || defaultFileUploadTypes, - holidays: !!settingsFromFile.holidays ? settingsFromFile.holidays : [], + holidays: Array.isArray(settingsFromFile.holidays) + ? settingsFromFile.holidays + : [], }; return settings; };