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

Development: Update tutorial groups module to signals #10450

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

az108
Copy link
Contributor

@az108 az108 commented Mar 7, 2025

Checklist

General

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data (e.g. using paging).
  • I strictly followed the principle of data economy for all client-server REST calls.
  • I strictly followed the client coding and design guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Motivation and Context

To keep the codebase modern this migration to InputSignals is necessary.

Description

I updated @input with inputSignals in the tutorial groups folder. I made sure that testcases are adjusted accordingly. Some files were not changed as they require more logical changes.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Course
  1. Log in to Artemis
  2. Navigate to Course Administration
  3. And make sure all tutorial groups related features are still working as intended

Testserver States

You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.

Review Progress

Performance Review

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Summary by CodeRabbit

  • Refactor

    • Updated several course and tutorial management interfaces to dynamically retrieve and display data (e.g., free days, session details, course information), ensuring real-time, consistent UI updates.
    • Introduced new input fields for configuring Docker flags related to CPU count, memory, and memory swap in the programming exercise build configuration.
    • Modified event bindings in various components to reflect updated event names for better clarity and functionality.
    • Adjusted the handling of user identity information in various components by removing references to the createdBy property.
  • Tests

    • Enhanced test setups to align with the new dynamic data binding approach, improving test reliability and overall application stability.
    • Added tests for validating Docker resource limits in the programming exercise build configuration.
    • Removed obsolete tests related to the createdBy property and updated assertions to reflect recent changes in event handling.
    • Updated tests to verify the correct application of Docker resource limits during the build process.

@github-actions github-actions bot added tests client Pull requests that update TypeScript code. (Added Automatically!) labels Mar 7, 2025
@az108 az108 marked this pull request as ready for review March 7, 2025 11:47
@az108 az108 requested a review from a team as a code owner March 7, 2025 11:47
Copy link

coderabbitai bot commented Mar 7, 2025

Walkthrough

The pull request refactors numerous Angular components and their associated test files by changing the way input properties are defined, accessed, and bound. The modifications replace Angular’s @Input() decorator with a functional approach using the input and input.required<T>() functions and update template bindings from direct property access to method invocation (e.g., from course to course()). Test files have been similarly updated to use Angular’s component reference API for setting inputs. These changes are applied consistently across various components managing tutorial groups, sessions, free periods, and related functionalities.

Changes

File(s) Change Summary
src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/…/tutorial-group-free-days-overview.component.{html,ts} Changed property access for tutorialGroupFreeDays and timeZone from direct access to function calls; replaced @Input() with input initialization.
src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/…/tutorial-group-utilization-indicator.component.{html,ts} Updated access for tutorialGroup from property to method call and replaced @Input() with input.required.
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/…/{component.html,component.ts} Modified binding and access for course and tutorialGroupId to invoke as functions and replaced @Input() with input.required.
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/…/{component.html,component.ts}
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/…/{component.html,component.ts}
Refactored free period components to change input access (e.g. course and timeZone accessed via function calls) and replaced @Input() decorators with input.required.
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/…/{component.html,component.ts} Altered access for tutorialFreePeriod and course from direct properties to function calls; updated input property definitions using input.required.
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/{create-tutorial-group-session,edit-tutorial-group-session}/…/{component.html,component.ts} Updated property accesses for tutorialGroup, course, and (in edit) tutorialGroupSession to function calls; migrated from @Input() to input.required.
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/…/{cancellation-modal, tutorial-group-session-row-buttons, tutorial-group-sessions-management}.{html,ts} Transitioned input properties (e.g. course, tutorialGroupId, tutorialGroupSession) to use input.required and updated template bindings from property access to function invocation.
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/…/tutorial-group-form/schedule-form/…/{component.html,component.ts} Changed access for parentFormGroup and course from direct property usage to function calls; replaced @Input() with input.required.
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/…/{component.html,component.ts} Modified input properties (isAtLeastInstructor, course, tutorialGroup) to be defined with the input function and accessed as functions in component logic.
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/…/tutorial-groups-course-information.{html,ts} Updated tutorialGroups access from property to function call and replaced @Input() with an input initialization.
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/…/{tutorial-groups-export-button.component.ts, tutorial-groups-import-button.component.ts, tutorial-groups-registration-import-dialog.component.ts} Replaced @Input() for courseId with input.required<number>() and updated its access to function calls.
Test Files (various)
e.g., files under src/test/javascript/spec/component/tutorial-groups/…
Changed direct property assignments to use fixture.componentRef.setInput() for input binding and updated access from properties to method calls in assertions.

Possibly related PRs

  • Development: Use signals in date time picker #9694: The changes in the main PR, which involve converting property accesses to function calls in the tutorial-group-free-days-overview component, are related to the changes in the retrieved PR, where similar conversions are made in the date-time-picker component. Both PRs modify the way properties are accessed, transitioning from static property access to dynamic function calls, indicating a shared approach to enhancing component reactivity.
  • Development: Migrate suspicious behavior module to new client coding guidelines #9887: The changes in the main PR, which involve modifying property accesses to method calls in the tutorial-group-free-days-overview component, are related to the changes in the retrieved PR, where similar modifications are made to access properties as methods in the plagiarism-cases-overview component. Both PRs reflect a shift from property access to method invocation for data retrieval within their respective components.
  • Development: Migrate client code for conversation detail tabs #9973: The changes in the main PR, which involve modifying the way properties are accessed in the tutorial-group-free-days-overview.component.html and tutorial-group-free-days-overview.component.ts files, are related to the changes in the retrieved PR, where similar modifications are made to access properties as functions in the conversation-info.component.html and conversation-info.component.ts files. Both PRs reflect a shift from property access to function calls for component properties.

Suggested labels

small, ready to merge, component:TutorialGroups


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🔭 Outside diff range comments (8)
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.html (2)

3-8: 🛠️ Refactor suggestion

⚠️ Potential issue

Update property access in modal header interpolation

The pipeline errors indicate that the tutorialGroupSession is now an InputSignal and must be invoked as a function to access its properties. In this header section the code is still using direct property access:

- (tutorialGroupSession.status === tutorialGroupSessionStatus.ACTIVE
+ (tutorialGroupSession().status === tutorialGroupSessionStatus.ACTIVE

Please update these references to ensure the template compiles correctly.

🧰 Tools
🪛 GitHub Actions: Build

[error] 4-4: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 6-6: NG9: Property 'status' does not exist on type 'InputSignal'.


14-20: 🛠️ Refactor suggestion

⚠️ Potential issue

Correct property access in modal body interpolation

Similarly, in the modal body the interpolation still references tutorialGroupSession.status (also used as an argument in the translation pipe), which causes NG9 errors. Update these occurrences to use a function invocation:

- (tutorialGroupSession.status === tutorialGroupSessionStatus.ACTIVE
+ (tutorialGroupSession().status === tutorialGroupSessionStatus.ACTIVE

Also verify if the helper function generateSessionLabel should receive the session object via tutorialGroupSession() rather than the signal itself.

🧰 Tools
🪛 GitHub Actions: Build

[error] 15-15: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG0: Value of type 'InputSignal' has no properties in common with type 'TutorialGroupSession'. Did you mean to call it?

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html (1)

13-15: ⚠️ Potential issue

Fix inconsistent signal usage in the @else block.

The code still uses direct property access (tutorialGroup.averageAttendance) in the else block instead of the function invocation pattern (tutorialGroup().averageAttendance) used elsewhere in the template. This inconsistency could lead to runtime errors.

Apply this diff to maintain consistency:

-        tutorialGroup.averageAttendance !== undefined
-            ? ('artemisApp.entities.tutorialGroup.averageAttendance' | artemisTranslate: { averageAttendance: tutorialGroup.averageAttendance })
+        tutorialGroup().averageAttendance !== undefined
+            ? ('artemisApp.entities.tutorialGroup.averageAttendance' | artemisTranslate: { averageAttendance: tutorialGroup().averageAttendance })
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.html (1)

6-10: ⚠️ Potential issue

Critical issue: Property access on signal input.

The pipeline error shows that you're accessing tutorialGroupSession.status directly instead of using the function call syntax. This needs to be updated to tutorialGroupSession().status.

-                (tutorialGroupSession.status === tutorialGroupSessionStatus.CANCELLED
+                (tutorialGroupSession().status === tutorialGroupSessionStatus.CANCELLED
                     ? 'artemisApp.pages.tutorialGroupSessionManagement.rowButtons.activate'
                     : 'artemisApp.pages.tutorialGroupSessionManagement.rowButtons.cancel'
                 ) | artemisTranslate
🧰 Tools
🪛 GitHub Actions: Build

[error] 6-6: NG9: Property 'status' does not exist on type 'InputSignal'.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.html (1)

19-19: ⚠️ Potential issue

Property does not exist on InputSignal type

The pipeline is reporting that 'isOnline' doesn't exist on type 'InputSignal<TutorialGroup | undefined>'.

Access the property through the function call:

-                            tutorialGroup.isOnline ? 'artemisApp.forms.scheduleForm.locationInput.labelOnline' : 'artemisApp.forms.scheduleForm.locationInput.labelOffline'
+                            tutorialGroup()?.isOnline ? 'artemisApp.forms.scheduleForm.locationInput.labelOnline' : 'artemisApp.forms.scheduleForm.locationInput.labelOffline'
🧰 Tools
🪛 GitHub Actions: CodeQL

[error] 19-19: NG9: Property 'isOnline' does not exist on type 'InputSignal<TutorialGroup | undefined>'.

🪛 GitHub Actions: Build

[error] 19-19: NG2: Object is possibly 'undefined'.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.html (2)

31-31: ⚠️ Potential issue

Fix timeZone access to use signal function call.

The property access needs to be updated to use the function call syntax for the signal.

-                                : (freePeriod.start | artemisDate: 'time' : false : course.timeZone : false)
+                                : (freePeriod.start | artemisDate: 'time' : false : course().timeZone : false)
🧰 Tools
🪛 GitHub Actions: Build

[error] 31-31: NG9: Property 'timeZone' does not exist on type 'InputSignal'.


38-38: ⚠️ Potential issue

Fix timeZone access to use signal function call.

The property access needs to be updated to use the function call syntax for the signal.

-                                : (freePeriod.end | artemisDate: 'time' : false : course.timeZone : false)
+                                : (freePeriod.end | artemisDate: 'time' : false : course().timeZone : false)
🧰 Tools
🪛 GitHub Actions: Build

[error] 38-38: NG9: Property 'timeZone' does not exist on type 'InputSignal'.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.ts (1)

73-101: 🛠️ Refactor suggestion

Consider updating the ngOnChanges lifecycle hook.

The ngOnChanges method might not work as expected with the new signal-based inputs. Angular signal inputs don't trigger the ngOnChanges lifecycle hook. Consider refactoring this to use signal effects or computed signals instead.

- ngOnChanges(changes: SimpleChanges) {
-    for (const propName in changes) {
-        if (changes.hasOwnProperty(propName)) {
-            const change = changes[propName];
-            switch (propName) {
-                case 'sessions': {
-                    if (change.currentValue) {
-                        this.splitIntoUpcomingAndPastSessions(this.sortService.sortByProperty(change.currentValue, 'start', false));
-                    }
-                    break;
-                }
-                case 'timeZone': {
-                    if (change.currentValue) {
-                        this.timeZoneUsedForDisplay = change.currentValue;
-
-                        this.changeDetectorRef.detectChanges();
-                    }
-                    break;
-                }
-                case 'tutorialGroup': {
-                    if (change.currentValue) {
-                        this.nextSession = change.currentValue.nextSession;
-
-                        this.changeDetectorRef.detectChanges();
-                    }
-                    break;
-                }
-            }
-        }
-    }
-}
+ constructor() {
+   effect(() => {
+     // Handle sessions changes
+     const currentSessions = this.sessions();
+     if (currentSessions) {
+       this.splitIntoUpcomingAndPastSessions(this.sortService.sortByProperty(currentSessions, 'start', false));
+     }
+     
+     // Handle timeZone changes
+     const currentTimeZone = this.timeZone();
+     if (currentTimeZone) {
+       this.timeZoneUsedForDisplay = currentTimeZone;
+       this.changeDetectorRef.detectChanges();
+     }
+     
+     // Handle tutorialGroup changes
+     const currentTutorialGroup = this.tutorialGroup();
+     if (currentTutorialGroup) {
+       this.nextSession = currentTutorialGroup.nextSession;
+       this.changeDetectorRef.detectChanges();
+     }
+   });
+ }
🧰 Tools
🪛 Biome (1.9.4)

[error] 75-75: Do not access Object.prototype method 'hasOwnProperty' from target object.

It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.

(lint/suspicious/noPrototypeBuiltins)

🧹 Nitpick comments (2)
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component/tutorial-groups-export-button.component.ts (1)

106-125: Consider standardizing subscription patterns

The exportJSON method uses the older callback-based subscription pattern while exportCSV uses the newer object-based pattern. Consider standardizing to the newer approach for consistency:

-this.tutorialGroupsService.exportToJson(this.courseId(), this.selectedFields).subscribe(
-    (response) => {
-        const blob = new Blob([response], { type: 'application/json' });
-        const url = window.URL.createObjectURL(blob);
-        const a = document.createElement('a');
-        a.href = url;
-        a.download = 'tutorial_groups.json';
-        a.click();
-        window.URL.revokeObjectURL(url);
-        this.resetSelections();
-        modal.close();
-    },
-    () => {
-        this.alertService.error('artemisApp.tutorialGroupExportDialog.failedJSON');
-        this.resetSelections();
-        modal.dismiss('error');
-    },
-);
+this.tutorialGroupsService.exportToJson(this.courseId(), this.selectedFields).subscribe({
+    next: (response) => {
+        const blob = new Blob([response], { type: 'application/json' });
+        const url = window.URL.createObjectURL(blob);
+        const a = document.createElement('a');
+        a.href = url;
+        a.download = 'tutorial_groups.json';
+        a.click();
+        window.URL.revokeObjectURL(url);
+        this.resetSelections();
+        modal.close();
+    },
+    error: () => {
+        this.alertService.error('artemisApp.tutorialGroupExportDialog.failedJSON');
+        this.resetSelections();
+        modal.dismiss('error');
+    }
+});
src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.ts (1)

38-38: Fix typo in property name.

There appears to be a typo in the property name: mifOfDifferentLanguages should be mixOfDifferentLanguages to maintain consistency with the component's naming conventions and improve code clarity.

- mifOfDifferentLanguages = input(false);
+ mixOfDifferentLanguages = input(false);
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 93eba08 and bef158c.

📒 Files selected for processing (62)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.html (7 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.ts (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.ts (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.html (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.ts (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.ts (2 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.ts (2 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.html (4 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.ts (4 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.ts (6 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/create-tutorial-group-free-period.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/create-tutorial-group-free-period.component.ts (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/edit-tutorial-group-free-period.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/edit-tutorial-group-free-period.component.ts (4 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.ts (4 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.html (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.ts (2 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session/create-tutorial-group-session.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session/create-tutorial-group-session.component.ts (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session/edit-tutorial-group-session.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session/edit-tutorial-group-session.component.ts (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.ts (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.html (2 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.ts (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.ts (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/crud/tutorial-group-form/schedule-form/schedule-form.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/crud/tutorial-group-form/schedule-form/schedule-form.component.ts (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/tutorial-group-row-buttons.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/tutorial-group-row-buttons.component.ts (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.ts (2 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component/tutorial-groups-export-button.component.ts (4 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-button/tutorial-groups-import-button.component.ts (3 hunks)
  • 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.ts (3 hunks)
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-detail.component.spec.ts (3 hunks)
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-free-days-overview.component.spec.ts (2 hunks)
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-row.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-sessions-table.component.spec.ts (3 hunks)
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-utilization-indicator.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-groups-table.component.spec.ts (2 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.spec.ts (2 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-management.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal.component.spec.ts (2 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.spec.ts (2 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-button.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-button.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-registration-import-dialog.component.spec.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
`src/main/webapp/**/*.html`: @if and @for are new and valid ...

src/main/webapp/**/*.html: @if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.

  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/create-tutorial-group-free-period.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session/edit-tutorial-group-session.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session/create-tutorial-group-session.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/crud/tutorial-group-form/schedule-form/schedule-form.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.html
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.html
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.html
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/edit-tutorial-group-free-period.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/tutorial-group-row-buttons.component.html
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.html
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.html
`src/test/javascript/spec/**/*.ts`: jest: true; mock: NgMock...

src/test/javascript/spec/**/*.ts: jest: true; mock: NgMocks; bad_practices: avoid_full_module_import; perf_improvements: mock_irrelevant_deps; service_testing: mock_http_for_logic; no_schema: avoid_NO_ERRORS_SCHEMA; expectation_specificity: true; solutions: {boolean: toBeTrue/False, reference: toBe, existence: toBeNull/NotNull, undefined: toBeUndefined, class_obj: toContainEntries/toEqual, spy_calls: {not_called: not.toHaveBeenCalled, once: toHaveBeenCalledOnce, with_value: toHaveBeenCalledWith|toHaveBeenCalledExactlyOnceWith}}

  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-management.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-sessions-table.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-registration-import-dialog.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-utilization-indicator.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-button.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-row.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-free-days-overview.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-button.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-groups-table.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-detail.component.spec.ts
`src/main/webapp/**/*.ts`: angular_style:https://angular.io/...

src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-button/tutorial-groups-import-button.component.ts
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component/tutorial-groups-export-button.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session/create-tutorial-group-session.component.ts
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/create-tutorial-group-free-period.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/tutorial-group-row-buttons.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session/edit-tutorial-group-session.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.ts
  • 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.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/crud/tutorial-group-form/schedule-form/schedule-form.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/edit-tutorial-group-free-period.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.ts
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.ts
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.ts
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.ts
🧠 Learnings (2)
src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.html (1)
Learnt from: florian-glombik
PR: ls1intum/Artemis#8564
File: src/main/webapp/app/overview/course-tutorial-groups/course-tutorial-groups.component.html:12-12
Timestamp: 2024-11-12T12:51:51.200Z
Learning: User prefers capitalization for terms like "Tutorial Group" in user-facing strings and emphasizes the importance of translations.
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.html (1)
Learnt from: florian-glombik
PR: ls1intum/Artemis#8564
File: src/main/webapp/app/overview/course-tutorial-groups/course-tutorial-groups.component.html:12-12
Timestamp: 2024-11-12T12:51:51.200Z
Learning: User prefers capitalization for terms like "Tutorial Group" in user-facing strings and emphasizes the importance of translations.
🪛 GitHub Actions: Build
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.html

[error] 4-4: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 15-15: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG0: Value of type 'InputSignal' has no properties in common with type 'TutorialGroupSession'. Did you mean to call it?


[error] 6-6: NG9: Property 'status' does not exist on type 'InputSignal'.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.html

[error] 32-32: NG2: Object is possibly 'undefined'.


[error] 33-33: NG2: Object is possibly 'undefined'.


[error] 34-34: NG2: Object is possibly 'undefined'.


[error] 37-37: NG2: Object is possibly 'undefined'.


[error] 50-50: NG5: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. Type 'undefined' is not assignable to type 'number'.


[error] 157-157: NG2: Object is possibly 'undefined'.


[error] 33-33: NG2: Object is possibly 'undefined'.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.html

[error] 19-19: NG2: Object is possibly 'undefined'.


[error] 24-24: NG2: Object is possibly 'undefined'.


[error] 39-39: NG2: Type 'TutorialGroup | undefined' is not assignable to type 'TutorialGroup'. Type 'undefined' is not assignable to type 'TutorialGroup'.


[error] 67-67: NG2: Type 'TutorialGroup | undefined' is not assignable to type 'TutorialGroup'. Type 'undefined' is not assignable to type 'TutorialGroup'.


[error] 4-4: NG2: Object is possibly 'undefined'.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.html

[error] 31-31: NG9: Property 'timeZone' does not exist on type 'InputSignal'.


[error] 38-38: NG9: Property 'timeZone' does not exist on type 'InputSignal'.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.html

[error] 6-6: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 15-15: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG0: Value of type 'InputSignal' has no properties in common with type 'TutorialGroupSession'. Did you mean to call it?

🪛 GitHub Actions: CodeQL
src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.html

[error] 4-4: NG2: Object is possibly 'undefined'.


[error] 8-8: NG2: Object is possibly 'undefined'.


[error] 21-21: NG2: Object is possibly 'undefined'.


[error] 30-30: NG2: Object is possibly 'undefined'.


[error] 35-35: NG2: Object is possibly 'undefined'.


[error] 39-39: NG2: Object is possibly 'undefined'.


[error] 42-42: NG2: Object is possibly 'undefined'.


[error] 43-43: NG2: Object is possibly 'undefined'.


[error] 49-49: NG2: Object is possibly 'undefined'.


[error] 51-51: NG2: Object is possibly 'undefined'.


[error] 52-52: NG2: Object is possibly 'undefined'.


[error] 53-53: NG2: Object is possibly 'undefined'.


[error] 55-55: NG2: Object is possibly 'undefined'.


[error] 58-58: NG2: Object is possibly 'undefined'.


[error] 62-62: NG2: Object is possibly 'undefined'.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.html

[error] 32-32: NG2: Object is possibly 'undefined'.


[error] 33-33: NG2: Object is possibly 'undefined'.


[error] 34-34: NG2: Object is possibly 'undefined'.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.html

[error] 19-19: NG9: Property 'isOnline' does not exist on type 'InputSignal<TutorialGroup | undefined>'.


[error] 24-24: NG2: Object is possibly 'undefined'.


[error] 39-39: NG9: Property 'status' does not exist on type 'InputSignal'.

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: server-tests
  • GitHub Check: client-tests
  • GitHub Check: Mend Security Check
🔇 Additional comments (161)
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.html (1)

21-21: Correct usage in conditional block is on track

The updated condition here correctly invokes the signal:

@if (tutorialGroupSession().status === tutorialGroupSessionStatus.ACTIVE) {

This is the correct usage for accessing the current state. Please ensure that the rest of the template follows this pattern.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons.component.spec.ts (2)

54-58: Update to using setInput follows modern Angular testing practice 👍

The change to use fixture.componentRef.setInput() instead of direct property assignment aligns well with Angular's recommended way of testing components that use signal-based inputs. This is consistent with the migration from @Input to inputSignals mentioned in the PR objectives.


90-93:

❓ Verification inconclusive

Verify property access in assertions matches component implementation

Since the component properties have been converted to signal-based inputs (functions), the assertions might need to be updated to match this pattern. Currently, the test is accessing properties directly (e.g., mockModalRef.componentInstance.course), but if the component now uses course() instead of course, these assertions might need adjustment.


🏁 Script executed:

#!/bin/bash
# Check how course, tutorialGroupsConfiguration, and tutorialFreePeriod are accessed in the component

# Look for input declarations in the component file
echo "Checking input declarations in component file:"
cat app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.ts | grep -A 1 "input"

# Check how these properties are accessed in the component template and class
echo "Checking property access patterns in component file:"
cat app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.ts | grep -E "course\(\)|tutorialGroupConfiguration\(\)|tutorialFreePeriod\(\)"

Length of output: 1188


Attention: Confirm Signal-Based Access of Inputs in the Component

The automated check didn’t locate the component file using the provided path, so we couldn’t verify whether the inputs have been converted to signal-based properties. Please manually verify that:

  • The inputs (e.g., course, tutorialGroupsConfiguration, and tutorialFreePeriod) are implemented as signals (accessed via function calls like course()).
  • The test assertions match the new implementation. For instance, if the component now exposes course() instead of course, update the assertion accordingly (i.e., change
    expect(mockModalRef.componentInstance.course).toEqual(course);
    to
    expect(mockModalRef.componentInstance.course()).toEqual(course);
    ```).

Once confirmed, adjust the tests if necessary to ensure proper validation of the signal-based inputs.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/create-tutorial-group-free-period.component.html (1)

9-9: LGTM: Good migration to input signals

The change from direct property access (course.timeZone!) to function invocation (course().timeZone!) is correctly implemented as part of the migration to Angular's input signals.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/edit-tutorial-group-free-period.component.html (1)

9-9: LGTM: Good migration to input signals

The change from direct property access (course.timeZone!) to function invocation (course().timeZone!) is correctly implemented as part of the migration to Angular's input signals.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session/edit-tutorial-group-session.component.html (1)

9-9: LGTM: Good migration to input signals

The change from direct property access (course.timeZone!) to function invocation (course().timeZone!) is correctly implemented as part of the migration to Angular's input signals.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session/create-tutorial-group-session.component.html (1)

9-9: LGTM: Good migration to input signals

The change from direct property access (course.timeZone!) to function invocation (course().timeZone!) is correctly implemented as part of the migration to Angular's input signals.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component.spec.ts (1)

55-55: LGTM: Correct test adaptation for input signals

Good update to the test to use Angular's testing utilities for setting input signals. The change from direct property assignment to fixture.componentRef.setInput() correctly maintains the component's interaction with the new input signal architecture.

src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-utilization-indicator.component.spec.ts (1)

23-23: Correctly using Angular's recommended testing API for signal inputs

This update properly transitions from direct property assignment to using the TestBed fixture's setInput method, which is the recommended approach for testing components with signal-based inputs.

src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-row.component.spec.ts (1)

33-34: Input property setup correctly uses TestBed's setInput method

The transition from directly assigning properties to using fixture.componentRef.setInput() follows Angular's best practices for testing components with signal-based inputs.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-button.component.spec.ts (1)

28-28: Properly updated test input initialization

The courseId input is now correctly set using Angular's recommended testing approach for signal-based inputs.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period.component.spec.ts (1)

128-130: Consistently applied signal-based input pattern to all component inputs

All inputs (course, tutorialGroupFreePeriod, tutorialGroupsConfiguration) have been properly updated to use the TestBed fixture's setInput method, maintaining consistency with the migration from @input to inputSignals.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.html (2)

5-5: Good use of the new Angular syntax

The change from *ngFor to @for follows the coding guidelines which recommend using the new Angular control flow syntax.


8-8: Correctly updated signal access pattern

The change from timeZone to timeZone() properly reflects the migration from @Input properties to input signals, ensuring the template accesses the latest value.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session.component.spec.ts (1)

47-48: Correctly updated test input handling

Good implementation of the proper test pattern for components using signals. Using fixture.componentRef.setInput() is the correct approach for setting input values in tests when working with signal-based inputs.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session.component.spec.ts (1)

55-57: Proper test setup for signal-based inputs

The change to use fixture.componentRef.setInput() for all three inputs follows the best practice for testing components that use Angular's signal-based input system. This ensures that the test correctly simulates how the component would receive inputs in a real application.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.html (1)

23-23: Consistent signal invocation pattern

The change from [course]="course" to [course]="course()" maintains consistency with the input signal pattern used throughout the PR. This ensures the course data is always up-to-date.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.html (3)

4-4: Proper implementation of inputSignals for ID attribute.

The change from direct property access to function call syntax (tutorialFreePeriod().id) correctly implements the migration from @Input to inputSignals.


10-10: Correct implementation of inputSignals for delete button ID.

The migration to function call syntax for the delete button ID attribute matches the pattern used for the edit button.


12-12: Successfully migrated both input properties to signal syntax.

Both tutorialFreePeriod and course properties are now correctly accessed using the function call syntax, ensuring consistency with Angular's input signals pattern.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-button.component.spec.ts (1)

49-51: Properly updated test setup for input signals.

The changes correctly implement the recommended approach for setting component inputs in tests when using input signals. Instead of direct property assignment, the code now uses the fixture.componentRef.setInput() method to set input values.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-registration-import-dialog.component.spec.ts (1)

272-272: Test input properly updated to signals pattern.

The migration from direct property assignment (component.courseId = 1) to the proper Angular testing pattern (fixture.componentRef.setInput('courseId', 1)) correctly supports the input signals implementation.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.html (1)

4-4: Properly implemented null-safe access with input signals.

The change correctly implements the function call syntax for accessing the tutorialGroups input property while maintaining the null check, improving code safety.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information.component.spec.ts (1)

35-35: Great usage of Angular's TestBed API for setting inputs!

Using fixture.componentRef.setInput() instead of direct property assignment is the recommended approach for setting component inputs in Angular tests. This properly triggers the Angular input binding lifecycle and better simulates how inputs are set in real applications.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html (1)

1-1: Great transition to using input signals in the template!

The update to access properties via tutorialGroup() function calls aligns with Angular's new input signals approach.

Also applies to: 3-3, 6-6

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period.component.spec.ts (1)

46-48: Excellent use of the recommended Angular input setting pattern!

Using fixture.componentRef.setInput() instead of direct property assignment properly simulates Angular's binding mechanism and ensures the component behaves as it would in a real application environment.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons.component.spec.ts (2)

47-49: Great implementation of Angular's TestBed input setting!

Using fixture.componentRef.setInput() is the recommended approach for setting component inputs in tests, as it properly triggers input binding lifecycle hooks and better represents how Angular sets properties in real applications.


76-78:

❓ Verification inconclusive

Verify component instance property access in expectations.

The test expectations directly access component instance properties, but based on the code changes elsewhere in this PR, these properties may now be accessed through function calls.


🏁 Script executed:

#!/bin/bash
# Look for any changes to the TutorialGroupSessionRowButtonsComponent input properties
rg -A 10 "export class TutorialGroupSessionRowButtonsComponent" --include="*.ts" | grep -A 10 -E "(course|tutorialGroup|tutorialGroupSession)"

Length of output: 586


Action Required: Verify Component Instance Property Access in Test

The test in
src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons.component.spec.ts (lines 76–78) directly accesses properties on the component instance. However, recent PR changes suggest that these properties may now be exposed via function calls (e.g., getters) rather than direct property access.

Please manually verify whether the TutorialGroupSessionRowButtonsComponent now accesses the values for tutorialGroupSession, course, and tutorialGroup through methods. If they are indeed accessed via getter calls, update the test assertions accordingly (for example, by calling the appropriate getter functions).

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/crud/tutorial-group-form/schedule-form/schedule-form.component.html (1)

1-1: LGTM! Successfully migrated to Signal-based input binding.

The change updates the binding from a property to a method call, which is consistent with the migration from @Input to inputSignals.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-management.component.spec.ts (1)

141-143: LGTM! Test properly updated for Signal-based inputs.

The test assertions have been correctly updated to call tutorialFreePeriod() as a method rather than accessing it as a property, aligning with the Signal-based input implementation.

src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-sessions-table.component.spec.ts (3)

82-84: LGTM! Test setup properly updated for Signal-based inputs.

The code correctly uses fixture.componentRef.setInput() which is the recommended approach for setting inputs on components that use Signal-based inputs.


96-97: LGTM! Assertions updated for Signal-based inputs.

The test expectations have been properly updated to call methods sessions() and timeZone() instead of accessing properties directly, aligning with the Signal-based approach.


150-152: LGTM! Test setup properly updated for Signal-based inputs.

The second test case also correctly uses fixture.componentRef.setInput() for configuring component inputs.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.html (2)

56-56: LGTM! Template binding updated for Signal-based inputs.

The template correctly binds to course().timeZone using a method call rather than direct property access.


64-64: LGTM! Template binding updated for Signal-based inputs.

The course input binding for the child component has been properly updated to use the method call syntax course().

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal.component.spec.ts (2)

33-35: Input initialization updated correctly to use setInput

The component inputs are now properly set using Angular's modern testing approach with fixture.componentRef.setInput() instead of direct property assignment. This aligns with the changes to signal-based inputs in the component under test.


75-75: Updated to use tutorialGroupSession as a signal

The code correctly updates the status by accessing the tutorialGroup session via function call - tutorialGroupSession() - instead of direct property access. This matches the component's transition to input signals.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.html (1)

2-2: Update to use signal-based inputs properly

The changes correctly modify property access to use function invocation syntax for signals (tutorialGroup() instead of tutorialGroup), aligning with Angular's recommended practice for input signals.

Also applies to: 5-5, 18-20, 26-26, 29-29, 32-35, 37-37, 50-50, 60-60, 65-65, 97-97, 102-102, 114-115, 119-119, 123-123

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.spec.ts (2)

106-107: Input initialization updated correctly to use setInput

The component inputs are now properly set using Angular's modern testing approach with fixture.componentRef.setInput() instead of direct property assignment. This aligns with the changes to signal-based inputs in the component.


127-127: Updated expectation to match signal-based input

The test now correctly expects comp.course() instead of comp.course, reflecting the change from an @Input property to an input signal in the component implementation.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.ts (1)

1-1: Correctly migrated from @input decorator to input signals

The component has been properly updated to use Angular's new input signal API with input.required<TutorialGroup>() instead of the @Input() decorator. This provides better type safety and reactivity.

This change aligns with Angular's recommended approach to handle inputs in components with the newer signals API, which provides improved performance and type safety compared to the older @Input decorator pattern.

Also applies to: 15-15

src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.html (2)

2-6: Great job using the new Angular control flow syntax!

The update from *ngIf to @if aligns perfectly with the Angular coding guidelines.

🧰 Tools
🪛 GitHub Actions: CodeQL

[error] 4-4: NG2: Object is possibly 'undefined'.


25-26: Clean transition to signal-based approach.

Good job using function calls with the new Angular control flow syntax. The condition and content have been properly updated.

src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-free-days-overview.component.spec.ts (2)

59-60: Good adoption of modern Angular testing practices.

Using fixture.componentRef.setInput() is the preferred way to set inputs in Angular tests, especially when working with signal-based components. This aligns with best practices for testing components that use the new input signal approach.


71-71: Properly updated assertion to use function call.

Correctly updated the assertion to call component.tutorialGroupFreeDays() as a function rather than accessing it as a property, which aligns with the new signal-based approach.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.html (3)

3-4: Good use of @if syntax, but missing function call for nested condition.

Properly updated to use @if syntax with function call for tutorialGroupSession(), but there's a pipeline error related to accessing the status.


23-25: Properly updated to function call access pattern.

Good job using the function call access pattern for both tutorialGroupSession() and course() when formatting dates.


14-17:

✅ Verification successful

Error in status access for button conditional.

The pipeline is reporting an error on this line as well, which might be related to accessing status property. Ensure any conditional logic uses the function call syntax.


🏁 Script executed:

#!/bin/bash
# Find all places where tutorialGroupSession is used in this component
cd src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/
grep -rn "tutorialGroupSession" --include="*.ts" .

Length of output: 1328


Action Required: Confirm Correct Usage of Function Call Syntax for Tutorial Group Session

The code currently uses the correct function call syntax (e.g., tutorialGroupSession().id) instead of directly accessing properties. Our grep check confirms that there are no remaining instances of property access (such as accessing .status without calling the function) in this component. Please ensure that any conditional logic in the template or elsewhere also consistently uses the function call syntax.

  • File: src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.html (Lines 14-17)
  • Note: The usage in this snippet and related parts of the component follows the correct pattern, resolving the previously reported pipeline error.
🧰 Tools
🪛 GitHub Actions: Build

[error] 15-15: NG9: Property 'status' does not exist on type 'InputSignal'.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/tutorial-group-row-buttons.component.html (4)

1-1: Good use of @if syntax with function calls.

Properly updated to use @if syntax with function calls for course() and tutorialGroup().


4-9: Clean update to function-based access pattern.

Well done converting the condition to use isAtLeastInstructor() as a function call and accessing tutorialGroup().isUserTutor. This properly implements the signal-based approach.


18-27: Good implementation of signal-based approach for edit button.

The RouterLink has been properly updated to use function calls for all dynamic values. Well done!


29-41: Good transition to signal-based approach for delete button.

All the necessary changes have been made to update this section to the new signal-based approach using function calls instead of direct property access.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-button/tutorial-groups-import-button.component.ts (3)

1-1: Import changes align with the Angular signal approach

The addition of input to the imports reflects the migration from @Input decorators to the newer Angular signals approach, which is the main goal of this PR.


22-22: Properly migrated to input signals

The courseId property has been correctly migrated from using the @Input() decorator to using the input.required<number>() function, which follows Angular's newer programming model for defining component inputs.


34-34: Updated property access to signal function call

The code has been properly updated to access the courseId signal by calling it as a function this.courseId() rather than accessing it directly as a property.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.spec.ts (2)

93-94: Test correctly updated to use setInput

The test has been properly updated to use fixture.componentRef.setInput() instead of direct property assignment, which aligns with the component's migration to input signals.


110-110: Property access updated to signal function call in test

The test correctly accesses the course property as a function call component.course() rather than a direct property access, matching the updated component implementation.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component/tutorial-groups-export-button.component.ts (3)

1-1: Import changes align with Angular signal approach

The addition of input to the imports reflects the migration from @Input decorators to the newer Angular signals approach, which is the main goal of this PR.


25-25: Properly migrated to input signals

The courseId property has been correctly migrated from using the @Input() decorator to using the input.required<number>() function, which follows Angular's newer programming model for defining component inputs.


87-87: Updated property access to signal function calls

The code has been properly updated to access the courseId signal by calling it as a function this.courseId() rather than accessing it directly as a property in both methods.

Also applies to: 107-107

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.ts (3)

1-1: Import changes align with Angular signal approach

The addition of input to the imports reflects the migration from @Input decorators to the newer Angular signals approach, which is the main goal of this PR.


14-14: Properly migrated to input signals with default value

The tutorialGroups property has been correctly migrated from using the @Input() decorator to using the input<TutorialGroup[]>([]) function with an empty array as the default value, which follows Angular's newer programming model for defining component inputs.


17-17: Updated property access to signal function call

The code has been properly updated to access the tutorialGroups signal by calling it as a function this.tutorialGroups() rather than accessing it directly as a property in the totalNumberOfRegistrations getter.

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.ts (3)

1-1: Updated imports to support Angular Signal inputs

The imports now include input from '@angular/core', which is used for the new Signal inputs approach.


63-63: Migrated from @input to Signal inputs

The component correctly transitions from the traditional @Input() decorator to Angular's newer Signal inputs feature using input.required<number>().


280-281: Updated property access to function call

The change from this.courseId to this.courseId() reflects the new Signal inputs pattern where inputs are accessed as functions rather than properties.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.html (1)

12-12: Changed property access to method invocation

The template now correctly calls showIdColumn() as a function instead of accessing it as a property.

src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-detail.component.spec.ts (4)

103-103: Updated test to use function call pattern

The test has been correctly updated to use detailInstance.tutorialGroup() instead of directly accessing the property.


132-132: Updated test setup for Angular Signal inputs

The test now correctly uses fixture.componentRef.setInput() to set component inputs instead of direct property assignment. This is the recommended approach for testing components that use Signal inputs.


181-181: Consistent use of setInput in parameterized test

The test correctly uses fixture.componentRef.setInput() to set the tutorial group in the parameterized test case.


183-183: Updated assertion to use function call pattern

The test has been correctly updated to use component.tutorialGroup() when accessing properties in assertions.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.html (4)

12-12: Updated conditional to use function call

The template now correctly calls showIdColumn() as a function instead of accessing it as a property.


60-63: Updated channel column conditional and router link

The template correctly:

  1. Uses showChannelColumn() as a function call
  2. Accesses the course ID through course().id!

71-71: Updated iteration to use function call

The template correctly iterates over tutorialGroups() as a function call instead of accessing it directly as a property.


81-85: Updated multiple input bindings to function calls

All the necessary properties have been correctly updated to be accessed as function calls rather than direct properties:

  • [course]="course()"
  • [showIdColumn]="showIdColumn()"
  • [showChannelColumn]="showChannelColumn()"
  • [timeZone]="timeZone()"
src/test/javascript/spec/component/tutorial-groups/shared/tutorial-groups-table.component.spec.ts (2)

110-111: Updated property access to function calls

The test now correctly accesses tutorialGroups and course as functions rather than properties, aligning with the migration from @Input decorators to Angular input signals.


141-143: Properly updated test input setting approach

The test now uses the modern fixture.componentRef.setInput() method instead of direct property assignment, which is the correct approach when working with components that use Angular's input signals.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.ts (5)

1-1: Added necessary imports for input signals

Correctly added inject and input imports from @angular/core to support the migration to input signals.


54-55: Migrated inputs to signal-based required inputs

Successfully converted traditional @Input properties to the modern signal-based approach using input.required<T>(), ensuring these inputs are properly required for component initialization.


64-64: Updated conditional check for function access

Properly modified the property access to function calls in conditional statement, maintaining consistency with the signal-based input approach.


76-76: Updated service call with function access

Correctly updated the service method call to use function invocation for accessing input values.


104-104: Updated modal component property assignment

Properly updated the assignment to the modal component to use function invocation for accessing the course value.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.ts (8)

1-1: Added necessary imports for input signals

Correctly added inject and input imports to support the migration to input signals.


31-32: Migrated inputs to signal-based required inputs

Successfully converted @Input properties to the modern signal-based approach using input.required<T>().


64-64: Updated initialization condition with function access

Properly modified the initialization check to use function calls for accessing input values.


75-75: Updated service method with function access

Correctly updated the registerStudent method call to use function invocation for accessing the course ID.


85-85: Updated service method with function access

Correctly updated the deregisterStudent method call to use function invocation for accessing the course ID.


94-94: Updated service method with function access

Correctly updated the searchStudents method call to use function invocation for accessing the course ID.


97-98: Updated getter implementation with function access

Properly updated the exportFilename getter to use function calls for accessing input values and their properties.


106-106: Updated service method with function access

Correctly updated the getOneOfCourse method call to use function invocation for accessing input values.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.ts (6)

1-1: Added necessary imports for input signals

Correctly added inject and input imports to support the migration to input signals.


23-23: Migrated input to signal-based input with default value

Successfully converted tutorialGroupFreeDays from an @Input property to the modern signal-based approach using input<T>([]) with an empty array as the default value.


25-25: Migrated input to signal-based input with default value

Successfully converted timeZone from an @Input property to the modern signal-based approach using input<T | undefined>(undefined) with an appropriate default value.


38-38: Updated initialize logic with function access

Properly modified the initialization of the iterable differ to use function invocation for accessing input values.


43-43: Updated change detection with function access

Correctly updated the change detection logic to use function invocation for accessing input values.


50-50: Updated sorting method with function access

Properly updated the sort method to use function invocation for accessing input values when calling the sort service.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/create-tutorial-group-free-period.component.ts (4)

1-1: Import update looks good.

The import statement has been updated correctly to include inject and input from Angular core, which aligns with the migration from @Input to input signals.


32-34: Successfully migrated to input signals.

The component inputs have been properly converted from @Input() decorators to the new signal-based approach using input.required<T>(). This change follows Angular's recommended patterns for reactive programming.


39-39: Property access correctly updated to function calls.

The initialization check has been properly updated to use function calls tutorialGroupConfigurationId() and course() instead of direct property access, consistent with the signal-based approach.


54-54: Service call parameters properly updated.

The service call has been correctly updated to use function calls for accessing the input properties, ensuring that the latest values are used when making the API request.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session/create-tutorial-group-session.component.ts (4)

1-1: Import statement properly updated.

The import statement has been correctly updated to include inject and input from Angular core, aligned with the migration to input signals.


32-34: Successful migration to input signals.

The component inputs have been properly converted from @Input() decorators to the new signal-based approach using input.required<T>(), maintaining type safety and required validation.


39-39: Condition check updated correctly.

The initialization check has been properly updated to use function calls course() and tutorialGroup() instead of direct property access, consistent with the signal-based pattern.


57-57: Service call parameters properly updated.

The service call has been correctly updated to use function calls when accessing input properties, ensuring that the most current values are used when creating a tutorial group session.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/crud/tutorial-group-form/schedule-form/schedule-form.component.ts (5)

1-1: Import statement properly updated.

The import statement has been correctly updated to include inject and input from Angular core, aligned with the migration to input signals.


41-42: Successful migration to input signals.

The component inputs have been properly converted from @Input() decorators to the signal-based approach using input.required<T>(), maintaining type safety and validation requirements.


55-56: Getter method properly updated.

The parentIsOnlineControl getter has been correctly updated to use a function call parentFormGroup() instead of direct property access, maintaining consistency with the signal-based pattern.


101-106: Properly updated configuration access.

The access to course configuration properties has been correctly updated to use the function call course() instead of direct property access, consistent with the signal-based approach.


120-120: Form control addition properly updated.

The addition of the form control to the parent form group has been correctly updated to use the function call parentFormGroup(), ensuring proper reactive form integration with the signal-based inputs.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.ts (6)

1-1: Import statement properly updated.

The import statement has been correctly updated to include inject and input from Angular core, aligned with the migration to input signals.


48-50: Input properties correctly migrated to signals.

The component inputs have been properly converted to use the signal-based approach:

  • Optional timeZone uses input<T>() with a default value
  • Required inputs use input.required<T>()

This correctly implements the pattern for both required and optional inputs using the signals approach.


76-76: Property access correctly updated to function call.

The access to tutorialGroup has been properly updated to use a function call, ensuring that the latest value is used when generating the formatted markdown.


87-101: All tutorial group property accesses properly updated.

All references to tutorial group properties in the getTutorialTimeSlotString method have been correctly updated to use function calls, consistently implementing the signal-based pattern throughout the method.


103-113: Tutorial detail method properly updated.

The getTutorialDetail method has been correctly updated to use function calls for both tutorialGroup() and course(), maintaining consistency with the signal-based approach.


115-124: Attendance calculation updated correctly.

The attendance calculation functionality has been properly updated to use function calls when accessing the tutorial group properties, ensuring that the latest values are used in calculations and updates.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/tutorial-group-row-buttons.component.ts (5)

1-1: Clean import changes for Angular signals.

The additions of inject and input imports align with the migration from @Input to signals-based input.


29-31: Well-implemented signal conversion.

Good implementation of Angular's new input signals API:

  • Default value correctly provided for isAtLeastInstructor
  • Required typing properly applied to course and tutorialGroup

55-57: Correctly updated property access to function calls.

Property access has been properly updated to use the function call syntax required by signals.


71-73: Properly updated modalRef property assignments.

The component instance properties are correctly accessed using the function call syntax.


86-87: Service method call updated correctly.

The service method parameters are properly retrieved using the function call syntax.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.ts (6)

1-1: Clean import changes for Angular signals.

The additions of inject and input imports align with the migration to signals-based input.


32-36: Well-implemented required signals.

Good implementation of Angular's new input signals API with all inputs correctly marked as required.


60-61: Properly updated timezone access with signal function call.

The timezone is now correctly accessed through the course signal function call.


64-69: Control flow logic updated for signals.

The status check now correctly uses function call syntax to access the tutorialGroupSession.


73-74: Service method call parameters updated correctly.

All parameters to the cancel method are properly retrieved using the function call syntax.


88-89: Service method call parameters updated correctly.

All parameters to the activate method are properly retrieved using the function call syntax.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.html (4)

1-1: Updated to function call syntax for signals.

The label text is now correctly accessed as a function call.


16-16: Updated to modern Angular control flow and signal function call.

Good use of the new @for syntax along with the signal function call for accessing tutorial group free periods.


22-26: Correctly updated to signal function call syntax.

The course properties are now properly accessed using function call syntax for the signal.


47-52: Correctly updated property bindings and event handlers for signals.

The input bindings and output handlers are properly updated to use function call syntax for signals.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.ts (5)

1-1: Clean import changes for Angular signals.

The additions of inject and input imports align with the migration to signals-based input.


31-33: Well-implemented required signals.

Good implementation of Angular's new input signals API with all inputs correctly marked as required.


49-50: Service method call parameters updated correctly.

All parameters to the delete method are properly retrieved using the function call syntax.


63-65: Correctly updated modalRef property assignments.

The component instance properties are correctly accessed using the function call syntax.


81-84: Properly updated modalRef property assignments.

All component instance properties are properly assigned using the function call syntax from signals.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.ts (4)

1-1: Import statements correctly updated.

The imports have been properly updated to include both inject and input from Angular core, which are required for the Signal-based approach being implemented.


27-29: Successfully migrated inputs to signals.

Inputs have been properly converted from @Input() decorator to the new Signal-based approach using input.required<T>(), making it clear that these properties are required inputs for the component.


44-44: Function call syntax properly implemented.

The property access has been correctly updated to use function call syntax to access the input signals, maintaining the component's functionality while modernizing the codebase.


58-60: Modal component instance properties correctly updated.

The modal instance properties are now properly accessed using function calls, ensuring the latest values are passed to the modal component.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/edit-tutorial-group-free-period.component.ts (6)

1-1: Import statements properly updated.

The component's imports have been correctly updated to include inject and input from Angular core, which are required for the Signal-based input approach.


33-37: Successfully migrated inputs to signals.

All @Input() decorators have been properly replaced with input.required<T>(), correctly implementing the Signal-based approach for component inputs.


51-51: Null check updated for signal syntax.

The null check in the initialize method has been correctly updated to use function call syntax to access the input values.


56-65: Property access correctly updated to signal syntax.

All property accesses within the formData construction have been properly updated to use function call syntax, ensuring the latest values are accessed.


67-76: Function calls correctly implemented for date manipulations.

The date manipulations now properly use function call syntax to access the input properties, maintaining the component's functionality.


92-92: Service call updated with correct signal syntax.

The update service call has been updated to use function call syntax to access the required ID properties.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.ts (4)

1-1: Import statements properly updated.

The component's imports have been correctly updated to include inject and input from Angular core, which are essential for the Signal-based input approach.


30-38: Successfully migrated inputs to signals with default values.

The component's inputs have been properly converted to signal-based inputs. Note the difference in syntax: non-required inputs use input(defaultValue) while others use the generic input<T>([]) syntax to provide type information and default values.


65-73: Sort functionality updated to use signal syntax.

The sortRows method now correctly uses function call syntax to access the tutorialGroups property, ensuring the most up-to-date data is used when sorting.


90-96: Property checks in ngOnChanges correctly updated.

All property accesses within the ngOnChanges lifecycle method have been properly updated to use function call syntax, ensuring the component correctly responds to changes in its inputs.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session/edit-tutorial-group-session.component.ts (5)

1-1: Import statements properly updated.

The component imports have been correctly updated to include inject and input from Angular core, which are necessary for the Signal-based approach.


30-34: Successfully migrated inputs to signals.

The input properties have been properly converted from @Input() decorator to the new input.required<T>() syntax, correctly implementing the Signal-based approach.


42-42: Null check updated for signal syntax.

The null check in the initialize method now correctly uses function call syntax to access the input values.


45-50: Form data initialization properly updated.

The initialization of formData now correctly uses function call syntax to access the input properties, ensuring the form is populated with the most current data.


68-68: Service call updated with correct signal syntax.

The update service method call now properly uses function call syntax to access the ID properties from the input signals.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.ts (3)

13-13: Import added for Angular signal inputs.

The import for input from @angular/core has been correctly added to support the new signal-based approach for component inputs.


38-48: Successfully migrated from @input to input signals.

The component properties have been properly converted from using Angular's @Input() decorator to the newer signal-based input() function with appropriate typing and default values.


58-71: Updated getter to work with signal-based inputs.

The numberOfColumns getter has been correctly updated to call this.tutorialGroup() and this.showIdColumn() as functions rather than accessing them as properties, which is the correct pattern when using input signals.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.ts (2)

1-1: Import added for Angular signal inputs.

The import for input from @angular/core has been correctly added to support the new signal-based approach for component inputs.


21-25: Successfully migrated to required input signals.

All properties have been properly converted to use input.required<Type>() which correctly indicates that these inputs are mandatory for the component to function. This matches the former @Input() usage while embracing the new signal-based API.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.ts (2)

1-1: Import added for Angular signal inputs.

The import for input from @angular/core has been correctly added to support the new signal-based approach for component inputs.


24-48: Successfully migrated from @input to input signals.

The component properties have been properly converted from using Angular's @Input() decorator to the newer signal-based input() function with appropriate typing and default values.

Copy link

coderabbitai bot commented Mar 7, 2025

Walkthrough

This pull request refactors multiple Angular components, templates, and tests by shifting from direct property access to function calls for retrieving input values. The changes replace traditional @Input() decorators with the new input() and input.required() functions and update all usages of properties (e.g. tutorialGroup and course) to be invoked as functions (e.g. tutorialGroup() and course()). Test setups are also modified to use fixture.componentRef.setInput() for initializing component inputs. Overall, the functionality remains the same while standardizing input retrieval across the codebase.

Changes

File Group(s) Change Summary
HTML Templates
(e.g., src/main/webapp/app/course/tutorial-groups/.../*.html)
Updated all templates to replace direct property accesses with function invocations (e.g. tutorialGrouptutorialGroup(), coursecourse()) in conditionals, bindings, and attribute evaluations.
TypeScript Components
(e.g., src/main/webapp/app/course/tutorial-groups/.../*.ts)
Replaced @Input() decorators with input() or input.required() for declaring component inputs; updated internal references from direct property access to function calls.
Test Files
(e.g., src/test/javascript/spec/component/tutorial-groups/.../*.spec.ts)
Updated test setups to use fixture.componentRef.setInput() in place of direct property assignments and adjusted assertions to call input getters as functions.

Sequence Diagram(s)

sequenceDiagram
    participant P as Parent Component
    participant A as Angular Framework
    participant C as Child Component
    P->>A: Bind inputs using input()/input.required()
    A->>C: Inject inputs as functions (e.g. tutorialGroup(), course())
    C->>C: Invoke input getters (e.g. call tutorialGroup() to access data)
Loading

Possibly related PRs

Suggested labels

refactoring, ready to merge

Suggested reviewers

  • HawKhiem
  • BBesrour
  • rabeatwork
  • SimonEntholzer
  • krusche
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🔭 Outside diff range comments (6)
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.html (2)

3-8: 🛠️ Refactor suggestion

⚠️ Potential issue

CRITICAL: Update signal usage in the header section
The expression on line 4 still uses property access (tutorialGroupSession.status) even though tutorialGroupSession is now an InputSignal. This results in the NG9 error since signals must be invoked as functions to access their underlying value.

Please update the expression as follows:

-            (tutorialGroupSession.status === tutorialGroupSessionStatus.ACTIVE
+            (tutorialGroupSession().status === tutorialGroupSessionStatus.ACTIVE

Ensure that all similar accesses in this template are updated accordingly.

🧰 Tools
🪛 GitHub Actions: Build

[error] 4-4: NG9: Property 'status' does not exist on type 'InputSignal'.


14-19: 🛠️ Refactor suggestion

⚠️ Potential issue

CRITICAL: Correct signal access in modal body text
Likewise, the expression on line 15 uses tutorialGroupSession.status instead of calling the signal function. This is causing the NG9 error indicated in the pipeline failure logs.

Please update the line as follows:

-            (tutorialGroupSession.status === tutorialGroupSessionStatus.ACTIVE
+            (tutorialGroupSession().status === tutorialGroupSessionStatus.ACTIVE

This change will ensure consistency in how signals are accessed throughout the application.

🧰 Tools
🪛 GitHub Actions: Build

[error] 15-15: NG9: Property 'status' does not exist on type 'InputSignal'.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html (1)

12-16: ⚠️ Potential issue

Fix inconsistent signal access pattern in the else block.

While the first conditional block correctly uses function call syntax tutorialGroup(), the else block still uses direct property access with tutorialGroup.averageAttendance.

<span>{{
-    tutorialGroup.averageAttendance !== undefined
-        ? ('artemisApp.entities.tutorialGroup.averageAttendance' | artemisTranslate: { averageAttendance: tutorialGroup.averageAttendance })
+    tutorialGroup().averageAttendance !== undefined
+        ? ('artemisApp.entities.tutorialGroup.averageAttendance' | artemisTranslate: { averageAttendance: tutorialGroup().averageAttendance })
        : ''
}}</span>
src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.html (1)

19-22: ⚠️ Potential issue

Fix property access for the Angular signal input

The current code is directly accessing tutorialGroup.isOnline but since tutorialGroup has been converted to a signal, it should be invoked as a function before accessing properties.

Apply this fix:

<span
    jhiTranslate="{{
-        tutorialGroup.isOnline ? 'artemisApp.forms.scheduleForm.locationInput.labelOnline' : 'artemisApp.forms.scheduleForm.locationInput.labelOffline'
+        tutorialGroup().isOnline ? 'artemisApp.forms.scheduleForm.locationInput.labelOnline' : 'artemisApp.forms.scheduleForm.locationInput.labelOffline'
    }}"
></span>
🧰 Tools
🪛 GitHub Actions: CodeQL

[error] 19-19: NG9: Property 'isOnline' does not exist on type 'InputSignal<TutorialGroup | undefined>'.

🪛 GitHub Actions: Build

[error] 19-19: NG9: Property 'isOnline' does not exist on type 'InputSignal<TutorialGroup | undefined>'.

src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-sessions-table.component.spec.ts (1)

167-178: ⚠️ Potential issue

Fix array sorting error in tests

The pipeline is reporting "TypeError: array.sort is not a function" errors in the test file.

The issue might be related to how the sessions are accessed or manipulated after the migration to signals. First, ensure that all methods returning arrays are properly typed:

#!/bin/bash
# Check the component definition for sorting issues
rg -A 3 "upcomingSessions" src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table
rg -A 3 "pastSessions" src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table

Also, verify that the SimpleChange object is correctly handling the new function-style access:

- changes.sessions = new SimpleChange([], component.sessions, true);
+ changes.sessions = new SimpleChange([], component.sessions(), true);

And ensure any array returned from a signal function is properly handled before sorting it.

Also applies to: 180-193

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.html (1)

31-31: ⚠️ Potential issue

Missing signal function call syntax

The template still uses direct property access with course.timeZone instead of course().timeZone, which is inconsistent with the other changes in the file and will likely cause errors.

Apply this diff to fix the issue:

-                                : (freePeriod.start | artemisDate: 'time' : false : course.timeZone : false)
+                                : (freePeriod.start | artemisDate: 'time' : false : course().timeZone : false)

And similarly in line 38:

-                                : (freePeriod.end | artemisDate: 'time' : false : course.timeZone : false)
+                                : (freePeriod.end | artemisDate: 'time' : false : course().timeZone : false)

Also applies to: 38-38

🧹 Nitpick comments (4)
src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-utilization-indicator.component.spec.ts (1)

27-29: Expectation can be more specific

According to the coding guidelines, boolean expectations should use .toBeTrue() or .toBeFalse() rather than the more generic .toBeTruthy().

-        expect(component).toBeTruthy();
+        expect(component).toBeTrue();
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component/tutorial-groups-export-button.component.ts (1)

106-125: Update subscribe usage to modern pattern

While not directly related to the signals migration, your existing subscribe pattern can be improved to use the modern object-based syntax for better maintainability.

- this.tutorialGroupsService.exportToJson(this.courseId(), this.selectedFields).subscribe(
-     (response) => {
-         // success handling
-     },
-     () => {
-         // error handling
-     },
- );
+ this.tutorialGroupsService.exportToJson(this.courseId(), this.selectedFields).subscribe({
+     next: (response) => {
+         // success handling
+     },
+     error: () => {
+         // error handling
+     }
+ });

This matches the pattern already used in your exportCSV method for consistency.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.ts (1)

95-95: Typo in variable name.

There's a typo in the variable name mifOfDifferentLanguages (used on line 96). It should be mixOfDifferentLanguages to match the property declared on line 59.

-                                );
-                                this.mifOfDifferentLanguages = this.tutorialGroups().some((tutorialGroup) => tutorialGroup.language !== this.tutorialGroups()[0].language);
+                                );
+                                this.mixOfDifferentLanguages = this.tutorialGroups().some((tutorialGroup) => tutorialGroup.language !== this.tutorialGroups()[0].language);
src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.ts (1)

38-38: Typo in property name comment.

There's a typo in the variable name mifOfDifferentLanguages - it should likely be mixOfDifferentLanguages to match the naming pattern used in the other properties.

-    mifOfDifferentLanguages = input(false);
+    mixOfDifferentLanguages = input(false);
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 93eba08 and bef158c.

📒 Files selected for processing (62)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.html (7 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.ts (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.ts (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.html (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.ts (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.ts (2 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.ts (2 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.html (4 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.ts (4 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.ts (6 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/create-tutorial-group-free-period.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/create-tutorial-group-free-period.component.ts (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/edit-tutorial-group-free-period.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/edit-tutorial-group-free-period.component.ts (4 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.ts (4 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.html (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.ts (2 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session/create-tutorial-group-session.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session/create-tutorial-group-session.component.ts (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session/edit-tutorial-group-session.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session/edit-tutorial-group-session.component.ts (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.ts (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.html (2 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.ts (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.ts (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/crud/tutorial-group-form/schedule-form/schedule-form.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/crud/tutorial-group-form/schedule-form/schedule-form.component.ts (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/tutorial-group-row-buttons.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/tutorial-group-row-buttons.component.ts (5 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.ts (2 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component/tutorial-groups-export-button.component.ts (4 hunks)
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-button/tutorial-groups-import-button.component.ts (3 hunks)
  • 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.ts (3 hunks)
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-detail.component.spec.ts (3 hunks)
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-free-days-overview.component.spec.ts (2 hunks)
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-row.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-sessions-table.component.spec.ts (3 hunks)
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-utilization-indicator.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-groups-table.component.spec.ts (2 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.spec.ts (2 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-management.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal.component.spec.ts (2 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.spec.ts (2 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-button.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-button.component.spec.ts (1 hunks)
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-registration-import-dialog.component.spec.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
`src/main/webapp/**/*.html`: @if and @for are new and valid ...

src/main/webapp/**/*.html: @if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.

  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session/edit-tutorial-group-session.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session/create-tutorial-group-session.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/create-tutorial-group-free-period.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.html
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.html
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/edit-tutorial-group-free-period.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/crud/tutorial-group-form/schedule-form/schedule-form.component.html
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/tutorial-group-row-buttons.component.html
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.html
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.html
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.html
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html
`src/test/javascript/spec/**/*.ts`: jest: true; mock: NgMock...

src/test/javascript/spec/**/*.ts: jest: true; mock: NgMocks; bad_practices: avoid_full_module_import; perf_improvements: mock_irrelevant_deps; service_testing: mock_http_for_logic; no_schema: avoid_NO_ERRORS_SCHEMA; expectation_specificity: true; solutions: {boolean: toBeTrue/False, reference: toBe, existence: toBeNull/NotNull, undefined: toBeUndefined, class_obj: toContainEntries/toEqual, spy_calls: {not_called: not.toHaveBeenCalled, once: toHaveBeenCalledOnce, with_value: toHaveBeenCalledWith|toHaveBeenCalledExactlyOnceWith}}

  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-button.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-registration-import-dialog.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-row.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-free-days-overview.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-sessions-table.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-detail.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-management.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-button.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-groups-table.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-utilization-indicator.component.spec.ts
  • src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.spec.ts
`src/main/webapp/**/*.ts`: angular_style:https://angular.io/...

src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-button/tutorial-groups-import-button.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session/create-tutorial-group-session.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/crud/tutorial-group-form/schedule-form/schedule-form.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/create-tutorial-group-free-period.component.ts
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.ts
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session/edit-tutorial-group-session.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component/tutorial-groups-export-button.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/edit-tutorial-group-free-period.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.ts
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.ts
  • 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.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/tutorial-group-row-buttons.component.ts
  • src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.ts
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.ts
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.ts
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.ts
🧠 Learnings (2)
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.html (1)
Learnt from: florian-glombik
PR: ls1intum/Artemis#8564
File: src/main/webapp/app/overview/course-tutorial-groups/course-tutorial-groups.component.html:12-12
Timestamp: 2024-11-12T12:51:51.200Z
Learning: User prefers capitalization for terms like "Tutorial Group" in user-facing strings and emphasizes the importance of translations.
src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.html (1)
Learnt from: florian-glombik
PR: ls1intum/Artemis#8564
File: src/main/webapp/app/overview/course-tutorial-groups/course-tutorial-groups.component.html:12-12
Timestamp: 2024-11-12T12:51:51.200Z
Learning: User prefers capitalization for terms like "Tutorial Group" in user-facing strings and emphasizes the importance of translations.
🪛 GitHub Actions: Build
src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.html

[error] 4-4: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 15-15: NG9: Property 'status' does not exist on type 'InputSignal'.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.html

[error] 6-6: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 15-15: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.


[error] 18-18: NG9: Property 'status' does not exist on type 'InputSignal'.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.html

[error] 19-19: NG9: Property 'isOnline' does not exist on type 'InputSignal<TutorialGroup | undefined>'.


[error] 24-24: NG2: Object is possibly 'undefined'.


[error] 39-39: NG2: Type 'TutorialGroup | undefined' is not assignable to type 'TutorialGroup'. Type 'undefined' is not assignable to type 'TutorialGroup'.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.html

[error] 32-32: NG2: Object is possibly 'undefined'.


[error] 33-33: NG2: Object is possibly 'undefined'.


[error] 34-34: NG2: Object is possibly 'undefined'.


[error] 37-37: NG2: Object is possibly 'undefined'.


[error] 50-50: NG5: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. Type 'undefined' is not assignable to type 'number'.


[error] 157-157: NG2: Object is possibly 'undefined'.


[error] 33-33: NG2: Object is possibly 'undefined'.

🪛 GitHub Actions: CodeQL
src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.html

[error] 19-19: NG9: Property 'isOnline' does not exist on type 'InputSignal<TutorialGroup | undefined>'.


[error] 24-24: NG2: Object is possibly 'undefined'.


[error] 39-39: NG2: Type 'TutorialGroup | undefined' is not assignable to type 'TutorialGroup'.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.html

[error] 19-19: NG9: Property 'isOnline' does not exist on type 'InputSignal<TutorialGroup | undefined>'.


[error] 24-24: NG2: Object is possibly 'undefined'.


[error] 39-39: NG2: Object is possibly 'undefined'.


[error] 41-41: NG2: Object is possibly 'undefined'.


[error] 42-42: NG2: Object is possibly 'undefined'.


[error] 43-43: NG2: Object is possibly 'undefined'.


[error] 49-49: NG2: Object is possibly 'undefined'.


[error] 51-51: NG2: Object is possibly 'undefined'.


[error] 52-52: NG2: Object is possibly 'undefined'.


[error] 53-53: NG2: Object is possibly 'undefined'.


[error] 55-55: NG2: Object is possibly 'undefined'.


[error] 58-58: NG2: Object is possibly 'undefined'.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.html

[error] 32-32: NG2: Object is possibly 'undefined'.


[error] 33-33: NG2: Object is possibly 'undefined'.


[error] 34-34: NG2: Object is possibly 'undefined'.


[error] 37-37: NG2: Object is possibly 'undefined'.

🪛 GitHub Actions: Test
src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-sessions-table.component.spec.ts

[error] 43-48: TypeError: array.sort is not a function


[error] 43-48: TypeError: array.sort is not a function


[error] 43-48: TypeError: array.sort is not a function

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (149)
src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-registration-import-dialog.component.spec.ts (1)

272-272: Good modernization to Angular signals approach.

This change correctly updates the test to use the fixture.componentRef.setInput method instead of direct property assignment, which aligns with Angular's recommended approach for testing components that use the new input signals pattern. This is consistent with the PR's objective of migrating from @Input to inputSignals.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-management.component.spec.ts (1)

141-143: Correctly updated property access to function call for Angular signals.

The test has been properly updated to use function call syntax tutorialFreePeriod() instead of direct property access, which aligns with the migration from @Input decorators to input() signals.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session/edit-tutorial-group-session.component.html (1)

9-9: Correctly migrated to Angular signals syntax.

The template has been properly updated to use the function call syntax course() instead of direct property access, which is the correct way to access input signals in Angular templates.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session/create-tutorial-group-session.component.html (1)

9-9: Correctly migrated to Angular signals syntax.

The template has been properly updated to use the function call syntax course() instead of direct property access, which is the correct way to access input signals in Angular templates.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/create-tutorial-group-free-period.component.html (1)

9-9: Correctly migrated to Angular signals syntax.

The template has been properly updated to use the function call syntax course() instead of direct property access, which is the correct way to access input signals in Angular templates. This change aligns with the PR objective of migrating from @Input to inputSignals.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/edit-tutorial-group-free-period.component.html (2)

9-9: Input access pattern properly updated to signals

The change from course.timeZone! to course().timeZone! correctly implements the migration from @Input to inputSignals as per the PR's objective.


2-2: Modern Angular control flow syntax is used correctly

The component is using the newer @if syntax instead of the older *ngIf directive, which aligns with the provided coding guidelines.

src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-utilization-indicator.component.spec.ts (2)

23-23: Test properly updated to use setInput for signals

The change to fixture.componentRef.setInput('tutorialGroup', tutorialGroup) properly implements the correct way to set inputs when using signals-based components in tests.


5-5: Test follows proper mocking practices

The test correctly uses MockComponent and MockPipe from ng-mocks as specified in the coding guidelines, helping to isolate the component under test.

Also applies to: 17-17

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.html (1)

4-4: Input access pattern properly updated to signals

The change from direct property access to tutorialGroups() as a function call correctly implements the migration from @Input to inputSignals.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-button.component.spec.ts (2)

28-28: Test properly updated to use setInput for signals

The change to fixture.componentRef.setInput('courseId', exampleCourseId) correctly implements the proper way to set inputs when using signals-based components in tests.


58-62: Expectation specificity follows the guidelines

The test correctly uses .toHaveBeenCalledOnce() for checking method calls, which aligns with the expectation specificity guidelines for testing.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.html (1)

23-23: Correctly updated input binding to use signals

The binding for [course] is now properly updated to use a function call course() instead of a property access, which aligns with the migration from @Input decorators to input() signals.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period.component.spec.ts (1)

128-130: Correctly updated test component initialization to use setInput

The component inputs are now properly initialized using fixture.componentRef.setInput() instead of direct property assignment, which is the correct approach when working with signal-based inputs in Angular components.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component.spec.ts (1)

55-55: Correctly updated courseId input initialization in tests

The courseId input property is now properly initialized using fixture.componentRef.setInput() instead of direct property assignment, aligning with Angular's approach for signal-based inputs in components.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session.component.spec.ts (1)

55-57: Correctly updated component input initialization in tests

The component inputs (course, tutorialGroupSession, and tutorialGroup) are now properly initialized using fixture.componentRef.setInput() instead of direct property assignment, which is the correct approach for testing components that use signal-based inputs.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.html (1)

5-5: Changes to function calls for signal-based inputs look good.

The code correctly converts direct property access to function calls for signal-based inputs (tutorialGroupFreeDays() and timeZone()), aligning with Angular's new input signal API.

Also applies to: 8-8

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons.component.spec.ts (1)

47-49: Correctly updated test setup for signal-based inputs.

The change to use fixture.componentRef.setInput() instead of direct property assignment is the proper approach for testing components with signal-based inputs.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/crud/tutorial-group-form/schedule-form/schedule-form.component.html (1)

1-1: Properly updated formGroup binding for signal-based input.

The change correctly updates the formGroup binding to use parentFormGroup() as a function call, consistent with Angular's signal-based input pattern.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-button.component.spec.ts (1)

48-52: Good use of setInput for Angular signal-based component testing.

The change from directly setting component properties to using fixture.componentRef.setInput() follows best practices for testing components with signal-based inputs in Angular.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html (1)

1-9: Good migration to signal-based syntax in the first conditional block.

The template correctly uses function call syntax tutorialGroup() instead of direct property access to retrieve values, aligning with the PR objective of migrating to inputSignals.

src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-row.component.spec.ts (1)

33-35: Good use of setInput for Angular signal-based component testing.

The change from directly setting component properties to using fixture.componentRef.setInput() follows best practices for testing components with signal-based inputs in Angular.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information.component.spec.ts (1)

35-35: Good use of setInput for Angular signal-based component testing.

The change from directly setting component property to using fixture.componentRef.setInput() follows best practices for testing components with signal-based inputs in Angular.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period.component.spec.ts (1)

46-47: Property initialization updated to use fixture.componentRef.setInput()

The code correctly updates the initialization of component inputs to use Angular's modern approach with fixture.componentRef.setInput() instead of direct property assignment. This change aligns with Angular's Signal inputs pattern.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.html (3)

4-4: Updated property access to use function call syntax

Correctly updated from direct property access to function call syntax (tutorialFreePeriod().id), which is required when using Angular Signal inputs.


10-10: Updated property access to use function call syntax

Correctly updated from direct property access to function call syntax (tutorialFreePeriod().id), which is required when using Angular Signal inputs.


12-12: Updated property access to use function call syntax

Correctly updated from direct property access to function call syntax for both tutorialFreePeriod() and course(), which is required when using Angular Signal inputs.

src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-free-days-overview.component.spec.ts (2)

59-60: Property initialization updated to use fixture.componentRef.setInput()

The code correctly updates the initialization of component inputs to use Angular's modern approach with fixture.componentRef.setInput() instead of direct property assignment. This change aligns with Angular's Signal inputs pattern.


71-71: Updated property access to use function call syntax

Correctly updated the test assertion to use function call syntax (component.tutorialGroupFreeDays()) instead of direct property access. This matches the component's implementation using Signal inputs.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.html (1)

2-2: All other property accesses updated correctly

The remaining property accesses have been correctly updated to use function call syntax when accessing Signal inputs. This is the required pattern when using Angular's Signal API.

Also applies to: 5-5, 18-21, 26-26, 65-65, 97-97, 102-102, 114-114, 119-119, 123-123, 153-156

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons.component.spec.ts (1)

55-57: Correctly implementing signal-based input testing.

The change from direct property assignment to using fixture.componentRef.setInput() is the proper approach for testing components with signal-based inputs. This follows Angular's best practices for testing components that use the new input() function.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session.component.spec.ts (1)

47-48: Properly updating test setup for signal-based inputs.

The code correctly updates input initialization using fixture.componentRef.setInput() rather than direct property assignment, which is the recommended approach when testing components that use the new signal-based inputs.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.html (2)

56-56: Correctly accessing timeZone property through course signal.

The template is now properly accessing the timeZone property through the course signal function call rather than direct property access, which aligns with Angular's signal-based inputs pattern.


64-64: Properly passing course signal to child component.

The template is correctly passing the course signal value to the child component using function invocation syntax, which is required when working with signal-based inputs.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal.component.spec.ts (2)

33-35: Test inputs correctly updated for signal-based approach.

The code properly migrates from direct property assignment to using fixture.componentRef.setInput() for initializing component inputs, which aligns with Angular's recommended practices for testing components with signal-based inputs.


75-75: Proper access of tutorialGroupSession as a signal function.

The test correctly calls tutorialGroupSession() as a function rather than accessing it as a property directly, which is the expected pattern when working with signal-based inputs.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.html (1)

12-14: Consistent usage of input signals in template

The conversion from @input to input signals has been appropriately applied to the property bindings.

The template now correctly invokes input properties as functions (e.g., showIdColumn(), timeZone(), isReadOnly()), which is the correct pattern when using Angular's input signals.

Also applies to: 40-43, 66-70, 91-95

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.spec.ts (2)

93-94: LGTM! Correct use of setInput for component testing

The change from direct property assignment to using fixture.componentRef.setInput() is the proper approach for setting inputs when testing components that use signal-based inputs.

This matches the Angular testing best practices for components using the new input signals API.


110-110: LGTM! Updated test expectation for signal-based input

The test expectation has been correctly updated to invoke the course property as a function since it's now a signal-based input.

This change ensures the test properly validates the component's behavior with the new input signals pattern.

src/test/javascript/spec/component/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.spec.ts (2)

106-107: LGTM! Correct use of setInput for component testing

The change from direct property assignment to using fixture.componentRef.setInput() is the proper approach for setting inputs when testing components that use signal-based inputs.

This matches the Angular testing best practices for components using the new input signals API.


127-127: LGTM! Updated test expectation for signal-based input

The test expectation has been correctly updated to invoke the course property as a function since it's now a signal-based input.

This change ensures the test properly validates the component's behavior with the new input signals pattern.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.ts (2)

1-1: LGTM! Updated import for Angular signals

The import statement has been correctly updated to use the new input function from Angular core instead of the Input decorator.

This is in line with Angular's move toward the signals API.


15-15: LGTM! Converted @input to input signal

The component property has been correctly converted from using the @Input() decorator to using the new input.required<TutorialGroup>() function.

This conversion follows Angular's modern approach to defining component inputs using signals. Using input.required() also ensures type safety by explicitly requiring a TutorialGroup.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.html (1)

2-2: Good switch to Angular's new control flow syntax!

You've successfully migrated from *ngIf to @if directives following the Angular guidelines. This new syntax is more efficient and type-safe.

Also applies to: 25-26, 28-32, 33-37, 47-61

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/tutorial-group-row-buttons.component.html (2)

1-1: Good migration to the new Angular control flow syntax

Successfully replaced *ngIf with @if and updated property accessors to use function calls. This adheres to the Angular guidelines.

Also applies to: 4-4, 11-11, 18-18, 29-29


4-5:

❓ Verification inconclusive

Add null checks for property accesses

Similar to the first file, add optional chaining when accessing properties of objects returned by function calls to prevent potential null reference errors.

Also applies to: 11-12, 19-22, 30-32


🏁 Script executed:

#!/bin/bash
# Check if the TutorialGroup interface includes proper types for the properties used
rg -A 5 "interface TutorialGroup" 

Length of output: 13243


Optional Chaining Required for Property Accesses
Update the template code so that function calls returning objects are safely dereferenced using optional chaining. For example, change:

@if (isAtLeastInstructor() || tutorialGroup().isUserTutor) {
    <button type="button" [id]="'sessions-' + tutorialGroup().id" (click)="openSessionDialog($event)" class="btn btn-primary btn-sm me-1">

to

@if (isAtLeastInstructor() || tutorialGroup()?.isUserTutor) {
    <button type="button" [id]="'sessions-' + tutorialGroup()?.id" (click)="openSessionDialog($event)" class="btn btn-primary btn-sm me-1">

Please apply similar optional chaining updates in the corresponding sections at lines 11–12, 19–22, and 30–32 to prevent potential null reference errors.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-export-button.component/tutorial-groups-export-button.component.ts (2)

1-1: Good migration from @input to input.required()

Successfully migrated from the traditional @Input() decorator to the new Signal-based input.required<number>() function. This aligns with the PR's objective of modernizing the codebase.

Also applies to: 25-25


87-87: Correctly updated property accesses to function calls

The courseId property is now correctly accessed as a function call in the service methods, which is consistent with the new input signals pattern.

Also applies to: 107-107

src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-sessions-table.component.spec.ts (2)

82-84: Good update to use fixture.componentRef.setInput()

Correctly migrated from direct property assignment to using fixture.componentRef.setInput(), which is the appropriate way to set input values for components using the new input signal pattern.

Also applies to: 150-152


96-97: Correctly updated property access to method calls

The test expectations have been properly updated to call the properties as functions, reflecting the changes in the component implementation.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-import-button/tutorial-groups-import-button.component.ts (3)

1-1: Correctly updated imports to include input signal functionality.

The import of input from '@angular/core' is properly added to support the new signal-based inputs.


22-22: Successfully migrated to required input signal.

The migration from @Input() decorator to input.required<number>() follows Angular's new signal-based input approach.


34-34: Property access correctly updated to function call.

The access to courseId has been properly updated from direct property access to a function call this.courseId().

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-groups-course-information/tutorial-groups-course-information.component.ts (3)

1-1: Proper import modifications for input signals.

The import statement has been correctly updated to include input and remove Input as part of the migration to signal-based inputs.


14-14: Correctly migrated to input signal with default value.

The migration from @Input() tutorialGroups: TutorialGroup[] = [] to tutorialGroups = input<TutorialGroup[]>([]) properly maintains the default empty array value.


17-17: Property access properly updated to function call in reducer.

The property access in the reducer has been correctly updated to use the function call syntax this.tutorialGroups().

src/test/javascript/spec/component/tutorial-groups/shared/tutorial-group-detail.component.spec.ts (4)

103-103: Test correctly updated to use function call for accessing tutorial group.

The comparison now properly uses detailInstance.tutorialGroup() instead of direct property access, aligning with the component's new signal-based input implementation.


132-132: Test setup updated to use modern input setting approach.

The test now properly uses fixture.componentRef.setInput() instead of direct property assignment, following Jest and Angular test best practices for signal-based inputs.


181-181: Test setup correctly adapted for signal inputs in average attendance test.

The test properly uses fixture.componentRef.setInput() to set the tutorial group input when testing attendance calculations.


183-183: Test expectation correctly updated to use function call.

The expectation now properly accesses the tutorial group's average attendance through component.tutorialGroup() function call.

src/test/javascript/spec/component/tutorial-groups/shared/tutorial-groups-table.component.spec.ts (2)

110-111: Property access properly updated to function calls in expectations.

Test expectations have been correctly updated to use function calls tutorialGroups() and course() for accessing component inputs.


141-143: Test setup properly updated to use setInput method.

The test initialization has been correctly updated to use fixture.componentRef.setInput() for all inputs, following best practices for testing components with signal-based inputs.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/registered-students/registered-students.component.ts (8)

1-1: LGTM: Updated import statement correctly.

The import statement has been properly updated to include the input function from Angular core, which is necessary for the signal-based input approach.


31-32: Good migration from @input decorator to input signals.

The component has been properly updated to use the modern signal-based input approach with input.required<Type>() instead of the @Input() decorator. This maintains type safety while moving to the newer API.


64-65: Correctly updated property access to function calls.

The component initialization logic has been properly updated to use function calls (this.tutorialGroupId() and this.course()) instead of direct property access.


74-75: LGTM: Properly updated property access in addToGroup method.

The property access has been properly converted to a function call in the addToGroup method.


84-85: LGTM: Properly updated property access in removeFromGroup method.

The property access has been properly converted to a function call in the removeFromGroup method.


94-94: LGTM: Properly updated property access in userSearch method.

The property access has been properly converted to a function call in the userSearch method.


96-98: LGTM: Properly updated property access in exportFilename getter.

The property access has been properly converted to a function call in the exportFilename getter.


105-106: LGTM: Properly updated property access in loadAll method.

The property access has been properly converted to a function call in the loadAll method.

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.ts (3)

1-1: LGTM: Updated import statement correctly.

The import statement has been properly updated to include the input function from Angular core, which is necessary for the signal-based input approach.


63-63: Good migration from @input decorator to input signals.

The component has been properly updated to use the modern signal-based input approach with input.required<number>() instead of the @Input() decorator. This maintains type safety while moving to the newer API.


280-281: Correctly updated property access to function call in import method.

The property access has been properly converted to a function call (this.courseId()) in the import method.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/create-tutorial-group-session/create-tutorial-group-session.component.ts (4)

1-1: LGTM: Updated import statement correctly.

The import statement has been properly updated to include the input function from Angular core, which is necessary for the signal-based input approach.


32-34: Good migration from @input decorator to input signals.

The component has been properly updated to use the modern signal-based input approach with input.required<Type>() instead of the @Input() decorator for both tutorialGroup and course properties. This maintains type safety while moving to the newer API.


38-40: Correctly updated property access to function calls in initialize method.

The property access has been properly converted to function calls (this.course() and this.tutorialGroup()) in the initialize method.


56-57: Correctly updated property access to function calls in createTutorialGroupSession method.

The property access has been properly converted to function calls (this.course().id! and this.tutorialGroup().id!) in the createTutorialGroupSession method.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/create-tutorial-group-free-period/create-tutorial-group-free-period.component.ts (4)

1-1: LGTM: Updated import statement correctly.

The import statement has been properly updated to include the input function from Angular core, which is necessary for the signal-based input approach.


32-34: Good migration from @input decorator to input signals.

The component has been properly updated to use the modern signal-based input approach with input.required<Type>() instead of the @Input() decorator for both tutorialGroupConfigurationId and course properties. This maintains type safety while moving to the newer API.


38-40: Correctly updated property access to function calls in initialize method.

The property access has been properly converted to function calls (this.tutorialGroupConfigurationId() and this.course()) in the initialize method.


53-54: Correctly updated property access to function calls in createTutorialGroupFreePeriod method.

The property access has been properly converted to function calls (this.course().id! and this.tutorialGroupConfigurationId()) in the createTutorialGroupFreePeriod method.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-sessions-management.component.ts (5)

1-1: Import statement updated correctly for new input pattern.

The import statement has been properly updated to include inject and input from Angular core, which are necessary for the new input signal pattern.


54-55: Successfully migrated to inputSignals pattern.

The component has been correctly updated to use the new input.required<T>() pattern, replacing the previous @Input() decorators. This change aligns with the PR objective of modernizing the codebase.


64-64: Properly updated property access to function calls.

The conditional check has been correctly updated to use function calls (tutorialGroupId() and course()) instead of direct property access, consistent with the input signals pattern.


76-76: Correctly updated property access in service call.

The service call has been properly updated to use this.course().id! instead of this.course.id!, maintaining consistency with the input signals pattern.


104-104: Successfully updated modal component instance property assignment.

The assignment to modalRef.componentInstance.course now correctly uses this.course() to retrieve the course value from the input signal.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-detail/tutorial-group-detail.component.ts (3)

1-1: Import statement updated correctly for new input pattern.

The import statement has been properly updated to include inject and input from Angular core, which are necessary for the new input signal pattern.


48-50: Successfully migrated to inputSignals with proper typing.

The component has been correctly updated to use the new input signals pattern:

  • timeZone uses input<string | undefined>(undefined) to preserve the optional nature with a default value
  • tutorialGroup uses input.required<TutorialGroup>() to indicate it's a required input
  • course uses input<Course>() for Course type

This follows Angular best practices for the new signals API.


76-77: All property accesses consistently updated to function calls.

All instances of accessing the input properties have been correctly updated to use function calls (e.g., this.tutorialGroup(), this.course()). This maintains consistency throughout the component.

Also applies to: 88-94, 95-99, 104-107, 117-118, 123-124

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.ts (3)

1-1: Import statement updated correctly for new input pattern.

The import statement has been properly updated to include inject and input from Angular core, which are necessary for the new input signal pattern.


23-25: Successfully migrated to inputSignals with default values.

The component has been correctly updated to use the new input signals pattern:

  • tutorialGroupFreeDays uses input<TutorialGroupFreePeriod[]>([]) to provide an empty array as default
  • timeZone uses input<string | undefined>(undefined) to preserve the optional nature with a default value

This properly maintains the same behavior as the previous implementation while adopting the new syntax.


38-39: All property accesses consistently updated to function calls.

All instances of accessing the input properties have been correctly updated to use function calls. This maintains consistency throughout the component and properly implements the signals pattern.

Also applies to: 43-44, 50-51

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/crud/tutorial-group-form/schedule-form/schedule-form.component.ts (5)

1-1: Import statement updated correctly for new input pattern.

The import statement has been properly updated to include inject and input from Angular core, which are necessary for the new input signal pattern.


41-42: Successfully migrated to required inputSignals.

The component has been correctly updated to use the new input.required<T>() pattern for both course and parentFormGroup properties, indicating they are required inputs for this component.


55-56: Properly updated getter to use function call.

The parentIsOnlineControl getter has been correctly updated to use this.parentFormGroup() instead of directly accessing the property, consistent with the signals pattern.


102-104: Successfully updated property access to function call in initialization.

The component initialization code has been properly updated to use this.course() to access the course object, maintaining consistency with the signals pattern.


120-120: Correctly updated form control addition to use function call.

The code to add a control to the parent form group now correctly uses this.parentFormGroup() to retrieve the form group from the input signal.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-groups/tutorial-groups-management/tutorial-group-row-buttons/tutorial-group-row-buttons.component.ts (5)

1-1: Good job on updating import statements

The component correctly imports inject and input from '@angular/core' which are needed for the refactoring.


29-31: Proper migration to Angular input signals

The code has been correctly updated from @Input() decorators to use Angular's modern signals API. The required inputs are properly marked as such, and default values are provided where appropriate.


55-57: Correct function call syntax for accessing input signals

The property access has been properly converted to function calls using parentheses. This is the correct pattern when working with input signals.


71-73: Input signal access properly implemented

Correct implementation of function calls to access the input signal values in the component instance.


86-86: Properly updated property access

The code correctly uses function call syntax to access the input signals within the delete operation.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.html (4)

1-1: Correct function call syntax for label text

Properly updated to invoke labelText() as a function call, which aligns with the signal-based API approach.


16-16: Properly migrated to @for loop with signal function call

The new Angular control flow syntax @for is correctly used here, and the signal is properly accessed as a function call.


22-22: Updated course property access correctly

The template correctly accesses the course signal using function call syntax to get the timeZone property.

Also applies to: 25-25


47-49: Proper signal property binding

Input bindings correctly use function call syntax to pass the signal values to the child component.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/crud/edit-tutorial-group-session/edit-tutorial-group-session.component.ts (4)

1-1: Good job on updating import statements

The component correctly imports inject and input from '@angular/core' which are needed for the signal-based refactoring.


30-36: Proper migration to required input signals

The component correctly defines required input signals for the tutorialGroup, course, and tutorialGroupSession properties.


42-53: Successfully updated property access to signal function calls

The initialize method has been properly updated to use signal function calls when accessing the input properties. The null check logic has also been updated appropriately.


68-68: Proper signal access in service call

The updateSession method correctly uses function call syntax to access the input signal values when making the service call.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/cancellation-modal/cancellation-modal.component.ts (6)

1-1: Good job on updating import statements

The component correctly imports inject and input from '@angular/core' which are needed for the signal-based refactoring.


32-36: Proper migration to required input signals

The component correctly defines required input signals for the course, tutorialGroupId, and tutorialGroupSession properties.


60-60: Properly updated course access

The generateSessionLabel method correctly uses function call syntax to access the course input signal's timeZone property.


64-69: Successful migration to signal function calls

The cancelOrActivate method correctly accesses the tutorialGroupSession property as a function call.


73-73: Proper signal access in service call

The cancelSession method correctly uses function call syntax to access all three input signal values when making the service call.


88-88: Proper signal access in service call

The activateSession method correctly uses function call syntax to access all input signal values when making the service call.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-group-sessions/tutorial-group-sessions-management/tutorial-group-session-row-buttons/tutorial-group-session-row-buttons.component.ts (5)

1-1: Import statement updated correctly to include the new signals API.

The component now imports the input function from @angular/core, which is essential for the refactoring from @Input() decorators to signals.


31-33: Input properties correctly migrated to Signal API.

The component has been properly refactored to use input.required<T>() instead of @Input() decorators, which enforces that these inputs must be provided by parent components.


49-49: Property access updated to function calls.

The code now correctly accesses input properties as functions: this.course().id!, this.tutorialGroup().id!, and this.tutorialGroupSession().id!.


63-64: Component instance property assignments updated properly.

The modal component instance properties are now correctly assigned using function calls to retrieve the input values.


81-83: Modal component property assignments properly updated.

All properties are now correctly passed to the edit session dialog using function calls instead of direct property access.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.html (5)

12-12: Template condition correctly updated to use function syntax.

The conditional rendering now calls showIdColumn() as a function instead of accessing it as a property, which is consistent with the component's signal-based implementation.


60-60: Template condition correctly updated to use function syntax.

The conditional rendering for the channel column now appropriately calls showChannelColumn() as a function.


62-62: Router link property access updated to function call.

The routerLink directive now correctly accesses the course ID through course().id! instead of direct property access.


71-71: Template iteration updated to use function call.

The @for loop now correctly iterates over tutorialGroups() as a function call, aligned with the signal-based implementation.


81-85: Input bindings properly updated to use function calls.

All input property bindings in the tutorial-group-row component are now correctly passed as function calls to maintain consistency with the signal-based architecture.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-period-row-buttons/tutorial-group-free-period-row-buttons.component.ts (4)

1-1: Import statement properly updated to include signals API.

The component now imports the input function from @angular/core, which is necessary for migrating from @Input() decorators.


27-29: Input properties correctly migrated to Signal API.

The component has been properly refactored to use input.required<T>() instead of @Input() decorators for all three input properties.


44-44: Property access updated to function calls.

The service method now correctly uses function calls to access the required IDs: this.course().id!, this.tutorialGroupConfiguration().id!, and this.tutorialFreePeriod().id!.


58-60: Modal component property assignments properly updated.

The modal component instance properties are now correctly initialized using function calls to retrieve the input values instead of direct property access.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-groups-table.component.ts (4)

1-1: Import statement properly updated to include signals API.

The component now imports the input function from @angular/core, which is necessary for implementing the signal-based input properties.


30-38: Input properties correctly migrated to Signal API.

All input properties have been properly refactored to use the signal-based approach:

  • showIdColumn initialized with default value false
  • showChannelColumn initialized with default value false
  • tutorialGroups initialized with an empty array
  • course initialized without a default value
  • timeZone initialized with undefined

This is consistent with the Angular signals approach.


67-72: Property access in sort method updated to function calls.

The sortRows method now correctly uses function calls to access tutorialGroups() in all sorting operations.


90-96: Property access in ngOnChanges updated to function calls.

All references to tutorialGroups in the ngOnChanges method have been updated to use the function call syntax, which is necessary when working with signal-based inputs.

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/crud/edit-tutorial-group-free-period/edit-tutorial-group-free-period.component.ts (6)

1-1: Consistent import order with Angular recommended style.

The update correctly adds the input import from '@angular/core' alongside other core imports.


33-37: Well-implemented migration to input signals.

The migration from @Input() decorator to input.required<T>() ensures type safety and makes required inputs explicit, following modern Angular practices.


51-51: Properly updated input access pattern.

Access pattern correctly changed from direct property access to function calls (this.tutorialGroupFreePeriod() instead of this.tutorialGroupFreePeriod), ensuring compatibility with the signal-based approach.


56-58: Consistent signal usage in function calls.

Consistently updated static method calls to use the signal-based property access pattern.


60-64: Properly updated nested property access.

All nested property access patterns have been correctly updated to use function calls first (e.g., this.tutorialGroupFreePeriod().start instead of this.tutorialGroupFreePeriod.start).


92-92: Properly updated service call with signal values.

Service method parameters correctly updated to use function calls to access input properties, maintaining consistent pattern throughout the component.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-sessions-table/tutorial-group-sessions-table.component.ts (4)

13-13: Correct import of input from Angular core.

The update correctly adds the input import from '@angular/core'.


38-48: Well-implemented migration to input signals with default values.

The migration from @Input() decorator to input<T>() with appropriate default values enhances type safety and provides better developer experience.


59-71: Improved getter implementation with defensive programming.

The numberOfColumns getter has been properly updated to handle the case when tutorialGroup() returns undefined by returning 0, which is a good defensive programming practice.


32-101:

❓ Verification inconclusive

Consider updating ngOnChanges logic for signals

The component still implements OnChanges while using the new signals API. While this works during transition, signals have their own change detection mechanism that might make ngOnChanges less relevant for signal-based properties.

Consider evaluating whether this component still needs to implement OnChanges now that it's using signals. For signal-based inputs, you might want to use the .subscribe() method or effect() to react to changes instead.


🏁 Script executed:

#!/bin/bash
# Search for similar patterns in the codebase to see how other components handle this
rg "implements OnChanges" -A 3 -B 3 | rg "input\("

Length of output: 52


Update ngOnChanges to fully leverage signals-based change detection

Our initial search for similar patterns in the codebase did not produce relevant examples on how other components are managing signal updates without relying on ngOnChanges. Please verify manually whether the use of the traditional change detection via ngOnChanges in this component is necessary or if you can refactor it to use signals directly (for example, using .subscribe() or effect()). This review comment remains a request for additional evaluation before making a decision.

🧰 Tools
🪛 Biome (1.9.4)

[error] 75-75: Do not access Object.prototype method 'hasOwnProperty' from target object.

It's recommended using Object.hasOwn() instead of using Object.hasOwnProperty().
See MDN web docs for more details.

(lint/suspicious/noPrototypeBuiltins)

src/main/webapp/app/course/tutorial-groups/tutorial-groups-management/tutorial-free-periods/tutorial-free-periods-management/tutorial-group-free-periods-table/tutorial-group-free-periods-table.component.ts (3)

1-1: Correct import of input from Angular core.

The update correctly adds the input import from '@angular/core'.


21-25: Effective use of required inputs for contract enforcement.

Using input.required<T>() for all inputs clearly communicates that these inputs are mandatory for the component to function properly, which is good practice for enforcing component contracts.


25-25: Good signal implementation for function input.

The implementation correctly shows that the signal pattern works well for function inputs, not just data properties.

src/main/webapp/app/course/tutorial-groups/shared/tutorial-groups-table/tutorial-group-row/tutorial-group-row.component.ts (2)

1-1: Correct import of input from Angular core.

The update correctly adds the input import from '@angular/core'.


24-48: Well-documented and consistently implemented inputs.

The implementation maintains good JSDoc comments for inputs and consistently applies default values for boolean inputs. The migration to signals is well-executed with appropriate types.

coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 7, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 7, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 7, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 7, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 2

🧹 Nitpick comments (12)
src/main/resources/templates/aeolus/javascript/default_static.sh (4)

1-3: Script Initialization and Environment Variable Setup
The shebang (#!/usr/bin/env bash) and set -e are correctly used, ensuring the script runs with Bash and exits on errors. However, in the export command, consider quoting the expansion of ${PWD} to safeguard against potential issues when the working directory contains spaces.

-export AEOLUS_INITIAL_DIRECTORY=${PWD}
+export AEOLUS_INITIAL_DIRECTORY="${PWD}"

9-12: static_code_analysis Function Logic
The function executes a linting command and uses || [ $? -eq 1 ] to allow a specific exit code (presumably 1) without causing the script to exit. Although this works in practice, it might be clearer to explicitly capture and check the exit code. For instance, storing the exit status in a variable before testing it could improve readability and future maintenance.


14-17: test Function Naming Suggestion
The function correctly echoes a status message and runs the tests via npm run test:ci. Note that naming a function test can shadow the Bash built-in command test, potentially leading to confusion. Consider renaming it to something more descriptive like run_tests to avoid any conflicts.


19-31: main Function Structure and Subshell Invocations
The main function correctly detects the special aeolus_sourcing argument to allow sourcing without executing further commands. It then uses a series of subshell invocations (via bash -c with sourcing) to sequentially execute install_dependencies, static_code_analysis, and test. While this approach works, it repeats the pattern of changing back to the initial directory and sourcing the script for each function call.
Consider refactoring by iterating over a list of functions in a single subshell, which would reduce redundancy and improve maintainability. For example, you might combine the commands in a loop.

src/test/java/de/tum/cit/aet/artemis/shared/base/AbstractSpringIntegrationLocalCILocalVCTest.java (1)

226-226: Consider documenting the reason for increased visibility

Changing dockerClientMock from private to protected increases visibility, which is generally avoided in production code but may be necessary in test code. Consider adding a comment explaining why subclasses need direct access to this mock.

-    protected static DockerClient dockerClientMock;
+    /**
+     * This mock is protected to allow subclasses to customize Docker behavior for specific test scenarios.
+     */
+    protected static DockerClient dockerClientMock;
src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.html (1)

94-117: New Docker resource input fields added

The three new input fields for Docker resource configuration (CPU count, memory, memory swap) enhance the configuration capabilities. However, the binding approach differs from other form elements in this component.

Consider using [ngModel] and (ngModelChange) for binding instead of [value] and (input) to be consistent with other form elements in this file:

-<input type="text" class="form-control" name="cpuCount" id="field_dockerCpuCount" [value]="cpuCount" (input)="onCpuCountChange($event)" />
+<input type="text" class="form-control" name="cpuCount" id="field_dockerCpuCount" [ngModel]="cpuCount" (ngModelChange)="onCpuCountChange($event)" />

Also, consider adding similar patterns as other fields - like validation attributes or placeholders as appropriate.

src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIInfoContributor.java (1)

60-73: Add error handling for invalid memory string formats.

The parseMemoryStringToMB method assumes a specific string format with optional unit suffixes, but doesn't handle potential formatting errors or unexpected input patterns.

Consider adding more robust error handling:

     private static long parseMemoryStringToMB(String memoryString) {
+        if (memoryString == null || memoryString.isEmpty()) {
+            return 0;
+        }
+        
         if (memoryString.endsWith("g\"")) {
             return Long.parseLong(memoryString.replaceAll("[^0-9]", "")) * 1024L;
         }
         else if (memoryString.endsWith("m\"")) {
             return Long.parseLong(memoryString.replaceAll("[^0-9]", ""));
         }
         else if (memoryString.endsWith("k\"")) {
             return Long.parseLong(memoryString.replaceAll("[^0-9]", "")) / 1024L;
         }
         else {
+            try {
                 return Long.parseLong(memoryString);
+            } catch (NumberFormatException e) {
+                // Log error or use a default value
+                return 0;
+            }
         }
     }
src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseBuildConfigService.java (2)

59-63: Initialize new Docker configuration parameters.

Defaulting CPU and memory-related parameters to zero is logical. Consider adding a validation check (e.g., disallow negative values) if user input is expected.


99-100: Handle zero parameters as 'no config' scenario.

createDockerRunConfig returning null if all arguments are zero or null is fine, but ensure the rest of the codebase checks for null. Consider returning a no-op config object to avoid branching logic.

src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobContainerService.java (2)

106-107: New resource allocation parameters.

Accepting CPU/memory/swap in configureContainer broadens flexibility. Validate if negative values or extremely large inputs are possible and handle them carefully.


151-159: Implement resource conversion and custom HostConfig creation.

The helper methods cleanly create a dedicated HostConfig. Converting MB to bytes is standard, but watch out for integer overflow if the user specifies extremely large memory values.

src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.ts (1)

125-138: Resource limitation change handlers lack numeric conversion

The event handlers should explicitly convert the string values from input events to numbers to ensure type safety.

 onCpuCountChange(event: any) {
-    this.cpuCount = event.target.value;
+    this.cpuCount = Number(event.target.value);
     this.parseDockerFlagsToString();
 }

 onMemoryChange(event: any) {
-    this.memory = event.target.value;
+    this.memory = Number(event.target.value);
     this.parseDockerFlagsToString();
 }

 onMemorySwapChange(event: any) {
-    this.memorySwap = event.target.value;
+    this.memorySwap = Number(event.target.value);
     this.parseDockerFlagsToString();
 }
🛑 Comments failed to post (2)
src/main/resources/templates/java/test/blackbox/projectTemplate/testsuite/config/default.exp (1)

118-118: ⚠️ Potential issue

Fixed regular expression escape sequences for proper Tcl interpretation

The changes modify the regular expression patterns to properly escape the backslashes in \r and \n sequences. This is an important fix since Tcl requires double backslashes (\\r and \\n) to correctly represent the literal escape sequences in the regex pattern.

Before this change, the patterns would incorrectly interpret \r and \n rather than treating them as the literal escape sequences that need to be matched in the output text.

Also applies to: 121-121, 124-124, 172-172, 175-175, 178-178

src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIInfoContributor.java (1)

45-56: 🛠️ Refactor suggestion

Potential ArrayIndexOutOfBoundsException risk when processing Docker flags.

The implementation assumes that defaultDockerFlags always contains an even number of elements (flag and value pairs), but doesn't validate this assumption. If the list has an odd number of elements, the loop will try to access an index that doesn't exist.

Consider adding a validation check:

-        for (int i = 0; i < defaultDockerFlags.size(); i += 2) {
+        // Ensure we have pairs of flags and values
+        if (defaultDockerFlags.size() % 2 != 0) {
+            // Log warning or handle the error
+            return;
+        }
+        
+        for (int i = 0; i < defaultDockerFlags.size(); i += 2) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

        List<String> defaultDockerFlags = programmingLanguageConfiguration.getDefaultDockerFlags();

        // Ensure we have pairs of flags and values
        if (defaultDockerFlags.size() % 2 != 0) {
            // Log warning or handle the error
            return;
        }
        
        for (int i = 0; i < defaultDockerFlags.size(); i += 2) {
            String flag = defaultDockerFlags.get(i);
            String value = defaultDockerFlags.get(i + 1);

            switch (flag) {
                case "--cpus" -> builder.withDetail(Constants.DOCKER_FLAG_CPUS, Long.parseLong(value.replaceAll("[^0-9]", "")));
                case "--memory" -> builder.withDetail(Constants.DOCKER_FLAG_MEMORY_MB, parseMemoryStringToMB(value));
                case "--memory-swap" -> builder.withDetail(Constants.DOCKER_FLAG_MEMORY_SWAP_MB, parseMemoryStringToMB(value));
            }
        }

az108 added 2 commits March 11, 2025 11:23
…ared-to-signals' into chore/migrate-tutorial-groups-shared-to-signals
coderabbitai[bot]
coderabbitai bot previously approved these changes Mar 11, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/test/javascript/spec/component/programming-exercise/programming-exercise-build-configuration.component.spec.ts (1)

138-138: Consider using object comparison instead of string comparison

While the string comparison works for testing the Docker flags, considering the increasingly complex structure, it might be more maintainable to parse the JSON string and compare the resulting objects.

- expect(comp.programmingExercise()?.buildConfig?.dockerFlags).toBe('{"network":"none","env":{},"cpuCount":1,"memory":1024,"memorySwap":2048}');
+ const expectedFlags = {"network":"none","env":{},"cpuCount":1,"memory":1024,"memorySwap":2048};
+ expect(JSON.parse(comp.programmingExercise()?.buildConfig?.dockerFlags || '{}')).toEqual(expectedFlags);
src/main/java/de/tum/cit/aet/artemis/communication/service/AnswerMessageService.java (1)

64-64: Consider refactoring to reduce the constructor parameter list.

The long list of injected dependencies is a potential code smell that can make the class more difficult to maintain and test. Extracting related services or using a builder/facade pattern can help simplify the constructor and enhance overall maintainability.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9dedf5d and 3628823.

⛔ Files ignored due to path filters (14)
  • package-lock.json is excluded by !**/package-lock.json
  • src/main/resources/config/application-buildagent.yml is excluded by !**/*.yml
  • src/main/resources/config/application.yml is excluded by !**/*.yml
  • src/main/resources/templates/aeolus/javascript/default_static.yaml is excluded by !**/*.yaml
  • src/main/resources/templates/javascript/staticCodeAnalysis/test/package-lock.json is excluded by !**/package-lock.json
  • src/main/resources/templates/javascript/test/package-lock.json is excluded by !**/package-lock.json
  • supporting_scripts/course-scripts/quick-course-setup/config.ini is excluded by !**/*.ini
  • package-lock.json is excluded by !**/package-lock.json
  • src/main/resources/config/application-buildagent.yml is excluded by !**/*.yml
  • src/main/resources/config/application.yml is excluded by !**/*.yml
  • src/main/resources/templates/aeolus/javascript/default_static.yaml is excluded by !**/*.yaml
  • src/main/resources/templates/javascript/staticCodeAnalysis/test/package-lock.json is excluded by !**/package-lock.json
  • src/main/resources/templates/javascript/test/package-lock.json is excluded by !**/package-lock.json
  • supporting_scripts/course-scripts/quick-course-setup/config.ini is excluded by !**/*.ini
📒 Files selected for processing (173)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.ts (3 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html (1 hunks)
  • build.gradle (8 hunks)
  • docs/requirements.txt (1 hunks)
  • docs/user/exercises/programming-exercise-features.inc (1 hunks)
  • gradle.properties (1 hunks)
  • gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • jest.config.js (1 hunks)
  • package.json (8 hunks)
  • src/main/java/de/tum/cit/aet/artemis/atlas/repository/KnowledgeAreaRepository.java (0 hunks)
  • src/main/java/de/tum/cit/aet/artemis/atlas/web/StandardizedCompetencyResource.java (0 hunks)
  • src/main/java/de/tum/cit/aet/artemis/buildagent/dto/DockerFlagsDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/buildagent/dto/DockerRunConfig.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobContainerService.java (4 hunks)
  • src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobExecutionService.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/communication/service/AnswerMessageService.java (2 hunks)
  • src/main/java/de/tum/cit/aet/artemis/core/config/Constants.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/core/config/StaticCodeAnalysisConfigurer.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/ExamAttendanceCheckEvent.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/ExamWideAnnouncementEvent.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/ProblemStatementUpdateEvent.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/WorkingTimeUpdateEvent.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ExamAttendanceCheckEventDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ExamLiveEventBaseDTO.java (0 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ExamWideAnnouncementEventDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ProblemStatementUpdateEventDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/WorkingTimeUpdateEventDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/service/ExamLiveEventsService.java (0 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exercise/service/ExerciseService.java (0 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/repository/BuildJobRepository.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseBuildConfigService.java (3 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseService.java (2 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIInfoContributor.java (3 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIProgrammingLanguageFeatureService.java (1 hunks)
  • src/main/resources/templates/aeolus/javascript/default_static.sh (1 hunks)
  • src/main/resources/templates/java/test/blackbox/projectTemplate/testsuite/config/default.exp (2 hunks)
  • src/main/resources/templates/javascript/staticCodeAnalysis/test/eslint.config.mjs (1 hunks)
  • src/main/resources/templates/javascript/staticCodeAnalysis/test/package.json (1 hunks)
  • src/main/webapp/app/exam/manage/exams/exam-checklist-component/exam-announcement-dialog/exam-live-announcement-create-modal.component.ts (0 hunks)
  • src/main/webapp/app/exam/manage/students/exam-students.component.html (1 hunks)
  • src/main/webapp/app/exam/manage/students/upload-images/students-upload-images-button.component.ts (2 hunks)
  • src/main/webapp/app/exam/participate/exam-participation-live-events.service.ts (0 hunks)
  • src/main/webapp/app/exam/shared/events/exam-live-event.component.html (0 hunks)
  • src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.html (1 hunks)
  • src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.ts (6 hunks)
  • src/main/webapp/app/exercises/programming/shared/service/aeolus.service.ts (1 hunks)
  • src/main/webapp/app/index.d.ts (0 hunks)
  • src/main/webapp/app/shared/circular-progress-bar/circular-progress-bar.component.html (0 hunks)
  • src/main/webapp/app/shared/circular-progress-bar/circular-progress-bar.component.scss (0 hunks)
  • src/main/webapp/app/shared/circular-progress-bar/circular-progress-bar.component.ts (0 hunks)
  • src/main/webapp/app/shared/course-group/course-group.component.html (1 hunks)
  • src/main/webapp/app/shared/layouts/profiles/profile-info.model.ts (1 hunks)
  • src/main/webapp/app/shared/layouts/profiles/profile.service.ts (1 hunks)
  • src/main/webapp/app/shared/markdown-editor/monaco/markdown-editor-monaco.component.html (2 hunks)
  • src/main/webapp/app/shared/markdown-editor/monaco/markdown-editor-monaco.component.ts (1 hunks)
  • src/main/webapp/app/shared/metis/posting-markdown-editor/posting-markdown-editor.component.html (1 hunks)
  • src/main/webapp/app/shared/standardized-competencies/standardized-competency.service.ts (0 hunks)
  • src/main/webapp/app/shared/user-import/users-import-button.component.ts (2 hunks)
  • src/main/webapp/app/shared/util/markdown.conversion.util.ts (3 hunks)
  • src/main/webapp/i18n/de/error.json (1 hunks)
  • src/main/webapp/i18n/de/exam.json (0 hunks)
  • src/main/webapp/i18n/de/programmingExercise.json (2 hunks)
  • src/main/webapp/i18n/en/error.json (1 hunks)
  • src/main/webapp/i18n/en/exam.json (0 hunks)
  • src/main/webapp/i18n/en/programmingExercise.json (2 hunks)
  • src/test/java/de/tum/cit/aet/artemis/atlas/competency/StandardizedCompetencyIntegrationTest.java (0 hunks)
  • src/test/java/de/tum/cit/aet/artemis/exam/StudentExamIntegrationTest.java (0 hunks)
  • src/test/java/de/tum/cit/aet/artemis/programming/icl/LocalCIInfoContributorTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/programming/icl/LocalCIIntegrationTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/shared/base/AbstractSpringIntegrationLocalCILocalVCTest.java (1 hunks)
  • src/test/javascript/spec/component/exam/shared/events/exam-live-event.component.spec.ts (0 hunks)
  • src/test/javascript/spec/component/programming-exercise/programming-exercise-build-configuration.component.spec.ts (3 hunks)
  • src/test/javascript/spec/component/shared/circular-progress-bar.component.spec.ts (0 hunks)
  • src/test/javascript/spec/component/standardized-competencies/standardized-competency.service.spec.ts (1 hunks)
  • src/test/javascript/spec/service/exam-participation-live-events.service.spec.ts (0 hunks)
  • src/test/playwright/e2e/exam/ExamParticipation.spec.ts (0 hunks)
  • src/test/playwright/support/pageobjects/exam/ExamManagementPage.ts (0 hunks)
  • src/test/playwright/support/pageobjects/exam/ExamParticipationActions.ts (0 hunks)
  • src/test/playwright/support/pageobjects/exam/ModalDialogBox.ts (0 hunks)
  • supporting_scripts/course-scripts/quick-course-setup/add_users_to_course.py (1 hunks)
  • supporting_scripts/course-scripts/quick-course-setup/create_course.py (2 hunks)
  • supporting_scripts/course-scripts/quick-course-setup/create_users.py (1 hunks)
  • supporting_scripts/course-scripts/quick-course-setup/large_course_main.py (1 hunks)
  • supporting_scripts/course-scripts/quick-course-setup/manage_programming_exercise.py (3 hunks)
  • supporting_scripts/course-scripts/quick-course-setup/utils.py (2 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.ts (1 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html (1 hunks)
  • build.gradle (8 hunks)
  • docs/requirements.txt (1 hunks)
  • docs/user/exercises/programming-exercise-features.inc (1 hunks)
  • gradle.properties (1 hunks)
  • gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • jest.config.js (1 hunks)
  • package.json (8 hunks)
  • src/main/java/de/tum/cit/aet/artemis/atlas/repository/KnowledgeAreaRepository.java (0 hunks)
  • src/main/java/de/tum/cit/aet/artemis/atlas/web/StandardizedCompetencyResource.java (0 hunks)
  • src/main/java/de/tum/cit/aet/artemis/buildagent/dto/DockerFlagsDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/buildagent/dto/DockerRunConfig.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobContainerService.java (4 hunks)
  • src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobExecutionService.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/communication/service/AnswerMessageService.java (2 hunks)
  • src/main/java/de/tum/cit/aet/artemis/core/config/Constants.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/core/config/StaticCodeAnalysisConfigurer.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/ExamAttendanceCheckEvent.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/ExamWideAnnouncementEvent.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/ProblemStatementUpdateEvent.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/WorkingTimeUpdateEvent.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ExamAttendanceCheckEventDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ExamLiveEventBaseDTO.java (0 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ExamWideAnnouncementEventDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ProblemStatementUpdateEventDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/WorkingTimeUpdateEventDTO.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exam/service/ExamLiveEventsService.java (0 hunks)
  • src/main/java/de/tum/cit/aet/artemis/exercise/service/ExerciseService.java (0 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/repository/BuildJobRepository.java (1 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseBuildConfigService.java (3 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseService.java (2 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIInfoContributor.java (3 hunks)
  • src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIProgrammingLanguageFeatureService.java (1 hunks)
  • src/main/resources/templates/aeolus/javascript/default_static.sh (1 hunks)
  • src/main/resources/templates/java/test/blackbox/projectTemplate/testsuite/config/default.exp (2 hunks)
  • src/main/resources/templates/javascript/staticCodeAnalysis/test/eslint.config.mjs (1 hunks)
  • src/main/resources/templates/javascript/staticCodeAnalysis/test/package.json (1 hunks)
  • src/main/webapp/app/exam/manage/exams/exam-checklist-component/exam-announcement-dialog/exam-live-announcement-create-modal.component.ts (0 hunks)
  • src/main/webapp/app/exam/manage/students/exam-students.component.html (1 hunks)
  • src/main/webapp/app/exam/manage/students/upload-images/students-upload-images-button.component.ts (2 hunks)
  • src/main/webapp/app/exam/participate/exam-participation-live-events.service.ts (0 hunks)
  • src/main/webapp/app/exam/shared/events/exam-live-event.component.html (0 hunks)
  • src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.html (1 hunks)
  • src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.ts (6 hunks)
  • src/main/webapp/app/exercises/programming/shared/service/aeolus.service.ts (1 hunks)
  • src/main/webapp/app/index.d.ts (0 hunks)
  • src/main/webapp/app/shared/circular-progress-bar/circular-progress-bar.component.html (0 hunks)
  • src/main/webapp/app/shared/circular-progress-bar/circular-progress-bar.component.scss (0 hunks)
  • src/main/webapp/app/shared/circular-progress-bar/circular-progress-bar.component.ts (0 hunks)
  • src/main/webapp/app/shared/course-group/course-group.component.html (1 hunks)
  • src/main/webapp/app/shared/layouts/profiles/profile-info.model.ts (1 hunks)
  • src/main/webapp/app/shared/layouts/profiles/profile.service.ts (1 hunks)
  • src/main/webapp/app/shared/markdown-editor/monaco/markdown-editor-monaco.component.html (2 hunks)
  • src/main/webapp/app/shared/markdown-editor/monaco/markdown-editor-monaco.component.ts (1 hunks)
  • src/main/webapp/app/shared/metis/posting-markdown-editor/posting-markdown-editor.component.html (1 hunks)
  • src/main/webapp/app/shared/standardized-competencies/standardized-competency.service.ts (0 hunks)
  • src/main/webapp/app/shared/user-import/users-import-button.component.ts (2 hunks)
  • src/main/webapp/app/shared/util/markdown.conversion.util.ts (3 hunks)
  • src/main/webapp/i18n/de/error.json (1 hunks)
  • src/main/webapp/i18n/de/exam.json (0 hunks)
  • src/main/webapp/i18n/de/programmingExercise.json (2 hunks)
  • src/main/webapp/i18n/en/error.json (1 hunks)
  • src/main/webapp/i18n/en/exam.json (0 hunks)
  • src/main/webapp/i18n/en/programmingExercise.json (2 hunks)
  • src/test/java/de/tum/cit/aet/artemis/atlas/competency/StandardizedCompetencyIntegrationTest.java (0 hunks)
  • src/test/java/de/tum/cit/aet/artemis/exam/StudentExamIntegrationTest.java (0 hunks)
  • src/test/java/de/tum/cit/aet/artemis/programming/icl/LocalCIInfoContributorTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/programming/icl/LocalCIIntegrationTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/shared/base/AbstractSpringIntegrationLocalCILocalVCTest.java (1 hunks)
  • src/test/javascript/spec/component/exam/shared/events/exam-live-event.component.spec.ts (0 hunks)
  • src/test/javascript/spec/component/programming-exercise/programming-exercise-build-configuration.component.spec.ts (3 hunks)
  • src/test/javascript/spec/component/shared/circular-progress-bar.component.spec.ts (0 hunks)
  • src/test/javascript/spec/component/standardized-competencies/standardized-competency.service.spec.ts (1 hunks)
  • src/test/javascript/spec/service/exam-participation-live-events.service.spec.ts (0 hunks)
  • src/test/playwright/e2e/exam/ExamParticipation.spec.ts (0 hunks)
  • src/test/playwright/support/pageobjects/exam/ExamManagementPage.ts (0 hunks)
  • src/test/playwright/support/pageobjects/exam/ExamParticipationActions.ts (0 hunks)
  • src/test/playwright/support/pageobjects/exam/ModalDialogBox.ts (0 hunks)
  • supporting_scripts/course-scripts/quick-course-setup/add_users_to_course.py (1 hunks)
  • supporting_scripts/course-scripts/quick-course-setup/create_course.py (2 hunks)
  • supporting_scripts/course-scripts/quick-course-setup/create_users.py (1 hunks)
  • supporting_scripts/course-scripts/quick-course-setup/large_course_main.py (1 hunks)
  • supporting_scripts/course-scripts/quick-course-setup/manage_programming_exercise.py (3 hunks)
  • supporting_scripts/course-scripts/quick-course-setup/utils.py (2 hunks)
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html (1 hunks)
💤 Files with no reviewable changes (48)
  • src/test/playwright/support/pageobjects/exam/ExamParticipationActions.ts
  • src/main/webapp/app/shared/circular-progress-bar/circular-progress-bar.component.html
  • src/main/webapp/app/index.d.ts
  • src/main/webapp/app/exam/participate/exam-participation-live-events.service.ts
  • src/main/webapp/app/shared/circular-progress-bar/circular-progress-bar.component.html
  • src/test/playwright/e2e/exam/ExamParticipation.spec.ts
  • src/test/playwright/support/pageobjects/exam/ExamManagementPage.ts
  • src/test/javascript/spec/component/exam/shared/events/exam-live-event.component.spec.ts
  • src/main/webapp/i18n/de/exam.json
  • src/main/webapp/app/exam/shared/events/exam-live-event.component.html
  • src/test/javascript/spec/component/shared/circular-progress-bar.component.spec.ts
  • src/test/playwright/support/pageobjects/exam/ModalDialogBox.ts
  • src/test/playwright/support/pageobjects/exam/ModalDialogBox.ts
  • src/main/webapp/app/shared/standardized-competencies/standardized-competency.service.ts
  • src/main/java/de/tum/cit/aet/artemis/atlas/web/StandardizedCompetencyResource.java
  • src/main/webapp/app/shared/standardized-competencies/standardized-competency.service.ts
  • src/test/playwright/support/pageobjects/exam/ExamParticipationActions.ts
  • src/test/javascript/spec/component/shared/circular-progress-bar.component.spec.ts
  • src/main/webapp/app/index.d.ts
  • src/main/webapp/app/exam/manage/exams/exam-checklist-component/exam-announcement-dialog/exam-live-announcement-create-modal.component.ts
  • src/test/playwright/e2e/exam/ExamParticipation.spec.ts
  • src/main/webapp/app/exam/shared/events/exam-live-event.component.html
  • src/main/webapp/app/exam/manage/exams/exam-checklist-component/exam-announcement-dialog/exam-live-announcement-create-modal.component.ts
  • src/main/webapp/app/exam/participate/exam-participation-live-events.service.ts
  • src/test/playwright/support/pageobjects/exam/ExamManagementPage.ts
  • src/test/javascript/spec/service/exam-participation-live-events.service.spec.ts
  • src/main/java/de/tum/cit/aet/artemis/exam/service/ExamLiveEventsService.java
  • src/main/java/de/tum/cit/aet/artemis/atlas/repository/KnowledgeAreaRepository.java
  • src/main/java/de/tum/cit/aet/artemis/exam/service/ExamLiveEventsService.java
  • src/test/java/de/tum/cit/aet/artemis/exam/StudentExamIntegrationTest.java
  • src/test/java/de/tum/cit/aet/artemis/atlas/competency/StandardizedCompetencyIntegrationTest.java
  • src/test/javascript/spec/service/exam-participation-live-events.service.spec.ts
  • src/test/java/de/tum/cit/aet/artemis/atlas/competency/StandardizedCompetencyIntegrationTest.java
  • src/main/webapp/i18n/en/exam.json
  • src/main/webapp/i18n/en/exam.json
  • src/test/java/de/tum/cit/aet/artemis/exam/StudentExamIntegrationTest.java
  • src/main/webapp/i18n/de/exam.json
  • src/main/java/de/tum/cit/aet/artemis/atlas/repository/KnowledgeAreaRepository.java
  • src/main/java/de/tum/cit/aet/artemis/atlas/web/StandardizedCompetencyResource.java
  • src/main/webapp/app/shared/circular-progress-bar/circular-progress-bar.component.ts
  • src/main/webapp/app/shared/circular-progress-bar/circular-progress-bar.component.scss
  • src/main/java/de/tum/cit/aet/artemis/exercise/service/ExerciseService.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ExamLiveEventBaseDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ExamLiveEventBaseDTO.java
  • src/test/javascript/spec/component/exam/shared/events/exam-live-event.component.spec.ts
  • src/main/java/de/tum/cit/aet/artemis/exercise/service/ExerciseService.java
  • src/main/webapp/app/shared/circular-progress-bar/circular-progress-bar.component.scss
  • src/main/webapp/app/shared/circular-progress-bar/circular-progress-bar.component.ts
🚧 Files skipped from review as they are similar to previous changes (112)
  • docs/requirements.txt
  • src/main/webapp/app/shared/metis/posting-markdown-editor/posting-markdown-editor.component.html
  • supporting_scripts/course-scripts/quick-course-setup/create_users.py
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html
  • gradle/wrapper/gradle-wrapper.properties
  • src/main/java/de/tum/cit/aet/artemis/core/config/StaticCodeAnalysisConfigurer.java
  • gradle/wrapper/gradle-wrapper.properties
  • supporting_scripts/course-scripts/quick-course-setup/add_users_to_course.py
  • src/main/webapp/app/exercises/programming/shared/service/aeolus.service.ts
  • supporting_scripts/course-scripts/quick-course-setup/add_users_to_course.py
  • src/main/webapp/app/shared/markdown-editor/monaco/markdown-editor-monaco.component.html
  • src/main/webapp/app/shared/metis/posting-markdown-editor/posting-markdown-editor.component.html
  • src/test/java/de/tum/cit/aet/artemis/programming/icl/LocalCIInfoContributorTest.java
  • supporting_scripts/course-scripts/quick-course-setup/large_course_main.py
  • src/main/java/de/tum/cit/aet/artemis/programming/repository/BuildJobRepository.java
  • src/main/webapp/app/exam/manage/students/exam-students.component.html
  • src/main/webapp/app/exam/manage/students/upload-images/students-upload-images-button.component.ts
  • src/main/webapp/app/shared/markdown-editor/monaco/markdown-editor-monaco.component.ts
  • src/main/resources/templates/javascript/staticCodeAnalysis/test/package.json
  • src/main/resources/templates/javascript/staticCodeAnalysis/test/eslint.config.mjs
  • supporting_scripts/course-scripts/quick-course-setup/large_course_main.py
  • src/main/java/de/tum/cit/aet/artemis/core/config/StaticCodeAnalysisConfigurer.java
  • jest.config.js
  • src/main/webapp/app/exercises/programming/shared/service/aeolus.service.ts
  • src/main/webapp/app/shared/layouts/profiles/profile-info.model.ts
  • src/main/resources/templates/javascript/staticCodeAnalysis/test/package.json
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html
  • supporting_scripts/course-scripts/quick-course-setup/utils.py
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/ExamAttendanceCheckEvent.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ExamAttendanceCheckEventDTO.java
  • src/main/webapp/app/shared/markdown-editor/monaco/markdown-editor-monaco.component.ts
  • supporting_scripts/course-scripts/quick-course-setup/create_users.py
  • src/main/webapp/app/shared/user-import/users-import-button.component.ts
  • src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIProgrammingLanguageFeatureService.java
  • src/main/java/de/tum/cit/aet/artemis/buildagent/dto/DockerRunConfig.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ExamWideAnnouncementEventDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ExamWideAnnouncementEventDTO.java
  • src/main/webapp/app/shared/course-group/course-group.component.html
  • src/main/webapp/app/exam/manage/students/exam-students.component.html
  • src/main/resources/templates/java/test/blackbox/projectTemplate/testsuite/config/default.exp
  • src/main/webapp/app/shared/course-group/course-group.component.html
  • src/main/java/de/tum/cit/aet/artemis/buildagent/dto/DockerFlagsDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/ExamWideAnnouncementEvent.java
  • src/main/resources/templates/aeolus/javascript/default_static.sh
  • src/main/resources/templates/javascript/staticCodeAnalysis/test/eslint.config.mjs
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/ExamWideAnnouncementEvent.java
  • src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIInfoContributor.java
  • supporting_scripts/course-scripts/quick-course-setup/utils.py
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/WorkingTimeUpdateEventDTO.java
  • src/test/java/de/tum/cit/aet/artemis/programming/icl/LocalCIIntegrationTest.java
  • src/main/webapp/app/shared/user-import/users-import-button.component.ts
  • src/main/webapp/i18n/en/error.json
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/WorkingTimeUpdateEventDTO.java
  • docs/user/exercises/programming-exercise-features.inc
  • supporting_scripts/course-scripts/quick-course-setup/create_course.py
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html
  • src/main/java/de/tum/cit/aet/artemis/buildagent/dto/DockerFlagsDTO.java
  • src/main/java/de/tum/cit/aet/artemis/programming/repository/BuildJobRepository.java
  • jest.config.js
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html
  • src/main/java/de/tum/cit/aet/artemis/core/config/Constants.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ProblemStatementUpdateEventDTO.java
  • src/test/java/de/tum/cit/aet/artemis/shared/base/AbstractSpringIntegrationLocalCILocalVCTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ExamAttendanceCheckEventDTO.java
  • src/main/java/de/tum/cit/aet/artemis/exam/dto/examevent/ProblemStatementUpdateEventDTO.java
  • src/main/webapp/i18n/en/error.json
  • docs/requirements.txt
  • src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.html
  • src/test/java/de/tum/cit/aet/artemis/programming/icl/LocalCIInfoContributorTest.java
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-utilization-indicator/tutorial-group-utilization-indicator.component.html
  • src/test/javascript/spec/component/standardized-competencies/standardized-competency.service.spec.ts
  • supporting_scripts/course-scripts/quick-course-setup/manage_programming_exercise.py
  • src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobExecutionService.java
  • src/test/javascript/spec/component/standardized-competencies/standardized-competency.service.spec.ts
  • src/test/java/de/tum/cit/aet/artemis/shared/base/AbstractSpringIntegrationLocalCILocalVCTest.java
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/ExamAttendanceCheckEvent.java
  • src/main/resources/templates/aeolus/javascript/default_static.sh
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/ProblemStatementUpdateEvent.java
  • src/main/resources/templates/java/test/blackbox/projectTemplate/testsuite/config/default.exp
  • src/main/java/de/tum/cit/aet/artemis/core/config/Constants.java
  • src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIProgrammingLanguageFeatureService.java
  • src/test/javascript/spec/component/programming-exercise/programming-exercise-build-configuration.component.spec.ts
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/WorkingTimeUpdateEvent.java
  • src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseBuildConfigService.java
  • src/main/webapp/i18n/de/error.json
  • src/main/webapp/app/shared/markdown-editor/monaco/markdown-editor-monaco.component.html
  • supporting_scripts/course-scripts/quick-course-setup/create_course.py
  • src/main/webapp/app/shared/layouts/profiles/profile-info.model.ts
  • src/main/webapp/i18n/en/programmingExercise.json
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/ProblemStatementUpdateEvent.java
  • src/main/java/de/tum/cit/aet/artemis/programming/service/localci/LocalCIInfoContributor.java
  • src/main/webapp/app/exam/manage/students/upload-images/students-upload-images-button.component.ts
  • src/main/webapp/i18n/de/error.json
  • src/main/webapp/app/shared/layouts/profiles/profile.service.ts
  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.ts
  • src/main/java/de/tum/cit/aet/artemis/buildagent/dto/DockerRunConfig.java
  • src/main/java/de/tum/cit/aet/artemis/exam/domain/event/WorkingTimeUpdateEvent.java
  • src/main/webapp/app/shared/layouts/profiles/profile.service.ts
  • src/main/webapp/i18n/en/programmingExercise.json
  • supporting_scripts/course-scripts/quick-course-setup/manage_programming_exercise.py
  • docs/user/exercises/programming-exercise-features.inc
  • build.gradle
  • src/main/webapp/i18n/de/programmingExercise.json
  • src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseBuildConfigService.java
  • src/main/webapp/i18n/de/programmingExercise.json
  • build.gradle
  • gradle.properties
  • gradle.properties
  • src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.ts
  • src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.ts
  • package.json
  • package.json
🧰 Additional context used
📓 Path-based instructions (5)
`src/main/webapp/**/*.ts`: angular_style:https://angular.io/...

src/main/webapp/**/*.ts: angular_style:https://angular.io/guide/styleguide;methods_in_html:false;lazy_loading:true;code_reuse:true;tests:meaningful;types:PascalCase;enums:PascalCase;funcs:camelCase;props:camelCase;no_priv_prefix:true;strings:single_quotes;localize:true;btns:functionality;links:navigation;icons_text:newline;labels:associate;code_style:arrow_funcs,curly_braces,open_braces_same_line,indent_4;memory_leak_prevention:true;routes:naming_schema;chart_framework:ngx-charts;responsive_layout:true

  • src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.ts
  • src/main/webapp/app/shared/util/markdown.conversion.util.ts
`src/main/java/**/*.java`: naming:CamelCase; principles:{sin...

src/main/java/**/*.java: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports

  • src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseService.java
  • src/main/java/de/tum/cit/aet/artemis/communication/service/AnswerMessageService.java
  • src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobExecutionService.java
  • src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobContainerService.java
`src/main/webapp/**/*.html`: @if and @for are new and valid ...

src/main/webapp/**/*.html: @if and @for are new and valid Angular syntax replacing *ngIf and *ngFor. They should always be used over the old style.

  • src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.html
`src/test/java/**/*.java`: test_naming: descriptive; test_si...

src/test/java/**/*.java: test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true

  • src/test/java/de/tum/cit/aet/artemis/programming/icl/LocalCIIntegrationTest.java
`src/test/javascript/spec/**/*.ts`: jest: true; mock: NgMock...

src/test/javascript/spec/**/*.ts: jest: true; mock: NgMocks; bad_practices: avoid_full_module_import; perf_improvements: mock_irrelevant_deps; service_testing: mock_http_for_logic; no_schema: avoid_NO_ERRORS_SCHEMA; expectation_specificity: true; solutions: {boolean: toBeTrue/False, reference: toBe, existence: toBeNull/NotNull, undefined: toBeUndefined, class_obj: toContainEntries/toEqual, spy_calls: {not_called: not.toHaveBeenCalled, once: toHaveBeenCalledOnce, with_value: toHaveBeenCalledWith|toHaveBeenCalledExactlyOnceWith}}

  • src/test/javascript/spec/component/programming-exercise/programming-exercise-build-configuration.component.spec.ts
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Call Build Workflow / Build .war artifact
  • GitHub Check: Call Build Workflow / Build and Push Docker Image
  • GitHub Check: client-tests
  • GitHub Check: server-tests
  • GitHub Check: Analyse
🔇 Additional comments (28)
src/main/webapp/app/exercises/programming/manage/update/update-components/custom-build-plans/programming-exercise-build-configuration/programming-exercise-build-configuration.component.html (1)

94-117: Good enhancement of Docker container resource configuration.

The addition of CPU count, memory, and memory swap input fields provides important resource configuration options for Docker containers. These fields align well with the Docker resource constraints API, allowing instructors to fine-tune performance for programming exercises.

Remember to update the translation keys for proper internationalization support, ensuring users across different languages understand these configuration options.

src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseService.java (4)

135-136: Good addition of Docker minimum memory constant.

Defining a constant for the minimum Docker memory limit provides clarity on Docker's technical limitations and enables consistent validation.


1119-1121: Well-implemented memory limit validation.

The validation ensures Docker containers have sufficient memory (at least 6MB) to run properly, preventing potential runtime failures.


1123-1125: Good addition of CPU count validation.

Ensuring the CPU count is greater than zero prevents invalid configurations that could lead to container startup failures.


1127-1128: Correctly implemented memorySwap validation.

The validation ensures memory swap isn't negative, which would be an invalid Docker configuration.

src/test/java/de/tum/cit/aet/artemis/programming/icl/LocalCIIntegrationTest.java (1)

631-647: Excellent test case for Docker resource configurations.

This test thoroughly verifies that the Docker container is created with the correct CPU, memory, and memory swap settings. The assertions properly check that the values are converted to the expected format for Docker's API (e.g., CPU quota in 100000 units, memory in bytes).

src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobExecutionService.java (2)

240-248: Good implementation of Docker resource configuration variables.

These variables properly capture the Docker resource settings from the build configuration and pass them through to the container configuration.


252-252: Correctly updated method call with new parameters.

The method call to configureContainer now includes the CPU count, memory, and memory swap parameters, ensuring these values are properly passed to the Docker container configuration.

src/main/java/de/tum/cit/aet/artemis/buildagent/service/BuildJobContainerService.java (6)

79-86: Good implementation of configuration properties for container resource limits.

The added configuration properties follow Spring's @Value pattern correctly and use sensible defaults (0 meaning no limit). This allows for flexible container resource management.


101-107: Method signature and documentation updated appropriately.

The method signature has been properly extended to include the new parameters, and the documentation clearly explains their purpose.


118-135: Well-structured logic for custom container resource allocation.

The implementation correctly:

  • Applies customization only when at least one parameter is specified (> 0)
  • Respects maximum limits defined in application properties
  • Falls back to original host config values when not specified
  • Handles all three resource types (CPU, memory, memory swap) consistently

The logic is clear and follows good defensive programming practices.


137-137: Container command correctly updated to use custom host configuration.

The call chain has been properly updated to use the potentially customized host configuration.


151-155: Clean implementation of host config creation method.

The method creates a new HostConfig with adjusted resource values while preserving other important settings from the original host config. The code is concise and readable.


157-159: Well-named utility method for memory conversion.

Extracting this simple conversion logic to a separate method improves code readability and maintainability. The method name clearly describes its purpose.

src/test/javascript/spec/component/programming-exercise/programming-exercise-build-configuration.component.spec.ts (7)

56-56: Appropriate test renaming

The test name has been updated from "should set timeout options" to "should set profile values" which better reflects the expanded scope of the test that now includes container configuration properties.


62-64: Good coverage of new container configuration properties

These added container configuration properties align properly with the expanded functionality being tested. This ensures that container resource settings are properly tested alongside the existing timeout settings.


72-74: Comprehensive initial state validation

Proper validation that the container configuration values are initially undefined when not provided in the profile info. This ensures the component handles the absence of these values correctly.


81-83: Added required test data

Good addition of test values for the new container configuration properties in the mock profile service response.


90-92: Proper validation of container settings

These expectations confirm that the component correctly processes the provided container configuration values from the profile service.


131-137: Good testing of event handlers

The addition of mock events and handlers for memory, CPU count, and memory swap properly tests the component's ability to handle user inputs for these new container configuration options.


157-157: Programming language modification

The test now first sets the language to EMPTY (to verify unsupported language behavior) before setting it to SWIFT. This provides better coverage by testing both unsupported and supported language scenarios.

Also applies to: 161-161

src/main/webapp/app/course/tutorial-groups/shared/tutorial-group-free-days-overview/tutorial-group-free-days-overview.component.ts (1)

25-25: Confirm fallback handling for non-specified timeZone.

Removing the | undefined type enforces that timeZone must always be supplied. Verify all parent components provide a valid string value. If a default timezone is desired when none is provided, consider specifying it as:

- timeZone = input<string>();
+ timeZone = input<string>('UTC');
src/main/webapp/app/shared/util/markdown.conversion.util.ts (5)

3-4: Type-only imports are a clean approach.

Using import type ... helps reduce bundle size and clarifies that no runtime import is required.


7-7: Prefer direct import of MarkdownIt.

Switching to import MarkdownIt from 'markdown-it' is consistent with modern TypeScript/ESM patterns.


53-61: Validate potential XSS risk due to html: true.

Enabling HTML in Markdown is often acceptable only if sanitized later. Though DOMPurify is used, carefully verify no unexpected bypass remains.


63-78: Chaining extensions appears logical.

Loading the highlight, LaTeX, alerts, and custom class plugins in sequence is neat and consistent. No concerns with ordering are apparent.


100-149: Recursive token class assignment is well implemented.

The setTokenClasses function gracefully recurses over nested tokens and preserves existing classes. The plugin approach in MarkdownitTagClass is an elegant solution for dynamic styling.

src/main/java/de/tum/cit/aet/artemis/communication/service/AnswerMessageService.java (1)

92-95:

✅ Verification successful

Verify fallback logic for conversation retrieval.

The .orElse(...) call to loadConversationWithParticipantsIfGroupChat can trigger an additional query. In scenarios where the conversation isn't a group chat, there's a potential performance overhead or risk of returning an unexpected state if conversationId references a conversation that isn't group-based.

Run the following script to locate all callers of loadConversationWithParticipantsIfGroupChat to confirm whether additional fallback checks or guards are needed:


🏁 Script executed:

#!/bin/bash
# Examine code references to loadConversationWithParticipantsIfGroupChat for proper usage
rg -A 5 "loadConversationWithParticipantsIfGroupChat"

Length of output: 3911


Fallback Query Verification: No Additional Query Overhead Detected

After verifying the code, the fallback in
AnswerMessageService.java (lines 92‑95)
now clearly leverages loadConversationWithParticipantsIfGroupChat to only perform an extra query when the fetched conversation is a group chat.

  • The loadConversationWithParticipantsIfGroupChat method (in ConversationService.java) first retrieves the conversation with a single query via findByIdElseThrow. It then conditionally triggers a second query with findWithParticipantsById only if the conversation is a GroupChat.
  • Both AnswerMessageService and ConversationMessagingService utilize this fallback in the same manner, ensuring the additional query is executed solely for group chats—and not for other conversation types—thereby avoiding the unnecessary performance overhead.

Based on this verification, no extra fallback checks or guards are required in scenarios where the conversation isn’t group-based.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) ready for review tests
Projects
Status: Ready For Review
Development

Successfully merging this pull request may close these issues.

2 participants