This is an old revision of the document!
Table of Contents
judge Plugin
Compatible with DokuWiki
!Binky, Ponder Stibbons
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
This is a prereleased version. Don't use it in production environment unless you are sure about what you are doing.
Note: it's not compatible with Binky because it use template actions but it's compatible with last version.
Description
The aim of Judge system is to test the correctness of programs and user's answers to questions related to computer science. The main difference between this plugin and other similar judge systems is it's simplicity and minimalistic design and making use of integrated tools of a Wiki software for defining the questions and their answers or test cases. Other main features of this system is the dependency of where users submit their answers or write questions from the other system which run the codes and send back the result, simplicity of nominating a question for judgement, controlling user's access to questions, submissions or answers. The installation process is straightforward and do not need to hack the core of Dokuwiki to use this system with.
Installation
The installation process is straightforward. Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. For manual install just download this repository, rename it to “judge” and put it in /lib/plugins/. visit Plugins to see more about how to install plugins manually.
Set the directory which submission codes uploaded into after the installation. You must make this directory outside of directories which is in the web.
External requirements: This plugin requires the following additional components that must be installed separately:
- sqlite module for the web server you are using.
Examples/Usage
Use the following syntax to create a simple judge block in the page:
{{judge}}
Demo
See the plugin in action here. The sample page shows all the styles available with the plugin.
Syntax
Parameter Name | Description | How plugin find the value | Default Value | Optional/Mandatory |
---|---|---|---|---|
submit_id | unique number for every submission | generated by the plugin | auto increment | Mandatory |
timestamp | submission time | saving current time on submission insert | .now | Mandatory |
problem_name | unique name of every question which is equal to page id of the problem | plugin syntax parameters | Mandatory | |
username | username of submitter | dokuwiki this user | Mandatory | |
language | programming language of submission | syntax parameters or user choice when submit ل file format | java | Mandatory |
type | two possible values: output-only and test-case | syntax parameter | test-case | Mandatory |
status_code | 0 means running and 1 means done | first it's 0. when the answer specified it became 1 | 0 | Mandatory |
valid_number | string which show the run status of programs | set by program which run the codes | null | Optional |
runtime | the time of running the codes | set by program which run the codes | null | Optional |
Basic syntax:
{{judge key=value}}
- key can be one of this:
problem_name
— ID of question pagetype
— test-case/output-onlylanguage
— programming language for test-case kind of questionsruntime
— maximum runtime of the programmethod
— tester.cpp/tester.java/diff
Configuration and Settings
Set the directory which submission codes uploaded into.
Development
Change Log
- 2016-01-29
- Initial release