Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General: Add missing details to course detail view in course management #7397

Merged
merged 10 commits into from
Oct 23, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ <h2><span jhiTranslate="artemisApp.course.detail.title">Course Details:</span></
<dd id="course-short-name">
<span>{{ course.shortName }}</span>
</dd>
<dt><span>Organizations</span></dt>
milljoniaer marked this conversation as resolved.
Show resolved Hide resolved
milljoniaer marked this conversation as resolved.
Show resolved Hide resolved
<dd id="course-organisations">
<span *ngFor="let organization of course.organizations" class="badge bg-primary font-weight-normal m-1 ps-3">{{ organization.name }}</span>
</dd>
<!--
For users which are at least instructor we show the group name including a link to the course user group management,
where new users can be added to the group, since they have the permission to add/remove users to/from the group
Expand Down Expand Up @@ -110,6 +114,14 @@ <h2><span jhiTranslate="artemisApp.course.detail.title">Course Details:</span></
</dd>
</div>
</ng-template>
<dt><span jhiTranslate="artemisApp.course.maxPoints.title">Max. Number of Points</span></dt>
<dd>
<span>{{ course.maxPoints }}</span>
</dd>
<dt><span jhiTranslate="artemisApp.course.accuracyOfScores">Amount of decimal places used for calculating the scores</span></dt>
milljoniaer marked this conversation as resolved.
Show resolved Hide resolved
<dd>
<span>{{ course.accuracyOfScores }}</span>
</dd>
<dt><span jhiTranslate="artemisApp.course.startDate">Start Date</span></dt>
<dd id="course-start-date">
<span>{{ course.startDate | artemisDate }}</span>
Expand Down Expand Up @@ -145,28 +157,28 @@ <h2><span jhiTranslate="artemisApp.course.detail.title">Course Details:</span></
<a [routerLink]="['/course-management', course?.id, 'lti-configuration']">LTI Configuration</a>
</dd>
</ng-container>
<dt><span jhiTranslate="artemisApp.course.registrationEnabled.title">Student Course Registration Enabled</span></dt>
<dd id="course-enrollment-enabled">
<span *ngIf="course.enrollmentEnabled">{{ 'global.generic.yes' | artemisTranslate }}</span>
<span *ngIf="!course.enrollmentEnabled">{{ 'global.generic.no' | artemisTranslate }}</span>
</dd>
<dt *ngIf="course.enrollmentEnabled"><span jhiTranslate="artemisApp.course.enrollmentStartDate">Enrollment Start</span></dt>
<dd *ngIf="course.enrollmentEnabled" id="course-enrollment-start-date">
<span>{{ course.enrollmentStartDate | artemisDate }}</span>
</dd>
<dt *ngIf="course.enrollmentEnabled"><span jhiTranslate="artemisApp.course.enrollmentEndDate">Enrollment End</span></dt>
<dd *ngIf="course.enrollmentEnabled" id="course-enrollment-end-date">
<span>{{ course.enrollmentEndDate | artemisDate }}</span>
</dd>
<dt><span jhiTranslate="artemisApp.course.unenrollmentEnabled.title">Student Course Unenrollment Enabled</span></dt>
<dd *ngIf="course.enrollmentEnabled" id="course-unenrollment-enabled">
<span *ngIf="course.unenrollmentEnabled">{{ 'global.generic.yes' | artemisTranslate }}</span>
<span *ngIf="!course.unenrollmentEnabled">{{ 'global.generic.no' | artemisTranslate }}</span>
</dd>
<dt *ngIf="course.unenrollmentEnabled"><span jhiTranslate="artemisApp.course.unenrollmentEndDate">Latest date to unenroll</span></dt>
<dd *ngIf="course.unenrollmentEnabled" id="course-unenrollment-end-date">
<span>{{ course.unenrollmentEndDate | artemisDate }}</span>
</dd>
<ng-container *ngIf="course.enrollmentEnabled">
<dt><span jhiTranslate="artemisApp.course.enrollmentStartDate">Enrollment Start</span></dt>
<dd id="course-enrollment-start-date">
<span>{{ course.enrollmentStartDate | artemisDate }}</span>
</dd>
<dt><span jhiTranslate="artemisApp.course.enrollmentEndDate">Enrollment End</span></dt>
<dd id="course-enrollment-end-date">
<span>{{ course.enrollmentEndDate | artemisDate }}</span>
</dd>
<dt><span jhiTranslate="artemisApp.course.registrationConfirmationMessage">Registration Confirmation Message</span></dt>
<dd
id="course-enrollment-confirmation"
class="markdown-preview editor-outline-background"
[innerHTML]="course.enrollmentConfirmationMessage | htmlForMarkdown"
></dd>
</ng-container>
<ng-container *ngIf="course.unenrollmentEnabled">
<dt><span jhiTranslate="artemisApp.course.unenrollmentEndDate">Latest date to unenroll</span></dt>
<dd id="course-unenrollment-end-date">
<span>{{ course.unenrollmentEndDate | artemisDate }}</span>
</dd>
</ng-container>
<ng-container [jhiFeatureToggleLink]="FeatureToggle.TutorialGroups">
<dt>
<span>{{ 'artemisApp.forms.configurationForm.timeZoneInput.label' | artemisTranslate }} </span>
Expand Down Expand Up @@ -204,6 +216,32 @@ <h2><span jhiTranslate="artemisApp.course.detail.title">Course Details:</span></
<span>{{ course.maxRequestMoreFeedbackTimeDays }}</span>
</dd>
</ng-container>
<dt><span jhiTranslate="artemisApp.course.maxComplaintTextLimit.title">Maximum number of characters per complaint</span></dt>
<dd id="course-max-complaint-text-limit">
<span>{{ course.maxComplaintResponseTextLimit }}</span>
</dd>
<dt><span jhiTranslate="artemisApp.course.maxComplaintResponseTextLimit.title">Maximum number of characters per complaint response</span></dt>
<dd id="course-max-complaint-response-text-limit">
<span>{{ course.maxComplaintResponseTextLimit }}</span>
</dd>
milljoniaer marked this conversation as resolved.
Show resolved Hide resolved
<dt><span jhiTranslate="artemisApp.course.courseCommunicationSetting.communicationEnabled.label">Communication Enabled</span></dt>
<dd id="course-communication-enabled">
<span *ngIf="this.communicationEnabled">{{ 'global.generic.yes' | artemisTranslate }}</span>
<span *ngIf="!this.communicationEnabled">{{ 'global.generic.no' | artemisTranslate }}</span>
</dd>
<dt><span jhiTranslate="artemisApp.course.courseCommunicationSetting.messagingEnabled.label">Messaging Enabled</span></dt>
<dd id="course-messaging-enabled">
<span *ngIf="this.messagingEnabled">{{ 'global.generic.yes' | artemisTranslate }}</span>
<span *ngIf="!this.messagingEnabled">{{ 'global.generic.no' | artemisTranslate }}</span>
</dd>
<ng-container *ngIf="this.messagingEnabled">
<dt><span jhiTranslate="artemisApp.course.courseCommunicationSetting.messagingEnabled.codeOfConduct">Messaging Code of Conduct</span></dt>
<dd
id="course-code-of-conduct"
class="markdown-preview editor-outline-background"
[innerHTML]="course.courseInformationSharingMessagingCodeOfConduct | htmlForMarkdown"
></dd>
</ng-container>
</dl>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { AlertService } from 'app/core/util/alert.service';
import { EventManager } from 'app/core/util/event-manager.service';
import { faChartBar, faClipboard, faEye, faFlag, faListAlt, faTable, faTimes, faWrench } from '@fortawesome/free-solid-svg-icons';
import { FeatureToggle } from 'app/shared/feature-toggle/feature-toggle.service';
import { OrganizationManagementService } from 'app/admin/organization-management/organization-management.service';

export enum DoughnutChartType {
ASSESSMENT = 'ASSESSMENT',
Expand All @@ -36,6 +37,9 @@ export class CourseDetailComponent implements OnInit, OnDestroy {
activeStudents?: number[];
course: Course;

messagingEnabled: boolean;
communicationEnabled: boolean;

ltiEnabled = false;

private eventSubscriber: Subscription;
Expand All @@ -54,6 +58,7 @@ export class CourseDetailComponent implements OnInit, OnDestroy {
constructor(
private eventManager: EventManager,
private courseManagementService: CourseManagementService,
private organizationService: OrganizationManagementService,
private route: ActivatedRoute,
private alertService: AlertService,
private profileService: ProfileService,
Expand All @@ -69,6 +74,8 @@ export class CourseDetailComponent implements OnInit, OnDestroy {
this.route.data.subscribe(({ course }) => {
if (course) {
this.course = course;
this.messagingEnabled = !!this.course.courseInformationSharingConfiguration?.includes('MESSAGING');
this.communicationEnabled = !!this.course.courseInformationSharingConfiguration?.includes('COMMUNICATION');
}
});
// There is no course 0 -> will fetch no course if route does not provide different courseId
Expand All @@ -78,6 +85,7 @@ export class CourseDetailComponent implements OnInit, OnDestroy {
});
this.fetchCourseStatistics(courseId);
this.registerChangeInCourses(courseId);
this.fetchOrganizations(courseId);
}

/**
Expand Down Expand Up @@ -114,4 +122,10 @@ export class CourseDetailComponent implements OnInit, OnDestroy {
error: (error: HttpErrorResponse) => onError(this.alertService, error),
});
}

private fetchOrganizations(courseId: number) {
this.organizationService.getOrganizationsByCourse(courseId).subscribe((organizations) => {
this.course.organizations = organizations;
});
}
}
3 changes: 2 additions & 1 deletion src/main/webapp/i18n/de/course.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
},
"messagingEnabled": {
"label": "Nachrichten aktiviert",
"tooltip": "Ermöglicht den Nachrichtenaustausch zwischen Nutzer:innen in privaten oder öffentlichen Kanälen, Gruppenchats oder Direktnachrichten. Kanäle können nur von Lehrenden und Tutor:innen erstellt werden. Nutzer:innen können selbst öffentlichen Kanälen beitreten und müssen zu privaten Kanälen hinzugefügt werden. Alle Nutzer:innen können einen privaten Gruppenchat starten und andere Nutzer:innen hinzufügen. Ein Gruppenchat ist auf zehn Mitglieder:innen begrenzt. Alle Nutzer:innen können Direktnachrichten an andere Nutzer:innen senden. Die Chats finden im Nachrichtenbereich des Kurses statt."
"tooltip": "Ermöglicht den Nachrichtenaustausch zwischen Nutzer:innen in privaten oder öffentlichen Kanälen, Gruppenchats oder Direktnachrichten. Kanäle können nur von Lehrenden und Tutor:innen erstellt werden. Nutzer:innen können selbst öffentlichen Kanälen beitreten und müssen zu privaten Kanälen hinzugefügt werden. Alle Nutzer:innen können einen privaten Gruppenchat starten und andere Nutzer:innen hinzufügen. Ein Gruppenchat ist auf zehn Mitglieder:innen begrenzt. Alle Nutzer:innen können Direktnachrichten an andere Nutzer:innen senden. Die Chats finden im Nachrichtenbereich des Kurses statt.",
"codeOfConduct": "Nachrichten: Code of Conduct"
}
},
"registrationEnabled": {
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/i18n/en/course.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
},
"messagingEnabled": {
"label": "Messaging Enabled",
"tooltip": "Enables messaging between course users in private or public channels, group chats or direct messages. Channels can only be created by instructors and tutors. Users can self-join public channels and must be invited to private channels. Every user can start a private group chat and add other users. A group chat is limited to 10 members. Every user can start a private one-to-one chat with another user. The chats happens in the messaging space of the course."
"tooltip": "Enables messaging between course users in private or public channels, group chats or direct messages. Channels can only be created by instructors and tutors. Users can self-join public channels and must be invited to private channels. Every user can start a private group chat and add other users. A group chat is limited to 10 members. Every user can start a private one-to-one chat with another user. The chats happens in the messaging space of the course.",
b-fein marked this conversation as resolved.
Show resolved Hide resolved
"codeOfConduct": "Messaging Code of Conduct"
}
},
"registrationEnabled": {
Expand Down
Loading