feat(exam-homework): add audit report, i18n, error boundaries, and permission hardening
- Add comprehensive audit report for exam and homework module - Create exam-homework i18n message files (zh-CN + en) and register namespace - Add permission check to gradeHomeworkSubmissionAction to prevent horizontal privilege escalation - Add Error Boundary + loading.tsx for 5 key pages (exam build/proctoring, homework assignment/submissions, student assignment) - Refactor exam-columns to createExamColumns(t) factory for i18n support - Refactor exam-data-table to manage columns internally via useTranslations - Replace hardcoded strings with i18n keys in all exam/homework components and pages - Add getHomeworkSubmissionForGrading data-access for secure grading flow
This commit is contained in:
@@ -35,6 +35,8 @@ export default getRequestConfig(async () => {
|
||||
lessonPreparation,
|
||||
grades,
|
||||
diagnostic,
|
||||
attendance,
|
||||
elective,
|
||||
] = await Promise.all([
|
||||
import(`@/shared/i18n/messages/${locale}/common.json`),
|
||||
import(`@/shared/i18n/messages/${locale}/auth.json`),
|
||||
@@ -51,6 +53,8 @@ export default getRequestConfig(async () => {
|
||||
import(`@/shared/i18n/messages/${locale}/lesson-preparation.json`),
|
||||
import(`@/shared/i18n/messages/${locale}/grades.json`),
|
||||
import(`@/shared/i18n/messages/${locale}/diagnostic.json`),
|
||||
import(`@/shared/i18n/messages/${locale}/attendance.json`),
|
||||
import(`@/shared/i18n/messages/${locale}/elective.json`),
|
||||
]);
|
||||
|
||||
return {
|
||||
@@ -71,6 +75,8 @@ export default getRequestConfig(async () => {
|
||||
lessonPreparation: lessonPreparation.default,
|
||||
grades: grades.default,
|
||||
diagnostic: diagnostic.default,
|
||||
attendance: attendance.default,
|
||||
elective: elective.default,
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user