ProFormA Programming Question Type

Question types ::: qtype_proforma
Maintained by Karin Borm
Quiz question type for automatically graded programming questions. Questions can be created in Moodle or imported as ProFormA tasks (https://github.com/ProFormA/proformaxml). Plugin requires the qbehaviour_adaptiveexternalgrading plugin and ProFormA Praktomat (https://github.com/elearning-ostfalia/Proforma-Praktomat).
Latest release:
72 sites
205 downloads
19 fans
Current versions available: 5

The ProForma Moodle Question Type is a Moodle Plugin that is used for automatically grading programming questions in Moodle quizzes. Questions are internally stored in the ProFormA format (https://github.com/ProFormA/proformaxml).

In order to generate the submission grade a predefined testsuite is run on an external server (Praktomat).

Standard test frameworks are used for specifying tests. Currently the following programming languages and test frameworks are supported:

  • Java: JUnit 4, JUnit 5, Checkstyle
  • C++: GoogleTest (CMake/make)
  • c: CUnit, GoogleTest (CMake/make)
  • Python: Python Unittest, Python Doctest
  • Setlx: Test, Syntax Check
Any other programming language resp. test framework can be used as long as the Praktomat (or any ProFormA compatible other test runner used as back-end) supports it. Since all code is open source, it can be easily extended to other languages and frameworks.

The plugin comes with a built-in Java question editor so simple Java questions can be created directly in Moodle. 
More complex questions must be created outside of the system with a stand-alone editor (https://proforma.github.io/formatEditor/proformaEditor.html) or by other means (e.g. script). These questions can be  imported by use of another Moodle plugin. 

Copyright note: The renderer code partly bases upon the renderer from essay question type (Moodle core).
Small code parts (in particular in qbehaviour_adaptiveexternalgrading) are copied from Coderunner
(https://moodle.org/plugins/qtype_coderunner).
 
Features

  • Various submission formats:
    • editor with programming language support such as syntax highlighting or automatic indentation
    • multi tab editor (explorer) for submission of more than one file
    • file upload (for more than one file)
    • external repository (version control system)
  • Code snippet as starting point for student
  • Immediate feedback for students (optional)
  • Supported programming languages are only limited by the available grader back-ends
  • Bulktest with model solution for administration purposes
 Installation

The ProFormA question type also requires:

Set the grader URI in qtype_prfoforma to match your Praktomat installation!

Optional plugins:

For importing questions from an external source you also need to install the ProFormA import plugin: 

You can get a separate Javascript editor for creating tasks at https://github.com/ProFormA/formatEditor.  An online version is available at https://proforma.github.io/formatEditor/proformaEditor.html. Of course ProFormA tasks can be created by different other external tools as well.

In order to download all students' submissions for e.g. checking for plagiats the plugins 

are avaliable.

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5

Contributors

Karin Borm (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Εμφάνιση σχολίων
  • Plugins bot
    Πέμ, 25 Ιουλ 2019, 4:00 PM
    Approval issue created: CONTRIB-7791
  • Kyriakos Iakovou
    Τρί, 14 Ιαν 2020, 5:17 AM
    Is this plugin be longer available for moodle 3.8?
  • Karin Borm
    Τρί, 14 Ιαν 2020, 3:02 PM
    It is also planned to support moodle 3.8 but I have not yet tested it.
  • Kyriakos Iakovou
    Τρί, 21 Ιαν 2020, 5:07 AM
    Ok, I am waiting...
  • Максим Михайловский
    Κυρ, 12 Απρ 2020, 11:21 PM
    Failed to connect to localhost port 8001: Connection refused

    What can be done?
  • Karin Borm
    Δευ, 13 Απρ 2020, 1:39 PM
    Upps. I changed the Praktomat port from 8001 to 8010 a long time ago and forgot to change the default setting in the Moodle plugin. So, if you have installed Praktomat correctly then change the port in the qtype_proforma settings "URI: Protocol and Server" to 8010 or 80.
  • Максим Михайловский
    Τρί, 21 Απρ 2020, 6:01 AM
    Dear friends, thanks for developing this plugin. Tell me, is there a step-by-step instruction on its use? I changed the port to 80 and now I get 404 errors when trying to send a response. Thanks.
  • Karin Borm
    Τρί, 21 Απρ 2020, 12:58 PM
    There is no step-by-step instruction. Do you have more information about 404 (= file not found)? Look at the 'raw response' that is visible for the admin account.
    Possible problems:
    * The submission URI could be invalid (check for '/api/v2/submissions' in your Moodle plugin settings)
    * The task could not be found in Praktomat because of incomplete installation (first submission request is sent before Praktomat is ready). Try and reset Praktomat (1. docker-compose down 2. docker-compose build 3. docler-compose up 4. wait until installation is completed 5. retry submission in Moodle).
    * What response format do you use? In case of 'version control system' the VCS URI could also be invalid.
  • Karin Borm
    Τετ, 22 Απρ 2020, 10:25 PM
    Possibly you must get the latest Praktomat version from Github. I just noticed that it did not start correctly (because of incompatibilties with django-tinymce version 3.x).
  • Douglas Nantes Gualberto
    Πέμ, 15 Φεβ 2024, 4:40 AM
    Update qtype_proforma 2.9.0 (2022071800) to 2.10.0 (2023011600) on Moodle 3.11.11+ return error:

    ERROR: column "versioncontrol" does not exist
    LINE 1: ...ptions SET vcssystem = "2" WHERE responseformat = "versionco...
    ^
    UPDATE mdl_qtype_proforma_options SET vcssystem = "2" WHERE responseformat = "versioncontrol"
    [array (
    )]
    Error code: dmlwriteexception

    line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
    line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
    line 338 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->read_slave_query_end()
    line 836 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
    line 340 of /question/type/proforma/db/upgrade.php: call to pgsql_native_moodle_database->execute()
    line 703 of /lib/upgradelib.php: call to xmldb_qtype_proforma_upgrade()
    line 1929 of /lib/upgradelib.php: call to upgrade_plugins()
    line 713 of /admin/index.php: call to upgrade_noncore()
  • Karin Borm
    Πέμ, 15 Φεβ 2024, 9:53 PM
    This has been fixed in version 3.0.0 of the plugin (does not actually help if you want to install 2.10.0). Please replace the update statement with

    $DB->execute('UPDATE {qtype_proforma_options} '.
    'SET vcssystem = "2" ' .
    'WHERE responseformat = :responseformat', ['responseformat' => 'versioncontrol']);

    That should make it work.
Please login to post comments