Skip to content

Commit

Permalink
update requirements versions
Browse files Browse the repository at this point in the history
  • Loading branch information
KBorm committed Jun 12, 2020
1 parent b5e73b3 commit 03755d6
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 39 deletions.
88 changes: 59 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ grading backend for different programming languages.

The code is a fork (2019) from the KIT Praktomat (https://github.com/KITPraktomatTeam/Praktomat).
It adds the ProFormA interface (https://github.com/ProFormA/proformaxml) which enables Praktomat
to be used as a grading back-end in e.g. learning management systems.
to be used as a grading backend in learning management systems.

The ProFormA format for tasks is 2.0 and 2.0.1 with some limitations.
The ProFormA format for HTTP requests is 2.0.

The code is currently only used as a 'docker composition'.
So the installation manual is not up-to-date.
So the installation manual for a plain Linux server is not up-to-date,
but you can follow the Dockerfile.

#### Programming Languages

Expand All @@ -16,8 +20,8 @@ The following programming languages and test frameworks are provided with the Pr
| Language | Test Frameworks |
| :---: | :----: |
| Java 8 | Compiler , JUnit 4.12 / JUnit 5, Checkstyle 8.23 / 8.29 |
| Python 3.5 | Doctest |
| SetlX | Test, Syntax Check |
| Python 3 | Doctest |

For running SetlX tests you need to copy the setlx-2.7.jar into the extra folder.

Expand All @@ -32,27 +36,46 @@ The following types of submission are supported:
* URI of SVN repository to export the submission from (credentials are stored in .env file)


## Configuration

## Setup


##### Mandatory: Credentials

Create an .env file containing credentials and other private data.
A sample file is included as .env.example.

cp .env.example .example

For using other framework versions then you need to modify the following files:
##### Optional: HTTPS
For enabling HTTPS (port 443) you must

* put your certificate files into /data/certs (or adjust folder name in docker-compose.yml)
* comment in 443 configuration in nginx/nginx.conf
* set servername and adjust certificate file names in nginx/nginx.conf

##### Optional: Different Test Framework Versions

For using other test framework versions then you need to modify the following files:
- URLs in Dockerfile
- src/checker/JUnitChecker.py
- src/checker/CheckStyleChecker.py
- URLs in Dockerfile
- src/settings.docker.py

## Setup

#### Create Docker Containers

In order to build and start the docker composition simply run

docker-compose build
docker-compose up
docker-compose build
docker-compose up



## ProFormA API (CURL)

<!--
TODO: The Web-Interface seems to be buggy.
Expand All @@ -64,23 +87,14 @@ For login see the credentials in your docker-compose.yml file (SUPERUSER and PAS
-->

The REST API is available on port 80
The grading service is available on port 80

http://localhost/api/v2/submissions

and port 8010 (circumventing the web server)

http://localhost:8010/api/v2/submissions
For enabling https (port 443) you must

* put your certificate files into /data/certs (or adjust folder name in docker-compose.yml)
* comment in 443 configuration in nginx/nginx.conf
* set servername and adjust certificate file names in nginx/nginx.conf

## ProFormA API (CURL)

The supported ProFormA format version is 2.0.

A typical grading HTTP request in CURL is

Expand All @@ -104,17 +118,17 @@ with the following 'submission.xml'
</result-spec>
</submission>"

'submission.xml' can be transferred as a separate file or simply as data.
Files are sent as normal 'file upload'. The task file can be a zipped file or a simple xml file.
`submission.xml` can be transferred as a separate file or simply as data.
Files are sent as multipart/form-data. The task file can be a zipped file or a simple xml file.

Note that embedding the submission file(s) into submission.xml as embedded-txt-file is also supported.
Note that embedding the submission file(s) into submission.xml as embedded-txt-file is also possible.

A sample for a timestamp is:

2019-04-03T01:01:01+01:00


### Submission with more than one file
#### Submission with more than one file

For submitting more than one file you have the following options:

Expand All @@ -130,7 +144,23 @@ You can also omit the relative path for Java source files:

http-file:User.java,File.java

### Maintenance
## LON-CAPA API

Since 4.5.0 an HTTP interface for the legacy learning management system LON-CAPA is provided.

The URI is

/api/v2/loncapasubmission

The following form fields are expected:
* `submission_filename`: Submission filename
* `task`: base64 coded ProFormA task
* `task_filename`: Filename of ProFormA task

The student submission is automatically put by LON-CAPA into `LONCAPA_student_response`.


## Maintenance

The Praktomat stores tasks and results in a database and in the filesystem. In order not to
run out of disk space the whole system should be reset from time to time (e.g. before starting a new semester).
Expand All @@ -141,11 +171,11 @@ This can easily be done by calling

There is no need to back-up anything!

#### Software Update
### Software Update

In case of a software update this is the recommended process:

1. docker-compose down
2. git pull (update software)
3. docker-dompose build
4. docker-dompose up
1. `docker-compose down`
2. update software (e.g. `git pull`)
3. `docker-dompose build`
4. `docker-dompose up`
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# workaround for debug-toolbar/sqlparse incompatibility, see http://stackoverflow.com/questions/38479063/django-debug-toolbar-breaking-on-admin-while-getting-sql-stats
chardet==3.0.4
Django==2.2.12
Django==2.2.13
django-debug-toolbar==2.2
django-extensions==2.2.9
# django-tinymce 3.x is not compatible
django-tinymce==2.9.0
dnspython==1.16.0
docutils==0.16
elementpath==1.4.1
elementpath==1.4.5
eventlet==0.25.2
greenlet==0.4.15
greenlet==0.4.16
gunicorn==20.0.4
lxml==4.5.0
Markdown==3.2
lxml==4.5.1
Markdown==3.2.2
monotonic==1.5
psycopg2-binary==2.8.5
Pygments==2.6.1
Expand All @@ -23,10 +23,10 @@ pytz==2020.1
# We might want to use the django-admin provieded jquery in our admin-site jquery snippets?!?!?

selenium==3.141.0
setuptools==45.2.0
six==1.14.0
setuptools==47.1.1
six==1.15.0
sqlparse==0.3.1
urllib3==1.25.9
wheel==0.29.0
xmlschema==1.1.0
wheel==0.34.2
xmlschema==1.2.0
zipp==1.2.0
2 changes: 1 addition & 1 deletion src/VERSION.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

version = "Version 4.4.0 LON CAPA| 20200528"
version = "Version 4.5.0 | 20200612"

0 comments on commit 03755d6

Please sign in to comment.