Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion _docs/instructor/assignment_configuration/configuration_path.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ previous uploads below. The uploaded configurations are sequentially numbered b
default, but the name may be edited by clicking on the pencil to the
left of each configuration.

For simple assignments, this upload may be a single `config.json` file.
For more complex assignments, Submitty also supports C/C++ style
comments and `#include` directives in `config.json`. If you use
`#include`, upload a zip archive that contains `config.json` and the
included files with their relative paths preserved.

![](/images/config_upload_interface.png)

Note: These uploaded configurations are stored in the course directory:
Expand All @@ -55,6 +61,13 @@ However, repeatedly uploading files through this interface is a
tedious workflow to develop and debug complex autograding
configurations.

For larger configurations, it is often easier to keep the files in a
course repository and organize the autograding config across multiple
files with `#include`. If a build error references a confusing line
number, compare it against the generated / preprocessed config used
during the build, including any generated config shown in the
instructor build log.


### Course Autograding Configuration Directory

Expand Down Expand Up @@ -90,4 +103,4 @@ folders containing a file named 'config.json'. Folders that are
found will be displayed in the dropdown menu (prefixed by "DIRECTORY"), as well as warnings if
an error is encountered while searching the directory.

![](/images/config_repo_box.png)
![](/images/config_repo_box.png)
17 changes: 15 additions & 2 deletions _docs/instructor/autograding/specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,21 @@ redirect_from:

You are allowed to have C/C++ style comments in a `config.json` file.
These will be removed before compilation of the autograding
executables.
executables.

Submitty also supports C/C++ preprocessor `#include` directives in
`config.json`. This can be used to split a large autograding
configuration across multiple files and reuse common fragments across
gradeables.

If a build or validation error points to a line number that does not
match the file you edited, compare it against the generated /
preprocessed config used during the build. If your build log includes
generated config sections, those files can make debugging much easier.

See the
[multi-file autograding example](https://github.com/Submitty/Submitty/tree/main/more_autograding_examples/multifile_config_python_greeting)
for a concise example that uses `#include`.


* **field:** ``"testcases"``
Expand Down Expand Up @@ -268,4 +282,3 @@ executables.
* **field:** ``"textboxes"``
**type:** _array of textbox objects_ (Described below)
**default value:** ``empty``