Spaces:
Runtime error
Runtime error
Commit History
-
feat(notifications): add Firebase push delivery for Android
86d6fd4
-
feat(exams): add exam record deletion and accurate list counts
- Add batch DTOs for deleting exam records and saving selected drafts - Add endpoints to delete individual saved exams and draft records - Add endpoint to batch delete selected saved exams and drafts - Add endpoint to batch save selected exam drafts - Enforce instructor course ownership before deleting or saving selected records - Remove finalized draft records when their linked saved exam is deleted - Return accurate exam item and section counts in exam list responses - Return accurate draft item and section counts in draft list responses - Add helper methods for ID normalization, missing-record validation, and count aggregationf335841 -
feat(question-bank): add bulk delete for selected questions
- Add BatchQuestionDeleteDto for deleting explicit selections or all questions matching filters - Add POST /api/question-bank/questions/delete/batch endpoint - Reuse existing batch question ID resolution for selected IDs and all-matching filter mode - Validate expected selected count before applying the delete operation - Verify instructor ownership for all selected questions before mutation - Archive selected questions before soft-deleting them to match single-question delete behavior - Return deleted question IDs and count so clients can refresh local state accurately7aafa94 -
fix(files): return 404 when file missing on disk; polish Word/PDF export
- files.service.ts: add fs.existsSync check in downloadFile so missing local files return NotFoundException (404) instead of crashing with a 400 from createReadStream - exams.service.ts: improve Word export HTML/DOCX rendering — better font stack, question number styling, math text formatting via formatExportMathText with unicode scripts, dedicated docxQuestionParagraph helper; q-marks CSS class for marks line Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e786b83
-
feat(exams): improve export media handling and register client PDFs
- add client PDF export registration endpoint for Flutter-rendered PDFs - accept multipart PDF uploads at /exams/:id/client-export - validate instructor ownership before registering client exports - store Flutter-generated PDFs through the existing FilesService - create completed ExamExport records linked to uploaded PDF files - keep existing backend export-word flow available as fallback - resolve exported exam images from local storage first, then Supabase - embed question media and attachment images in PDF/DOCX exports when available - prevent Supabase-backed question-bank image paths from being printed as plain text - add export image metadata handling for file ids, storage paths, mime types, and extensions - improve backend LaTeX fallback rendering for exported text - normalize common LaTeX delimiters, fractions, roots, Greek symbols, operators, arrows, and spacing commands - support readable handling for subscripts/superscripts such as K_1, R_0, s^2, and e^{-0.1T} - render DOCX…fe32daa -
fix(question-bank): make batch status updates safe and efficient
- Optimize question bank batch status actions to avoid slow per-question updates - Resolve selected question ids server-side for all-matching filter batches - Add batch support for approve, submit for review, archive, reject, and restore flows - Create review events and question versions for batch-updated questions - Add expectedQuestionCount validation to prevent accidental oversized batch mutations - Refuse batch actions when the resolved server-side selection count differs from the client selection count - Extend batch status DTO with all-matching filters, excluded ids, filter fields, and expected selection count - Preserve instructor course ownership checks for all affected batch questions - Keep batch responses hydrated with question media, attachments, groups, and image URLsb0ac0e7
-
fix(backend): return previewable group media URLs in question and exam APIs
- Add sharedImageUrl to question bank group summary responses - Load group shared files when returning question bank questions and question details - Generate Supabase signed/public URLs for group shared images, matching question and attachment media behavior - Include group shared image URLs in private question responses - Return decorated group image URLs from create, update, list, and detail group endpoints - Use previewable question-image URLs for draft exam question, attachment, and source group media - Use previewable question-image URLs for saved exam snapshots and attachments - Preserve local storage data URI fallback when Supabase preview URLs are unavailable - Keep exam full-detail snapshot decoration async so media URLs can be resolved before responseab98c34 -
Revert "feat(question-bank): expose createdBy on private response DTO"
This reverts commit 773efaf0bb590d26937e091fe547fabb0cc0e132.7b563a4 -
feat(question-bank): expose createdBy on private response DTO
773efaf -
feat(exams): generate real DOCX paper exports and align export layout
- Replace HTML-as-.doc Word export with a real DOCX package - Return .docx filename and proper OOXML MIME type for Word exports - Add DOCX document, footer, styles, settings, relationships, and media packaging - Render Word headers from the same paper template fields used by PDF - Preserve Arabic/Unicode text in Word exports instead of corrupting text - Add real Word PAGE and NUMPAGES footer fields for page numbering - Apply export layout fixes consistently to student, answer-key, and combined copies fix(exams): keep section question order consistent in exported papers - Treat each exam section as a contiguous paper block during export - Order section blocks by their first item position in the global draft order - Keep section questions together while still allowing unassigned questions around section blocks - Use sequential paper question numbering after final export ordering - Remove group and bulk metadata from exported exam content - Respect show/hide total marks and per-question…83d0321
-
feat(question-bank): expose createdAt and updatedAt on private response DTO
Adds createdAt and updatedAt to QuestionBankPrivateResponseDto and the toPrivateResponse mapper. Enables clients (e.g. the question-generator inspector page) to display when a question was saved without a separate admin endpoint.0057e36
-
feat(assessment): implement Question Bank and Exam Generator backend
Add full backend support for instructor Question Bank and Exam Generator workflows, including question lifecycle management, media attachments, grouped questions, intent-based exam generation, draft editing, saved exam snapshots, export options, and paper templates. Question Bank: - add chapter, question, bulk question, attachment, group, group item, version, and review-event DTOs/entities/services - support question statuses: draft, under_review, approved, rejected, archived - implement review actions for submit, approve, reject, archive, and restore - reset approved questions back to draft after meaningful edits - add batch status actions and backend stats for filtered question pools - support prompt image metadata, image captions, alt text, hints, and multiple supporting attachments - add attachment upload, update, delete, reorder, and orphan cleanup behavior - add question groups with shared prompt/image metadata, link existing questions, unlink questions safely, reorder gro…ffd0171
-
feat: add student relation to getMyAppointments for enhanced appointment details
2c7da32 -
feat: enhance assignments module with user role handling and upload file type definition
cb527e9 -
feat: add exam drafts functionality with pagination and image upload support in question bank
1588205 -
feat: add exam drafts functionality with pagination and image upload support in question bank
b69e79f -
feat: add exam drafts functionality with pagination and image upload support in question bank
fc9fd2d
-
feat: implement question bank and exam modules with associated services, controllers, and entities
45a5ec1 -
feat: implement question bank and exam modules with associated services, controllers, and entities
8cffb49
-
feat(backend): add student payment APIs and stabilize transcript/assignment responses.
This enables dashboard integrations by exposing /payments/my with seeded demo data, grouping GPA transcript data by semester correctly, and returning null for missing assignment submissions to avoid expected 404 noise.810c001 -
feat(ai-services): harden attendance/quiz deployments and backend integrations.
Tune attendance recognition and HF Docker setup, improve quiz generation variability and HF metadata, and add backend fixes for AI attendance matching plus recent course activity endpoints.1e03ebd
-
config
5a387fc -
config
9bcea3c -
feat: Hugging Face Docker Space, uploads chown, and Swagger fixes for production
- Root Dockerfile and .dockerignore for HF Docker Space (port 7860, node user) - Swagger: string-enum query metadata helper, avoid enum-as-object OpenAPI bug - Production: disable OpenAPI unless ENABLE_SWAGGER=true (Space variable) - Docs: README.HF-DEPLOY tweakaa3bec5
-
feat: implement core backend modules, notification system, and AI agent skill documentation
a8a7b69
-
feat(admin): wire dashboard modules and implement calendar persistence
2494e74 -
Merge pull request #15 from tarekdx34/quiz_fix
Amir Mohamed Hamdifix(quizzes): abandon stale in-progress attempts and harden92b2b91 -
fix(quizzes): abandon stale in-progress attempts and harden time-limit checks
Problem ------- In-progress attempts that had exceeded the time limit were being resumed instead of flagged as stale. The submit flow also lacked server-side elapsed-time calculation, making it possible to bypass time constraints via client-side manipulation. Changes ------- Start-attempt flow - Detects expired in-progress attempts on session start - Marks stale attempts as abandoned - Creates a fresh attempt instead of resuming the expired one Submit flow - Computes elapsed time via DB TIMESTAMPDIFF (falls back to JS if unavailable) - Applies the same grace-window threshold used at start time - Marks expired attempts abandoned before throwing a timeout error - Uses server-computed elapsed time for timeTakenMinutes Shared helpers (new) - isAttemptExpired() — unified expiry check - calcElapsedTime() — DB-first elapsed-time calculation - abandonAttempt() — single-responsibility abandon transition4d96dfd
-
feat: implement announcement service with role-based access control and target audience enumeration
0ab7cad
-
Issue #27
32b4d43 -
fix(database): normalize FK column types for refactored schema sync
Align primary/foreign key bigint columns to unsigned across entities, fix nullable SET NULL linkage, and disable automatic migration execution to stabilize startup against the refactored database.fcab6da -
refactor: resolve circular dependencies and optimize entities for SWC builder
Implements TypeORM Relation<T> and type-only imports across all entities to support the transition to the SWC builder and resolve initialization reference errors.9f03bd9
-
feat(attendance): raise student face reference upload limit to 15 MB
Align server validation with the frontend and clarify the error message when the file is too large.beaf33b -
feat(progress): track student material views and persist course completion updates.
Add per-student material view tracking and update student progress records from material view events, while exposing progress metrics in enrollments and adding migration/SQL tooling for Aiven and local DB rollout.862e7e0
-
Issue #15 #17 #24 #26 Fixed
c235262
-
fixed the admin BUGS
e6b22aa
-
feat(attendance): face references, AI section flow, and nullable photo file
- Nest: student face reference entity/service, AI attendance FormData to Python, optional fileId on photos - Python: /attendance/section for roster + reference images - DB: migrations for face_refs table and nullable attendance_photos.file_id; optional SSL in database.config - Ignore ca.pem; Postman minimal collection; campus-events SQL runner script5d9c8a5
-
feat(enrollments): add endpoint for live student enrollment count
Add GET /api/enrollments/section/:sectionId/students/count to return the actual enrolled student count without fetching all records. ## Problem - current_enrollment counter in course_sections can become stale - Mobile app had to fetch all student records just to get a count - Stats cards showed incorrect counts vs actual enrolled students ## Solution - New endpoint using COUNT() query returning { count: number } - Reuses existing access control (assertStaffCanAccessSection) - Placed before /students route to avoid route conflicts ## Files Changed - enrollments.controller.ts: add getSectionStudentsCount endpoint - enrollments.service.ts: add getSectionStudentsCount method419018d
-
feat(labs): add instructor labs CRUD, grading, and attendance improvements for Flutter Phase 7
Marwan Hassan Sobhy## New Fields - Add allowedFileTypes and maxFileSizeMb to CreateLabDto and Lab entity - Database migration required: ALTER TABLE labs ADD COLUMN allowed_file_types VARCHAR(255) NULL, ADD COLUMN max_file_size_mb FLOAT NULL; ## New Endpoints - PATCH /api/labs/:id/instructions/:instructionId — update instruction text, orderIndex, and fileId (via UpdateInstructionDto) - DELETE /api/labs/:id/instructions/:instructionId — delete lab instruction ## Attendance Overhaul - Rewrote getAttendance() to return all enrolled students for the lab's course, not just those with existing attendance records - Queries CourseSection for sections matching the lab's courseId - Queries CourseEnrollment for enrolled students with user relations - Queries LabAttendance with user relations for existing records - Merges results: existing records for marked students, placeholders (id: null, attendanceStatus: null) for unmarked students - Injected CourseSection and CourseEnrollment repositories int…fbaa73d -
Merge pull request #13 from tarekdx34/quizzes
Tarek Mohamedfeat(quizzes): add auto-save for quiz progress and enrich quiz attemp…24e2802 -
feat(quizzes): add auto-save for quiz progress and enrich quiz attempt data
eac689e -
fix(assignments): change delete instruction endpoint to accept driveId instead of DB PK
The GET /api/assignments/:id response returns instructionFiles with driveId (Google Drive file ID) but no database PK, making the previous delete endpoint unreachable from the frontend. - Change route param from :instructionFileId (number) to :driveId (string) - Update service to lookup files by driveId instead of driveFileId - Update response field from deletedFileId to deletedFileDriveId Frontend can now use the driveId already available from the GET response with no frontend changes required.0717182
-
feat(assignments): add endpoint to delete assignment instruction files
- Add DELETE /api/assignments/:assignmentId/instructions/:instructionFileId - Instructor, TA, and admin only (matches upload endpoint auth) - Deletes file from Google Drive and drive_files DB record - Graceful degradation: if Drive deletion fails, still removes DB record and returns a warning message in the response - Import GoogleDriveService into AssignmentsService9d22537
-
1 fix(google-drive): add self-healing folder management with duplicate prevention
2 3 Fix assignment file upload failures caused by stale Google Drive folder IDs 4 and prevent duplicate Drive ID entries in the database. 5 6 Problems fixed: 7 - 404 "File not found" errors when parent folder IDs in DB no longer exist in Drive 8 - Duplicate entry errors when Drive IDs already exist with different parent/type 9 - Orphaned folders created in Drive when database records weren't synced 10 11 Changes to google-drive.service.ts: 12 - Add verifyFolderExists() to check if folders actually exist in Google Drive 13 14 Changes to drive-folder.service.ts: 15 - Rewrite getOrCreateFolder() with comprehensive 5-step check-first logic: 16 1. Check database by (folderType, parentDriveFolderId, folderName) 17 2. Get parent folder from database 18 3. Verify parent exists in Google Drive (detect stale IDs) 19 4. Check Google Drive by name to find existing folders 20 4.5. Check if Dri…b4c4de1
-
feat(labs): enhance instruction file retrieval with improved query strategies
6f57ab6 -
TA Dashboard SHARING components
343821c -
feat: add database test script for office hour slots retrieval
refactor: improve query formatting and readability in user management service feat: add public profile retrieval endpoint in user profile controller fix: update role permissions to include STUDENT in enrollments controller feat: enhance enrollment service to check for student enrollment status refactor: clean up office hours controller for better readability and maintainability feat: implement appointment count retrieval in office hours serviceed9da92
-
Scheduling templates done
1452e50
-
feat(schedule): add campus event and schedule template management
- Implemented QueryCampusEventDto for filtering campus events. - Created QueryScheduleTemplateDto for querying schedule templates. - Added RegisterCampusEventDto for event registration notes. - Introduced UpdateCampusEventDto and UpdateScheduleTemplateDto for partial updates. - Developed CampusEventRegistration entity to manage event registrations. - Established CampusEvent and ScheduleTemplate entities with necessary fields and relationships. - Implemented CampusEventsService for handling campus event logic including CRUD operations and registration. - Developed ScheduleTemplatesService for managing schedule templates and applying them to course sections. - Added validation for schedule slots and bulk application of templates.1ae6d1e -
feat(drive-integration): refactor Google Drive integration with folder service and DB schema improvements
- Added DriveFolderService with dedicated folder management - Integrated drive folder service into assignments and labs modules - Fixed foreign key constraints in lab_submission entity (labSubmissionId column) - Updated service methods to use new drive folder service - Added comprehensive frontend integration guide - Added migration documentation for frontend developers - Included SQL script for database schema updates Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>5e42f3a