System Overview
As an administrator, you have full access to all Wecode features including:- System settings and configuration
- User management (creating, editing, bulk import)
- Class (Lop) management
- Problem and assignment oversight
- System maintenance and security
Accessing Admin Settings
Navigate to the Settings page from the main navigation menu. Only users with admin or head instructor roles can access these settings.Permission Required: Admin role only for modifying system settings
System Settings
General Configuration
The settings page (/settings route, handled by setting_controller.php) provides access to core system configuration:
Configure Basic Settings
Update the following essential settings:
- Site Name: Your Wecode installation name
- Timezone: System timezone for all date/time operations
- Theme: UI theme selection
Critical System Paths
Tester Path (tester_path)
- Location of the code testing and evaluation scripts
- Used for judging submissions
- Must be accessible by the web server
assignments_root)
- Base directory for storing all assignments, problems, and submissions
- Requires write permissions for the web server
- Contains subdirectories:
/problems/{problem_id}/- Problem test cases and descriptions/assignment_{assignment_id}/- Assignment-specific files/assignment_{assignment_id}/problem_{problem_id}/{username}/- Student submissions
Submission Limits
File Size Limit (file_size_limit)
- Maximum upload size for student code submissions (in KB)
- Default: Varies based on installation
- Affects both file uploads and pasted code
output_size_limit)
- Maximum output size for program execution (in KB)
- Prevents infinite loops from consuming disk space
Registration Settings
Enable Registration (enable_registration)
- Toggle public user registration
- When disabled, only admins can create accounts
registration_code)
- Optional code required for self-registration
- Leave empty to allow open registration (when enabled)
- Students must enter this code during signup
Late Submission Policy
Default Late Rule (default_late_rule)
- Mathematical expression for calculating late penalties
- Uses variables:
delay,extra_time - Example:
max(0, 100 - delay/3600)(1% penalty per hour)
submit_penalty)
- Additional penalty per submission attempt
- Used in some grading schemes
Display Settings
Results Per Page (All) (results_per_page_all)
- Number of items shown in submission lists
- Default: 30
results_per_page_final)
- Number of items in final submission views
- Default: 30
week_start)
- First day of week for calendar displays
- 0 = Sunday, 1 = Monday
Queue Configuration
Concurrent Queue Processes (concurent_queue_process)
- Number of parallel judging processes
- Higher values = faster judging but more CPU usage
- Recommended: 2-4 depending on server capacity
Language Settings
Default Language Number (default_language_number)
- Default programming language for new problems
- Corresponds to language ID in database
default_trial_time)
- Hours of access for trial student accounts
- After expiration, student accounts become guest accounts
- Set to 0 or null for unlimited access
Security Settings
IP White List (ip_white_list)
- Restrict access to specific IP addresses or ranges
- Format: Comma-separated list of IPs or CIDR ranges
- Example:
192.168.1.0/24, 10.0.0.1 - Leave empty to allow all IPs
User Management
Viewing All Users
Access the user list at/users to see all registered users:
- Username and display name
- Email address
- Role (Admin, Head Instructor, Instructor, Student, Guest)
- Account creation date
- Trial time (if applicable)
Creating Individual Users
Enter User Details
- Username: Unique identifier (required)
- Email: Valid email address (required)
- Password: Minimum 8 characters (required)
- Display Name: Optional friendly name
- Role: Select from available roles
Bulk Adding Users
For adding multiple users at once (e.g., enrolling a class):Password Generation
Use
random[N] to auto-generate a password of N characters:random[8]generates an 8-character random passwordrandom[12]generates a 12-character random password
Lines starting with
# are treated as comments and ignored. Empty lines are also skipped.Role Permissions
Admin- Full system access
- Can create/modify any user, problem, or assignment
- Access to all settings
- Can create classes (lops) and assignments
- Can create instructors and students
- Can manage their own classes and assignments
- Cannot access system settings
- Can view classes they belong to
- Can create students
- Can create problems and assignments
- Limited to their own resources
- Can enroll in open classes
- Can submit to assignments
- Can practice on available problems
- Read-only access
- Cannot submit code
- Typically students whose trial period has expired
Editing Users
Click on any user in the user list to:- Update email, display name, or password
- Change role (admin only)
- Set trial time duration
- View user statistics and submission history
Trial Accounts
Set trial time for temporary student access:Set Duration
Choose either:
- New Time: Number of hours from account creation
- End Time: Specific date/time when access expires
Deleting Users
To delete a user:- Click the delete icon next to the user
- If user has submissions, you’ll need to delete them first
- Confirm deletion
Class (Lop) Management
What are Lops?
“Lop” (Vietnamese for “class”) represents a group of students and instructors. Classes are used to:- Organize students into cohorts
- Assign homework/assignments to groups
- Track class-wide performance
Creating a Class
Configure Class
- Name: Class identifier (e.g., “CS101 Spring 2024”)
- Open: Toggle whether students can self-enroll
- User List: Comma or space-separated usernames to enroll
Managing Class Enrollment
Edit a class to:- Add users by entering their usernames
- Remove users by checking the boxes next to their names
- Toggle open/closed status for self-enrollment
Class Scoreboards
View aggregate class performance:- Navigate to the class list
- Click “Scoreboard” next to a class
- View cumulative scores across all class assignments
Problem Management
Admins can view and edit all problems in the system.Problem Oversight
- View all problems at
/problems - Filter by owner, tags, or search term
- See usage statistics (total submissions, acceptance rate)
- Edit any problem regardless of owner
Problem Settings
Allow Practice- Enables/disables problem for practice mode
- Students can submit outside of assignments
- Allows other instructors to use the problem
- Visible to all instructors, editable only by owner
- Permits students to download test case inputs/outputs
- Useful for local debugging
Import/Export Problems
Exporting Problems- Select problems from the problem list
- Click “Export Selected”
- Download ZIP containing:
- Test cases (in/out folders)
- Problem description
- Metadata JSON file
- Prepare ZIP file in Wecode export format
- Go to Problems → Import
- Upload ZIP file
- Problems are imported with your user as owner
Assignment Management
Admins can access and modify all assignments.Assignment Settings
Open/Closed Status- Open: Students can submit
- Closed: Only instructors can submit
- Toggle by clicking the status indicator
- Enable to show public rankings
- Disable to keep submissions private
Downloading Submissions
For any assignment, you can download: All Submissions- Complete submission history
- Includes all files and judging results
- One file per student per problem
- Organized in folders:
username/problem_X.ext
- One file per student per problem
- Organized in folders:
problem_X/username.ext
Rejudging Submissions
Use when test cases or grading logic changes:Rejudging resets submission status to PENDING and re-runs all test cases.
Language Management
Configure supported programming languages at/languages:
- Language name and file extension
- Compiler/interpreter commands
- Default time and memory limits
- Sorting order for display
Adding a Language
Plagiarism Detection (Moss)
Integrate with Stanford’s MOSS (Measure of Software Similarity) for plagiarism detection.Setup Moss
Obtain Moss User ID
Register for a MOSS account at http://theory.stanford.edu/~aiken/moss/
Running Moss Detection
Maintenance Tasks
Database Backups
Recommended backup strategy:- Daily automated database dumps
- Weekly full filesystem backups of assignments_root
- Store backups off-server
Disk Space Management
Monitor disk usage in:assignments_root/directory (submissions and test cases)- Database size (submission records)
Queue Monitoring
Check the queue status to ensure submissions are being processed:- Navigate to Queue page
- View pending submissions
- Check for stuck items
- Manually trigger queue processing if needed
Log Files
Monitor application logs for:- Failed submissions
- System errors
- Authentication issues
- File permission problems
Security Best Practices
Troubleshooting
Submissions Stuck in Queue
Symptoms: Submissions stay in PENDING status Solutions:- Check queue worker is running
- Verify tester_path is correct and accessible
- Check file permissions on assignments_root
- Manually trigger queue processing
- Review error logs
Users Cannot Upload Files
Symptoms: File upload errors Solutions:- Check file_size_limit setting
- Verify PHP upload_max_filesize and post_max_size
- Confirm assignments_root write permissions
- Check disk space
Moss Not Working
Symptoms: No Moss results generated Solutions:- Verify Moss User ID is correct
- Check tester_path contains moss script
- Ensure moss script is executable (chmod +x)
- Verify network connectivity to Moss servers
Assignment Time Issues
Symptoms: Wrong start/finish times Solutions:- Verify timezone setting matches server timezone
- Check system time on server
- Ensure timezone is set in both settings and PHP configuration
Advanced Configuration
Customizing Late Penalties
The late_rule field accepts mathematical expressions using: Variables:delay: Seconds after deadlineextra_time: Extra time allowed (seconds)
- Mathematical:
max(),min(),abs(),floor(),ceil() - Trigonometric:
sin(),cos(),tan() - Exponential:
exp(),log(),pow()
Email Configuration
Configure email settings for notifications (requires server mail configuration):- Mail From: Sender email address
- Mail From Name: Sender display name
- Reset Password Mail: Template for password resets
- Add User Mail: Template for new user notifications
Email functionality requires proper SMTP configuration in Laravel’s
.env file.Summary
As an administrator, you control all aspects of your Wecode installation. Key responsibilities include:- ✅ Configuring system settings and paths
- ✅ Managing user accounts and permissions
- ✅ Organizing classes and instructors
- ✅ Monitoring system health and queue status
- ✅ Maintaining backups and security
- ✅ Supporting instructors and students
- ✅ Troubleshooting issues

