A script to grade students' submissions written in CPP, Java, and Python.
Tested only on the following versions.
- python 3.10
- pandas 1.4
- openpyxl 3.0
- g++ 12.1.0 (to compile C++ codes)
- javac and java 18 (to compile and run Java codes)
-
Make sure all the requirements are installed.
-
Clone the Git repository.
-
Copy your folder (which contains your source code file) into the Submissions folder. A sample folder (named Doe_800123123) is provided in the Submissions folder.
-
Run the grader using:
python main.py <assignment_number> Submissions
example:
python main.py 1 Submissions
-
Make sure the Docker platform is installed on your machine. It can be installed from https://www.docker.com/
-
Build the image using the following command in Terminal / PowerShell / Command Prompt:
docker build -t cs372_code_grader .
-
Copy your folder (which contains your source code file) into the Submissions folder. A sample folder (named Doe_800123123) is provided in the Submissions folder.
-
Run the image using the following command:
- In Terminal and PowerShell:
docker run --rm -v ${PWD}:/app cs372_code_grader <assignment_number> Submissions
example:
docker run --rm -v ${PWD}:/app cs372_code_grader 1 Submissions
- In Command Prompt:
docker run --rm -v "%cd%":/app cs372_code_grader <assignment_number> Submissions
example:
docker run --rm -v "%cd%":/app cs372_code_grader 1 Submissions
-
Remove the created image using the following command:
docker rmi cs372_code_grader
One Excel file (assignment1_grades.xlsx) with the following sheets:
- grades
- contains the number of incorrect tests for each question.
- details
- contains the students' codes outputs and the desired outputs for each test and each question.