Stateful PHP editor based on CodeMirror, to be used in PEM tasks.
Install the javascript part through bower:
bower install France-ioi/fioi-editor
and the php part (optionally) with composer through a composer.json
like:
{
"repositories": [{
"type": "vcs",
"url": "http://github.com/France-ioi/fioi-editor"
}],
"require": {
"namshi/jose": "*",
"France-ioi/fioi-editor": "*@dev"
}
}
See the demo for a simple use case.
You must have a database set up with the tm\_platform
, tm\_source\_codes
and tm\_tasks\_tests
tables (see the requests for relevant fields). Then add a connect.php
at the root of the repository providing a $db
variable in the global scope. Then you can visit
demo.html?sPlatform=xxx
where xxx
is the platform name.
Install dependencies:
npm install
and generate the files:
gulp compile
The code has many bad practices, it should be fixed in many ways, or rewritten from scratch.