Skip to content

Implement leave request#115

Open
maurya-doshi wants to merge 1 commit into
vicharanashala:mainfrom
maurya-doshi:feature/leave-request
Open

Implement leave request#115
maurya-doshi wants to merge 1 commit into
vicharanashala:mainfrom
maurya-doshi:feature/leave-request

Conversation

@maurya-doshi

Copy link
Copy Markdown

Implement leave request

Summary

Adds a complete leave request workflow for peer evaluations, allowing students to request leave from exams and teachers to approve/reject those requests. Also includes an incentivization system where students can volunteer to grade extra papers from a pool.

Features

Student Side

  • Students can submit leave requests for specific exams with a reason.
  • Students can view their leave request history and current status (pending/approved/rejected).
  • Students can claim extra evaluation papers from an incentivized pool.
  • Approved leave requests automatically hide the associated peer evaluations from the student's Peer Evaluation tab.

Teacher Side

  • Teachers can view all pending leave requests filtered by exam.
  • Teachers can approve or reject leave requests.
  • Approving a leave creates extra pool evaluations that other students can claim for incentive points.

Peer Evaluation Integration

  • initiatePeerEvaluation now excludes students on approved leave from the active evaluator pool.
  • Extra pool evaluations (with isExtra: true) are created for students on leave so their papers still get graded.
  • getPendingEvaluations filters out evaluations for exams where the student has approved leave.

New Files

  • backend/src/models/LeaveRequest.ts — Mongoose model for leave requests.
  • backend/src/controllers/student/leave.controller.ts — Student leave endpoints.
  • backend/src/controllers/teacher/leave.controller.ts — Teacher leave review endpoint.
  • frontend/src/components/student/StudentLeaves.tsx — Student leave UI.
  • frontend/src/components/teacher/TeacherLeavesRequests.tsx — Teacher leave management UI.

Bug Fixes

  • Fixed exam dropdowns showing blank/undefined by using exam.title instead of exam.name across frontend components.
  • Fixed duplicate navigation block in Login.tsx.
  • Removed debug console.log statements in OtpScreen.tsx.

Cleanup

  • Removed dead commented-out imports and routes in server.ts.
  • Fixed .gitignore — removed overly broad **/*.json rule that was suppressing package.json/tsconfig.json, added proper ignores for .env, .zip, temp files, and log files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant