This is the source code repository for the MoDTA plugin. It is an extended and enhanced version of the approved Moodle JUnit Exercise Corrector (MoJEC) plugin, and the Moodle Dockerized Code Testing (MoDoCoT) and Moodle Dockerized Test Tool (Moodle DTT) plugins - for which no approval was requested, which all still run up to Moodle 4.3. MoDTA can thus be considered MoJEC version 4, thought it can test code in any programming language for which a teacher provides a test runner docker image.
The zip archive in the root directory contains the files from the dta directory for easy installation as long as it is unavailable via Moodle Plugins Directory.
This plugin is compatible with Moodle versions 4.3 and above, up until 4.5 (LTS)
## Goals
MoDTA empowers teachers to provide programming Moodle assignments for their students, which are automatically corrected upon hand-in using teacher-provided tests and the results provided as extended submission feedback.
Moodle DTA empowers teachers to provide programming Moodle assignments for their students, which are automatically corrected upon hand-in using teacher-provided tests and the results provided as extended submission feedback.
Corrections optionally include a pedagogic agent giving feedback on student competencies and in the next version recommending next exercises based on student competency levels and resilience.
Furthermore, MoDTA optionally provides the errors as tickets in supported ticketing systems to resemble current state-of-the-art software development workflows.
Furthermore, Moodle DTA optionally provides the errors as tickets in supported ticketing systems to resemble current state-of-the-art software development workflows.
### Motivation
Due to contact time constraints, assignments for a new topic typically include about three tasks (one easy introductory, one standard usage, and one advanced combination with previous topics). Students e.g. stuck at the standard level assignment may face frustration and only little opportunity for qualified feedback. Especially in beginners’ programming education, many students struggle with the way of thinking and at the same time feel reluctant to ask teachers for help.
MoDTA allows for teachers to provide additional assignments at intermediate levels from their typically existing assignment collection. Teachers have to create automated tests for the assignments and place them in a git repository. Afterwards students can practice their skills 24/7 with a less steep learning curve and without having to overcome their potential reluctance to ask a teacher for help. They receive feedback consistent with other assignment results integrated into the Moodle environment.
Moodle DTA allows for teachers to provide additional assignments at intermediate levels from their typically existing assignment collection. Teachers have to create automated tests for the assignments and place them in a git repository. Afterwards students can practice their skills 24/7 with a less steep learning curve and without having to overcome their potential reluctance to ask a teacher for help. They receive feedback consistent with other assignment results integrated into the Moodle environment.
MoDTA supports beginners not educated in state-of-the-art repository-based workflows by offering hand-ins in a zip archive containing the code to lower the learning curve. It also supports hand-in via repository URL and optionally repository credentials for advanced students.
Moodle DTA supports beginners not educated in state-of-the-art repository-based workflows by offering hand-ins in a zip archive containing the code to lower the learning curve. It also supports hand-in via repository URL and optionally repository credentials for advanced students.
Optionally, if a teacher provides competency profiles and difficulties for tasks and tests, students also receive feedback about their achieved competencies by a pedagogic agent, which in the next version optionally recommends a learning path to the students based on their resilience.
Furthermore and independent of the other optional features, MoDTA optionally supports a state-of-the-art workflow by placing tickets for compile errors in a student-provided ticketing system link (currently supported: GitLab and Atlassian Jira).
Furthermore and independent of the other optional features, Moodle DTA optionally supports a state-of-the-art workflow by placing tickets for compile errors in a student-provided ticketing system link (currently supported: GitLab and Atlassian Jira).
## Overview
The MoDTA system comprises two key components:
The Moodle DTA system comprises two key components:
• The MoDTA Moodle plugin, designed as an assignment submission tool.
• The Moodle DTA plugin, designed as an assignment submission tool.
• The DTA backend web service, which interfaces with the Moodle plugin through REST and employs the JSON file format for communication.
The plugin establishes communication with the external DTA backend REST web service offering the endpoints:
...
...
@@ -43,23 +45,23 @@ The plugin establishes communication with the external DTA backend REST web serv
After approval, install the plugin directly from the Moodle Plugins Directory via Site Administration/Plugins/Install Plugins.
Before that or alternatively: zip the plugin code from https://transfer.hft-stuttgart.de/gitlab/HFTSoftwareProject/moodledta (here). The readily-zipped current version also sits in the repository’s main directory. Then install the plugin from zip via Site Administration/Plugins/Install Plugins, or by extracting the plugin archive to {Moodle_Root}/mod/assign/submission/dta and visiting the admins notifications page.
Before that or alternatively: zip the plugin code from https://transfer.hft-stuttgart.de/gitlab/cota/moodle-assignsubmission_dta (here). The readily-zipped current version also sits in the repository’s main directory. Then install the plugin from zip via Site Administration/Plugins/Install Plugins, or by extracting the plugin archive to {Moodle_Root}/mod/assign/submission/dta and visiting the admins notifications page.
Visit Site Administration/Plugins/Plugin Overview and select Settings next to the Moodle Dockerized Test Agent (MoDTA) entry to enter the URI of your backend as shown in Fig. 1.  Finally, configure via Site Administration/Security/HTTP Security settings permitting communication with the backend URI and port as seen in Fig. 2.  The plugin requires the external DTA REST webservice backend.
Visit Site Administration/Plugins/Plugin Overview and select Settings next to the Moodle Dockerized Test Agent (Moodle DTA) entry to enter the URI of your backend as shown in Fig. 1.  Finally, configure via Site Administration/Security/HTTP Security settings permitting communication with the backend URI and port as seen in Fig. 2.  The plugin requires the external DTA REST webservice backend.
Notes:
The universal DTA REST webservice backend is available under the GPLv3 as well at https://transfer.hft-stuttgart.de/gitlab/HFTSoftwareProject/dtabackend and the docker image at https://hub.docker.com/r/hftstuttgart/dta-backend . See the documentation in the repository for the necessary setup.
An example JDK 17 JUnit 5 test runner is available under GPLv3 as well at https://transfer.hft-stuttgart.de/gitlab/HFTSoftwareProject/dtatestrunner and the pre-built docker image at https://hub.docker.com/r/hftstuttgart/dta-jdk17-junit5-testrunner . The repository contains an example docker-compose.yaml for tests with a bitnami Moodle and MariaDB setup and the backend.
An example JDK 17 JUnit 5 test runner is available under GPLv3 as well at https://transfer.hft-stuttgart.de/gitlab/cota/examples/cota-runner-jdk17-junit5 and the pre-built docker image at https://hub.docker.com/r/hftstuttgart/dta-jdk17-junit5-testrunner . The repository contains an example docker-compose.yaml for tests with a bitnami Moodle and MariaDB setup and the backend.
## Usage
With the MoDTA plugin installed and configured backend URI (including Moodle Security/HTTP Security settings permitting communication with that URI):
With the Moodle DTA plugin installed and configured backend URI (including Moodle Security/HTTP Security settings permitting communication with that URI):
### Teacher
When creating an assignment, a teacher can select the MoDTA exercise as a new assignment type via an additional checkbox on the assignment creation page as shown at the bottom of Fig. 3.  A new standard file upload field appears as indicated in Fig. 4. . There, the teacher must upload a text file with the git repository URI containing the tests as shown in Fig. 5.  The text file has to adhere to the following format also given in the example repository:
When creating an assignment, a teacher can select the Moodle DTA exercise as a new assignment type via an additional checkbox on the assignment creation page as shown at the bottom of Fig. 3.  A new standard file upload field appears as indicated in Fig. 4. . There, the teacher must upload a text file with the git repository URI containing the tests as shown in Fig. 5.  The text file has to adhere to the following format also given in the example repository:
The text file has to contain the following, each separated by ::
- dtt as the URI-type
...
...
@@ -78,9 +80,9 @@ Students use the same format, just without the runner part at the end.
Students use an additional MoDTA standard file upload field in the standard submission processs in Moodle like in Fig. 6. [Fig. 6: Moodle DTA Student File Upload](.assets/usage_student_1.png) There, they place either a zip archive or a text file adhering to the same format as the teacher’s file with their code repository URI and optionally credentials and/or a ticketing system URI as shown in Fig. 7. 
Upon completion, students see a summarized overview of their test results in an additional column of the submission feedback table like in Fig. 8.  Clicking on a new expansion icon in that column, they reach a detailed feedback dialog including stack traces of compile errors and test failures as in Fig. 9.  Optionally, the MoDTA backend creates tickets for compile failures in the ticketing system under the URI provided by the student upon hand-in.
Upon completion, students see a summarized overview of their test results in an additional column of the submission feedback table like in Fig. 8.  Clicking on a new expansion icon in that column, they reach a detailed feedback dialog including stack traces of compile errors and test failures as in Fig. 9.  Optionally, the Moodle DTA backend creates tickets for compile failures in the ticketing system under the URI provided by the student upon hand-in.
Note: Teachers have access to the Moodle submission result view to assess student results. However, teacher control and grading are not the focus of MoDTA.
Note: Teachers have access to the Moodle submission result view to assess student results. However, teacher control and grading are not the focus of Moodle DTA plugin.
### Technical Workflow
...
...
@@ -120,7 +122,7 @@ This file provides version information about the plugin to manage installation a
### settings.php
The settings file defines two settings for the MoDTA plugin:
The settings file defines two settings for the Moodle DTA plugin:
1. Default: This setting offers a checkbox to determine whether the plugin should be enabled by default when creating a new assignment.
...
...
@@ -167,4 +169,4 @@ The folder contains various utility files, e.g. displaying the new test summary
### Code Checking
The Moodle Plugin Directory offers a helpful tool for developers to ensure their code adheres to Moodle's coding conventions. This tool, named "Code Checker," can be found via the following link: