diff --git a/frontend/frontend/src/assets/logo_UGent_EN_RGB_2400_color-on-white.png b/frontend/frontend/public/assets/logo_UGent_EN_RGB_2400_color-on-white.png
similarity index 100%
rename from frontend/frontend/src/assets/logo_UGent_EN_RGB_2400_color-on-white.png
rename to frontend/frontend/public/assets/logo_UGent_EN_RGB_2400_color-on-white.png
diff --git a/frontend/frontend/src/assets/logo_UGent_EN_RGB_2400_color.png b/frontend/frontend/public/assets/logo_UGent_EN_RGB_2400_color.png
similarity index 100%
rename from frontend/frontend/src/assets/logo_UGent_EN_RGB_2400_color.png
rename to frontend/frontend/public/assets/logo_UGent_EN_RGB_2400_color.png
diff --git a/frontend/frontend/src/assets/logo_UGent_EN_RGB_2400_white.png b/frontend/frontend/public/assets/logo_UGent_EN_RGB_2400_white.png
similarity index 100%
rename from frontend/frontend/src/assets/logo_UGent_EN_RGB_2400_white.png
rename to frontend/frontend/public/assets/logo_UGent_EN_RGB_2400_white.png
diff --git a/frontend/frontend/src/assets/logo_UGent_NL_RGB_2400_kleur-op-wit.png b/frontend/frontend/public/assets/logo_UGent_NL_RGB_2400_kleur-op-wit.png
similarity index 100%
rename from frontend/frontend/src/assets/logo_UGent_NL_RGB_2400_kleur-op-wit.png
rename to frontend/frontend/public/assets/logo_UGent_NL_RGB_2400_kleur-op-wit.png
diff --git a/frontend/frontend/src/assets/logo_UGent_NL_RGB_2400_kleur.png b/frontend/frontend/public/assets/logo_UGent_NL_RGB_2400_kleur.png
similarity index 100%
rename from frontend/frontend/src/assets/logo_UGent_NL_RGB_2400_kleur.png
rename to frontend/frontend/public/assets/logo_UGent_NL_RGB_2400_kleur.png
diff --git a/frontend/frontend/src/assets/logo_UGent_NL_RGB_2400_wit.png b/frontend/frontend/public/assets/logo_UGent_NL_RGB_2400_wit.png
similarity index 100%
rename from frontend/frontend/src/assets/logo_UGent_NL_RGB_2400_wit.png
rename to frontend/frontend/public/assets/logo_UGent_NL_RGB_2400_wit.png
diff --git a/frontend/frontend/src/assets/react.svg b/frontend/frontend/public/assets/react.svg
similarity index 100%
rename from frontend/frontend/src/assets/react.svg
rename to frontend/frontend/public/assets/react.svg
diff --git a/frontend/frontend/src/assets/ufo-logo-3375276369.png b/frontend/frontend/public/assets/ufo-logo-3375276369.png
similarity index 100%
rename from frontend/frontend/src/assets/ufo-logo-3375276369.png
rename to frontend/frontend/public/assets/ufo-logo-3375276369.png
diff --git a/frontend/frontend/src/components/AssignmentListItemSubjectsPage.tsx b/frontend/frontend/src/components/AssignmentListItemSubjectsPage.tsx
new file mode 100644
index 00000000..6ad833a0
--- /dev/null
+++ b/frontend/frontend/src/components/AssignmentListItemSubjectsPage.tsx
@@ -0,0 +1,62 @@
+import {ListItem, ListItemButton, ListItemText, Divider} from "@mui/material";
+import {useNavigate} from "react-router-dom";
+import {t} from "i18next";
+interface AssignmentListItemSubjectsPageProps {
+ key: string;
+ projectName: string;
+ dueDate?: Date;
+ submissions: number;
+ score: number;
+ isStudent: boolean;
+}
+
+/*
+* This component is used to display a single assignment in the list of assignments
+* @param key: string - the key of the assignment
+* @param projectName: string - the name of the project
+* @param dueDate: Date - the due date of the project
+* @param submissions: number - number of submissions for the project
+* @param score: number - assigned score on the project
+* @param isStudent: boolean - if the user is a student or a teacher
+*/
+
+export function AssignmentListItemSubjectsPage({key,projectName, dueDate, submissions, score, isStudent}:AssignmentListItemSubjectsPageProps) {
+ const navigate = useNavigate();
+ const handleProjectClick = () => {
+ console.log("Project clicked");
+ navigate(`/${key}`)
+ }
+
+ return (
+ <>
+
+
+ {isStudent?
+ <>
+
+
+
+
+ >
+ :
+ <>
+
+
+
+ >
+ }
+
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/frontend/frontend/src/components/StudentScoreListItem.tsx b/frontend/frontend/src/components/StudentScoreListItem.tsx
new file mode 100644
index 00000000..74d6bccd
--- /dev/null
+++ b/frontend/frontend/src/components/StudentScoreListItem.tsx
@@ -0,0 +1,50 @@
+import {ListItem, ListItemText, Divider, TextField, IconButton} from "@mui/material";
+import DownloadIcon from '@mui/icons-material/Download';
+import {t} from "i18next";
+
+interface StudentScoreListItemProps {
+ key: string;
+ studentName: string;
+ submissionFiles: string[];
+}
+
+/*
+* This component is used to display a single assignment in the list of assignments
+* @param key: string - the key of the studentOnProject
+* @param studentName: string - the name of the student
+* @param submissionFiles: string[] - a list of all files submitted by this student
+*/
+
+export function StudentScoreListItem({key, studentName, submissionFiles}:StudentScoreListItemProps) {
+ return (
+ <>
+
+
+ <>
+
+
+
+
+
+
+
+
+
+
+
+ >
+
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/frontend/frontend/src/i18n/config.ts b/frontend/frontend/src/i18n/config.ts
index 8a1313cb..7b0c659f 100644
--- a/frontend/frontend/src/i18n/config.ts
+++ b/frontend/frontend/src/i18n/config.ts
@@ -3,8 +3,8 @@ import i18n from "i18next";
import LanguageDetector from "i18next-browser-languagedetector";
const english = {
- logo: "./src/assets/logo_UGent_EN_RGB_2400_white.png",
- logo_blue: "./src/assets/logo_UGent_EN_RGB_2400_color.png",
+ logo: "/assets/logo_UGent_EN_RGB_2400_white.png",
+ logo_blue: "/assets/logo_UGent_EN_RGB_2400_color.png",
login: "Log in with your UGent account",
back: "Back",
current_courses: "Current courses",
@@ -12,10 +12,16 @@ const english = {
students: "Students: ",
no_deadline: "No deadline",
add_admin: "Add admin",
+ submission: "Submission",
+ error: "Something went wrong.",
+ assignment: "Assignment:",
+ filename: "Submitted file:",
+ restrictions: "Restrictions:",
+ current_projects: "Current projects",
};
const dutch = {
- logo: "./src/assets/logo_UGent_NL_RGB_2400_wit.png",
- logo_blue: "./src/assets/logo_UGent_NL_RGB_2400_kleur.png",
+ logo: "/assets/logo_UGent_NL_RGB_2400_wit.png",
+ logo_blue: "/assets/logo_UGent_NL_RGB_2400_kleur.png",
login: "Log in met je UGent account",
back: "Terug",
current_courses: "Huidige vakken",
@@ -23,6 +29,12 @@ const dutch = {
students: "Studenten: ",
no_deadline: "Geen deadline",
add_admin: "Voeg admin toe",
+ submission: "Indiening",
+ error: "Er is iets misgegaan.",
+ assignment: "Opgave:",
+ filename: "Ingediend bestand:",
+ restrictions: "Restricties:",
+ current_projects: "Huidige projecten",
};
i18n.use(initReactI18next).use(LanguageDetector).init({
diff --git a/frontend/frontend/src/main.tsx b/frontend/frontend/src/main.tsx
index 54ff44ee..9141dcd8 100644
--- a/frontend/frontend/src/main.tsx
+++ b/frontend/frontend/src/main.tsx
@@ -8,17 +8,22 @@ import ErrorPage from "./pages/ErrorPage.tsx";
import {MainPage} from "./pages/mainPage/MainPage.tsx";
import {Helmet, HelmetProvider} from "react-helmet-async";
+
+import { SubjectsStudentPage } from "./pages/subjectsPage/SubjectsStudentPage.tsx";
+import { SubjectsTeacherPage } from "./pages/subjectsPage/SubjectsTeacherPage.tsx";
+import { ProjectScoresPage } from "./pages/scoresPage/ProjectScoresPage.tsx";
import { SubjectsStudentPage } from "./pages/subjects_page/SubjectsStudentPage.tsx";
import { AssignmentStudentPage } from "./pages/assignmentPage/assignmentStudentPage";
import { AssignmentTeacherPage } from "./pages/assignmentPage/assignmentTeacherPage.tsx";
import { GroupsPage } from "./pages/groupsPage/groupsPage.tsx";
import {SubjectsStudentPage} from "./pages/subjects_page/SubjectsStudentPage.tsx";
-
import {LocalizationProvider} from "@mui/x-date-pickers";
import {AdapterDayjs} from '@mui/x-date-pickers/AdapterDayjs/AdapterDayjs';
+import {SubmissionPage} from "./pages/submissionPage/SubmissionPage.tsx";
import {SimpleRequestsPage} from "./pages/simpleRequestsPage/SimpleRequestsPage.tsx";
+
const router = createBrowserRouter([
{
path: "/",
@@ -26,10 +31,19 @@ const router = createBrowserRouter([
errorElement: ,
},
{
- path: "/subjects_student",
+ path: "/subjects_student/:courseId",
element: ,
},
{
+
+ path: "/subjects_teacher/:courseId",
+ element: ,
+ },
+ {
+ path: "/scores",
+ element: ,
+ },
+
path: "/assignment_student",
element: ,
},
@@ -47,6 +61,11 @@ const router = createBrowserRouter([
},
{
+
+ path: "/submission/:project",
+ element: ,
+ },
+ {
path: "/test_requests",
element: ,
}
diff --git a/frontend/frontend/src/pages/ErrorPage.tsx b/frontend/frontend/src/pages/ErrorPage.tsx
index 6afd2b0f..0efc778b 100644
--- a/frontend/frontend/src/pages/ErrorPage.tsx
+++ b/frontend/frontend/src/pages/ErrorPage.tsx
@@ -1,18 +1,122 @@
-import { useRouteError } from "react-router-dom";
+import {isRouteErrorResponse, useRouteError} from "react-router-dom";
+import {Box, Typography} from "@mui/material";
+import {t} from "i18next";
-//TODO:: fix a decent error page
export default function ErrorPage() {
const error = useRouteError();
console.error(error);
+ let errorMessage: string;
+
+ if (isRouteErrorResponse(error)) {
+ // error is type `ErrorResponse`
+ errorMessage = error.error?.message || error.statusText;
+ } else if (error instanceof Error) {
+ errorMessage = error.message;
+ } else if (typeof error === 'string') {
+ errorMessage = error;
+ } else {
+ console.error(error);
+ errorMessage = 'Unknown error';
+ }
return (
-
-
Oops!
-
Sorry, an unexpected error has occurred.
-
- error
-
-
+ <>
+
+
+
+
+
+
+
+ {t("error")}
+
+
+ {errorMessage}
+
+
+
+
+
+ >
);
}
\ No newline at end of file
diff --git a/frontend/frontend/src/pages/SubjectsPage/ArchivedProjectsView.tsx b/frontend/frontend/src/pages/SubjectsPage/ArchivedProjectsView.tsx
new file mode 100644
index 00000000..0f4cded8
--- /dev/null
+++ b/frontend/frontend/src/pages/SubjectsPage/ArchivedProjectsView.tsx
@@ -0,0 +1,7 @@
+export function ArchivedProjectsView() {
+ return (
+ <>
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/frontend/frontend/src/pages/SubjectsPage/ProjectsView.tsx b/frontend/frontend/src/pages/SubjectsPage/ProjectsView.tsx
new file mode 100644
index 00000000..70266f32
--- /dev/null
+++ b/frontend/frontend/src/pages/SubjectsPage/ProjectsView.tsx
@@ -0,0 +1,101 @@
+import {Box, Typography} from "@mui/material";
+import List from '@mui/material/List';
+import {AssignmentListItemSubjectsPage} from "../../components/AssignmentListItemSubjectsPage.tsx";
+
+interface ProjectsViewProps {
+ courseId: string;
+ isStudent: boolean;
+}
+
+interface Course {
+ id: string;
+ name: string;
+ teacher: string;
+ students: string[];
+ //list of assignment ids
+ assignments: string[];
+ archived: boolean;
+}
+
+interface Assignment {
+ id: string;
+ name: string;
+ deadline?: Date;
+ submissions: number;
+ score: number;
+}
+
+export function ProjectsView({courseId, isStudent}: ProjectsViewProps) {
+ const course = getCourse(courseId);
+ const assignments = course.assignments.map((assignmentId) => getAssignment(assignmentId));
+
+ return (
+ <>
+
+ {isStudent?
+ <>
+ Project
+ Deadline
+ Submissions
+ Score
+ >
+ :
+ <>
+ Project
+ Deadline
+ Edit
+ >
+ }
+
+
+
+
+
+ {assignments.map((assignment) => (
+
+ ))}
+
+
+
+
+ >
+ );
+}
+
+//TODO: use api to get data, for now use mock data
+function getCourse(courseId: string): Course {
+ return {
+ id: courseId,
+ name: "courseName",
+ teacher: "teacher",
+ students: ["student1", "student2"],
+ archived: false,
+ assignments: ["assignment1", "assignment2", "assignment3", "assignment4", "assignment5", "assignment6", "assignment7", "assignment8", "assignment9"]
+ }
+}
+
+function getAssignment(assignmentId: string): Assignment {
+ return {
+ id: assignmentId,
+ name: "assignmentName",
+ deadline: new Date(2022, 11, 17),
+ submissions: 2,
+ score: 10
+ }
+}
\ No newline at end of file
diff --git a/frontend/frontend/src/pages/SubjectsPage/SubjectsStudentPage.tsx b/frontend/frontend/src/pages/SubjectsPage/SubjectsStudentPage.tsx
new file mode 100644
index 00000000..512c33a7
--- /dev/null
+++ b/frontend/frontend/src/pages/SubjectsPage/SubjectsStudentPage.tsx
@@ -0,0 +1,22 @@
+import { Header } from "../../components/Header";
+import { Box, Stack } from "@mui/material";
+import TabSwitcher from "../../components/TabSwitcher.tsx";
+import {ArchivedProjectsView} from "./ArchivedProjectsView.tsx";
+import {ProjectsView} from "./ProjectsView.tsx";
+import { useParams } from "react-router-dom";
+
+export function SubjectsStudentPage() {
+ let { courseId } = useParams();
+ courseId = String(courseId);
+ return (
+ <>
+
+
+
+ ,]}/>
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/frontend/frontend/src/pages/SubjectsPage/SubjectsTeacherPage.tsx b/frontend/frontend/src/pages/SubjectsPage/SubjectsTeacherPage.tsx
new file mode 100644
index 00000000..1858afe4
--- /dev/null
+++ b/frontend/frontend/src/pages/SubjectsPage/SubjectsTeacherPage.tsx
@@ -0,0 +1,22 @@
+import { Header } from "../../components/Header";
+import { Box, Stack } from "@mui/material";
+import TabSwitcher from "../../components/TabSwitcher.tsx";
+import {ArchivedProjectsView} from "./ArchivedProjectsView.tsx";
+import {ProjectsView} from "./ProjectsView.tsx";
+import { useParams } from "react-router-dom";
+
+export function SubjectsTeacherPage() {
+ let { courseId } = useParams();
+ courseId = String(courseId);
+ return (
+ <>
+
+
+
+ ,]}/>
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/frontend/frontend/src/pages/loginPage/LoginPage.tsx b/frontend/frontend/src/pages/loginPage/LoginPage.tsx
index e4aa5bfa..72d3c320 100644
--- a/frontend/frontend/src/pages/loginPage/LoginPage.tsx
+++ b/frontend/frontend/src/pages/loginPage/LoginPage.tsx
@@ -1,5 +1,5 @@
-import { Box, Button, Typography } from "@mui/material";
-import { t } from "i18next";
+import {Box, Button, Typography} from "@mui/material";
+import {t} from "i18next";
import {useNavigate} from "react-router-dom";
/*
@@ -16,106 +16,106 @@ export function LoginPage() {
//navigate("main") //relative path, so it will redirect to localhost:3000/login/main
}
- return (
- <>
-
-
-
-
+ return (
+ <>
-
- Naam Platform
-
-
-
-
-
-
-
- >
- );
+
+
+
+
+
+ Naam Platform
+
+
+
+
+
+
+
+ >
+ );
}
diff --git a/frontend/frontend/src/pages/scoresPage/ProjectScoresPage.tsx b/frontend/frontend/src/pages/scoresPage/ProjectScoresPage.tsx
new file mode 100644
index 00000000..d8ba97fe
--- /dev/null
+++ b/frontend/frontend/src/pages/scoresPage/ProjectScoresPage.tsx
@@ -0,0 +1,30 @@
+import { Header } from "../../components/Header";
+import { Box, Button, Stack } from "@mui/material";
+import { useParams } from "react-router-dom";
+import { StudentsView } from "./StudentsView.tsx";
+import SaveIcon from '@mui/icons-material/Save';
+import CloseIcon from '@mui/icons-material/Close';
+
+export function ProjectScoresPage() {
+ let { projectId } = useParams();
+ projectId = String(projectId);
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+
+ }/>
+ }/>
+
+
+
+ >
+ );
+}
\ No newline at end of file
diff --git a/frontend/frontend/src/pages/scoresPage/StudentsView.tsx b/frontend/frontend/src/pages/scoresPage/StudentsView.tsx
new file mode 100644
index 00000000..0e16f1fb
--- /dev/null
+++ b/frontend/frontend/src/pages/scoresPage/StudentsView.tsx
@@ -0,0 +1,109 @@
+import {Box, Typography, Divider} from "@mui/material";
+import List from '@mui/material/List';
+import { StudentScoreListItem } from "../../components/StudentScoreListItem.tsx";
+
+interface StudentsViewProps {
+ projectId: string;
+}
+
+interface Assignment {
+ id: string;
+ name: string;
+ teacher: string;
+ //list of student ids
+ students: string[];
+}
+
+interface Student {
+ id: string;
+ name: string;
+}
+
+interface StudentProject {
+ id: string;
+ studentId: string;
+ submissions: string[];
+}
+
+interface Submission {
+ id: string;
+ file: string;
+}
+
+export function StudentsView({projectId}: StudentsViewProps) {
+ const project = getProject(projectId);
+ const students = project.students.map((studentProjectId) => getStudentOnProject(studentProjectId));
+
+ return (
+ <>
+
+ <>
+ Student
+ Time
+ Score
+ Download
+ >
+
+
+
+
+
+
+ {students.map((studentOnProject) => (
+ getSubmission(submissionId).file)}/>
+ ))}
+
+
+
+
+ >
+ );
+}
+
+//TODO: use api to get data, for now use mock data
+function getProject(projectId: string): Assignment {
+ return {
+ id: projectId,
+ name: "courseName",
+ teacher: "teacher",
+ students: ["student1", "student2", "student3"],
+ }
+}
+
+function getStudentOnProject(studentProjectId: string): StudentProject {
+ return {
+ id: studentProjectId,
+ studentId: "student",
+ submissions: ["submission1", "submission2"],
+ }
+}
+
+function getStudent(studentId: string): Student {
+ return {
+ id: studentId,
+ name: "studentName",
+ }
+}
+
+function getSubmission(submissionId: string): Submission {
+ return {
+ id: submissionId,
+ file: "file",
+ }
+}
\ No newline at end of file
diff --git a/frontend/frontend/src/pages/subjects_page/SubjectsStudentPage.tsx b/frontend/frontend/src/pages/subjects_page/SubjectsStudentPage.tsx
deleted file mode 100644
index 6397c620..00000000
--- a/frontend/frontend/src/pages/subjects_page/SubjectsStudentPage.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import { Header } from "../../components/Header";
-import { ItemList } from "../../components/ItemList";
-import { Box } from "@mui/material";
-
-const items = [
- { opdracht: 'Task 1', deadline: '2024-03-15', status: 'In progress', score: '80%' },
- { opdracht: 'Task 2', deadline: '2024-03-20', status: 'Completed', score: '100%' },
- { opdracht: 'Task 3', deadline: '2024-03-25', status: 'Not started', score: 'N/A' },
- { opdracht: 'Task 1', deadline: '2024-03-15', status: 'In progress', score: '80%' },
- { opdracht: 'Task 2', deadline: '2024-03-20', status: 'Completed', score: '100%' },
- { opdracht: 'Task 3', deadline: '2024-03-25', status: 'Not started', score: 'N/A' },
- { opdracht: 'Task 1', deadline: '2024-03-15', status: 'In progress', score: '80%' },
- { opdracht: 'Task 2', deadline: '2024-03-20', status: 'Completed', score: '100%' },
- { opdracht: 'Task 3', deadline: '2024-03-25', status: 'Not started', score: 'N/A' },
- { opdracht: 'Task 1', deadline: '2024-03-15', status: 'In progress', score: '80%' },
- { opdracht: 'Task 2', deadline: '2024-03-20', status: 'Completed', score: '100%' },
- { opdracht: 'Task 3', deadline: '2024-03-25', status: 'Not started', score: 'N/A' },
- { opdracht: 'Task 1', deadline: '2024-03-15', status: 'In progress', score: '80%' },
- { opdracht: 'Task 2', deadline: '2024-03-20', status: 'Completed', score: '100%' },
- { opdracht: 'Task 3', deadline: '2024-03-25', status: 'Not started', score: 'N/A' },
- { opdracht: 'Task 1', deadline: '2024-03-15', status: 'In progress', score: '80%' },
- { opdracht: 'Task 2', deadline: '2024-03-20', status: 'Completed', score: '100%' },
- { opdracht: 'Task 3', deadline: '2024-03-25', status: 'Not started', score: 'N/A' },
-];
-
-export function SubjectsStudentPage() {
- return (
- <>
-
-
-
-
-
-
- >
- );
-}
diff --git a/frontend/frontend/src/pages/submissionPage/SubmissionPage.tsx b/frontend/frontend/src/pages/submissionPage/SubmissionPage.tsx
new file mode 100644
index 00000000..4863a2e0
--- /dev/null
+++ b/frontend/frontend/src/pages/submissionPage/SubmissionPage.tsx
@@ -0,0 +1,200 @@
+import Grid2 from "@mui/material/Unstable_Grid2";
+import {Header} from "../../components/Header.tsx";
+import {useParams} from "react-router-dom";
+import {t} from "i18next";
+import {useEffect, useState} from "react";
+import {Box, Button, Card, Divider, ListItem, Paper, Typography} from "@mui/material";
+import dayjs, {Dayjs} from "dayjs";
+import DownloadIcon from '@mui/icons-material/Download';
+import List from "@mui/material/List";
+
+interface Submission {
+ //Dayjs is present in pull request for mainpage
+ deadline: Dayjs;
+ projectName: string;
+ assignment: string;
+ filename: string;
+ restrictions: { name: string, value: string, artifact?: string }[];
+}
+
+
+export function SubmissionPage() {
+ const {project} = useParams();
+ const [submission, setSubmission] = useState({
+ deadline: dayjs(),
+ projectName: "",
+ assignment: "",
+ filename: "",
+ restrictions: []
+ } as Submission);
+
+ const downloadArtifact = (artifact: string) => {
+ fetch(`/api/submissions/${project}/${artifact}`)
+ .then(res => res.blob())
+ .then(blob => {
+ const url = window.URL.createObjectURL(blob);
+ const a = document.createElement('a');
+ a.href = url;
+ a.download = artifact;
+ document.body.appendChild(a);
+ a.click();
+ a.remove();
+ });
+ }
+
+ const downloadSubmission = () => {
+ fetch(`/api/submissions/${project}`)
+ .then(res => res.blob())
+ .then(blob => {
+ const url = window.URL.createObjectURL(blob);
+ const a = document.createElement('a');
+ a.href = url;
+ a.download = project + "_submission.zip";
+ document.body.appendChild(a);
+ a.click();
+ a.remove();
+ });
+ }
+
+ //TODO: fetch submission data from backend
+ useEffect(() => {
+ // fetch(`/api/submissions/${project}`)
+ // .then(res => res.json())
+ // .then(data => setSubmission(data));
+ setSubmission({
+ deadline: dayjs(),
+ projectName: "project",
+ assignment: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Nullam vehicula ipsum a arcu cursus vitae congue mauris rhoncus. Pretium lectus quam id leo in vitae. A scelerisque purus semper eget. Porttitor leo a diam sollicitudin. Ornare massa eget egestas purus viverra accumsan in nisl nisi. Nunc lobortis mattis aliquam faucibus purus in. Orci dapibus ultrices in iaculis nunc sed. Morbi enim nunc faucibus a pellentesque sit amet. Quam quisque id diam vel quam elementum pulvinar. Quis commodo odio aenean sed adipiscing diam donec adipiscing tristique. Egestas maecenas pharetra convallis posuere morbi leo urna. At varius vel pharetra vel turpis nunc eget lorem. Eleifend donec pretium vulputate sapien. Sit amet cursus sit amet. Lectus quam id leo in. Neque vitae tempus quam pellentesque nec nam. Metus aliquam eleifend mi in nulla. Faucibus turpis in eu mi. Sed vulputate odio ut enim blandit volutpat.\n" +
+ "\n" +
+ "Quis varius quam quisque id diam vel quam elementum pulvinar. Viverra vitae congue eu consequat. Amet aliquam id diam maecenas ultricies mi eget mauris. Mi proin sed libero enim sed. Etiam tempor orci eu lobortis elementum nibh tellus molestie nunc. Orci a scelerisque purus semper eget. Magna fermentum iaculis eu non diam phasellus vestibulum lorem. Eu nisl nunc mi ipsum. Augue eget arcu dictum varius duis at consectetur lorem. Aenean vel elit scelerisque mauris pellentesque. Elit duis tristique sollicitudin nibh.\n" +
+ "\n" +
+ "Amet consectetur adipiscing elit ut aliquam. Amet aliquam id diam maecenas ultricies. Tellus in metus vulputate eu scelerisque felis imperdiet proin fermentum. Cursus euismod quis viverra nibh cras pulvinar mattis nunc sed. Bibendum est ultricies integer quis auctor elit sed vulputate mi. Quam elementum pulvinar etiam non quam lacus. At imperdiet dui accumsan sit amet nulla facilisi morbi. Accumsan sit amet nulla facilisi. Enim praesent elementum facilisis leo vel fringilla. Quisque id diam vel quam elementum. Tristique sollicitudin nibh sit amet commodo nulla facilisi nullam vehicula. Volutpat est velit egestas dui id ornare arcu odio ut. Tellus in metus vulputate eu scelerisque felis imperdiet proin fermentum. Velit ut tortor pretium viverra suspendisse.\n" +
+ "\n" +
+ "Purus viverra accumsan in nisl nisi scelerisque eu ultrices vitae. Volutpat commodo sed egestas egestas fringilla phasellus faucibus. Lorem sed risus ultricies tristique nulla aliquet enim. Donec ultrices tincidunt arcu non sodales neque sodales ut. Volutpat est velit egestas dui id. Egestas erat imperdiet sed euismod. Egestas pretium aenean pharetra magna. Nunc consequat interdum varius sit amet. Imperdiet dui accumsan sit amet nulla facilisi morbi tempus iaculis. Viverra mauris in aliquam sem fringilla ut morbi tincidunt. Vitae congue eu consequat ac felis donec et odio pellentesque. Volutpat odio facilisis mauris sit amet massa vitae. Tellus mauris a diam maecenas. Eget gravida cum sociis natoque penatibus et magnis dis parturient. Diam quis enim lobortis scelerisque. Ut venenatis tellus in metus vulputate. Et malesuada fames ac turpis. A cras semper auctor neque vitae tempus quam. Sed viverra tellus in hac. Mattis enim ut tellus elementum sagittis vitae et.\n" +
+ "\n" +
+ "Nunc lobortis mattis aliquam faucibus purus in massa tempor nec. Gravida dictum fusce ut placerat orci nulla pellentesque. Vel facilisis volutpat est velit egestas dui id ornare arcu. Et ligula ullamcorper malesuada proin libero nunc consequat. A arcu cursus vitae congue. Feugiat scelerisque varius morbi enim nunc faucibus a. Velit dignissim sodales ut eu sem. Vestibulum mattis ullamcorper velit sed. Volutpat commodo sed egestas egestas fringilla phasellus. Libero justo laoreet sit amet cursus sit amet. In est ante in nibh mauris cursus mattis molestie a. Euismod elementum nisi quis eleifend quam adipiscing vitae proin. Cursus in hac habitasse platea dictumst quisque sagittis purus.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Parturient montes nascetur ridiculus mus mauris vitae. Ornare aenean euismod elementum nisi quis eleifend quam adipiscing vitae. Enim praesent elementum facilisis leo vel fringilla est. Euismod quis viverra nibh cras. Enim ut tellus elementum sagittis. Nisl nisi scelerisque eu ultrices. A erat nam at lectus urna duis convallis. Viverra nam libero justo laoreet sit amet cursus sit. Id aliquet risus feugiat in ante. Amet commodo nulla facilisi nullam. Accumsan lacus vel facilisis volutpat est velit egestas. Nibh nisl condimentum id venenatis. Sagittis eu volutpat odio facilisis mauris. Et magnis dis parturient montes nascetur ridiculus mus mauris vitae. Aliquam nulla facilisi cras fermentum odio eu feugiat. Quis enim lobortis scelerisque fermentum dui faucibus in. At ultrices mi tempus imperdiet.\n" +
+ "\n" +
+ "Felis imperdiet proin fermentum leo vel. Luctus accumsan tortor posuere ac ut. Tellus cras adipiscing enim eu. Habitasse platea dictumst quisque sagittis purus sit amet volutpat consequat. Vulputate odio ut enim blandit volutpat maecenas volutpat blandit. Enim nec dui nunc mattis enim. Felis eget nunc lobortis mattis aliquam faucibus. Eget velit aliquet sagittis id consectetur purus ut faucibus. Eget egestas purus viverra accumsan in. Vel elit scelerisque mauris pellentesque pulvinar pellentesque habitant morbi tristique. Sit amet facilisis magna etiam. Consectetur libero id faucibus nisl tincidunt eget nullam non nisi. Aliquet eget sit amet tellus cras adipiscing. Justo eget magna fermentum iaculis. Volutpat maecenas volutpat blandit aliquam. Scelerisque purus semper eget duis at tellus. Morbi tempus iaculis urna id volutpat. Nec ultrices dui sapien eget mi proin sed. Nibh tellus molestie nunc non blandit massa enim nec dui.\n" +
+ "\n" +
+ "Dolor sed viverra ipsum nunc aliquet bibendum. Egestas sed tempus urna et pharetra pharetra massa massa ultricies. Ut sem nulla pharetra diam sit amet nisl suscipit. Magna eget est lorem ipsum dolor sit. Consequat interdum varius sit amet mattis. Senectus et netus et malesuada fames ac turpis. Justo eget magna fermentum iaculis eu non diam. Vel elit scelerisque mauris pellentesque pulvinar pellentesque habitant morbi. Venenatis lectus magna fringilla urna porttitor rhoncus dolor purus. Tempus imperdiet nulla malesuada pellentesque. Ornare quam viverra orci sagittis eu. Pellentesque nec nam aliquam sem. Semper viverra nam libero justo laoreet sit amet. A diam sollicitudin tempor id. Sed velit dignissim sodales ut eu sem integer vitae. Fermentum odio eu feugiat pretium nibh ipsum. Morbi tincidunt augue interdum velit euismod in pellentesque massa. Purus ut faucibus pulvinar elementum integer enim. Parturient montes nascetur ridiculus mus mauris vitae ultricies. Eu ultrices vitae auctor eu augue.\n" +
+ "\n" +
+ "Netus et malesuada fames ac turpis egestas sed tempus urna. Eget nunc scelerisque viverra mauris in aliquam. Feugiat nibh sed pulvinar proin gravida hendrerit lectus a. Sollicitudin aliquam ultrices sagittis orci. Eleifend mi in nulla posuere sollicitudin aliquam. Non diam phasellus vestibulum lorem sed. Quis auctor elit sed vulputate mi sit amet. Id nibh tortor id aliquet lectus. Et netus et malesuada fames ac turpis egestas. Viverra orci sagittis eu volutpat odio facilisis mauris. Neque viverra justo nec ultrices dui sapien eget. Ut tristique et egestas quis ipsum suspendisse ultrices gravida dictum. Consectetur a erat nam at lectus urna duis. Condimentum mattis pellentesque id nibh tortor id aliquet. Egestas fringilla phasellus faucibus scelerisque eleifend donec pretium vulputate. Nunc sed id semper risus. Vitae auctor eu augue ut lectus. Sociis natoque penatibus et magnis. Odio pellentesque diam volutpat commodo sed egestas egestas. Sit amet nulla facilisi morbi tempus iaculis urna id volutpat.\n" +
+ "\n" +
+ "Nunc lobortis mattis aliquam faucibus purus. Quis vel eros donec ac odio tempor orci. Tempus egestas sed sed risus pretium quam vulputate. In hac habitasse platea dictumst vestibulum rhoncus. Aliquam ultrices sagittis orci a scelerisque purus semper eget duis. Diam phasellus vestibulum lorem sed risus ultricies tristique. Tincidunt eget nullam non nisi est sit. Habitant morbi tristique senectus et netus et malesuada. Lorem dolor sed viverra ipsum nunc aliquet bibendum. Magna ac placerat vestibulum lectus mauris. Aliquet eget sit amet tellus cras adipiscing enim. A erat nam at lectus urna duis. Aenean vel elit scelerisque mauris pellentesque pulvinar pellentesque habitant. A diam maecenas sed enim ut sem viverra aliquet. Nunc mi ipsum faucibus vitae aliquet.\n" +
+ "\n" +
+ "Leo urna molestie at elementum eu. Arcu cursus vitae congue mauris rhoncus aenean vel. Amet massa vitae tortor condimentum lacinia. Ut tristique et egestas quis. Neque gravida in fermentum et sollicitudin ac. Molestie ac feugiat sed lectus vestibulum mattis ullamcorper. Non curabitur gravida arcu ac tortor dignissim convallis aenean. Aenean et tortor at risus viverra adipiscing. Amet commodo nulla facilisi nullam. Duis convallis convallis tellus id interdum velit laoreet id donec. Fames ac turpis egestas sed tempus urna et pharetra. Ac tincidunt vitae semper quis lectus nulla. Accumsan tortor posuere ac ut consequat semper viverra. Pretium fusce id velit ut tortor pretium viverra suspendisse potenti. Ultricies mi eget mauris pharetra et ultrices neque ornare aenean. Fames ac turpis egestas sed tempus urna.\n" +
+ "\n" +
+ "Elit ut aliquam purus sit amet. Placerat duis ultricies lacus sed turpis tincidunt id aliquet. Et malesuada fames ac turpis egestas integer. Ultrices dui sapien eget mi proin sed libero enim sed. Tristique nulla aliquet enim tortor at auctor urna. Scelerisque fermentum dui faucibus in ornare quam viverra orci sagittis. Ornare quam viverra orci sagittis. Diam in arcu cursus euismod quis. Amet mauris commodo quis imperdiet massa. Malesuada fames ac turpis egestas. At ultrices mi tempus imperdiet nulla malesuada pellentesque elit eget. Viverra orci sagittis eu volutpat odio facilisis mauris sit amet. Molestie at elementum eu facilisis sed odio. Turpis cursus in hac habitasse. Sodales ut etiam sit amet nisl purus in.\n" +
+ "\n" +
+ "Commodo odio aenean sed adipiscing diam donec adipiscing tristique risus. Nec sagittis aliquam malesuada bibendum arcu vitae elementum curabitur. Cras tincidunt lobortis feugiat vivamus at augue eget. Interdum posuere lorem ipsum dolor sit amet. Sit amet consectetur adipiscing elit pellentesque habitant morbi. Elementum eu facilisis sed odio morbi quis. Vestibulum mattis ullamcorper velit sed ullamcorper morbi tincidunt ornare. Suscipit tellus mauris a diam maecenas. Aliquam ut porttitor leo a diam sollicitudin tempor id eu. Proin fermentum leo vel orci porta non pulvinar neque laoreet.\n" +
+ "\n" +
+ "Risus nec feugiat in fermentum posuere urna nec. Quis lectus nulla at volutpat diam ut venenatis. Sed cras ornare arcu dui. Quis commodo odio aenean sed adipiscing diam donec adipiscing. Fermentum dui faucibus in ornare quam viverra orci sagittis. Pellentesque dignissim enim sit amet venenatis urna cursus eget nunc. Massa eget egestas purus viverra. Imperdiet proin fermentum leo vel. Habitant morbi tristique senectus et netus et malesuada fames ac. Amet cursus sit amet dictum sit amet justo. Viverra justo nec ultrices dui sapien eget mi. A arcu cursus vitae congue mauris rhoncus.\n" +
+ "\n" +
+ "Ipsum dolor sit amet consectetur adipiscing. Augue neque gravida in fermentum et sollicitudin ac orci. Urna duis convallis convallis tellus. Nunc sed blandit libero volutpat. Massa tincidunt nunc pulvinar sapien et ligula ullamcorper malesuada proin. Nunc id cursus metus aliquam eleifend mi in. Odio pellentesque diam volutpat commodo sed egestas egestas. Vitae congue mauris rhoncus aenean vel elit scelerisque mauris. Enim nulla aliquet porttitor lacus. Nibh nisl condimentum id venenatis. Neque convallis a cras semper auctor neque vitae tempus. Dictum sit amet justo donec. At varius vel pharetra vel. Nisl pretium fusce id velit ut tortor pretium viverra. Tincidunt lobortis feugiat vivamus at augue eget arcu. Cras semper auctor neque vitae. Maecenas accumsan lacus vel facilisis volutpat est. Vulputate odio ut enim blandit. Sed turpis tincidunt id aliquet risus. Egestas purus viverra accumsan in nisl nisi.",
+ filename: "filename",
+ restrictions: [{name: "filetype", value: ".pdf, .zip",}, {
+ name: "docker tests",
+ value: "filename",
+ artifact: "filename"
+ }, {name: "max file size", value: "10MB"}, {name: "min file size", value: "1MB"}]
+ });
+ }, [project]);
+
+
+ return (
+ <>
+
+
+
+
+ Deadline:
+ {submission.deadline.format("DD/MM/YYYY")}
+
+
+
+ {t("assignment")}
+
+
+ {submission.assignment}
+
+
+
+
+ {t("filename")}
+
+
+
+
+ {t("restrictions")}
+
+
+ {
+ submission.restrictions.map((restriction, index) => {
+ return (
+ <>
+
+ {restriction.name}
+ {restriction.artifact &&
+ }
+ {restriction.value}
+
+
+ >
+ );
+ })
+ }
+
+
+
+
+
+ >
+ );
+}
\ No newline at end of file