diff --git a/src/main/webapp/app/course/manage/course-update.component.html b/src/main/webapp/app/course/manage/course-update.component.html
index e993e20a9ac6..a7b73fe7a72a 100644
--- a/src/main/webapp/app/course/manage/course-update.component.html
+++ b/src/main/webapp/app/course/manage/course-update.component.html
@@ -339,7 +339,7 @@
ngbTooltip="{{ 'artemisApp.course.courseCommunicationSetting.messagingEnabled.tooltip' | artemisTranslate }}"
/>
- @if (messagingEnabled) {
+ @if (messagingEnabled || communicationEnabled) {
diff --git a/src/test/javascript/spec/component/course/course-update.component.spec.ts b/src/test/javascript/spec/component/course/course-update.component.spec.ts
index b919ecdd60c7..be63776c0a42 100644
--- a/src/test/javascript/spec/component/course/course-update.component.spec.ts
+++ b/src/test/javascript/spec/component/course/course-update.component.spec.ts
@@ -400,6 +400,19 @@ describe('Course Management Update Component', () => {
comp.updateCourseInformationSharingMessagingCodeOfConduct('# Code of Conduct');
expect(comp.courseForm.controls['courseInformationSharingMessagingCodeOfConduct'].value).toBe('# Code of Conduct');
});
+
+ it('should update course information sharing code of conduct when communication is enabled and messaging disabled', () => {
+ comp.communicationEnabled = true;
+ comp.messagingEnabled = false;
+ comp.course = new Course();
+ comp.courseForm = new FormGroup({
+ courseInformationSharingMessagingCodeOfConduct: new FormControl(),
+ });
+ comp.updateCourseInformationSharingMessagingCodeOfConduct('# Code of Conduct');
+ expect(comp.courseForm.controls['courseInformationSharingMessagingCodeOfConduct'].value).toBe('# Code of Conduct');
+ // Verify the form control is editable
+ expect(comp.courseForm.controls['courseInformationSharingMessagingCodeOfConduct'].enabled).toBeTrue();
+ });
});
describe('changeComplaintsEnabled', () => {