();
+ readonly importRelations = computed(() => this.importSettings().importRelations);
+ readonly importExercises = computed(() => this.importSettings().importExercises);
+ readonly importLectures = computed(() => this.importSettings().importLectures);
+ readonly referenceDate = computed(() => this.importSettings().referenceDate);
+ readonly isReleaseDate = computed(() => this.importSettings().isReleaseDate);
+
+ protected toggleImportSetting(setting: keyof CourseCompetencyImportSettings): void {
+ this.importSettings.update((settings) => ({
+ ...settings,
+ [setting]: !settings[setting],
+ }));
+ }
+
+ public setReferenceDate(dateEvent?: HTMLInputElement): void {
+ this.importSettings.update((settings) => ({
+ ...settings,
+ referenceDate: dateEvent ? new Date(dateEvent.value) : undefined,
+ isReleaseDate: dateEvent ? (settings.referenceDate ? settings.isReleaseDate : true) : undefined,
+ }));
+ }
+
+ protected setReferenceDateType(event: Event): void {
+ const target = event.target as HTMLInputElement;
+ this.importSettings.update((settings) => ({
+ ...settings,
+ isReleaseDate: JSON.parse(target.value),
+ }));
+ }
+}
diff --git a/src/main/webapp/app/course/competencies/forms/common-course-competency-form.component.html b/src/main/webapp/app/course/competencies/forms/common-course-competency-form.component.html
index c27066b26924..77a39956b91c 100644
--- a/src/main/webapp/app/course/competencies/forms/common-course-competency-form.component.html
+++ b/src/main/webapp/app/course/competencies/forms/common-course-competency-form.component.html
@@ -73,7 +73,7 @@
({{ 'artemisApp.courseCompetency.create.averageMastery' | artemisTranslate }}: {{ averageStudentScore }}%)
}
-
+
}