diff --git a/Backend/src/services/RecommendedCourses.service.ts b/Backend/src/services/RecommendedCourses.service.ts index 00c882bd..b5c977c5 100644 --- a/Backend/src/services/RecommendedCourses.service.ts +++ b/Backend/src/services/RecommendedCourses.service.ts @@ -211,7 +211,7 @@ export class RecommendedCoursesService { // Audit log await auditService.logSync({ userId: decoded.id, - action: isRecommended ? AuditAction.UPDATE_COURSE : AuditAction.UPDATE_COURSE, + action: AuditAction.UPDATE, entityType: 'Course', entityId: courseId, oldValue: { is_recommended: course.is_recommended }, diff --git a/Backend/src/types/CoursesStudent.types.ts b/Backend/src/types/CoursesStudent.types.ts index 13051a8b..541787c1 100644 --- a/Backend/src/types/CoursesStudent.types.ts +++ b/Backend/src/types/CoursesStudent.types.ts @@ -154,12 +154,20 @@ export interface LessonContentData { title: MultiLangText; description: MultiLangText | null; passing_score: number; - time_limit: number | null; - shuffle_questions: boolean; - shuffle_choices: boolean; - is_skippable: boolean; - show_answers_after_completion: boolean; - questions: { + time_limit?: number | null; + shuffle_questions?: boolean; + shuffle_choices?: boolean; + is_skippable?: boolean; + show_answers_after_completion?: boolean; + allow_multiple_attempts?: boolean; + latest_attempt?: { + score: number; + is_passed: boolean; + attempt_number: number; + started_at: Date; + completed_at: Date | null; + }; + questions?: { id: number; question: MultiLangText; question_type: 'MULTIPLE_CHOICE' | 'TRUE_FALSE' | 'SHORT_ANSWER';