Skip to content

Conversation

SamuelRoettgermann
Copy link
Contributor

@SamuelRoettgermann SamuelRoettgermann commented Oct 1, 2025

Checklist

General

Client

  • I translated all newly inserted strings into English and German.

Motivation and Context

Currently we allow an admin to delete all exam rooms, i.e. all versions of all exam rooms, including the most recent ones. This PR aims to remove that functionality, as it is not a proper use-case, as such a removal would also need to notify every course instructor. A feature to remove the newest version of a single room can be implemented in a future PR if desired.

Description

Removed everything related to the 'Delete all exam rooms' feature/button on the admin's Exam Room server administration tab .

Also slightly adapted the text of the other deletion button to better reflect what it does.

Steps for Testing

Testing is not required, as the only thing that could be tested is the absence of a button, which I did locally.

Review Progress

Code Review

  • Code Review 1
  • Code Review 2
  • Code Review 3
  • Code Review 4

Summary by CodeRabbit

  • Refactor
    • Removed the “Delete All Exam Rooms” capability from the admin interface and API.
  • Chores
    • Updated admin exam room texts in English and German; clarified wording to “Delete outdated and unused exam room versions.”
    • Cleaned up related UI elements by removing the bulk-delete button.
  • Tests
    • Removed tests covering the deleted bulk-delete flow; retained tests for deleting outdated and unused exam room versions.

@github-project-automation github-project-automation bot moved this to Work In Progress in Artemis Development Oct 1, 2025
@github-actions github-actions bot added tests server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) core Pull requests that affect the corresponding module exam Pull requests that affect the corresponding module labels Oct 1, 2025
Copy link
Contributor

coderabbitai bot commented Oct 1, 2025

Walkthrough

Removal of the “delete all exam rooms” functionality across backend, frontend, and tests. Eliminated the service methods, REST endpoint, UI button, dialog handling, and associated tests. Updated i18n keys and adjusted wording for the safe delete action. Other endpoints and features remain unchanged.

Changes

Cohort / File(s) Summary
Backend service API removal
src/main/java/.../exam/service/ExamRoomService.java
Removed public method deleteAllExamRooms.
Backend REST endpoint removal
src/main/java/.../exam/web/admin/AdminExamResource.java
Removed @DeleteMapping("exam-rooms") endpoint deleteAllExamRooms().
Frontend UI cleanup
src/main/webapp/app/core/admin/exam-rooms/exam-rooms.component.html
Removed “Delete All Exam Rooms” button.
Frontend component logic cleanup
src/main/webapp/app/core/admin/exam-rooms/exam-rooms.component.ts
Removed dialog-related imports, fields, and clearExamRooms() method; minor import cleanup.
Frontend service API removal
src/main/webapp/app/core/admin/exam-rooms/exam-rooms.service.ts
Removed deleteAllExamRooms() HTTP DELETE method.
Frontend tests update
src/main/webapp/app/core/admin/exam-rooms/exam-rooms.component.spec.ts
Removed tests covering delete-all flow and related reload behavior.
i18n updates (EN/DE)
src/main/webapp/i18n/en/examRooms.json, src/main/webapp/i18n/de/examRooms.json
Removed keys: deleteAllExamRooms, deleteAllExamRoomsQuestion; updated deleteExamRoomsSafe wording to reference “exam room versions”.
Backend integration tests cleanup
src/test/java/.../exam/ExamRoomIntegrationTest.java
Removed tests for DELETE /exam/admin/exam-rooms; retained tests for .../outdated-and-unused.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Admin as Admin UI
  participant FE as Frontend Service
  participant BE as AdminExamResource
  participant SVC as ExamRoomService
  participant DB as Database

  rect rgba(240,240,255,0.6)
  note over Admin,BE: Removed flow (Delete All Exam Rooms)
  Admin->>FE: click "Delete All Exam Rooms" (removed)
  FE--xBE: DELETE /exam/admin/exam-rooms (removed)
  BE--xSVC: deleteAllExamRooms() (removed)
  SVC--xDB: purge all rooms (removed)
  end

  rect rgba(240,255,240,0.6)
  note over Admin,BE: Existing flow retained (Delete outdated and unused)
  Admin->>FE: click "Delete outdated and unused"
  FE->>BE: DELETE /exam/admin/exam-rooms/outdated-and-unused
  BE->>SVC: deleteOutdatedAndUnusedExamRooms()
  SVC->>DB: remove targeted versions
  DB-->>SVC: result
  SVC-->>BE: ok
  BE-->>FE: 204 No Content
  FE-->>Admin: refresh overview
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly states the main change of the pull request, which is the removal of the “delete all exam room versions” feature, and it directly reflects the core modifications across service, controller, UI, and tests. It is concise and specific enough for a teammate to understand the primary intent without extraneous details.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/exam-mode/remove-delete-all-rooms-functionality

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@marlonnienaber marlonnienaber left a comment

Choose a reason for hiding this comment

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

Code LGTM.

Copy link

github-actions bot commented Oct 2, 2025

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran199 passed3 skipped3 failed1h 14m 2s 143ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseManagement.spec.ts
ts.Quiz Exercise Management › Quiz Exercise Creation › Creates a Quiz with Drag and Drop❌ failure2m 3s 562ms
e2e/exercise/quiz-exercise/QuizExerciseParticipation.spec.ts
ts.Quiz Exercise Participation › DnD Quiz participation › Student can participate in DnD Quiz❌ failure2m 4s 625ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure2m 30s 202ms

@SamuelRoettgermann SamuelRoettgermann moved this from Work In Progress to Ready For Review in Artemis Development Oct 2, 2025
Copy link
Contributor

@Yhmidi Yhmidi left a comment

Choose a reason for hiding this comment

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

code

Copy link

@MarcosOlivaKaczmarek MarcosOlivaKaczmarek left a comment

Choose a reason for hiding this comment

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

Code: looks good to me

Copy link
Contributor

@LeZhen1105 LeZhen1105 left a comment

Choose a reason for hiding this comment

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

code looks good

@SamuelRoettgermann SamuelRoettgermann moved this from Ready For Review to Developer Approved in Artemis Development Oct 2, 2025
Copy link
Contributor

@HawKhiem HawKhiem left a comment

Choose a reason for hiding this comment

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

code 👍

@krusche krusche added this to the 8.4.1 milestone Oct 3, 2025
@krusche krusche changed the title Exam mode: Remove the 'Delete all exam room versions' feature Development: Remove delete all exam room versions Oct 3, 2025
@krusche krusche merged commit 805666a into develop Oct 3, 2025
44 of 51 checks passed
@krusche krusche deleted the chore/exam-mode/remove-delete-all-rooms-functionality branch October 3, 2025 19:39
@github-project-automation github-project-automation bot moved this from Developer Approved to Merged in Artemis Development Oct 3, 2025
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!) core Pull requests that affect the corresponding module exam Pull requests that affect the corresponding module ready to merge server Pull requests that update Java code. (Added Automatically!) tests
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

7 participants