![Build status] (https://travis-ci.org/icalF/PTIgrader.svg?branch=master) Dedicated for beloved TPB kids, grader for PTI course
PTIgrader is designed to make a boring grading job a lot much easier. This program only need source files which to be graded, testcase files, and answer files for each testcase to perform automated grading. The output is a textfile contain details of programs made from each source file.
This project is under GNU General Public License. Feel free to using and sharing FOR NON-COMMERCIAL USE.
- GNU C++ compiler installed (by standalone package like MinGW, or IDE built-in like Code::Blocks or Dev-C++ ). Don't be confused with Turbo C++ or MS C++ (if you have Visual Studio). Make sure of using latest compiler version because grader using C++11 features.
- For Windows : path of compiler has added to
PATH Environment
. If you don't really understand how to add it, follow instruction below in theAdd Compiler Path
section.
- Download zip of this source by click
Download ZIP
in the right panel - Extract zip to somewhere
- Put all source files (CPP files) into PTIgrader-master folder
- Put all testcases into case folder inside PTIgrader-master
- Put all answers into ans folder inside PTIgrader-master. Make sure each testcases and answers filename match lexicographically. Alternatively, you can rename each answer file with correspondent testcase file
- Edit the
normalizer.cpp
to catch only expected character from program output. SeeFilter the Output
section for more details - Finally run the
autograder.sh
(for Linux / Mac) orautograder.bat
(for Windows) and open result.txt to see the practice score
- Select Computer from the Start menu
- Choose System Properties from the context menu
- Click Advanced system settings > Advanced tab
- Click on Environment Variables, under System Variables, find PATH, and click on it.
- In the Edit windows, modify PATH by adding the location of the class to the value for PATH. By default, the location is
C:\MinGW\bin
. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
Before run the grader, output must be formatted as the answer be like. As editting all source file is not efficient,
PTIgrader have this feature inside normalizer.cpp
.
This file located inside bin
folder works by filtering only character whose matched predicate(s) listed in the normalizer.
Any other else characted will be thrown away.
For now, normalizer support many character formatting, includes alphabetic, lowercase, uppercase, alphanumeric, decimal number, and many others. Read thouroughly each predicates specification to know where predicates set or not. And if those predicate doesn't enough, just add your own predicate function or (if additional characters is just a few) put additional characters into isanother predicate.