Skip to content

This script generates *.cases files for the Moodle VPL plugin

Notifications You must be signed in to change notification settings

msambinelli/vpl-case-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

VPL-CASES-GEN

This script generates *.cases files for the Moodle VPL plugin.

Usage

usage: vpl-cases-gen [-h] [--interpreter INTERPRETER] [-o filepath] program filepath [filepath ...]

Generator of test cases files for the Moodle VPL plugin.

positional arguments:
  program               The program that are going to process the input cases to generate the outputs.
  filepath              Files with the input cases.

optional arguments:
  -h, --help            show this help message and exit
  --interpreter INTERPRETER
                        If necessary, you can use this option to specify an interpreter to run program.
  -o filepath, --output filepath
                        Specify an output file to write the generate cases (default: write to the stdout).

Usage examples

Basic usage

./vpl-cases-gen program input01.in input02.in input03.in

where:

  • program is the program that will be fed by the test cases contained in the input files to generate the reference output that will be used for grading the students' solutions.
  • inputXX.in is a file containing one or more test cases for program. If inputXX.in has more than one test case, then a line containing the mark <<<>>> should be put between two test cases to represent that one test case is ending and another is starting.

Writing the output to a file

You can write the output to a file with the option -o or --output.

./vpl-cases-gen -o output.cases program input01.in input02.in input03.in

Setting an interpreter

If the program require an interpreter to run properly (maybe because the program has no execution permission or because the OS does not understand shebang), you can specify one with the option --interpreter.

./vpl-cases-gen --interpreter julia program.jl input01.in input02.in

Workflow

Some time ago, I recorded this video (in Portuguese) for a group of friends explaining how I use the script. The video is very amateurish, but I think it can be useful, so I decided to make it available here.

IMAGE ALT TEXT HERE

About

This script generates *.cases files for the Moodle VPL plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages