Skip to content

Exam mode: Migrate participate module to signals #10456

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

Open
wants to merge 59 commits into
base: develop
Choose a base branch
from

Conversation

coolchock
Copy link
Contributor

@coolchock coolchock commented Mar 9, 2025

Checklist

General

Client

Motivation and Context

Description

This is the final pull request that completes the migration of the exam mode to use signals.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • 1 Student
  • 1 Exam and 1 Test Exam with all exercise types
  1. Log in to Artemis.
  2. Participate in both the Exam and the Test Exam multiple times (Test Exams now support multiple attempts).
  3. Verify the following:
    • Exam navigation bar works as expected
    • Exam start page works as expected
    • Exam cover page works as expected
    • Exam summary page works as expected
    • Participating in the exercises does not cause any issues

Testserver States

You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.

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 even for very large courses with more than 2000 students.
  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance even for very large courses with more than 2000 students.

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Summary by CodeRabbit

  • Refactor

    • Enhanced exam interfaces by streamlining dynamic data updates across exam overview, timer, navigation, and result summary displays. This ensures that exam statuses, timings, and progress are more consistently and accurately reflected, providing a smoother user experience.
  • Tests

    • Updated test suites to verify the improved responsiveness and reliability of exam components, ensuring consistent behavior during exam sessions.

@coolchock coolchock removed the stale label Apr 21, 2025
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed50m 23s 164ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/course/CourseMessages.spec.ts
ts.Course messages › Channel messages › Write/edit/delete message in channel › Student should be able to edit message in channel❌ failure2m 2s 775ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure1m 45s 822ms

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran196 passed3 skipped2 failed51m 32s 267ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/course/CourseMessages.spec.ts
ts.Course messages › Channel messages › Write/edit/delete message in channel › Student should be able to edit message in channel❌ failure2m 2s 935ms
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure1m 46s 40ms

@helios-aet helios-aet bot temporarily deployed to artemis-test3.artemis.cit.tum.de April 25, 2025 06:56 Inactive
Copy link

@HawKhiem HawKhiem 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 TS3. Everything went smoothly in the first attempt of an exam. I noticed something odd when attempting an exam the second time. I couldn't submit the programming exercise, I either had a 404 or 500 error. The same thing happened for follow up attempts.
Screenshot 2025-04-25 092451
Screenshot 2025-04-25 092515
Screenshot 2025-04-25 092855

Also the number of attempts is not updated correctly. I have made 2 attempts but the attempts count is still 0.

Screenshot 2025-04-25 092809

Copy link
Contributor

@florian-glombik florian-glombik left a comment

Choose a reason for hiding this comment

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

Please fix the outcommented code in src/main/webapp/app/exam/overview/exam-cover/exam-participation-cover.component.spec.ts - I think it can be removed?

Could we also align the usage of update vs set?
https://angular.dev/guide/signals#writable-signals

Besides that the changes look fine to me

Comment on lines 65 to 68
TestBed.runInInjectionContext(() => {
component.exam = input(exam);
component.studentExam = input(studentExam);
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we do this in the @beforeEach?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@github-project-automation github-project-automation bot moved this from Work In Progress to Ready For Review in Artemis Development Apr 25, 2025
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran197 passed3 skipped1 failed49m 27s 49ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/course/CourseMessages.spec.ts
ts.Course messages › Channel messages › Write/edit/delete message in channel › Student should be able to edit message in channel❌ failure2m 3s 124ms

coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 28, 2025
Copy link
Contributor

@florian-glombik florian-glombik left a comment

Choose a reason for hiding this comment

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

Approve code

There are still two outcommented lines of code, but no dealbreaker

Copy link
Contributor

@florian-glombik florian-glombik 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 the adjustments, the code looks good to me! 😄

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report201 ran197 passed3 skipped1 failed44m 52s 80ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/course/CourseMessages.spec.ts
ts.Course messages › Channel messages › Write/edit/delete message in channel › Student should be able to edit message in channel❌ failure2m 3s 411ms

@helios-aet helios-aet bot temporarily deployed to artemis-test3.artemis.cit.tum.de April 30, 2025 06:39 Inactive
Copy link

@HawKhiem HawKhiem left a comment

Choose a reason for hiding this comment

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

Retested on TS3. Everything mentioned works as it should. There is still the problem I mentioned earlier, but that probably has nothing to do with this PR. Should I create an issue for this?

image

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!) exam Pull requests that affect the corresponding module ready for review
Projects
Status: Ready For Review
Development

Successfully merging this pull request may close these issues.

4 participants