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

Exam mode: Add summary to exam deletion dialog #9185

Merged
merged 31 commits into from
Oct 12, 2024

Conversation

ole-ve
Copy link
Contributor

@ole-ve ole-ve commented Aug 4, 2024

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
  • I strictly followed the server coding and design guidelines.
  • I added multiple integration tests (Spring) related to the features (with a high test coverage).
  • I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
  • I documented the Java code using JavaDoc style.

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.
  • 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 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

Implements #9179.

Description

  • New endpoint for fetching some exam stats
  • Display stats on exam deletion modal, originated from calling 1 new endpoint and using the data already there

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 2 Students
  1. Log in to Artemis
  2. Create an exam with two exercise groups, each having one exercise of each type
  3. Start the exam
  4. Participate as a student and make multiple (>=2) pushes to the exercise
  5. Repeat step 4 as a different student
  6. As instructor: Go to exam -> title of the exam -> Click the delete button
  7. Verify that all the stats are displayed correctly and look valid

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Review Progress

Performance Review

  • I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance
  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Screenshots

Screenshot 2024-08-04 at 17 02 07

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added methods to count and retrieve statistics for build jobs, student exams, and answer posts associated with specific exercises, exams, and posts.
    • Introduced a feature for fetching a detailed deletion summary for exams, enhancing overall functionality.
    • Enhanced user interface with detailed summaries during deletion processes, improving user awareness and decision-making.
    • Improved deletion confirmation dialogs to include contextual information about the entity being deleted.
  • Bug Fixes

    • Enhanced error handling in fetching exam deletion summaries.
  • Documentation

    • Updated localization files to include new summary metrics for deletion confirmation dialogs.

@ole-ve ole-ve added server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) labels Aug 4, 2024
@ole-ve ole-ve self-assigned this Aug 4, 2024
@ole-ve ole-ve requested a review from a team as a code owner August 4, 2024 13:05
Copy link

coderabbitai bot commented Aug 4, 2024

Walkthrough

The recent changes enhance the application’s exam management capabilities through new repository methods that support counting and retrieving related data. The exam deletion process has been improved with a summary report feature that aggregates important metrics. User interface components now offer contextual information during deletion actions, resulting in a more informed, user-friendly experience for managing exams.

Changes

Files Change Summary
src/main/java/de/tum/in/www1/artemis/repository/... Added methods for counting and retrieving associated data across repositories, enhancing data access capabilities.
src/main/java/de/tum/in/www1/artemis/service/exam/... Expanded dependencies and introduced getExamDeletionSummary(long examId) method for summarizing exam deletion metrics.
src/main/webapp/app/entities/exam-deletion-summary.model.ts Created ExamDeletionSummaryDTO interface to encapsulate metrics related to exam deletions.
src/main/webapp/app/shared/delete-dialog/... Added new properties for improved context in deletion dialogs, enhancing user feedback during deletion processes.
src/main/webapp/app/shared/delete-dialog/delete-dialog.component.html Introduced conditional display logic for entity summary in deletion confirmation dialogs.
src/main/webapp/i18n/.../exam.json Enhanced localization files with detailed metrics for deletion confirmation summaries.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ExamResource
    participant ExamDeletionService
    participant Database

    User->>ExamResource: Request getDeletionSummary(courseId, examId)
    ExamResource->>ExamDeletionService: Call getExamDeletionSummary(examId)
    ExamDeletionService->>Database: Retrieve deletion metrics
    Database-->>ExamDeletionService: Return metrics
    ExamDeletionService-->>ExamResource: Provide summary data
    ExamResource-->>User: Return deletion summary
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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 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.

@ole-ve ole-ve changed the title Exam: Add exam summary to exam deletion dialog Usability: Add exam summary to exam deletion dialog Aug 4, 2024
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: 2

coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 4, 2024
@ole-ve ole-ve linked an issue Aug 4, 2024 that may be closed by this pull request
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: 3

@Strohgelaender
Copy link
Contributor

Can you also include:

  • Test exam (yes / no)
  • Course name + test course (yes / no)

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: 6

coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 4, 2024
SimonEntholzer
SimonEntholzer previously approved these changes Aug 4, 2024
Copy link
Contributor

@SimonEntholzer SimonEntholzer 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 👍

@github-actions github-actions bot added exam Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module labels Oct 3, 2024
Copy link
Contributor

@SimonEntholzer SimonEntholzer left a comment

Choose a reason for hiding this comment

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

Works on Ts6

@simonbohnen
Copy link

Tested just now in a test session. Summary of exam details looks good!

Copy link
Contributor

@edkaya edkaya left a comment

Choose a reason for hiding this comment

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

Tested on ts6, works as expected

@krusche krusche added this to the 7.6.0 milestone Oct 12, 2024
@krusche krusche changed the title Usability: Add exam summary to exam deletion dialog Exam mode: Add summary to exam deletion dialog Oct 12, 2024
@krusche krusche merged commit 491e368 into develop Oct 12, 2024
18 of 28 checks passed
@krusche krusche deleted the feature/summary-on-exam-deletion branch October 12, 2024 15:30
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!) communication Pull requests that affect the corresponding module core Pull requests that affect the corresponding module exam Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module ready for review server Pull requests that update Java code. (Added Automatically!) tests too-long-open !!! This is an antipattern, we should aim for small PRs that are only open for a short time !!!
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Improve the exam delete dialog