d2fbee0e

DTABackend

Backend Rest Web Service for the Moodle Dockerized Test Agent (DTA) plugin.

Name

Moodle Dockerized Test Agent (MoDTA) backend.

Visuals

See plugin docs at the Moodle HQ or the readme at https://transfer.hft-stuttgart.de/gitlab/HFTSoftwareProject/moodledta.

Installation

Assumption for usage: git, Java JDK 21, maven and docker installed, docker running.

Assumption for development: Typically, a Java IDE like Eclipse JEE running. curl or an API test tool for testing.

Only before the first build, add the dependency to unifiedticketing to your local maven repo using the command in deployunifiedticketingdeptolocalrepo.txt

Build the jar using

export BUILD_NUMBER=<YOUR_BUILD_NUMBER>; mvn clean install

Assumption: members of a system group named 'docker' have access rights to the docker socket and daemon.

Then build the docker image using (Hint: There are backticks in front of 'getent' and after 'f3')

docker build --build-arg AGID=`getent group docker | cut -d: -f3` --build-arg BUILD_NUMBER=$BUILD_NUMBER -t <YOUR_DOCKERHUB_ORGANISATION>/dta-backend:latest .

The default image is provided with the organisation hftstuttgart.

Assumption for integration: docker-compose or a new docker version with integrated docker compose running.

Test it without building anything e.g. with Moodle 4.3 using the provided docker-compose.yaml. With this compose file, after Moodle spinup

  • install the dta plugin
  • configure Moodle to open the necessary ports and hosts under Site Administration/Security/HTTP Security
  • configure moodle dta plugin backend url to e.g. backendcomposedtt:8080 when using the example dockerfile
  • ensure read/write access to the host temp dir for the dta plugin, e.g. with the example dockerfile for the group 'docker' to /tmp/dta-tests
  • create a new course
  • create a new assignment
    • configure the assignment as Dockerized Test Agent
    • provide the example repo in the teacher-dta-dir.txt example file
  • add a submission to the new assignment
    • provide the example repo in the student-dir.txt example file
  • see the result!

Usage

See plugin docs at the Moodle HQ or the readme at https://transfer.hft-stuttgart.de/gitlab/HFTSoftwareProject/moodledta.

Support

Issue tracker in this Portal.

Roadmap

See issues:

HIGH: Include agent recommendation functionality, support for Subversion version control system and kubernetes infrastructure alternatively to docker(-compose).

MEDIUM: Enhance security by building all images to run as non-root.

LOW: Potentially offer demo runners for further programming languages or newer Java LTS versions when available.

Contributing

You are ready to go after clone and installation, see above. Contributions welcome!

Authors and acknowledgment

Lineage:

  • Master student project Moodle JUnit Exercise Corrector (MoJEC, 2017),
  • Bachelor student project Moodle Dockerized Code Testing (MoDoCoT, 2020),
  • Master thesis project Moodle Dockerized Test Tool (Moodle DTT, 2021).

License

See LICENSE in the root directory.

Project status

Currently under intensive development via research project AVILAB2 (see HFT research projects page).