Skip to content

Conversation

KonstiAnon
Copy link
Contributor

@KonstiAnon KonstiAnon commented Aug 11, 2025

ONLY DEPLOY TO TS 6

Checklist

General

  • I tested all changes and their related features with all corresponding user types on a test server.
  • This is a small issue that I tested locally and was confirmed by another developer on a test server.
  • I chose a title conforming to the naming conventions for pull requests.

Server

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 (e.g. using paging).
  • I strictly followed the principle of data economy for all client-server REST calls.
  • I strictly followed the client coding and design guidelines.

Motivation and Context

Currently all submissions for quiz exercises ([0-1] live submissions, [n] practice submissions) are all attached to a single participation. The only way to differentiate between live and practice submissions is to check if the result is rated. To make quizzes more consistent with programming exercises they should instead use the testRun attribute already contained in the Participation.

Description

This PR changes Quiz Exercises so, that every student can have two participations for each quiz exercise:

  • Live Participation
  • Practice Participation
    To achieve this I adapted the startPracticeMode function in the ParticipationService, so that it now also works for Quiz Exercises and is no longer reserved only for Programming Exercises.
    The submitForPractice function in the QuizSubmissionResource now utilizes the startPracticeMode instead of the startExercise function, reserving the latter one for live submissions.

Steps for Testing

Prerequisites:

  • 1 Student
  • 1 Instructor
  • 1 Quiz Exercise
  1. Log in to Artemis as a Student
  2. Participate in a quiz
  3. Wait for the due date to pass, or manually end the quiz
  4. Log in to Artemis as the Instructor
  5. Navigate to the course management
  6. Open the quiz for practice mode
  7. Switch back the the Student account
  8. Participate in a Practice run
  9. Verify that in the overview, both the graded result, as well as the practice result are displayed

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

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Summary by CodeRabbit

  • New Features

    • Practice mode now supported for quiz exercises (parity with programming exercises).
  • Bug Fixes

    • Practice badges consider the result itself as well as participation mode, fixing missing badges.
    • More reliable handling when switching or reusing graded vs. practice participations, reducing errors.
  • Improvements

    • Simplified quiz practice submission/initialization flow.
    • Minor UI tweak to ensure instructor actions render correctly.

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran201 passed3 skipped1 failed1h 2m 29s 759ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/programming/ProgrammingExerciseStaticCodeAnalysis.spec.ts
ts.Static code analysis tests › Configures SCA grading and makes a successful submission with SCA errors❌ failure2m 17s 495ms

Copy link

End-to-End (E2E) Test Results Summary

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ☑️Skipped ⚠️Failed ❌️Time ⏱
End-to-End (E2E) Test Report205 ran191 passed6 skipped8 failed2h 4m 39s 169ms
TestResultTime ⏱
End-to-End (E2E) Test Report
e2e/exercise/quiz-exercise/QuizExerciseManagement.spec.ts
ts.Quiz Exercise Management › Quiz Exercise Creation › Creates a Quiz with Drag and Drop❌ failure2m 7s 661ms
e2e/exam/ExamAssessment.spec.ts
ts.Exam assessment › Text exercise assessment › Assess a text exercise submission❌ failure
e2e/exam/test-exam/TestExamParticipation.spec.ts
ts.Test exam participation › Early Hand-in › Participates as a student in a registered test exam❌ failure7m 13s 214ms
ts.Test exam participation › Early Hand-in › Using exercise sidebar to navigate within exam❌ failure5m 11s 19ms
ts.Test exam participation › Early Hand-in › Using exercise overview to navigate within exam❌ failure4m 32s 280ms
e2e/exam/test-exam/TestExamStudentExams.spec.ts
ts.Test Exam - student exams › Check exam participants and their submissions › Open the list of exam students❌ failure6m 22s 372ms
ts.Test Exam - student exams › Check exam participants and their submissions › Search for a student in exams❌ failure6m 21s 799ms
e2e/exam/ExamResults.spec.ts
ts.Exam Results › Check exam exercise results › Check exam results for programming exercise › Check exam programming exercise results❌ failure6m 9s 772ms

@github-actions github-actions bot added server Pull requests that update Java code. (Added Automatically!) exercise Pull requests that affect the corresponding module quiz Pull requests that affect the corresponding module labels Aug 13, 2025
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅Skipped ⚠️FailedTime ⏱
End-to-End (E2E) Test Report205 ran202 passed3 skipped0 failed1h 3m 19s 688ms
TestResultTime ⏱
No test annotations available

@github-actions github-actions bot added client Pull requests that update TypeScript code. (Added Automatically!) core Pull requests that affect the corresponding module labels Aug 15, 2025
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed1s 609ms
TestResultTime ⏱
No test annotations available

Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅Skipped ⚠️FailedTime ⏱
End-to-End (E2E) Test Report205 ran202 passed3 skipped0 failed1h 1m 50s 249ms
TestResultTime ⏱
No test annotations available

@github-actions github-actions bot added the database Pull requests that update the database. (Added Automatically!). Require a CRITICAL deployment. label Aug 15, 2025
Copy link

End-to-End (E2E) Test Results Summary

TestsPassed ✅SkippedFailedTime ⏱
End-to-End (E2E) Test Report1 ran1 passed0 skipped0 failed1s 727ms
TestResultTime ⏱
No test annotations available

Copy link

End-to-End (E2E) Test Results Summary

AND r.rated = FALSE);
</sql>

<sql dbms="mysql">
Copy link
Member

Choose a reason for hiding this comment

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

You might include h2 here.

bensofficial
bensofficial previously approved these changes Aug 18, 2025
Copy link
Member

@bensofficial bensofficial left a comment

Choose a reason for hiding this comment

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

DB migration looks good.

Copy link

End-to-End (E2E) Test Results Summary

@KonstiAnon KonstiAnon marked this pull request as ready for review August 23, 2025 16:30
@marlonnienaber marlonnienaber temporarily deployed to artemis-test6.artemis.cit.tum.de September 15, 2025 11:47 — with GitHub Actions Inactive
@marlonnienaber
Copy link
Contributor

Tested on TS6, worked as expected.

Copy link

End-to-End (E2E) Test Results Summary

HawKhiem
HawKhiem previously approved these changes Sep 15, 2025
Copy link
Contributor

@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 TS6, also code 👍

@helios-aet helios-aet bot temporarily deployed to artemis-test6.artemis.cit.tum.de September 15, 2025 12:28 Inactive
@helios-aet helios-aet bot temporarily deployed to artemis-test6.artemis.cit.tum.de September 15, 2025 12:30 Inactive
LeZhen1105
LeZhen1105 previously approved these changes Sep 15, 2025
Copy link
Contributor

@LeZhen1105 LeZhen1105 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 TS6 worked as described

Copy link

End-to-End (E2E) Test Results Summary

bensofficial
bensofficial previously approved these changes Sep 15, 2025
Copy link
Member

@bensofficial bensofficial left a comment

Choose a reason for hiding this comment

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

Reapprove DB migration

Copy link

End-to-End (E2E) Test Results Summary

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.

Copy link

github-actions bot commented Oct 6, 2025

End-to-End (E2E) Test Results Summary

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!) core Pull requests that affect the corresponding module database Pull requests that update the database. (Added Automatically!). Require a CRITICAL deployment. exercise Pull requests that affect the corresponding module quiz Pull requests that affect the corresponding module ready for review server Pull requests that update Java code. (Added Automatically!)
Projects
Status: Ready For Review
Development

Successfully merging this pull request may close these issues.

5 participants