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: Update problem statement content only if there is a new change #8356

Merged
merged 6 commits into from
Apr 22, 2024

Conversation

kaancayli
Copy link
Contributor

@kaancayli kaancayli commented Apr 8, 2024

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.
  • I strictly followed the client coding and design guidelines.
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.

Motivation and Context

After submitting the exam, "Click Show the difference" button can still be seen on the exam overview page and clicking the button does not show any difference. This PR makes sure that after submission, the button is not visible.

Description

Changed the BehaviorSubject to regular Subject in exam-exercise-update.service.ts

Exam Mode Testing

Prerequisites:

  • 1 Instructor
  • 1 Student
  • 1 Exam with a Programming Exercise

Note

Prevent refreshing your browser while following the steps.

  1. Log in to Artemis
  2. Participate in an exam as a student
  3. In another browser / or in a new window using incognito mode, log in to Artemis as an Instructor / Admin.
  4. Go to exam management as instructor and edit the problem statement of the programming exercise.
  5. As student verify that you can see the "Click Show the difference" button, and clicking the button shows the difference.
  6. Make a submission to the programming exercise as a student.
  7. After your submission is built and tested, hand in the exam
  8. Verify on the exam overview page that "Click Show the difference" button is not visible.

Testserver States

Note

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







Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Exam Mode Test

  • Test 1
  • Test 2

Screenshots

  • Before submission:
    Screenshot 2024-04-08 at 23 39 40

  • After submission:
    Screenshot 2024-04-08 at 23 54 27

@kaancayli kaancayli requested a review from a team as a code owner April 8, 2024 22:18
Copy link

coderabbitai bot commented Apr 8, 2024

Walkthrough

The recent updates aim to enhance the user experience in exam exercises by refining the problem statement update process and improving update visibility. These changes involve adjusting service behaviors, updating HTML templates for better UI control, and introducing properties for managing component visibility. The goal is to facilitate clearer communication of updates and modifications within exam exercises.

Changes

Files Change Summary
.../exam/manage/exam-exercise-update.service.ts Replaced BehaviorSubject with Subject for examExerciseIdAndProblemStatementSource
.../participate/exercises/exam-exercise-update-highlighter.component.html
.../participate/exercises/exam-exercise-update-highlighter.component.ts
Updated HTML template and component logic to control button visibility based on _isHidden property

Possibly related issues


Recent Review Details

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 99617ce and 441a45e.
Files selected for processing (1)
  • src/main/webapp/app/exam/participate/exercises/exam-exercise-update-highlighter/exam-exercise-update-highlighter.component.html (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/webapp/app/exam/participate/exercises/exam-exercise-update-highlighter/exam-exercise-update-highlighter.component.html

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.

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Apr 8, 2024
coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 9, 2024
@kaancayli kaancayli added the small label Apr 9, 2024
Strohgelaender
Strohgelaender previously approved these changes Apr 9, 2024
Copy link
Contributor

@Strohgelaender Strohgelaender 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 7.0.0 milestone Apr 10, 2024
JohannesWt
JohannesWt previously approved these changes Apr 11, 2024
Copy link
Contributor

@JohannesWt JohannesWt 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

@krusche krusche modified the milestones: 7.0.0, 7.0.1 Apr 11, 2024
Copy link
Member

@julian-christl julian-christl left a comment

Choose a reason for hiding this comment

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

Don't see any such button on TS2, code lgtm

Copy link
Contributor

@coolchock coolchock left a comment

Choose a reason for hiding this comment

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

tested during testing session, works as described 👍

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.

tested during the testing session today, works as expected

Copy link
Contributor

@egekurt123 egekurt123 left a comment

Choose a reason for hiding this comment

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

Manually Tested during testing session on ts4, works as expected

Copy link
Contributor

@pzdr7 pzdr7 left a comment

Choose a reason for hiding this comment

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

Tested in testing session; works as expected

Copy link
Member

@BaumiCoder BaumiCoder left a comment

Choose a reason for hiding this comment

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

Successfully tested in the Testing Session 👍

@krusche krusche modified the milestones: 7.0.1, 7.0.2 Apr 22, 2024
@krusche krusche changed the title Exam mode: Update content only if there is a new change Exam mode: Update problem statement content only if there is a new change Apr 22, 2024
@krusche krusche merged commit ed31739 into develop Apr 22, 2024
78 of 85 checks passed
@krusche krusche deleted the bugfix/exam-exercise-update-highlighter branch April 22, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix client Pull requests that update TypeScript code. (Added Automatically!) component:Exam Mode ready to merge small
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

10 participants