Skip to content

Add Quiz Taking UI #3103

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

Merged
merged 22 commits into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b9f5560
style (Taking Quiz): update style for taking quiz [page
Puppychan Jun 15, 2025
4289697
style (Taking Quiz UI): add styling for before taking quiz
Puppychan Jun 15, 2025
8cdede6
feat (Taking Quiz UI): add taking quiz button, dark light styling
Puppychan Jun 16, 2025
1d0ce00
feat (Taking Quiz UI): add translation
Puppychan Jun 16, 2025
0d51335
ops (Taking Quiz UI): fix deploy
Puppychan Jun 16, 2025
ba85695
ops (Taking Quiz UI): fix deploy
Puppychan Jun 16, 2025
c682863
ops (Taking Quiz UI): fix deploy
Puppychan Jun 16, 2025
c4e13b3
Merge branch 'main' into feat/upskii/taking-quiz-ui
Puppychan Jun 16, 2025
05f7737
style: apply prettier formatting
Puppychan Jun 16, 2025
40fb721
style: apply prettier formatting for feat/upskii/taking-quiz-ui (#3104)
Puppychan Jun 16, 2025
b625bf7
fix (Taking Quiz UI): fix UI displayed when max attempt limit reached
Puppychan Jun 18, 2025
574faea
Merge remote-tracking branch 'origin/feat/upskii/taking-quiz-ui' into…
Puppychan Jun 18, 2025
d218347
style(Taking Quiz UI - Answering Question): styling for input and que…
Puppychan Jun 18, 2025
6c92781
style(Taking Quiz UI - Answering Question): styling for displaying sc…
Puppychan Jun 18, 2025
90fc234
fix (Taking Quiz UI): fix deploy
Puppychan Jun 18, 2025
e1c7076
fix (Taking Quiz UI): duration not recorded to backend
Puppychan Jun 18, 2025
a025cae
revert(Taking Quiz UI): revert working form
Puppychan Jun 18, 2025
d465f77
style: apply prettier formatting
Puppychan Jun 18, 2025
ee415ea
style: apply prettier formatting for feat/upskii/taking-quiz-ui (#3114)
Puppychan Jun 18, 2025
d762d19
Merge branch 'main' into feat/upskii/taking-quiz-ui
vhpx Jun 18, 2025
cc0b7f2
chore(db): consolidate database schema
vhpx Jun 18, 2025
e2d71dd
refactor: standardize customer ID naming and update database schema f…
vhpx Jun 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions apps/db/supabase/migrations/20250618174721_enhance_quiz_taking.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
alter table "public"."workspace_quiz_attempts" add column "duration_seconds" integer;

alter table "public"."workspace_quiz_attempts" add column "submitted_at" timestamp with time zone not null default now();

alter table "public"."workspace_quiz_sets" add column "available_date" timestamp with time zone not null default now();

alter table "public"."workspace_quiz_sets" add column "explanation_mode" smallint not null default 0;

alter table "public"."workspace_quiz_sets" add column "instruction" jsonb;

alter table "public"."workspace_quizzes" add column "instruction" jsonb;

alter table "public"."workspace_quiz_sets" add column "results_released" boolean not null default false;

alter table "public"."workspace_quiz_sets" drop column "release_points_immediately";

alter table "public"."workspace_quiz_sets" add column "allow_view_old_attempts" boolean not null default true;
175 changes: 144 additions & 31 deletions apps/upskii/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3846,40 +3846,153 @@
"edit": "Edit quiz",
"question": "Question",
"answer": "Answer",
"question_status_title": "Question Progress",
"answered_status_short": "answered",
"quiz_progress_label": "Quiz Progress",
"question_navigation_label": "Question Navigation",
"jump_to_question_aria": "Question {{number}}, {{status}}",
"answered_state": "Answered",
"unanswered_state": "Unanswered",
"answered_icon": "✓",
"unanswered_icon": "⚪",
"time_elapsed": "Time Elapsed",
"hidden_time_elapsed": "Time Elapsed (hidden)",
"hidden_time_remaining": "Hidden Timer",
"edit_description": "Edit an existing quiz",
"generation_error": "An error has occured when generating quizzes.",
"generation_accepted": "AI-generated quizzes are accepted!",
"please_answer_all": "Please answer all questions.",
"loading": "Loading...",
"results": "Results",
"attempt": "Attempt",
"of": "of",
"unlimited": "Unlimited Attempts",
"score": "Score",
"done": "Done",
"attempts": "Attempts",
"time_limit": "Time Limit",
"no_time_limit": "No Time Limit",
"minutes": "Minutes",
"take_quiz": "Take Quiz",
"time_remaining": "Time Remaining",
"points": "Points",
"submitting": "Submitting...",
"submit": "Submit",
"due_on": "Due on",
"quiz_past_due": "This quiz is past its due date."
"quiz-status": {
"sidebar_aria": "Quiz progress sidebar",
"question_status_title": "Question Progress",
"answered_status_short": "answered",
"quiz_progress_label": "Quiz Progress",
"question_navigation_label": "Jump to question",
"answered_state": "Answered",
"unanswered_state": "Unanswered",
"jump_to_question": "Jump to question"
},
"time": {
"remaining": "Time Remaining",
"elapsed": "Time Elapsed",
"hidden_remaining": "Time Hidden",
"hidden_elapsed": "Time Hidden",
"hour": "hour",
"hours": "hours",
"minute": "minute",
"second": "second"
},
"errors": {
"error-type-submit": "Error when submitting test",
"unknown-error": "Unknown error",
"network-error": "Network error",
"submission-failed": "Submission failed.",
"network-error-submitting": "Network error submitting"
},
"quiz": {
"take-quiz": "Take Quiz",
"start-quiz": "Start Quiz",
"starting-quiz": "Starting Quiz...",
"quiz-instructions": "Quiz Instructions",
"attempt-limit": "Attempt Limit",
"due-date": "Due Date",
"available-date": "Available Date",
"attempts-remaining": "Attempts Remaining",
"past-due": "This quiz is past due",
"not-available": "This quiz is not yet available",
"unlimited": "Unlimited",
"review-info": "Review the information below before starting your exam",
"click-to-begin": "Click to begin your attempt",
"results-out": "Results are out—no further attempts",
"quiz-past-due": "Quiz is past due",
"quiz-not-available": "Quiz not yet available",
"no-attempts-remaining": "No attempts remaining",
"view-result": "View Result",
"view-final-total-score": "You got {score} over {maxScore} for your recent attempt.",
"view-final-attempt": "You got {score} over {maxScore} for your recent attempt. Click `View Result` to view your score details",
"quiz-not-available-message": "This quiz is not yet available. Please check back later.",
"quiz-past-due-message": "This quiz is past its due date. You cannot start a new attempt at this time.",
"no-attempts-message": "You have no attempts remaining for this quiz."
},
"info": {
"quiz-information": "Quiz Information",
"quiz-id": "Quiz ID",
"time-limit": "Time Limit",
"no-time-limit": "No time limit",
"minutes": "Minutes",
"attempts-used": "Attempts Used",
"explanations": "Explanations",
"schedule": "Schedule",
"available-from": "Available From",
"due-date": "Due Date",
"attempt-remaining": "attempt remaining",
"attempts-remaining": "attempts remaining",
"explanation-modes": {
"none": "None",
"correct-after-release": "Correct only after release",
"all-after-release": "All after release"
}
},
"instructions": {
"title": "Instructions",
"subtitle": "Read before you begin",
"default": {
"stable-connection": "Make sure you have a stable internet connection",
"cannot-pause": "You cannot pause the quiz once started",
"answer-all": "You should answer all questions before submitting",
"auto-save": "Your progress will be automatically saved",
"time-limit": "You have {minutes} minutes"
}
},
"past-attempts": {
"title": "Past Attempts",
"view-answers": "Click \"View Details\" to view your answers",
"view-results": "Click \"View Details\" to view your results",
"results-pending": "Results pending release",
"view-results-button": "View Results",
"view-details-button": "View Details",
"attempt-info": " at {date} ({duration})"
},
"summary": {
"title": "Attempt Summary",
"description": "Review your quiz attempt details and responses",
"back_to_quiz": "Back to Quiz",
"attempt_number": "Attempt #{number}",
"submitted": "Submitted",
"duration": "Duration",
"completion": "Completion",
"answered_of_total": "{answered} of {total} questions",
"progress": "Progress",
"questions_and_responses": "Questions & Responses",
"questions_count": "{count} questions",
"answered": "Answered",
"skipped": "Skipped",
"your_response": "Your Response:",
"no_answer": "No answer provided",
"available_options": "Available Options:",
"summary_stats": {
"attempt_number": "Attempt Number",
"answered": "Questions Answered",
"skipped": "Questions Skipped",
"time_taken": "Time Taken"
}
},
"results": {
"quiz-completed": "Quiz Completed!",
"your-score": "Your Score",
"attempt": "Attempt",
"of": "of",
"unlimited": "Unlimited",
"attempts-remaining": "Attempts Remaining",
"left": "left",
"excellent-work": "Excellent Work!",
"outstanding-performance": "Outstanding performance! You have mastered this material.",
"good-job": "Good Job!",
"solid-understanding": "You show a solid understanding of the material.",
"keep-practicing": "Keep Practicing!",
"room-for-improvement": "There's room for improvement. Consider reviewing the material.",
"needs-improvement": "Needs Improvement",
"review-recommended": "We recommend reviewing the material and trying again.",
"back-take-quiz": "Back to Quiz Page",
"quiz-completed-at": "Quiz completed at",
"time-limit": "Time limit",
"minutes": "minutes",
"started_at": "Started at",
"completed_at": "Completed at",
"duration": "Duration",
"points": "Points",
"correct": "(Correct)",
"your_answer": "(Your answer)",
"correct_option": "(Correct)",
"score_awarded": "Score Awarded"
}
},
"ws-reports": {
"report": "Report",
Expand Down
183 changes: 149 additions & 34 deletions apps/upskii/messages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3847,40 +3847,155 @@
"edit": "Chỉnh sửa bộ trắc nghiệm",
"question": "Câu hỏi",
"answer": "Câu trả lời",
"question_status_title": "Tiến độ câu hỏi",
"answered_status_short": "đã trả lời",
"quiz_progress_label": "Tiến độ bài kiểm tra",
"question_navigation_label": "Điều hướng câu hỏi",
"jump_to_question_aria": "Câu hỏi {{number}}, {{status}}",
"answered_state": "Đã trả lời",
"unanswered_state": "Chưa trả lời",
"answered_icon": "✓",
"unanswered_icon": "⚪",
"time_elapsed": "Đã trôi qua",
"hidden_time_elapsed": "Đã ẩn thời gian",
"hidden_time_remaining": "Ẩn đếm ngược",
"edit_description": "Chỉnh sửa bài kiểm tra hiện có",
"generation_error": "Đã xảy ra lỗi khi tạo bộ câu hỏi.",
"generation_accepted": "Các bộ câu hỏi do AI tạo ra đã được chấp nhận!",
"please_answer_all": "Vui lòng trả lời tất cả các câu hỏi.",
"loading": "Đang tải...",
"results": "Kết quả",
"attempt": "Lần thử",
"of": "của",
"unlimited": "Không giới hạn số lần thi",
"score": "Điểm số",
"done": "Hoàn thành",
"attempts": "Số lần thử",
"time_limit": "Giới hạn thời gian",
"no_time_limit": "Không giới hạn thời gian",
"minutes": "Phút",
"take_quiz": "Làm bài kiểm tra",
"time_remaining": "Thời gian còn lại",
"points": "Điểm",
"submitting": "Đang gửi...",
"submit": "Nộp bài",
"due_on": "Hạn nộp",
"quiz_past_due": "Bài kiểm tra đã quá hạn"
"points": "Points",
"submitting": "Submitting...",
"submit": "Submit",
"quiz-status": {
"sidebar_aria": "Thanh bên tiến độ bài kiểm tra",
"question_status_title": "Tiến độ câu hỏi",
"answered_status_short": "đã trả lời",
"quiz_progress_label": "Tiến độ bài kiểm tra",
"question_navigation_label": "Chuyển đến câu hỏi",
"answered_state": "Đã trả lời",
"unanswered_state": "Chưa trả lời",
"jump_to_question": "Chuyển đến câu hỏi"
},
"time": {
"remaining": "Thời gian còn lại",
"elapsed": "Thời gian đã trôi qua",
"hidden_remaining": "Đã ẩn thời gian còn lại",
"hidden_elapsed": "Đã ẩn thời gian trôi qua",
"minutes": "phút",
"seconds": "giây",
"hour": "giờ",
"hours": "giờ",
"minute": "phút",
"second": "giấy"
},
"errors": {
"error-type-submit": "Đã có lỗi xảy ra khi nộp bài",
"unknown-error": "Lỗi không xác định",
"network-error": "Lỗi mạng",
"submission-failed": "Nộp bài thất bại",
"network-error-submitting": "Lỗi mạng khi nộp bài"
},
"quiz": {
"take-quiz": "Làm bài kiểm tra",
"start-quiz": "Bắt đầu làm bài",
"starting-quiz": "Đang bắt đầu...",
"quiz-instructions": "Hướng dẫn làm bài",
"attempt-limit": "Giới hạn lần làm",
"due-date": "Hạn nộp",
"available-date": "Ngày mở",
"attempts-remaining": "Số lần còn lại",
"past-due": "Bài kiểm tra đã quá hạn",
"not-available": "Bài kiểm tra chưa mở",
"unlimited": "Không giới hạn",
"review-info": "Xem kỹ thông tin bên dưới trước khi bắt đầu bài thi",
"click-to-begin": "Nhấp để bắt đầu lần làm bài của bạn",
"results-out": "Kết quả đã công bố—không thể làm thêm",
"quiz-past-due": "Bài kiểm tra đã quá hạn",
"quiz-not-available": "Bài kiểm tra chưa mở",
"no-attempts-remaining": "Không còn lần làm bài nào",
"view-result": "Xem kết quả",
"view-final-total-score": "Bạn đạt được {score} trên {maxScore}.",
"view-final-attempt": "Bạn đạt được {score} trên {maxScore}. Xem kết quả lần làm bài gần đây nhất",
"quiz-not-available-message": "Bài kiểm tra này chưa mở. Vui lòng quay lại sau.",
"quiz-past-due-message": "Bài kiểm tra này đã quá hạn nộp. Bạn không thể bắt đầu lần làm bài mới vào lúc này.",
"no-attempts-message": "Bạn không còn lần làm bài nào cho bài kiểm tra này."
},
"info": {
"quiz-information": "Thông tin bài kiểm tra",
"quiz-id": "Mã bài kiểm tra",
"time-limit": "Giới hạn thời gian",
"no-time-limit": "Không giới hạn thời gian",
"minutes": "Phút",
"attempts-used": "Số lần đã làm",
"explanations": "Giải thích",
"schedule": "Lịch trình",
"available-from": "Mở từ",
"due-date": "Hạn nộp",
"attempt-remaining": "lần còn lại",
"attempts-remaining": "lần còn lại",
"explanation-modes": {
"none": "Không có",
"correct-after-release": "Chỉ đáp án đúng sau khi công bố",
"all-after-release": "Tất cả sau khi công bố"
}
},
"instructions": {
"title": "Hướng dẫn",
"subtitle": "Đọc trước khi bắt đầu",
"default": {
"stable-connection": "Đảm bảo bạn có kết nối internet ổn định",
"cannot-pause": "Bạn không thể tạm dừng bài kiểm tra sau khi bắt đầu",
"answer-all": "Bạn nên trả lời tất cả câu hỏi trước khi nộp bài",
"auto-save": "Tiến trình của bạn sẽ được tự động lưu",
"time-limit": "Bạn có {minutes} phút"
}
},
"past-attempts": {
"title": "Lần làm bài trước",
"view-answers": "Nhấp \"Xem chi tiết\" để xem câu trả lời của bạn",
"view-results": "Nhấp \"Xem kết qủa\" để xem kết quả của bạn",
"results-pending": "Kết quả đang chờ công bố",
"view-results-button": "Xem kết quả",
"view-details-button": "Xem chi tiết",
"attempt-info": " lúc {date} ({duration})"
},
"summary": {
"title": "Tóm tắt lần làm bài",
"description": "Xem lại chi tiết và câu trả lời trong lần làm bài kiểm tra của bạn",
"back_to_quiz": "Quay lại làm bài",
"attempt_number": "Lần làm #{number}",
"submitted": "Đã nộp",
"duration": "Thời lượng",
"completion": "Hoàn thành",
"answered_of_total": "{answered} / {total} câu hỏi",
"progress": "Tiến độ",
"questions_and_responses": "Câu hỏi & Câu trả lời",
"questions_count": "{count} câu hỏi",
"answered": "Đã trả lời",
"skipped": "Bỏ qua",
"your_response": "Câu trả lời của bạn:",
"no_answer": "Chưa chọn câu trả lời",
"available_options": "Tùy chọn có sẵn:",
"summary_stats": {
"attempt_number": "Số lần làm",
"answered": "Câu hỏi đã trả lời",
"skipped": "Câu hỏi đã bỏ qua",
"time_taken": "Thời gian làm bài"
}
},
"results": {
"quiz-completed": "Đã hoàn thành bài kiểm tra!",
"your-score": "Điểm số của bạn",
"attempt": "Lần làm",
"of": "trên",
"unlimited": "Không giới hạn",
"attempts-remaining": "Số lần còn lại",
"left": "lần",
"excellent-work": "Làm rất tốt!",
"outstanding-performance": "Hiệu suất xuất sắc! Bạn đã nắm vững kiến thức này.",
"good-job": "Làm tốt lắm!",
"solid-understanding": "Bạn hiểu khá vững kiến thức.",
"keep-practicing": "Tiếp tục luyện tập!",
"room-for-improvement": "Còn chỗ cần cải thiện. Hãy xem lại nội dung.",
"needs-improvement": "Cần cải thiện",
"review-recommended": "Chúng tôi khuyên bạn nên ôn tập lại và thử lại.",
"back-take-quiz": "Quay lại trang làm bài",
"quiz-completed-at": "Hoàn thành bài kiểm tra lúc",
"time-limit": "Giới hạn thời gian",
"minutes": "phút",
"started_at": "Bắt đầu lúc",
"completed_at": "Hoàn thành lúc",
"duration": "Thời gian làm bài",
"points": "Điểm",
"correct": "(Đáp án đúng)",
"your_answer": "(Câu trả lời của bạn)",
"correct_option": "(Đáp án đúng)",
"score_awarded": "Điểm đạt được"
}
},
"ws-reports": {
"report": "Báo cáo",
Expand Down
Loading