Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/development' into course-join-link
Browse files Browse the repository at this point in the history
  • Loading branch information
BramMeir committed May 1, 2024
2 parents 4df45e0 + d3800a3 commit 92ea064
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 11 deletions.
Binary file not shown.
5 changes: 4 additions & 1 deletion frontend/src/assets/lang/app/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@
"scoreVisibility": "Make score, when uploaded, automatically visible to students",
"dockerUpload": "Upload a Dockerfile",
"submissionStructure": "Structure of how a submission should be made",
"noStudents": "No students in this group"
"noStudents": "No students in this group",
"locked": "Closed",
"unlocked": "Open"
},
"submissions": {
"title": "Submissions",
Expand All @@ -97,6 +99,7 @@
"clone": "Clone course",
"cloneAssistants": "Clone assistants:",
"cloneTeachers": "Clone teachers:",
"cloneCourse": "Clone teachers:",
"name": "Course name",
"description": "Description",
"excerpt": "Short description",
Expand Down
13 changes: 6 additions & 7 deletions frontend/src/components/courses/CourseGeneralList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,12 @@ watch(user, loadCourses, { immediate: true });
<template v-else>
<div class="w-30rem text-center mx-auto">
<span class="pi pi-exclamation-circle text-6xl text-primary" />
<p>{{ t('components.list.noCourses') }}</p>
<RouterLink :to="{ name: 'courses' }" v-if="user?.isStudent()">
<Button :label="t('components.button.searchCourse')" icon="pi pi-search" />
</RouterLink>
<RouterLink :to="{ name: 'course-create' }" v-else>
<Button :label="t('components.button.createCourse')" icon="pi pi-plus" />
</RouterLink>
<slot name="empty">
<p>{{ t('components.list.noCourses') }}</p>
<RouterLink :to="{ name: 'courses' }">
<Button :label="t('components.button.searchCourse')" icon="pi pi-search" />
</RouterLink>
</slot>
</div>
</template>
</template>
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/components/projects/ProjectInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ const { t } = useI18n();

<template>
<div class="flex align-items-center flex-wrap gap-3 surface-50 p-3">
<span class="flex align-items-center">
<template v-if="project.isLocked()">
<i class="pi pi-lock mr-2" />
{{ t('views.projects.locked') }}
</template>
<template v-else>
<i class="pi pi-unlock mr-2" />
{{ t('views.projects.unlocked') }}
</template>
</span>
<span class="flex align-items-center">
<i class="pi pi-play mr-2" />
{{ project.getFormattedStartDate() }}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/types/Project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class Project {
* @returns True if the project is locked, false otherwise.
*/
public isLocked(): boolean {
return !this.visible || this.archived || this.locked_groups || moment(this.start_date).isAfter();
return !this.visible || this.archived || this.locked_groups || moment(this.start_date).isBefore();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ watch(message, () => {
}
// Add the message to the toast.
add({ ...message.value, life: 5000000 });
add({ ...message.value, life: 4000 });
}
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/courses/roles/TeacherCourseView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import ProjectList from '@/components/projects/ProjectList.vue';
import TeacherAssistantList from '@/components/teachers_assistants/TeacherAssistantList.vue';
import ProjectCreateButton from '@/components/projects/ProjectCreateButton.vue';
import TeacherAssistantUpdateButton from '@/components/teachers_assistants/TeacherAssistantUpdateButton.vue';
import ShareCourseButton from '@/components/courses/ShareCourseButton.vue';
import Button from 'primevue/button';
import ButtonGroup from 'primevue/buttongroup';
import InputSwitch from 'primevue/inputswitch';
Expand All @@ -16,7 +17,6 @@ import { PrimeIcons } from 'primevue/api';
import { useCourses } from '@/composables/services/course.service';
import { useProject } from '@/composables/services/project.service.ts';
import { computed, ref, watch } from 'vue';
import ShareCourseButton from '@/components/courses/ShareCourseButton.vue';
/* Props */
const props = defineProps<{
Expand Down

0 comments on commit 92ea064

Please sign in to comment.