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: Allow students to see if their attendance was checked #8074

Merged
merged 41 commits into from
Apr 26, 2024

Conversation

coolchock
Copy link
Contributor

@coolchock coolchock commented Feb 25, 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 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

Our students cannot verify if their attendance during an exam has been recorded properly. This leads to confusion during the examination and possible arguments after the conduction. Fixes #8036

Description

I implemented a warning on the exam cover page which is displayed when student's attendance wasn't verified yet and they want to submit early. There's also an option in the exam configuration to specify if attendance is checked during exam.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Student
  • 1 Exam with attendance check turned on
  • 1 Test Exam
  • Attendance check app
  1. Participate in the test exam as a student
  2. Click "hand in early"
  3. Verify that attendance check warning isn't displayed on the cover page
  4. Participate in the exam as a student
  5. Click "hand in early"
  6. Verify that attendance check warning is displayed on the cover page
  7. Click continue
  8. Verify student's attendance using attendance check app
  9. Verify that attendance check warning is not displayed anymore

Client

Class/File Line Coverage Confirmation (assert/expect)
exam.model.ts 100%
exam-management.service.ts 90.38%
exam-update.component.ts 87.82%
exam-participation-cover.component.ts 99.01%
exam-participation.component.ts 90.34%

Server

Class/File Line Coverage Confirmation (assert/expect)
Exam.java 92%
ExamResource.java 95%
ExamUserResource.java 90%

Testserver States

Note

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







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

Screenshots

image

Instructors can activate attendance check below the exam mode. This option is not available for test exams:
image

Summary by CodeRabbit

  • New Features

    • Added functionality to verify student attendance for exams.
    • Introduced a setting to disable attendance checks for test exams.
  • Bug Fixes

    • Ensured that test exams cannot have attendance checks enabled, preventing configuration errors.
  • Documentation

    • Updated user interface messages and warnings related to exam attendance checks in German.
  • Tests

    • Implemented new integration and service tests to ensure the reliability of attendance verification features.

@artemis-bot artemis-bot added this to In progress in Artemis Development Feb 25, 2024
@github-actions github-actions bot added server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) labels Feb 25, 2024
@krusche krusche added this to the 6.9.1 milestone Mar 2, 2024
@coolchock coolchock force-pushed the feature/show-attendence-check-status-in-exam branch from 7de823c to 001840d Compare March 6, 2024 22:23
@github-actions github-actions bot added the database Pull requests that update the database. (Added Automatically!). Require a CRITICAL deployment. label Mar 6, 2024
@github-actions github-actions bot added the tests label Mar 8, 2024
@krusche krusche modified the milestones: 6.9.1, 6.9.2 Mar 10, 2024
@github-actions github-actions bot added the tests label Mar 11, 2024
@coolchock coolchock marked this pull request as ready for review March 11, 2024 08:45
@coolchock coolchock requested a review from a team as a code owner March 11, 2024 08:45
@artemis-bot artemis-bot moved this from In progress to Ready for review in Artemis Development Mar 11, 2024
Copy link

coderabbitai bot commented Mar 11, 2024

Walkthrough

This update introduces functionality to manage and verify student attendance in exams, particularly ensuring that test exams do not have attendance checks enabled. It includes backend validations, user interface adjustments for managing exam settings, and the necessary tests to ensure functionality works as intended.

Changes

Files Change Summary
ExamResource.java, ExamUserResource.java, ExamUserRepository.java Added methods to check and manage exam attendance settings and verify student attendance.
exam-update.component.html, exam-update.component.ts Updated UI components to handle attendance check settings based on the type of exam.
exam-participation.component.html, i18n/de/exam.json Enhanced exam participation UI and added localization support for attendance features.
master.xml, 20240418204415_changelog.xml Updated database configuration and migrations to support new features.
ExamUserIntegrationTest.java, exam-management.service.spec.ts Added tests to verify the new attendance checking functionality.

Possibly related issues


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

Artemis Development automation moved this from Ready for review to Review in progress Mar 11, 2024
@krusche krusche modified the milestones: 7.0.0, 7.0.1 Apr 11, 2024
@krusche
Copy link
Member

krusche commented Apr 11, 2024

We can only merge this in 7.0.1 due to the involved database changes

Comment on lines 6 to 7
<include file="classpath:config/liquibase/changelog/20240306204415_changelog.xml" relativeToChangelogFile="false"/>
<include file="classpath:config/liquibase/changelog/20240331151800_cleanup.xml" relativeToChangelogFile="false"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Your changelog must get executed after the cleanup changelog.

@krusche krusche modified the milestones: 7.0.1, 7.0.2 Apr 22, 2024
@krusche krusche merged commit 79f17e6 into develop Apr 26, 2024
27 of 30 checks passed
@krusche krusche deleted the feature/show-attendence-check-status-in-exam branch April 26, 2024 21:25
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!) component:Exam Mode database Pull requests that update the database. (Added Automatically!). Require a CRITICAL deployment. ready to merge 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
Artemis Development
  
Review in progress
Development

Successfully merging this pull request may close these issues.

Exam mode: Allow students to see if their attendance was checked