Skip to content

Update quiz set and quiz edit form UI #3153

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

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
157 changes: 152 additions & 5 deletions apps/upskii/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3832,26 +3832,169 @@
"ws-quiz-sets": {
"plural": "Quiz Sets",
"singular": "Quiz Set",
"name": "Quiz set name",
"description": "Quiz sets are used to group quizzes together for learning purposes.",
"create": "Create quiz set",
"create_description": "Create a new quiz set",
"name": "Set name",
"edit": "Edit set",
"link-quizzes": "Link Quizzes",
"link-modules": "Link modules"
"link-modules": "Link modules",
"editing": "Updating...",
"creating": "Creating...",
"create": "Create Quiz Set",
"edit": "Edit Quiz Set",
"form-sections": {
"basic": {
"title": "Basic Information",
"subtitle": "Set up the fundamental details of your quiz"
},
"timing-limit": {
"title": "Basic Information",
"subtitle": "Set up the fundamental details of your quiz"
Comment on lines +3849 to +3851

Choose a reason for hiding this comment

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

medium

The timing-limit section's title and subtitle are the same as the basic section. Consider a more descriptive title and subtitle specific to timing and attempt limits.

      "timing-limit": {
        "title": "Timing & Limits",
        "subtitle": "Set attempt and time limits for the quiz"
      },

},
"schedule": {
"title": "Schedule",
"subtitle": "Set availability and due dates for the quiz"
},
"settings": {
"title": "Quiz Settings",
"subtitle": "Configure quiz behavior and student permissions"
}
},
"form-description": "Configure your quiz settings, timing, and permissions to create an engaging learning experience for your students.",
"required-badge": "Required",
"form-fields": {
"name": {
"title": "Set Name",
"description": "Choose a clear, descriptive name for your quiz",
"placeholder": "e.g., Chapter 5 Assessment"
},
"attempt_limit": {
"title": "Attempt Limit",
"description": "Maximum number of times a user can attempt the quiz. Leave 0 for unlimited.",
"placeholder": "e.g., 3"
},
"time_limit_minutes": {
"title": "Time Limit (minutes)",
"description": "The time allowed to complete the quiz in minutes. Leave 0 for no time limit.",
"placeholder": "e.g, 60"
},
"available_date": {
"title": "Available From",
"description": "Date and time when the quiz becomes available to participants."
},
"due_date": {
"title": "Due Date",
"description": "Deadline for submitting the quiz."
},
"explanation_mode": {
"title": "Explanation Mode",
"description": "Choose when and how students can see answer explanations",
"placeholder": "Select explanation timing",
"select_never": "Never show answer explanations",
"select_correct_answer": "Only show explanation of correct answers",
"select_all_answer": "Show explanation of all answers"
},
"instruction": {
"title": "Instructions",
"description": "Provide detailed instructions for students using the rich text editor, displayed before starting the quiz.",
"save": "Save Instruction",
"saving": "Saving..."
},
"allow_view_results": {
"title": "Allow Immediate Results",
"description": "Enable users to see their score immediately upon submission."
},
"results_released": {
"title": "Results Released",
"description": "Mark quiz results as released, allowing detailed feedback and explanations."
},
"allow_view_old_attempts": {
"title": "Allow Review Old Attempts",
"description": "Revisit users' previous quiz attempts. Before results are released, users can view only their submitted answers. Once results are released, they'll see their answers along with detailed results and feedback."
}
}
},
"ws-quizzes": {
"plural": "Quizzes",
"singular": "Quiz",
"create": "Create quiz",
"create_multiple": "Add questions",
"create_description": "Create a new quiz",
"description": "Manage quizzes in your workspace that have multiple choice questions for learning purposes.",
"edit_description": "Edit a quiz",
"edit": "Edit quiz",
"edit_all": "Edit all quizzes",
"question": "Question",
"answer": "Answer",
"points": "Points",
"submitting": "Submitting...",
"submit": "Submit",
"form": {
"edit-title": "Edit Quiz Questions",
"create-title": "Create Quiz Questions",
"create-description": "Create multiple quiz questions at once. Each question can have multiple options with explanations. The user can also copy and paste quiz questions",
"edit-description": "Edit or add more multiple quiz questions at once. Each question can have multiple options with explanations. The user can also copy and paste quiz questions",
"question-no": "Question {no}",
"option-no": "Option {no}",
"untitled-question": "Untitled Question",
"content": {
"options": {
"label": "Answer Options",
"add-button": "Add Option",
"placeholder": "Option {no}",
"total-options-text": "Total Options",
"correct-label": "Correct",
"explanation-label": "Explanation",
"generate-explanation-button": "Generate",
"explanation-placeholder": "Explain why this option is correct or incorrect..."
},
"questions": {
"label": "Question",
"placeholder": "Enter your question here...",
"count-many": "{count} Questions",
"count-one": "{count} Question"
},
"correct-answers": {
"no-selected": "No correct answer selected",
"single-selected": "Single correct answer",
"multiple-selected": "Multiple correct answers"
}
},
"paste-confirm-modal": {
"title": "Confirm Paste",
"description-plural": "You are about to paste {length} quiz questions. Review the content below and choose an action.",
"description-single": "You are about to paste 1 quiz question. Review the content below and choose an action.",
"discard-button": "Discard",
"confirm-button": "Confirm Paste"
},
"add-another-button": "Add Another Question",
"paste-question-button": "Paste Question",
"create-button": "Create All Questions",
"edit-button": "Edit All Questions",
"creating": "Creating...",
"updating": "Updating...",
"error": {
"title": "Error",
"fail-update": "Failed to update quiz",
"fail-create": "Failed to create quiz",
"unexpected": "An unexpected error occurred",
"invalid-clipboard-title": "Error",
"invalid-clipboard": "Invalid quiz format",
"invalid-clipboard-message": "Failed to paste quiz data. Please ensure you have valid quiz data in your clipboard.",
"explanation-generation-failed": "Failed to generate explanation",
"quiz-copy-failed": "Failed to copy quiz to clipboard"
},
"success": {
"title": "Success",
"edit-quizzes": "Successfully updated {length} quizzes",
"edit-quiz": "Successfully updated {length} quiz",
"create-quizzes": "Successfully created {length} quizzes",
"create-quiz": "Successfully created {length} quiz",
"quiz-copied": "Quiz copied to clipboard",
"paste-success-many": "Pasted {length} quizzes succesfully",
"paste-success-one": "Pasted 1 quiz succesfully",
"explanation-generated": "Explanation generated successfully"
}
},
"quiz-status": {
"sidebar_aria": "Quiz progress sidebar",
"question_status_title": "Question Progress",
Expand All @@ -3860,7 +4003,11 @@
"question_navigation_label": "Jump to question",
"answered_state": "Answered",
"unanswered_state": "Unanswered",
"jump_to_question": "Jump to question"
"jump_to_question": "Jump to question",
"upcoming": "Upcoming",
"active": "Active",
"expired": "Expired",
"draft": "Draft"
},
"time": {
"remaining": "Time Remaining",
Expand Down
170 changes: 157 additions & 13 deletions apps/upskii/messages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3836,28 +3836,168 @@
"create_description": "Tạo một hàng chờ mới"
},
"ws-quiz-sets": {
"plural": "Bộ trắc nghiệm",
"singular": "Bộ trắc nghiệm",
"description": "Quản lý các bộ trắc nghiệm trong không gian làm việc của bạn bao gồm các câu hỏi nhiều lựa chọn dành cho mục đích học tập.",
"create": "Tạo bộ trắc nghiệm",
"create_description": "Tạo bộ trắc nghiệm mới",
"name": "Tên bộ trắc nghiệm",
"edit": "Chỉnh sửa bộ",
"link-quizzes": "Liên kết câu hỏi",
"link-modules": "Liên kết mô-đun"
"plural": "Bộ câu hỏi",
"singular": "Bộ câu hỏi",
"name": "Tên bộ câu hỏi",
"description": "Bộ câu hỏi được sử dụng để nhóm các câu quiz lại với nhau cho mục đích học tập.",
"create_description": "Tạo một bộ câu hỏi mới",
"link-quizzes": "Liên kết bài kiểm tra",
"link-modules": "Liên kết học phần",
"editing": "Đang cập nhật...",
"creating": "Đang tạo...",
"create": "Tạo bộ câu hỏi",
"edit": "Chỉnh sửa bộ câu hỏi",
"form-sections": {
"basic": {
"title": "Thông tin cơ bản",
"subtitle": "Thiết lập các chi tiết cơ bản cho bài kiểm tra của bạn"
},
"timing-limit": {
"title": "Thông tin cơ bản",
"subtitle": "Thiết lập các chi tiết cơ bản cho bài kiểm tra của bạn"
Comment on lines +3855 to +3857

Choose a reason for hiding this comment

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

medium

The timing-limit section's title and subtitle are the same as the basic section. Update these to be more descriptive for Vietnamese-speaking users.

      "timing-limit": {
        "title": "Thời gian & Giới hạn",
        "subtitle": "Thiết lập giới hạn về số lần làm bài và thời gian cho bài kiểm tra của bạn"
      },

},
"schedule": {
"title": "Lịch trình",
"subtitle": "Đặt thời gian khả dụng và thời hạn cho bài kiểm tra"
},
"settings": {
"title": "Cài đặt bài kiểm tra",
"subtitle": "Cấu hình hành vi bài kiểm tra và quyền của sinh viên"
}
},
"form-description": "Cấu hình cài đặt, thời gian và quyền của bài kiểm tra để tạo trải nghiệm học tập hấp dẫn cho sinh viên của bạn.",
"required-badge": "Bắt buộc",
"form-fields": {
"name": {
"title": "Tên bộ câu hỏi",
"description": "Chọn một tên rõ ràng, mô tả cho bài kiểm tra của bạn",
"placeholder": "Ví dụ: Kiểm tra Chương 5"
},
"attempt_limit": {
"title": "Giới hạn số lần làm bài",
"description": "Số lần tối đa người dùng có thể làm bài kiểm tra. Để 0 nếu không giới hạn.",
"placeholder": "Ví dụ: 3"
},
"time_limit_minutes": {
"title": "Giới hạn thời gian (phút)",
"description": "Thời gian cho phép hoàn thành bài kiểm tra tính bằng phút. Để 0 nếu không giới hạn thời gian.",
"placeholder": "Ví dụ: 60"
},
"available_date": {
"title": "Có hiệu lực từ",
"description": "Ngày và giờ bài kiểm tra có sẵn cho người tham gia."
},
"due_date": {
"title": "Ngày hết hạn",
"description": "Thời hạn nộp bài kiểm tra."
},
"explanation_mode": {
"title": "Chế độ giải thích",
"description": "Chọn thời điểm và cách học sinh có thể xem giải thích câu trả lời",
"placeholder": "Chọn thời điểm giải thích",
"select_never": "Không bao giờ hiển thị giải thích câu trả lời",
"select_correct_answer": "Chỉ hiển thị giải thích các câu trả lời đúng",
"select_all_answer": "Hiển thị giải thích của tất cả các câu trả lời"
},
"instruction": {
"title": "Hướng dẫn",
"description": "Cung cấp hướng dẫn chi tiết cho học sinh bằng trình soạn thảo văn bản đa dạng thức, hiển thị trước khi bắt đầu bài kiểm tra."
},
Comment on lines +3902 to +3905

Choose a reason for hiding this comment

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

medium

The instruction object is missing the save and saving keys, which are present in the en.json file. Add these translations for consistency.

      "instruction": {
        "title": "Hướng dẫn",
        "description": "Cung cấp hướng dẫn chi tiết cho học sinh bằng trình soạn thảo văn bản đa dạng thức, hiển thị trước khi bắt đầu bài kiểm tra.",
        "save": "Lưu Hướng dẫn",
        "saving": "Đang lưu..."
      },

"allow_view_results": {
"title": "Cho phép xem kết quả ngay lập tức",
"description": "Cho phép người dùng xem điểm của họ ngay sau khi nộp bài."
},
"results_released": {
"title": "Đã công bố kết quả",
"description": "Đánh dấu kết quả bài kiểm tra đã công bố, cho phép xem phản hồi chi tiết và giải thích."
},
"allow_view_old_attempts": {
"title": "Cho phép xem lại các lần làm bài cũ",
"description": "Cho phép người dùng xem lại các lần làm bài kiểm tra trước đó của họ. Trước khi kết quả được công bố, người dùng chỉ có thể xem các câu trả lời đã nộp của mình. Khi kết quả được công bố, họ sẽ thấy các câu trả lời cùng với kết quả chi tiết và phản hồi."
}
}
},
"ws-quizzes": {
"plural": "Câu hỏi trắc nghiệm",
"singular": "Bộ trắc nghiệm",
"create": "Tạo câu hỏi",
"edit_description": "Chỉnh sửa bộ trắc nghiệm",
"create_description": "Tạo một bộ trắc nghiệm mới",
"description": "Quản lý bộ trắc nghiệm trong không gian làm việc của bạn có các câu hỏi nhiều lựa chọn dành cho mục đích học tập.",
"edit": "Chỉnh sửa bộ trắc nghiệm",
"edit-all": "Chỉnh sửa toàn bộ",
"question": "Câu hỏi",
"answer": "Câu trả lời",
"points": "Points",
"submitting": "Submitting...",
"submit": "Submit",
"points": "Điểm",
"submitting": "Đang nộp...",
"submit": "Nộp",
"form": {
"edit-title": "Chỉnh sửa câu hỏi đố vui",
"create-title": "Tạo câu hỏi đố vui",
"create-description": "Tạo nhiều câu hỏi đố vui cùng lúc. Mỗi câu hỏi có thể có nhiều lựa chọn với giải thích. Người dùng cũng có thể sao chép và dán câu hỏi đố vui",
"edit-description": "Chỉnh sửa hoặc thêm nhiều câu hỏi đố vui cùng lúc. Mỗi câu hỏi có thể có nhiều lựa chọn với giải thích. Người dùng cũng có thể sao chép và dán câu hỏi đố vui",
"question-no": "Câu hỏi {no}",
"option-no": "Tùy chọn {no}",
"untitled-question": "Câu hỏi không có tiêu đề",
"content": {
"options": {
"label": "Tùy chọn trả lời",
"add-button": "Thêm tùy chọn",
"placeholder": "Tùy chọn {no}",
"total-options-text": "Tổng số tùy chọn",
"correct-label": "Đúng",
"explanation-label": "Giải thích",
"generate-explanation-button": "Tạo",
"explanation-placeholder": "Giải thích tại sao tùy chọn này đúng hoặc sai..."
},
"questions": {
"label": "Câu hỏi",
"placeholder": "Nhập câu hỏi của bạn vào đây...",
"count-many": "{count} Câu hỏi",
"count-one": "{count} Câu hỏi"
},
"correct-answers": {
"no-selected": "Chưa chọn câu trả lời đúng",
"single-selected": "Một câu trả lời đúng",
"multiple-selected": "Nhiều câu trả lời đúng"
}
},
"paste-confirm-modal": {
"title": "Xác nhận dán",
"description-plural": "Bạn sắp dán {length} câu hỏi đố vui. Xem lại nội dung bên dưới và chọn hành động.",
"description-single": "Bạn sắp dán 1 câu hỏi đố vui. Xem lại nội dung bên dưới và chọn hành động.",
"discard-button": "Hủy bỏ",
"confirm-button": "Xác nhận dán"
},
"add-another-button": "Thêm câu hỏi khác",
"paste-question-button": "Dán câu hỏi",
"create-button": "Tạo tất cả câu hỏi",
"edit-button": "Chỉnh sửa tất cả câu hỏi",
"creating": "Đang tạo...",
"updating": "Đang cập nhật...",
"error": {
"title": "Lỗi",
"fail-update": "Cập nhật câu đố thất bại",
"fail-create": "Tạo câu đố thất bại",
"unexpected": "Đã xảy ra lỗi không mong muốn",
"invalid-clipboard-title": "Lỗi",
"invalid-clipboard": "Định dạng câu đố không hợp lệ",
"invalid-clipboard-message": "Không thể dán dữ liệu câu đố. Vui lòng đảm bảo bạn có dữ liệu câu đố hợp lệ trong khay nhớ tạm.",
"explanation-generation-failed": "Không tạo được giải thích",
"quiz-copy-failed": "Sao chép câu đố vào khay nhớ tạm thất bại"
},
"success": {
"title": "Thành công",
"edit-quizzes": "Đã cập nhật thành công {length} câu đố",
"edit-quiz": "Đã cập nhật thành công {length} câu đố",
"create-quizzes": "Đã tạo thành công {length} câu đố",
"create-quiz": "Đã tạo thành công {length} câu đố",
"quiz-copied": "Đã sao chép câu đố vào khay nhớ tạm",
"paste-success-many": "Đã dán thành công {length} câu đố",
"paste-success-one": "Đã dán thành công 1 câu đố",
"explanation-generated": "Giải thích đã được tạo thành công"
}
},
"quiz-status": {
"sidebar_aria": "Thanh bên tiến độ bài kiểm tra",
"question_status_title": "Tiến độ câu hỏi",
Expand All @@ -3866,7 +4006,11 @@
"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"
"jump_to_question": "Chuyển đến câu hỏi",
"upcoming": "Sắp diễn ra",
"active": "Đang hoạt động",
"expired": "Đã hết hạn",
"draft": "Nháp"
},
"time": {
"remaining": "Thời gian còn lại",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ClientQuizzes from '../../../../../../../../components/quiz/client-quizzes';
import ClientFlashcards from './flashcards/client-flashcards';
import ClientQuizzes from './quizzes/client-quizzes';
import { extractYoutubeId } from '@/utils/url-helper';
import {
createClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ export default function BeforeTakingQuizWhole({

const canViewTotalPointsOnly = quizData.resultsReleased;

console.log('Test', quizData.attempts[0]);

// const canViewOldAttemptsResults = quizData.resultsReleased;
// can view attempts with points in detailed explanation
const canViewOldAttemptsResults =
Expand Down
Loading