Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #392 from SELab-2/cant_make_project_for_archived_c…
Browse files Browse the repository at this point in the history
…ourse

cant make project for archived course
  • Loading branch information
EmmaVandewalle authored May 23, 2024
2 parents 3bbe1fc + fdee646 commit c3c78d5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frontend/src/components/ProjectTeacherComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {useNavigate} from "react-router-dom";
import {project_create_group, update_project} from "../utils/api/Project.ts";
import {getScrollbarWidth} from "../utils/ScrollBarWidth.ts";
import Switch from "react-switch";
import { MdRestore } from "react-icons/md";
import {MdRestore} from "react-icons/md";

export function ProjectTeacherComponent(props: {
project: ProjectTeacher,
Expand Down Expand Up @@ -95,10 +95,10 @@ export function ProjectTeacherComponent(props: {
}
};

const course_options = props.project.all_courses.map(course => course.course_name);
const course_options = props.project.all_courses.filter(course => !course.course_archived).map(course => course.course_name);

const hours_array = Array.from({length: 24}, (_, index) => index.toString().padStart(2, '0'));
const minutes_array = Array.from({length: 60}, (_, index) => index.toString().padStart(2, '0'));
const hours_array = Array.from({length: 24}, (_, index) => index.toString());
const minutes_array = Array.from({length: 60}, (_, index) => index.toString());

// SimpleTests
const [requiredFilesHasChanged, setRequiredFilesHasChanged] = useState(false);
Expand Down Expand Up @@ -373,12 +373,12 @@ export function ProjectTeacherComponent(props: {
<FaEraser/>
</button>
</span>
}
}
{initialValues.value10 !== "" && initialValues.value10 !== dockerString &&
<span>
<button className="download-button button is-small is-light"
onClick={handleRestoreDocker}>
<MdRestore />
<MdRestore/>
</button>
</span>
}
Expand Down

0 comments on commit c3c78d5

Please sign in to comment.