Overview
Classes (called “Lops” in the system) are organizational units that group students, instructors, and assignments together. They provide a way to manage course sections and control access to assignments.Class structure
Each class has:- Name: Identifier for the class (e.g., “CS101 Spring 2024”)
- Open status: Controls whether students can self-enroll
- Users: Students and instructors enrolled in the class
- Assignments: Assignments associated with this class
Creating a class
As an admin or head instructor:- Navigate to Classes in the main menu
- Click Create New Class
- Enter the class name
- Set the open status:
- Open: Students can find and enroll themselves
- Closed: Only admins can add students
Classes are referenced in the codebase as “Lop” (the Vietnamese word for class).
Managing enrollment
Adding students
- Individual enrollment
- Bulk enrollment
- Open the class details page
- Click Add Students
- Select students from the user list
- Click Enroll
Managing instructors
Classes can have multiple instructors:- Open the class details
- Go to the Instructors tab
- Add or remove instructor access
- Instructors can view all assignments and submissions for their class
Assigning coursework
Adding assignments to a class
When creating an assignment:- In the assignment form, select Classes
- Choose one or more classes
- All enrolled students will see the assignment
- Class scoreboards will include the assignment
Class scoreboards
View aggregated performance across all assignments:- Total score across all assignments
- Rank within the class
- Individual assignment scores
- Overall class statistics
Student enrollment workflow
For open classes
Students can self-enroll:- Log in to Wecode
- Navigate to Classes
- Browse available open classes
- Click Enroll on the desired class
- Confirm enrollment
For closed classes
Admins must manually enroll students:- Students cannot see closed classes in the listing
- Only users explicitly added can access the class
Permissions
| Action | Admin | Head Instructor | Instructor | Student |
|---|---|---|---|---|
| Create class | ✓ | ✓ | ✗ | ✗ |
| Edit class | ✓ | ✓ | Limited | ✗ |
| Delete class | ✓ | ✓ | ✗ | ✗ |
| Add students | ✓ | ✓ | ✗ | ✗ |
| Add instructors | ✓ | ✓ | ✗ | ✗ |
| View scoreboard | ✓ | ✓ | ✓ | Own only |
| Self-enroll (if open) | ✗ | ✗ | ✗ | ✓ |
API reference
Model: Lop
Location:app/Models/Lop.php
Fillable fields
The class name or identifier
Whether students can self-enroll (1) or class is closed (0)
Relationships
Methods
Routes
| Method | URI | Action | Permission |
|---|---|---|---|
| GET | /lops | List all classes | Authenticated |
| GET | /lops/create | Show create form | Admin/Head Instructor |
| POST | /lops | Store new class | Admin/Head Instructor |
| GET | /lops/{lop} | Show class details | Enrolled users |
| GET | /lops/{lop}/edit | Show edit form | Admin/Head Instructor |
| PUT/PATCH | /lops/{lop} | Update class | Admin/Head Instructor |
| DELETE | /lops/{lop} | Delete class | Admin/Head Instructor |
| POST | /lops/{lop}/enrol/{in} | Enroll/unenroll | Student (if open) |
| GET | /lop/scoreboard/{lop} | View class scoreboard | Enrolled users |
Best practices
Naming conventions
Use clear, consistent names like “CS101-Fall2024” or “Algorithms-Section-A” to help students identify the right class.
Open vs closed
Use closed classes for small sections or invite-only courses. Use open for large lectures where students self-register.
Multiple instructors
Add teaching assistants as instructors so they can help grade and manage submissions without full admin access.
Assignment grouping
Assign all related coursework to the same class to keep the scoreboard and student view organized.
Common workflows
Setting up a new course
End of semester cleanup
Related features
- User management - Managing student and instructor accounts
- Assignments - Creating and configuring assignments
- Scoreboard - Viewing class and assignment rankings
- Admin guide - Complete administration documentation

