Tutortool

command module
v0.0.0-...-70c0da3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2018 License: GPL-3.0 Imports: 6 Imported by: 0

README

Description

This is a grading tool for C(98/99/11) assignments. It provides a Web-GUI which is provided by a simple integrated webserver. The webserver is currently hard-coded to listen to port 8080.

Usage

  1. Open a terminal and run:

    go get "github.com/ms-xy/Tutortool"
    go get "github.com/ms-xy/rlimiter"
    
  2. Switch to the directory you want to install the Tutortool in

  3. Create the configuration (see config section below)

  4. Copy the rlimiter and Tutortool executable to this directory:

    cp "$GOPATH/bin/Tutortool" "$GOPATH/bin/rlimiter" ./
    

    This step might seem unnecessary. However, it protects against accidentally overwriting the binaries in the GOPATH.

  5. Execute the Tutortool:

    ./Tutortool
    

Configuration

The Tutortool is configured via multiple JSON files. Mandatory files are the tutortool-config.json, the students config and the task list config.

tutortool-config.json

{
  "tutor":           "<name>",
  "students-config": "students/students-config.json",
  "task-list":       "tasks/task-list.json"
}

The students-config and task-list can be located anywhere. You can use both relative and absolute paths here.

students-config.json

[
  {
    "name": "Anne",
    "path": "anne"
  },
  {
    "name": "Herbert",
    "path": "herbert"
  },
  {
    "name": "Lucas",
    "path": "lucas"
  }
]

This file is a simple map of directories. Relative paths are resolved in relation to the path of the students-config.json.

task-list.json

[
  "task01/task-config.json",
  "task02/task-config.json",
  "task03/task-config.json"
]

This file lists all the task config files. Again, relative paths are resolved relative to the task-list-json path.

Example task-config.json

{
  "name": "task name / short description",
  "gcc": {
    "parameters": ["-Wall", "-Werror", "-std=c99"],
    "files":      ["main.c", "library.c"],
    "replacements": {
      "main.c":    "main.c",
      "library.h": "library.h"
    }
  },
  "run": {
    "timeout": 60,
    "stdout-size": 10000,
    "stderr-size": 10000
  },
  "testcases": [
    {
      "name": "testcase name / short description",
      "parameters": ["custom", "program", "parameters"],
      "input-file": "path/to/input/file"
    },
    {
      "name": "another testcase",
      "input-file": "path/to/another/input/file",
      "timeout": 120,
      "stdout-size": 1000,
      "stderr-size": 2000
    },
    {
      "name": "just simply execute the darn program"
    }
  ],
  "sources": ["library.c"]
}

Each config file must specify a task name, gcc settings and at least one testcase. A global run config may be specified but also overriden on a per-testcase level. Sane defaults are chosen if limits are not set. (5 min execution time, 10kB stdout and stderr sizes, memory limit of a couple megabyte). These limits are enforced by using rlimiter.

License

Tutortool itself is licensed under GNU GPLv3. Please see the attached License.txt file for details. Different license terms can be arranged on request.

Tutortool comes packaged with several javascript libraries that use different licenses. These libraries remain subject to the terms and conditions set by their authors and/or publishers. The user of the Tutortool acknowledges that they have read and agreed to the terms and conditions of these libraries:

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL