Rusty Hektor
This is a new implementation of Hektor in the Rust programming language.
It can be used to convert the ILIAS output of an e-exam into a json format which can be imported into the Grady project.
Download
The latest compiled binary can be downloaded from the releases.
Usage
View the help message:
rusty-hektor -h
Convert an ILIAS .zip
(can be generated on ILIAS for an exam under Export -> Erstelle Exportdatei (inkl. Teilnehmerergebnisse)
) containing .xml
into .json
:
rusty-hektor -o <out_file_path> [<path_to_zip>]
Converting an ILIAS Output into an anonymised json representation, storing the mapping file at map.json
(DO NOT LOOSE THIS FILE!).
rusty-hektor -a --map-file map.json -o <out_file_path> [<path_to_zip>]
If -o
is omitted, the output is printed to stdout.
By default, the program parses the source code questions and submissions of the .xml
input. Should you
wish to instead parse cloze type questions (currently used by hallgrimJS) you can pass the --parse-cloze
flag.
Converting multiple cohorts
It is possible to submit multiple .zip
exports. In case the exercise types contained in the provided exports are differing, a warning is issued and the first set of exercise types is used. If another set should be used, the order of the export files has to be changed when calling the program.
If a user with the same identifier is present in multiple exports, the program aborts and the user needs to fix the data manually (in practice this should not occur).
This feature must be used when converting multiple cohorts with anonymisation enabled, since pseudonym collisions can thus be avoided.
Providing Solutions
During program execution the user can provide sample solutions. These should be valid source code files in the same programming language as the exercise. For plaintext questions the sample solution must also be plaintext. Html or other markup languages are currently not supported.
Supported programming languages
The programming languages currently supported are: "c, java, mipsasm, haskell, plaintext, markdown, python"
(these are the names that need to be entered if the user is asked for the programming language of a submission type). Note that python
is use for jupyter notebooks. This might be changed in the future.
Running tests on submissions
By default an empty test is run for every submission, checking if it is empty (excluding whitespace). For the C programming course, the flag --tests empty compile_c
can be passed to additionally try the compilation of each submission. In this case --header-dir
must be set to the directory containing the header files used during the exam.
When the compile test is used, it is highly recommended to manually check the failed tests in the resulting output in order to ensure that everything worked.
Development
Building the project
Since this program is written in the Rust Programming Language, the latest stable Rust toolchain is needed in order to build the project. The easiest way to do so is by installing rustup
(follow the instructions on rustup.rs).
Building the project is as simple as running
cargo build --release
which will download all necessary dependencies, compile and link them with optimizations enabled and place the resulting binary at target/release/rusty-hektor
.
Structure
The project is structured roughly in the following way:
for the declaration of the input types see src/input_types, the transformation and interactive annotation is done in src/transform. The input types are converted into the output types that are defined in src/output_types. These are closely modeled after the actual output of the program.
Before the output is written to a file or stdout, the post processing code src/post_process runs tests / swaps personally identifiable information with pseudonyms.
Documentation
For exploring the crate it might be beneficial to have a look at the documentation. In order to generate and view it execute
cargo doc --no-deps --document-private-items --open
or simply view the hosted one via gitlab pages here.
Word List
The anonymised names are generated by selecting random words from the EFF long list, intended for password generation. https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases
License
Rusty-Hektor is licensed under either of the following, at your option:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)