Abstract
With the popularization of computer science education and ongoing course reforms, the number of students enrolled in Programming Technology courses is increasing. However, the practical nature of programming skills, combined with limited teaching staff, means that traditional written examinations often fail to accurately evaluate a student's coding proficiency. This article details the design and implementation of a programming examination platform based on a LAMP (Linux, Apache, MySQL, PHP) server. Utilizing a Browser/Server (B/S) architecture, the platform automatically compiles user-provided code and judges its correctness. Experimental results indicate that this platform evaluates programming skills more accurately and efficiently than traditional methods.
Introduction
As computer science education scales, instructors face a significant challenge: written exams are poor indicators of actual coding ability, and manual grading of source code is notoriously slow and prone to subjective bias. Traditional assessment methods fail to simulate the "actual work environment" students will eventually enter. There is a clear need for a system that can handle the entire lifecycle of a programming course—from homework and exercises to formal examinations—while ensuring that grading remains consistent, timely, and reflective of a student's ability to produce functional code.
System Architecture
The "Procedural Examination Platform" is built using a standard LAMP (Linux, Apache, MySQL, PHP) architecture. To ensure a robust and maintainable codebase, the authors employed the CodeIgniter framework, which follows the Model-View-Controller (MVC) design pattern.
This separation allows for:
- Controller: Managing the logic of requests and responses.
- Model: Handling data interactions with the MySQL database.
- View: Presenting the user interface to students, teachers, and administrators.
To enhance the user experience, the platform utilizes Asynchronous Submission (Ajax). This allows students to submit code snippets in the background without refreshing the entire page, preventing data loss from accidental browser navigation.
Database and Data Management
The system's backend is powered by a MySQL database designed to manage complex relationships between users, questions, and submissions. The data architecture includes specialized tables for question banks (Tiku), test samples, and student records.
Key data components include:
- Question Banks: A repository of programming questions and associated test cases (
tiku_bc_example). - Student Submissions: Real-world data generated during course activities, including code updates in test and challenge models.
- Role-Based Access Control: Distinct tables for administrators, teachers, and students ensure secure access to specific web directories and functionalities.
Automated Compilation and Grading
The core innovation of the platform is its automated compilation engine. When a student submits code (primarily in C or C++), the server performs the following steps:
- File Creation: A temporary source file is created in a secure directory.
- Compilation: The server invokes a compiler to generate an executable.
- Execution and Validation: The program runs within strict time and resource limits. Teacher-provided test cases are piped into the program, and the output is captured.
- Comparison: The captured output is compared against a "standard answer" to determine correctness.
To maintain server stability, the system includes "kill process" logic that terminates any program exceeding predefined resource limits, preventing malicious or inefficient code from crashing the examination server.
Operational Results and Impact
The platform was deployed in two major iterations at the Beijing Information Science Technology University. Version 1.0 (2013) focused on online training and homework, while Version 2.0 (2014) was a rewritten version that significantly improved performance and stability.
The authors report that the system successfully meets the requirements of modern programming education. By removing the human element from initial grading, the platform ensures objectivity and consistency across large student cohorts. Furthermore, the system mitigates cheating by generating unique exam papers for each student based on templates.
Conclusion and Future Work
The Procedural Examination Platform represents a significant advancement in automating the assessment of programming skills. While currently focused on C and C++, future developments could expand support to managed languages like Java or interpreted languages like Python. Additionally, further research into advanced security sandboxing (such as Docker containers) and more granular grading metrics (e.g., code complexity and style analysis) would enhance the platform's utility. As network technology evolves, such automated systems are likely to become indispensable in computer science education.
Summary updated