Skip to content

Latest commit

 

History

History
172 lines (137 loc) · 16.7 KB

File metadata and controls

172 lines (137 loc) · 16.7 KB

4. Features & Functionality: What Can FMS Actually Do? 🚀

The Faculty Management System (FMS) isn't just a collection of code; it's a bustling hub of activity, designed to simplify and supercharge academic administration and communication. Think of it as your department's digital Swiss Army knife – packed with specialized tools for every occasion. Let's pop open the toolkit and explore what FMS brings to the table!

1. User Authentication & Role-Based Access Control: The Keys to the Kingdom 🔑

Before anyone can explore the wonders of FMS, they need the right key! Our robust authentication system is the gatekeeper, ensuring only authorized personnel get in, and once inside, they only see what's relevant to their role. It's like a high-tech castle with different access levels for royalty (Admins), knights (Lecturers), and esteemed citizens (Students).

  • Meet the Players (User Roles):
    • 👑 Admin: The ultimate superuser, the Gandalf of the system. Admins wield full power to manage students, lecturers, subjects, broadcast news, and configure the very fabric of the FMS reality.
    • 👨‍🏫 Lecturer (Teacher): The knowledge-bearers and mentors. Lecturers can manage their assigned subjects, upload precious learning materials, craft challenging exercises, and gracefully handle student submissions via the unique "Waiting Room."
    • 🎓 Student: The eager learners. Students can access their enrolled subjects, download course materials, keep an eye on exercise deadlines, and (conceptually, as per current analysis) submit their brilliant work.
  • The Digital Handshake (Login/Logout): A secure and straightforward login mechanism. We use sessions – think of them as temporary backstage passes – to remember who is who as they navigate the system.
  • Velvet Ropes & VIP Sections (Protected Routes): Not every page is for every eye! Access to different parts of FMS is strictly controlled based on the logged-in user's role. This is enforced by:
    • Decorators: Pythonic spells like @login_required that guard routes.
    • Custom Logic: Our very own check_restricted_route utility (often found in app/utils/security.py) acts like a vigilant bouncer, checking IDs (roles) against the guest list (RESTRICTED_ROUTES in config.py).
  • Behind the Curtain (Implementation Sketch):
    • The grand entrance and exit (login, registration - if enabled, logout) are managed by routes in app/routes/auth.py.
    • The actual "ID check" and "key granting" logic happens in app/controllers/auth_controller.py, which likely calls upon an AuthService from app/services/auth_service.py.
    • This service consults the User model (our list of registered members) to validate credentials.
    • Once authenticated, magic session variables like session['type'], session['user_id'], and session['is_Admin'] are set, tailoring the FMS experience.

2. Student Management: Nurturing the Next Generation (Primarily Admin) 🌟

Admins are the primary custodians of student records, equipped with a comprehensive toolkit.

  • The Grand Roster (List Students): Admins can view a filterable and searchable list of all enrolled students. It's like having a dynamic, digital yearbook!
    • Information at your fingertips: ID, Name, Class/Group, Date of Birth, Parent Name (Patronymic), Mobile Number, Address.
    • How it works: app/routes/students.py (look for a studentsList route) talks to app/controllers/student_controller.py, which enlists app/services/student_service.py. The final view is artfully rendered by app/templates/students/students.html.
  • Welcoming New Faces (Add New Student):
    • Admins can onboard students one by one through a user-friendly form.
    • Required Intel: First Name, Last Name, Patronymic, DOB, Email, Group, Phone, and even a dashing Photo!
    • Power Move - Bulk Upload: For larger cohorts, there's an option to upload student data via an Excel file. Efficiency for the win!
    • The Machinery: The addStudent route and controller method, with the app/templates/students/add-student.html template providing the interface.
  • Keeping Records Shipshape (Edit Student Details): Information changes. FMS allows admins to easily update existing student profiles.
    • The Machinery: The editStudent route and controller, using app/templates/students/edit-student.html.
  • The Full Picture (View Student Details - Conceptual): While not fully fleshed out in the refactored templates, the presence of links like student-details.html strongly suggests a dedicated page for viewing a comprehensive profile of a single student.
  • Say Cheese! (Image Uploads): Student photos can be uploaded to personalize their profiles.

3. Teacher/Lecturer Management: Empowering Educators (Primarily Admin) 💡

Just as with students, Admins ensure lecturer information is accurate and accessible.

  • The Faculty Directory (List Lecturers): A filterable and searchable directory of all esteemed lecturers.
    • Key Details: Name, Assigned Groups/Classes, Academic Degree, Subject(s) Taught, Mobile Number, Address.
    • The Flow: Handled by app/routes/teachers.py, app/controllers/lecturer_controller.py, and app/services/lecturer_service.py, presented through app/templates/teachers/teachers.html.
  • Onboarding New Mentors (Add New Lecturer):
    • Admins can add new lecturers through a detailed form.
    • Information Gathered: Similar to student details, plus academic specifics like Degree, Position, and the subjects they are qualified to teach (often a multi-select field).
    • Efficiency Boost - Bulk Upload: Yes, Excel uploads are available for lecturers too!
    • The Cogs: The addTeacher route/controller, with app/templates/teachers/add-teacher.html as the frontend.
  • Profile Updates (Edit Lecturer Details): Keeping lecturer information current is a breeze.
    • The Cogs: The editTeacher route/controller, using app/templates/teachers/edit-teacher.html.

4. Subject Management: Organizing Knowledge 📚

Subjects are the building blocks of education, and FMS provides tools for Lecturers and Admins to manage them effectively.

  • The Course Catalog (List Subjects): Both students and lecturers can view subjects, but their perspectives differ:
    • Student View: Shows subjects they're enrolled in, providing easy access to associated files and materials. It's their personalized learning library.
    • Lecturer View: Displays subjects they are teaching, empowering them to manage course content and files.
    • Visual Style: Information is presented in an engaging card-based layout for each subject, with a neat table of associated files nestled within each card.
    • The Team: app/routes/subjects.py, app/controllers/subject_controller.py, app/services/subject_service.py, and the app/templates/subjects/subjects.html template.
  • Crafting New Courses (Add New Subject - Lecturer/Admin):
    • Define the subject's name, assign it to relevant student groups (using a handy multi-select field), and provide an initial description or introductory text.
    • Crucially, upload initial files and learning materials.
    • The Workshop: The addSubjects route/controller (likely named addSubject in practice), with app/templates/subjects/add-subject.html for the user interface.
  • Course Refinement (Edit Subject Details - Lecturer/Admin): Modify subject information and manage the curriculum by updating associated files.
  • Resource Management (Manage Subject Files - Lecturer/Admin):
    • Upload new resources (PDFs, Word documents, presentations, etc.) for a subject.
    • Update or replace existing files.
    • Remove outdated materials.
    • Behind the Scenes: File operations are likely handled by a dedicated FileService (or methods within SubjectService), orchestrated by subject management routes and controllers.

5. Exercise Management: Assignments & Assessments 📝

Lecturers can create, assign, and manage exercises, while students can view and (conceptually) submit them.

  • The Assignment Board (List Exercises):
    • Student's View: A clear list of exercises relevant to their enrolled subjects and groups.
    • Lecturer's View: An overview of exercises they have created and assigned.
    • Key Info Displayed: Subject Name, Exercise Text/Description, Target Group Name, Any Associated File (e.g., a PDF brief), and the all-important End Time (due date!).
    • The Crew: app/routes/exercises.py, app/controllers/exercise_controller.py, app/services/exercise_service.py, and the app/templates/exercises/exercises.html template.
  • Creating Challenges (Add New Exercise - Lecturer):
    • Fields of Engagement: Subject Name, Group Name, End Time (due date), the main Exercise Text/Description, and an option to Upload an Associated File.
    • The Forge: The addExercise route/controller, with app/templates/exercises/add-exercise.html as the UI.
  • Tweaking Tasks (Edit Exercise - Lecturer): Modify details of an existing exercise.
    • The Forge (for edits): The editExercise route/controller, using app/templates/exercises/edit-exercise.html.
  • Clearing the Board (Delete Exercise - Lecturer): Remove an exercise.
  • Student Engagement with Exercises:
    • Students can select exercises using checkboxes on their list page.
    • The "Send to WaitRoom" Portal: This unique feature allows students to indicate they've completed/addressed selected exercises, sending them to the "Waiting Room" for lecturer review. This implies a submission or a "ready for marking" workflow.
    • Tech Magic: JavaScript on the exercises.html page captures these selections and sends them to a backend route (e.g., a dedicated /waitroom/submit or exercises/send_to_waitroom endpoint) via an AJAX POST request.

6. News System: Keeping Everyone Informed 📢 (Primarily Admin)

Admins can publish departmental news, updates, and important announcements.

  • Broadcasting Updates (Add News - Admin):
    • A straightforward form allows admins to create news articles with: Category, Title, the main Text content, and an Image Upload.
    • A Touch of Modernity: The image upload on this page cleverly uses an embedded React component for a smoother user experience.
    • The Newsroom Crew: The addNews route (found in app/routes/news.py), app/controllers/news_controller.py, app/services/news_service.py, and the app/templates/news.html template.
  • Reading the Headlines (View News - All Users):
    • While the specific display wasn't a focus of the HTML refactoring, a system like this logically includes a section (e.g., on user dashboards or a dedicated "News" page) where all users can view published news articles. This keeps the entire department in the loop!

7. The Waiting Room: A Lecturer's Review Hub 📥 (Lecturer)

This is one of FMS's standout features – a dedicated interface for lecturers to manage and review student submissions or other items that require their attention.

  • Incoming! (View Submissions): Displays items sent by students (e.g., exercises marked as "done" and sent from the Exercises page).
    • Organized for Clarity: Typically organized by Subject, and then by Group within that subject.
    • At a Glance per Submission: Student ID, Student Name, Current Marks/Rating (if any), Student's Date of Birth (perhaps for context or just as available data).
  • Marking & Feedback (Score Submissions): Lecturers can assign a score (e.g., 1-6, as seen in the template) to each submission using a simple dropdown menu.
  • Processing the Queue (Process Submissions):
    • "Submit Score" Action: Saves the assigned score for the student's submission related to a specific exercise. This updates the student's record for that task.
    • "Remove from Waiting Room" Action: Clears the item from the waiting list, perhaps archiving it or marking it as fully processed.
  • The Control Center:
    • Routes for viewing and interacting with the waiting room are likely in app/routes/teachers.py or could be in a dedicated app/routes/waitroom.py. The existing outWaitingRoom and /done/... endpoints point to this functionality.
    • The user interface is app/templates/waitingroom.html.
    • Interactive JavaScript on this page captures score selections and uses AJAX POST requests to send this data to backend endpoints, allowing for dynamic updates without full page reloads.

8. File Handling & Display: The Digital Document Trail 📎

FMS seamlessly integrates file uploads and downloads across various features.

  • Uploading Made Easy: Student photos, lecturer profiles, subject materials, exercise attachments, news article images, and even Excel files for bulk data uploads.
    • How it's done: Standard HTML forms using enctype="multipart/form-data".
    • Backend Storage: Services (like a dedicated FileService or methods within feature-specific services) manage the secure saving of these files to the server's UPLOAD_FOLDER (defined in config.py).
  • Accessing Resources (Downloads/Viewing):
    • Clear links are provided to view or download files (e.g., a PDF of lecture notes for a subject, or an exercise brief).
    • A general-purpose show_file route (perhaps in dashboard.py or a utility blueprint) is typically used to securely serve these files from the upload folder.
    • Visual Cues: Handy file type icons (like for PDF or Word documents) are often displayed next to file links, making it easy to identify file types at a glance.

9. The Dashboard: Your Personalized Command Center 🖥️

Upon logging in, each user role is greeted with a dashboard tailored to their specific needs and permissions. This is their personalized homepage within FMS.

  • Admin Dashboard: A bird's-eye view of the entire system. Might include:
    • Key statistics (total students, lecturers, subjects).
    • Quick links to all management sections.
    • Potentially data visualizations (the codebase hints at Bokeh plots for user activity in dashboard.py – imagine charts showing system usage!).
  • Lecturer Dashboard: Focused on teaching tasks. Might show:
    • A list of their assigned subjects.
    • Recent activity or pending items in their Waiting Room.
    • Latest departmental news.
  • Student Dashboard: Centered on the student's learning journey. Might display:
    • Their enrolled subjects.
    • Upcoming exercise deadlines.
    • Recent news and announcements.
    • Quick links to subject materials.
  • The Engine Room:
    • The /dashboard route is defined in app/routes/dashboard.py.
    • app/controllers/dashboard_controller.py is the smart component that figures out who the user is (Admin, Lecturer, or Student) and gathers the appropriate data for their dashboard.
    • All this information is then beautifully rendered by app/templates/dashboard.html, which uses a lot of clever Jinja2 conditional logic ({% if session['type'] == '...' %}) to customize the content for each user type.

10. Chatbot Integration: Your Future AI Assistant 🤖 (Conceptual)

The presence of app/controllers/chatbot_controller.py, app/routes/chatbot.py, and an app/templates/chatbot.html template are exciting breadcrumbs pointing towards an intended or partially implemented chatbot feature!

  • The Vision: Imagine a friendly AI assistant within FMS, ready to:
    • Answer common student questions ("When is the deadline for the Potion Practical?").
    • Help lecturers find specific functions ("How do I upload a new file to Herbology 101?").
    • Guide users through the system.
  • Current Status: While the full depth of implementation isn't clear from the file structure alone, the foundational pieces (an API endpoint for chat interactions and a basic UI template) suggest this is a feature planned for enhancing user support and engagement.

11. Smart Searching & Filtering: Finding Needles in Haystacks 🔍

Nobody likes scrolling endlessly! Most list views in FMS (Students, Teachers, Exercises, Waiting Room) come equipped with search forms. This allows users to quickly filter large amounts of data based on various criteria (ID, name, phone number, etc.), making information retrieval efficient and user-friendly.


This grand tour covers the primary features and functionalities that make FMS a powerful tool for academic departments. Each feature is a carefully orchestrated dance between routes, controllers, services, models, and templates, all working in concert to deliver a cohesive and valuable user experience. The system is designed not just to store data, but to actively assist in the complex, dynamic world of education.