Repository navigation
Exam: reliable answer saving and schedules, exam/question editing, and a show-result option - #33
Merged
Merged
Conversation
…e limits reliable - Exam runner: answers go through a save queue with automatic retries. A failed save stays visible and blocks submit, essays are saved after a typing pause instead of on every keystroke, and the automatic submit at the fifth violation and when time runs out now works. - Attempts waiting for essay grading are shown as such instead of offering the exam again. - Schedules: reject an end time before the start time and a duration that does not fit in the window; the form shows the server's validation message. - Admins can create an exam by choosing the teacher who owns it. - Rate limiting: authenticated requests are limited per user instead of per IP and the per-IP login limit is configurable, so a school lab behind one public address is not locked out. - Run the backend in Asia/Jakarta (TZ / APP_TIMEZONE) so schedule times entered as local time are read as local time.
…pes and retry option
- Exams can be edited after creation, schedule included (PUT /exams/{id}).
- Questions can be edited (PUT /exams/{id}/questions/{questionId}); the
explanation field is available and attached image/audio paths are kept.
- Short-answer questions in the editor and in the exam room.
- Exam type select aligned with the backend enum (quiz, UTS, UAS, praktik,
tryout), shown on the exam card.
- "Allow retry" option in the exam form and a retry link on the student card.
… exam The show_result flag was stored but never applied: students always saw their score. It now decides what a student sees. - Exam form: "show the score to students" checkbox (on by default). Turning it on later releases the scores. - With the setting off, the submit response, the student's exam list and the student's grade report no longer carry the score of that exam. The exam card and the result screen say the score has not been shared yet. The teacher's monitor is unchanged. - V6 migration switches show_result on for existing exams so they keep showing scores as before; the demo seed does the same for the demo exams.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Several things could cost students their answers or lock a class out during a real exam, and some backend features had no screen:
LocalDateTime), so exam windows and deadlines were evaluated 7 hours off for WIB.Teacher profile not found).short_answer, exam types,allowRetryandshowResultexisted in the backend but not in the UI, andshowResultwas never applied.What changed
Exam room (student)
answerSaver.ts) with automatic retries. Unsaved answers stay visible and block submit; essays are saved after a typing pause.alert()in the exam room.needs_grading) are shown as such instead of offering the exam again.Exam management (teacher/admin)
PUT /exams/{id}).PUT /exams/{id}/questions/{questionId}), including the explanation field.Show result
Platform
app.rate-limit.*.Asia/Jakartaby default (TZ/APP_TIMEZONE).Behaviour and API changes
POST /exams/attempts/{attemptId}/submitaddsresultHidden;scoreandpassedare omitted when the exam hides results.studentScoreandstudentPassedare null while results are hidden.ExamDto: new optionalteacherId(used when an admin creates the exam);durationMinutesmust be at least 1 andpassingScorebetween 0 and 100.Deployment notes
V6setsshow_result = TRUEon existing exams. The flag was never applied before, so this keeps current behaviour: students keep seeing their scores.APP_TIMEZONE(defaultAsia/Jakarta),APP_RATE_LIMIT_LOGIN_PER_IP(default 100),APP_RATE_LIMIT_AUTH_PER_IP(default 200).Not in this PR