From 940237b5bd05010ff630a14b88b13e61d3901465 Mon Sep 17 00:00:00 2001 From: "Felix T.J. Dietrich" Date: Tue, 18 Jun 2024 21:11:45 +0200 Subject: [PATCH 1/8] Learning analytics: Improve usability of student course dashboard (#8813) --- jest.config.js | 2 +- .../metrics/LectureUnitMetricsRepository.java | 2 +- .../metrics/LectureUnitInformationDTO.java | 13 ++-- .../competency-accordion.component.html | 44 +++++++------ .../competency-accordion.component.ts | 14 ++-- ...udgement-of-learning-rating.component.html | 9 ++- .../judgement-of-learning-rating.component.ts | 3 +- .../webapp/app/entities/competency.model.ts | 5 ++ .../app/entities/student-metrics.model.ts | 9 +-- .../course-dashboard.component.ts | 64 +++++++++++++------ .../i18n/de/courseStudentDashboard.json | 7 +- .../i18n/de/studentAnalyticsDashboard.json | 4 +- .../i18n/en/courseStudentDashboard.json | 5 +- .../i18n/en/studentAnalyticsDashboard.json | 4 +- 14 files changed, 115 insertions(+), 70 deletions(-) diff --git a/jest.config.js b/jest.config.js index ec7fe17ed5c3..931347fc9291 100644 --- a/jest.config.js +++ b/jest.config.js @@ -102,7 +102,7 @@ module.exports = { global: { // TODO: in the future, the following values should increase to at least 90% statements: 86.80, - branches: 73.21, + branches: 73.18, functions: 81.21, lines: 86.89, }, diff --git a/src/main/java/de/tum/in/www1/artemis/repository/metrics/LectureUnitMetricsRepository.java b/src/main/java/de/tum/in/www1/artemis/repository/metrics/LectureUnitMetricsRepository.java index 8a5c3cc5ce93..04da4e4e905e 100644 --- a/src/main/java/de/tum/in/www1/artemis/repository/metrics/LectureUnitMetricsRepository.java +++ b/src/main/java/de/tum/in/www1/artemis/repository/metrics/LectureUnitMetricsRepository.java @@ -27,7 +27,7 @@ public interface LectureUnitMetricsRepository extends JpaRepository type) { +public record LectureUnitInformationDTO(long id, long lectureId, String lectureTitle, String name, ZonedDateTime releaseDate, Class type) { } diff --git a/src/main/webapp/app/course/competencies/competency-accordion/competency-accordion.component.html b/src/main/webapp/app/course/competencies/competency-accordion/competency-accordion.component.html index d1b997bd2c08..7cf8f7c2feb6 100644 --- a/src/main/webapp/app/course/competencies/competency-accordion/competency-accordion.component.html +++ b/src/main/webapp/app/course/competencies/competency-accordion/competency-accordion.component.html @@ -33,7 +33,7 @@

} @if (lectureUnitsProgress !== undefined) {
- +
+ @if (promptForRating) { +
+ +
+ } @if (course && (nextLectureUnits.length > 0 || nextExercises.length > 0)) { -
+
+ } + @if (course && nextExercises.length > 0) { + @for (exercise of nextExercises; track exercise) { + + } } @if (course && nextLectureUnits.length > 0) { @for (lectureUnit of nextLectureUnits; track lectureUnit) {
- + + {{ lectureUnit.lectureTitle }} + - {{ lectureUnit.name }}
} } - @if (course && nextExercises.length > 0) { - @for (exercise of nextExercises; track exercise) { - - } - } - @if (promptForRating) { -
- -
- } @@ -131,7 +131,7 @@

[disabled]="!(exercise?.isAtLeastInstructor || isAssessor) || saveBusy || submitBusy || cancelBusy" > @if (cancelBusy) { - + } @@ -145,7 +145,7 @@

[ngbTooltip]="('artemisApp.assessment.button.control' | artemisTranslate) + ' + Enter'" > @if (submitBusy) { - + } @@ -153,7 +153,7 @@

@if (result?.completionDate && exercise?.isAtLeastInstructor && (exercise!.type === ExerciseType.MODELING || exercise!.type === ExerciseType.TEXT)) { @@ -170,7 +170,7 @@

[ngbTooltip]="nextSubmissionShortcut" > @if (nextSubmissionBusy) { - + } diff --git a/src/main/webapp/app/assessment/assessment-locks/assessment-locks.component.html b/src/main/webapp/app/assessment/assessment-locks/assessment-locks.component.html index 6eb08480c1c6..3ddb1452b3b9 100644 --- a/src/main/webapp/app/assessment/assessment-locks/assessment-locks.component.html +++ b/src/main/webapp/app/assessment/assessment-locks/assessment-locks.component.html @@ -54,7 +54,7 @@

submission.participation!.id!, 'submissions', submission.id!, - 'assessment' + 'assessment', ]" class="btn btn-outline-secondary btn-sm mb-1" > @@ -70,7 +70,7 @@

submission.participation!.exercise!.id!, 'submissions', submission.id, - 'assessment' + 'assessment', ]" class="btn btn-outline-secondary btn-sm mb-1" > diff --git a/src/main/webapp/app/assessment/assessment-locks/assessment-locks.component.ts b/src/main/webapp/app/assessment/assessment-locks/assessment-locks.component.ts index 5a1c95837a97..78b63339c2ad 100644 --- a/src/main/webapp/app/assessment/assessment-locks/assessment-locks.component.ts +++ b/src/main/webapp/app/assessment/assessment-locks/assessment-locks.component.ts @@ -1,6 +1,5 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { Location } from '@angular/common'; import { FileUploadAssessmentService } from 'app/exercises/file-upload/assess/file-upload-assessment.service'; import { TranslateService } from '@ngx-translate/core'; import { Submission, SubmissionExerciseType } from 'app/entities/submission.model'; @@ -21,8 +20,6 @@ import { combineLatest } from 'rxjs'; templateUrl: './assessment-locks.component.html', }) export class AssessmentLocksComponent implements OnInit { - PROGRAMMING_EXERCISE = ExerciseType.PROGRAMMING; - readonly ExerciseType = ExerciseType; course: Course; @@ -51,7 +48,6 @@ export class AssessmentLocksComponent implements OnInit { private fileUploadAssessmentService: FileUploadAssessmentService, private programmingAssessmentService: ProgrammingAssessmentManualResultService, translateService: TranslateService, - private location: Location, private courseService: CourseManagementService, private examManagementService: ExamManagementService, ) { diff --git a/src/main/webapp/app/core/core.module.ts b/src/main/webapp/app/core/core.module.ts index 14a8868b9b36..542e96746e44 100644 --- a/src/main/webapp/app/core/core.module.ts +++ b/src/main/webapp/app/core/core.module.ts @@ -1,12 +1,12 @@ import { APP_INITIALIZER, ErrorHandler, LOCALE_ID, NgModule } from '@angular/core'; import { DatePipe, registerLocaleData } from '@angular/common'; -import { HTTP_INTERCEPTORS, HttpClient, HttpClientModule } from '@angular/common/http'; +import { HTTP_INTERCEPTORS, HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; import { Title } from '@angular/platform-browser'; import { AuthExpiredInterceptor } from 'app/core/interceptor/auth-expired.interceptor'; import { ErrorHandlerInterceptor } from 'app/core/interceptor/errorhandler.interceptor'; import { NotificationInterceptor } from 'app/core/interceptor/notification.interceptor'; import { NgbDateAdapter, NgbDatepickerConfig, NgbTooltipConfig } from '@ng-bootstrap/ng-bootstrap'; -import { NgxWebstorageModule, SessionStorageService } from 'ngx-webstorage'; +import { SessionStorageService, provideNgxWebstorage, withLocalStorage, withNgxWebstorageConfig, withSessionStorage } from 'ngx-webstorage'; import locale from '@angular/common/locales/en'; import { MissingTranslationHandler, TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core'; import { SentryErrorHandler } from 'app/core/sentry/sentry.error-handler'; @@ -23,8 +23,6 @@ import { Router } from '@angular/router'; @NgModule({ imports: [ - HttpClientModule, - NgxWebstorageModule.forRoot({ prefix: 'jhi', separator: '-' }), TranslateModule.forRoot({ loader: { provide: TranslateLoader, @@ -38,6 +36,8 @@ import { Router } from '@angular/router'; }), ], providers: [ + provideHttpClient(withInterceptorsFromDi()), + provideNgxWebstorage(withNgxWebstorageConfig({ prefix: 'jhi', separator: '-' }), withLocalStorage(), withSessionStorage()), Title, { provide: LOCALE_ID, diff --git a/src/main/webapp/app/core/legal/data-export/confirmation/data-export-confirmation-dialog.component.html b/src/main/webapp/app/core/legal/data-export/confirmation/data-export-confirmation-dialog.component.html index 44e09435e4bf..0c25f8d340e8 100644 --- a/src/main/webapp/app/core/legal/data-export/confirmation/data-export-confirmation-dialog.component.html +++ b/src/main/webapp/app/core/legal/data-export/confirmation/data-export-confirmation-dialog.component.html @@ -49,7 +49,7 @@

@if (!exportReady) {   Loading the results of all students... diff --git a/src/main/webapp/app/course/dashboards/assessment-dashboard/assessment-dashboard.component.html b/src/main/webapp/app/course/dashboards/assessment-dashboard/assessment-dashboard.component.html index c06b43f2044c..26e89bbfb6f5 100644 --- a/src/main/webapp/app/course/dashboards/assessment-dashboard/assessment-dashboard.component.html +++ b/src/main/webapp/app/course/dashboards/assessment-dashboard/assessment-dashboard.component.html @@ -255,7 +255,7 @@

{{ 'artemisApp.assessmentDashboard.tutorPerformanceIssues.title' | artemisTr tutorName: issue.tutorName, numberOfTutorItems: issue.numberOfTutorItems, averageTutorValue: issue.averageTutorValue.toFixed(1), - threshold: issue.allowedRange.lowerBound.toFixed(1) + threshold: issue.allowedRange.lowerBound.toFixed(1), } }} @@ -269,7 +269,7 @@

{{ 'artemisApp.assessmentDashboard.tutorPerformanceIssues.title' | artemisTr tutorName: issue.tutorName, numberOfTutorItems: issue.numberOfTutorItems, averageTutorValue: issue.averageTutorValue.toFixed(1), - threshold: issue.allowedRange.upperBound.toFixed(1) + threshold: issue.allowedRange.upperBound.toFixed(1), } }} diff --git a/src/main/webapp/app/course/manage/course-management-exercises.component.html b/src/main/webapp/app/course/manage/course-management-exercises.component.html index 9122af2f1c1b..603b9c3c3c6e 100644 --- a/src/main/webapp/app/course/manage/course-management-exercises.component.html +++ b/src/main/webapp/app/course/manage/course-management-exercises.component.html @@ -44,7 +44,7 @@

course: course, programmingExerciseCountCallback: setProgrammingExerciseCount.bind(this), exerciseFilter: exerciseFilter, - filteredProgrammingExercisesCountCallback: setFilteredProgrammingExerciseCount.bind(this) + filteredProgrammingExercisesCountCallback: setFilteredProgrammingExerciseCount.bind(this), } " [embedded]="true" diff --git a/src/main/webapp/app/course/manage/detail/course-detail-doughnut-chart.component.html b/src/main/webapp/app/course/manage/detail/course-detail-doughnut-chart.component.html index 341fb2a1e1fc..fa11b3dc4448 100644 --- a/src/main/webapp/app/course/manage/detail/course-detail-doughnut-chart.component.html +++ b/src/main/webapp/app/course/manage/detail/course-detail-doughnut-chart.component.html @@ -17,7 +17,7 @@

{{ 'artemisApp.course.detail.' + doughnutChartTitle + 'T } @if (!receivedStats) {
- +
} diff --git a/src/main/webapp/app/course/manage/detail/course-detail-line-chart.component.html b/src/main/webapp/app/course/manage/detail/course-detail-line-chart.component.html index 5f195e3966db..b499fda9b56b 100644 --- a/src/main/webapp/app/course/manage/detail/course-detail-line-chart.component.html +++ b/src/main/webapp/app/course/manage/detail/course-detail-line-chart.component.html @@ -77,7 +77,7 @@
{{ 'artemisApp.courseStatistics.activeStudents' | artemisTranslate }}
} @else {

- +

} diff --git a/src/main/webapp/app/course/manage/overview/course-management-card.component.html b/src/main/webapp/app/course/manage/overview/course-management-card.component.html index 65ce0966261f..65a3cba0dfda 100644 --- a/src/main/webapp/app/course/manage/overview/course-management-card.component.html +++ b/src/main/webapp/app/course/manage/overview/course-management-card.component.html @@ -107,7 +107,7 @@

{{ course.title }} ({{
@if (!courseWithExercises) {
- +
} @if (courseWithExercises) { @@ -224,7 +224,7 @@

{{ 'artemisApp.course.noExer } @if (!courseStatistics) {
- +
}

diff --git a/src/main/webapp/app/course/plagiarism-cases/student-view/detail-view/plagiarism-case-student-detail-view.component.html b/src/main/webapp/app/course/plagiarism-cases/student-view/detail-view/plagiarism-case-student-detail-view.component.html index 213513dca6ea..e33f0dfcc537 100644 --- a/src/main/webapp/app/course/plagiarism-cases/student-view/detail-view/plagiarism-case-student-detail-view.component.html +++ b/src/main/webapp/app/course/plagiarism-cases/student-view/detail-view/plagiarism-case-student-detail-view.component.html @@ -79,7 +79,7 @@

{{ 'artemisApp.plagiarism.plagiarismCases.conversation' | artemisTranslate } 'day' ) : posts[0].creationDate.add(7, 'day') - ).format('DD.MM.YYYY') + ).format('DD.MM.YYYY'), } " >

diff --git a/src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.html b/src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.html index ad622809e31a..08fc06f10250 100644 --- a/src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.html +++ b/src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.html @@ -73,7 +73,7 @@ [ngClass]="{ 'table-success': tutorialGroup.isUserRegistered, 'is-user-tutor': tutorialGroup.isUserTutor, - 'is-user-not-tutor': !tutorialGroup.isUserTutor + 'is-user-not-tutor': !tutorialGroup.isUserTutor, }" [tutorialGroup]="tutorialGroup" [course]="course" diff --git a/src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-dialog/tutorial-groups-registration-import-dialog.component.html b/src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-dialog/tutorial-groups-registration-import-dialog.component.html index 8763ea815a0f..21d9adf655a6 100644 --- a/src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-dialog/tutorial-groups-registration-import-dialog.component.html +++ b/src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-dialog/tutorial-groups-registration-import-dialog.component.html @@ -39,7 +39,7 @@