đŸ›Ąī¸ CW Classroom Administrator Guide

Complete administrator manual for managing CW Classrooms on Morse Trainer Pro

Full Admin Access User Management System Overview Advanced Features

📚 Quick Navigation

🔐 Administrator Access & Privileges

✅ What You Can Access as Admin

  • ✓ Full access to all teacher functionality
  • ✓ Full access to all student functionality
  • ✓ System-wide classroom administration panel
  • ✓ User management and permissions
  • ✓ Advanced system monitoring and analytics

đŸŽ¯ Navigation & Menu Structure

Training Menu Access

  • â€ĸ 🎓 CW Classroom (Teacher) - Full teacher dashboard
  • â€ĸ 📚 CW Classroom (Student) - Full student dashboard
  • â€ĸ Access to all training programs

Account Menu Access

  • â€ĸ 🎓 CW Classroom Admin - Administrative panel
  • â€ĸ Advanced user management
  • â€ĸ System configuration

💡 Pro Tip: As an admin, you can test the complete user experience by accessing both teacher and student dashboards. This helps you understand the workflow from all perspectives when assisting users.

đŸ‘Ĩ User Management

🔄 User Roles & Permissions

đŸ›Ąī¸ Administrator

  • â€ĸ Full system access
  • â€ĸ Teacher + Student capabilities
  • â€ĸ User management
  • â€ĸ System configuration

👨‍đŸĢ Teacher

  • â€ĸ Create classrooms
  • â€ĸ Invite students
  • â€ĸ Manage lessons
  • â€ĸ Track progress

👨‍🎓 Student

  • â€ĸ Join classrooms
  • â€ĸ Complete lessons
  • â€ĸ View progress
  • â€ĸ Access training

âš™ī¸ Managing User Flags

1

Access Database or Admin Panel

Navigate to your admin panel or database management interface to modify user permissions.

2

Locate User Flags

Users table contains these important flags:

  • â€ĸ is_admin - Administrator privileges
  • â€ĸ teacher_flag - Teacher capabilities
  • â€ĸ student_flag - Student capabilities
3

Set Appropriate Flags

Users can have multiple flags. Admins typically have all three flags enabled for full testing capabilities.

âš ī¸ Important: Always ensure admins have both teacher_flag and student_flag set to 1 in addition to is_admin for full access to all classroom features.

đŸĢ Classroom System Overview

đŸŽ¯ Key Features You Oversee

📝 Classroom Management

  • â€ĸ Teachers can create unlimited classrooms
  • â€ĸ Customizable descriptions and settings
  • â€ĸ Real-time student enrollment tracking
  • â€ĸ Pending invitation management

đŸ‘Ĩ Student Management

  • â€ĸ Email-based invitation system
  • â€ĸ Secure token-based enrollment
  • â€ĸ Student progress tracking
  • â€ĸ Classroom activity monitoring

📊 Database Structure (For Reference)


📁 Core Tables:
├── 👤 users (id, username, hash, salt, is_admin, teacher_flag, student_flag)
├── đŸĢ classrooms (id, name, description, teacher_id, created_at)
├── 📧 classroom_invitations (id, classroom_id, email, token, status, expires_at)
├── đŸ‘Ĩ classroom_students (id, classroom_id, student_id, enrolled_at)
└── 📈 classroom_activities (id, classroom_id, student_id, activity_type, created_at)
                

💡 Admin Insight: The system uses secure token-based invitations with expiration dates. Invitations automatically expire after 7 days for security.

âš™ī¸ Advanced System Features

🔔 Toast Notification System

We've implemented a modern toast notification system that replaces all popup alerts:

  • â€ĸ ✅ Success notifications - Classroom creation, invitations sent
  • â€ĸ ❌ Error notifications - Connection issues, validation errors
  • â€ĸ âš ī¸ Warning notifications - Form validation, missing data
  • â€ĸ â„šī¸ Info notifications - Feature announcements, help messages

Features: Auto-close, manual close buttons, center-screen positioning, beautiful glassmorphism design

🔐 Security Implementation

Session Management

  • â€ĸ PHP session-based authentication
  • â€ĸ Automatic session validation
  • â€ĸ Role-based access control
  • â€ĸ Secure logout functionality

API Security

  • â€ĸ CORS headers properly configured
  • â€ĸ Input validation and sanitization
  • â€ĸ SQL injection prevention
  • â€ĸ Token-based invitation system

📱 User Interface Improvements

  • â€ĸ Responsive Design: Works perfectly on desktop, tablet, and mobile
  • â€ĸ Dark Theme: Professional dark interface reducing eye strain
  • â€ĸ Intuitive Navigation: Clear menu structure and logical workflow
  • â€ĸ Real-time Updates: Dynamic content loading without page refresh
  • â€ĸ Loading States: Clear feedback during API operations

🔧 Administrator Troubleshooting Guide

❌ Common Access Issues

Problem: "Please log in to access your classroom dashboard"

Solution:

  1. Check if user has proper flags: is_admin=1, teacher_flag=1, student_flag=1
  2. Clear browser cookies and session storage
  3. Ensure API endpoints are accessible
  4. Check browser console for JavaScript errors

Problem: Admin menu not showing

Solution:

  1. Verify is_admin flag is set to 1 in database
  2. Check global menu JavaScript is loading correctly
  3. Ensure session data includes admin flag

Problem: Database connection errors

Solution:

  1. Check .env file database credentials
  2. Verify database server is running
  3. Test database connection with simple query
  4. Check database user permissions

đŸ› ī¸ Advanced Diagnostics

Use these diagnostic pages:

⭐ Administrative Best Practices

đŸ—ī¸ Initial System Setup

1

Set Up Admin Account Properly

Ensure your admin account has all necessary flags:

is_admin = 1, teacher_flag = 1, student_flag = 1
2

Test All User Flows

Before launching, test the complete user experience from all perspectives (admin, teacher, student).

3

Configure Email System

Ensure email invitations are working properly for classroom enrollment.

🔄 Ongoing Maintenance

Regular Tasks

  • â€ĸ Monitor classroom creation rates
  • â€ĸ Clean up expired invitations
  • â€ĸ Review user activity logs
  • â€ĸ Update system documentation

User Support

  • â€ĸ Help with permission issues
  • â€ĸ Assist with classroom setup
  • â€ĸ Troubleshoot technical problems
  • â€ĸ Provide feature training

đŸŽ¯ Pro Admin Tip: Regularly access the system as both teacher and student to experience what your users see. This helps you provide better support and identify potential improvements.

📋 Quick Reference

🔗 Important URLs

  • â€ĸ Admin Panel: /cw-classroom-admin.html
  • â€ĸ Teacher Dashboard: /cw-classroom-teacher.html
  • â€ĸ Student Dashboard: /cw-classroom-student.html
  • â€ĸ Session API: /api/session.php

đŸ—„ī¸ Database Tables

  • â€ĸ users - User accounts & permissions
  • â€ĸ classrooms - Classroom information
  • â€ĸ classroom_invitations - Pending invites
  • â€ĸ classroom_students - Enrollments