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: Enable changing working time in exam edit screen #7284

Merged
merged 39 commits into from
Oct 14, 2023

Conversation

aplr
Copy link
Contributor

@aplr aplr commented Sep 28, 2023

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
  • I followed the 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 followed the 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.

Changes affecting Programming Exercises

  • I tested all changes and their related features with all corresponding user types on Test Server 1 (Atlassian Suite).
  • I tested all changes and their related features with all corresponding user types on Test Server 2 (Jenkins and Gitlab).

Motivation and Context

We've introduced extending the working time using a quick-access dialog in #7119. This is causing inconsistent UI behaviour, as updating the working time in the exam edit screen does not trigger programming exercise re-scheduling.

Description

This PR is a follow-up of #7119. It adds the same programming exercise rescheduling behaviour when changing the working time on the exam edit screen, and adds tests which verify the expected behaviour.

Time change confirmation during exam

When the working time was changed while the exam is ongoing, a confirmation dialog is presented to the instructor.

Negative working time change

It's now possible to input negative numbers in the working time change dialog.

Working time change display

In both the working time change dialog as well as the confirmation dialog, the old and new working times are shown.

Other changes

Besides the changes regarding the motivation, this PR includes general improvements to UX and code.

Exam update component refactoring

The data flow in the exam update component was very complex, UI elements triggered recomputation of values, which in turn influenced other UI elements. This caused client tests to fail. Also, subscriptions were created within subscriptions, and data races occured. This PR pulls all of these issues straight, while also reducing the LOC and overall complexity.

Date input behaviour

Date inputs in the exam form now depend on each other, i.e. the end time picker now automatically starts w/ the current value of the start time.

Minor changes

  • Course is now loaded w/ a custom parameter resolver to simplify data flow
  • Translations for the working time dialog were updated to include a small indicator, that only positive working time changes are possible.
  • Fixed some linter issues

Testing

As this PR changes multiple things in the exam update component, we also have to test these changes.

Exam create/update

Prerequisites:

  • 1 Instructor
  1. Log in to Artemis
  2. Head over to course management
  3. Go to exams
  4. Create a new exam
  5. Check if creating the exam still works
  6. Update the exam
  7. Check if updating the exam still works

Exam import

Prerequisites:

  • 1 Instructor
  • 1 Exam
  1. Log in to Artemis
  2. Head over to course management
  3. Go to exams
  4. Import an existing exam
  5. Check if importing works, and all relevant fields are taken over.
  6. Specifically, check if fields which should NOT be imported are not imported. This was fixed in this PR. (see https://github.com/ls1intum/Artemis/pull/7284/files#r1342600853)

Change exam dates

Prerequisites:

  • 1 Instructor
  • 2 Students
  • 1 Exam
  1. Log in to Artemis
  2. Participate in the exam as a student
  3. Log in to Artemis in another browser session
  4. Change the exam's end date and save the exam (note the warning is only visible during the exam, and the confirmation dialog works as expected)
  5. Check if you as a student get the notification that the working time has changed

Change exam working time

Prerequisites:

  • 1 Instructor
  • 2 Students
  • 1 Exam
  1. Log in to Artemis
  2. Participate in the exam as a student
  3. Log in to Artemis in another browser session
  4. Use the working time extension dialog to change the exam's working time and confirm (also test negative values)
  5. Check if you as a student get the notification that the working time has changed

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

If an exam is in progress, the following warning is now shown to the educators:
Screenshot 2023-09-28 at 20 01 38

If start or end date are changed, upon saving, this confirmation dialog is shown:
Screenshot 2023-10-06 at 17 16 24

When changing the working in the dedicated dialog from the exam summary, it looks like this:
Screenshot 2023-10-06 at 13 04 31

And if the exam dates are changed despite the warning, the students get to see this:
Screenshot 2023-09-28 at 20 01 30

@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!) labels Sep 28, 2023
@aplr aplr changed the title Enable changing working time in exam edit screen Exam: Enable changing working time in exam edit screen Sep 28, 2023
@reschandreas reschandreas self-assigned this Sep 28, 2023
@aplr aplr marked this pull request as ready for review September 28, 2023 22:14
@aplr aplr requested a review from a team as a code owner September 28, 2023 22:14
JohannesStoehr
JohannesStoehr previously approved these changes Oct 12, 2023
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.

Code looks good overall, left two optional comments:

src/main/webapp/i18n/de/exam.json Outdated Show resolved Hide resolved
valentin-boehm
valentin-boehm previously approved these changes Oct 12, 2023
Copy link
Contributor

@valentin-boehm valentin-boehm 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

laurenzfb
laurenzfb previously approved these changes Oct 12, 2023
Copy link
Contributor

@laurenzfb laurenzfb 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!

reschandreas
reschandreas previously approved these changes Oct 12, 2023
Copy link
Contributor

@reschandreas reschandreas left a comment

Choose a reason for hiding this comment

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

reapprove

valentin-boehm
valentin-boehm previously approved these changes Oct 12, 2023
milljoniaer
milljoniaer previously approved these changes Oct 13, 2023
Copy link
Contributor

@milljoniaer milljoniaer left a comment

Choose a reason for hiding this comment

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

re-approve

JohannesStoehr
JohannesStoehr previously approved these changes Oct 13, 2023
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.

Thanks for incorporating my optional suggestions

Copy link
Member

@krusche krusche left a comment

Choose a reason for hiding this comment

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

client tests fail

@aplr
Copy link
Contributor Author

aplr commented Oct 14, 2023

Sorry, 2 failing client tests sneaked in without noticing in the last commits. They're fixed now.

@krusche krusche merged commit 211d6a1 into develop Oct 14, 2023
14 of 18 checks passed
@krusche krusche deleted the feature/exam-mode/edit-working-time branch October 14, 2023 12:46
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 server Pull requests that update Java code. (Added Automatically!) tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants