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: Show exam announcements only for started exams #9102

Closed

Conversation

coolchock
Copy link
Contributor

@coolchock coolchock commented Jul 21, 2024

Checklist

General

Motivation and Context

In issues #9010 and #9021, two problems regarding exam announcements were reported. Both issues involved exam announcements being displayed before the exam started and after the exam ended when the user opened the Exams tab on the course page. This pull request resolves both #9010 and #9021.

Description

The jhi-exam-live-events-button was present in the exam-participation-cover.component.html, which caused announcements to be displayed on the exam cover page. I removed the jhi-exam-live-events-button, so now announcements are only displayed if the user has started the exam and opened the exam-participation.component.html.

Exam Mode Testing

Prerequisites:

  • 1 Instructor
  • 1 Student
  • 1 Exam
  1. Log in to Artemis as an instructor in one browser and as a student in another browser/tab.
  2. As the student, go to your course -> Exams.
  3. As the instructor, go to Course Management -> Exams and select your exam.
  4. Change the working time of the exam, create an announcement, and change the problem statement of an exercise. Verify all three cases. Ensure that at least one case is tested when the exam is visible to the student, but the working time has not yet started.
  5. As the student, verify that no announcements are displayed before the exam has started.
  6. Start the exam and verify that announcements are displayed.

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

Exam Mode Test

  • Test 1
  • Test 2

Test Coverage

Screenshots

Summary by CodeRabbit

  • New Features
    • Simplified user interface by removing the live events button during exam wait times and submission issues.
    • Focus shifted towards presenting exam title and general information, enhancing usability and clarity for students.

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Jul 21, 2024
@coolchock coolchock temporarily deployed to artemis-test4.artemis.cit.tum.de July 21, 2024 22:09 — with GitHub Actions Inactive
@coolchock coolchock temporarily deployed to artemis-test6.artemis.cit.tum.de July 24, 2024 12:13 — with GitHub Actions Inactive
@coolchock coolchock marked this pull request as ready for review July 24, 2024 19:15
@coolchock coolchock requested a review from a team as a code owner July 24, 2024 19:15
Copy link

coderabbitai bot commented Jul 24, 2024

Walkthrough

The recent update simplifies the user interface of the exam participation cover component by removing the <jhi-exam-live-events-button /> component. This button was previously displayed during two specific scenarios—when the exam had not yet started and when a student failed to submit their exam. The changes aim to streamline the user experience, focusing on essential information and minimizing distractions for students during critical exam moments.

Changes

Files Change Summary
src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html Removed the <jhi-exam-live-events-button /> component under specific conditions to simplify the interface.

Sequence Diagram(s)

sequenceDiagram
    participant Student
    participant ExamSystem

    Student->>ExamSystem: Request Exam Start
    ExamSystem-->>Student: Display Exam Title and Info
    alt Exam Not Started
        Student->>ExamSystem: Wait for Exam
        ExamSystem-->>Student: No Live Events Button
    end
    alt Submission Failed
        Student->>ExamSystem: Attempt Submission
        ExamSystem-->>Student: Submission Error
        ExamSystem-->>Student: No Live Events Button
    end
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>.
    • 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.
    • @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 as 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.

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

CodeRabbit Configuration 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.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 24, 2024
Strohgelaender
Strohgelaender previously approved these changes Jul 26, 2024
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 ts4, did not get any notifications before I start the exam 👍 However, I think we still want to display notifications in end page, because it is part of an active exam period. Removing from that notification button also breaks the end page layout. (However, it is not so important, since we have a new end page design.)

Screenshot 2024-07-26 at 13 37 23

@@ -1,8 +1,5 @@
@if (!startView && !studentFailedToSubmit) {
<div class="w-100 d-flex">
<div class="col-md-3">
<jhi-exam-live-events-button />
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

Here should be added again (Line 3-5)

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.

Besides, I also realized that if there are some changes before an exam starts, the notifications are not displayed in the welcome page but still displayed directly after we start with the exam, which I am not sure if it is the intended behaviour. Because the changes before the exam's start date should be irrelevant for the students in my opinion.
Screenshot 2024-07-26 at 18 05 30

Copy link
Contributor

@JohannesStoehr JohannesStoehr left a comment

Choose a reason for hiding this comment

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

This PR should also adapt the server so it also makes sure that no information is sent to the students that is not supposed to be sent

@edkaya
Copy link
Contributor

edkaya commented Jul 28, 2024

This PR should also adapt the server so it also makes sure that no information is sent to the students that is not supposed to be sent

Server part will be adapted here #9136

SimonEntholzer
SimonEntholzer previously approved these changes Aug 1, 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

undernagruzez
undernagruzez previously approved these changes Aug 5, 2024
Copy link
Contributor

@undernagruzez undernagruzez left a comment

Choose a reason for hiding this comment

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

code, also since the server PR has already been merged, looks good

Copy link

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

…ments-after-exam-start

# Conflicts:
#	src/main/webapp/app/exam/participate/exam-cover/exam-participation-cover.component.html
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!) small stale
Projects
Archived in project
6 participants