A tool to assist grading programming assignments for CIT 160 at BYU-I
This utility is written in C# and the solution was made with Visual Studio 2019.
There are 2 projects (currently) in the solution: CIT160Grader and CIT160GradingConsole. All of the grading logic is in the CIT160Grader project. CIT160GradingConsole is a console application. In the future I plan on adding a UI project that instructors or students can use.
The Grading Utility is generic. It's made to be able to grade most all programming assignments from CIT 160 that involve full HTML and JavaScript including allowing to set the current date for the test. Specfics about each programming assignment is kept in a json template file. I'll go through and add a template to the templates folder for every assignment as I can throughout the 2020 Spring semester. Hopefully by summer term we'll have all of the templates that we need. There is an example template in the template folder called GradingTemplate.json
There are zip files in the Builds folder with a compiled copies of the application for 4 different platforms: win-x64, linux-x64, osx-x64, and portable. Just unzip the correct file on your computer and run CIT160GradingCoreUtility(.exe) from a command window.
Usage of the Console application is very simple:
This will output example json for a template.
Outputs how to use the console application
The template path is the file that the program will use to grade with. The other argument can take either a single file or a folder. It will grade all .htm or .html files in the folder.
After the application is run, it creates a text file in the folder that was graded or the same folder where the file specified to grade is found. The name is either Report.txt or [Filename]-Report.txt. The report contains all grading information for each file graded including the file name, the actual submitted program, and some basic feedback and a score to use as a jumping off point for the instructor's grading.
The templates are in json format and there is a different one for every graded program. This is the format:
{ "Tests": [ { "Inputs": [ "0", "0", "10", "10" ], "TestDateTime": "2000-01-01T00:00:00", "ExpectedOutput": "4.14", "AlternativeOutputs": [ "4", "4.1" ] } ], "PossiblePoints": 5.0, "WrongNumberOfInputsPenalty": 0.5, "InsufficientInputsPenalty": 0.5, "NoButtonPenalty": 0.5, "NoDivPenalty": 0.5, "ValidationPenalty": 0.5, "IncorrectResponsePenalty": 0.5, "NoRunPenalty": 1.0, "MinimumSubmissionScore": 1.5 }
This defines the inputs and expected outputs of each test that's performed.
An array of values to put into the program's fields. They are in the same order as they are expected to be in in the of the HTML page.
The date to run the test with. This only applies to a couple of the assignments that are date based.
A string that is expected to appear somewhere in the first
An array of alternative outputs that are also correct. This can be used to handle multiple levels of rounding that are correct.
The total number of points possible in for this problem. This is used for estimating partial credit.
The points deducted if the number of tags in the web page doesn't equal the number of inputs in the "Inputs" array in the template
The points deducted if the number of tags in the web page is less than the number of inputs in the "Inputs" array in the template. This will cause the grader to not attempt to run the script. (This is compounded with the WrongNumberOfInputsPenalty - both will be deducted.)
The points deducted if there is no found in the web page. This will cause the grader to not attempt to run the script since there is no button to press.
The points deducted if there is no
The points deducted if the web page does not validate using the w3schools validation api.
The points deducted if the text in the
The points deducted if the program doesn't run or causes an exception in the grading program.
This is the minimum score given just for submitting. If their actual score is less than this minimum score, it'll give the minimum score.