Improve DQL Question Support
Description
DQL questions, are currently already supported. However, there are a few things we would like to improve.
- To force deterministic results for the DQL exercise, we force an order on all attributes of the result. Currently, we do this independently at two spots in the YAML files. First, in the question description, and secondly, in the query that is the solution to the question. We should automate the ordering. If the user does not define any ordering, we create a random ordering and change the question description and the solution query to support that ordering. If the user only defines ordering in the solution query, we add the ordering used in the query to the description (look at how we highlight ordering in existing queries). If the user manually defines an ordering in the query, we abort execution and notify the user that no ordering should be explicitly provided in the description (we could also use that ordering or overwrite it, but both solutions can get messy).
- (#21): Currently, we have a function that can provide base64 strings for the different database files that we use. This approach is very inflexible. In this issue, we need to automatically create the base64 string. We need to access the database file anyway, so we can simply add a step, during which we base64 encode the database file and then we add this to the end of the moodle-xml.
- We need to migrate to DuckDB (we currently use SQLite).
- We need to create tests.
- We need to add doc strings throughout our code (#13 (closed))
Todo
-
automate the ordering of all attributes of the result -
automatically base64 encode the database file and add the resulting base64 string to the moodle-xml that is produced (covered in #21) -
migrate to DuckDB, make sure to use the same version that we use on ISIS -
create tests for the SQL-DQL question type -
add doc strings for documentation (#13 (closed))
Edited by Nils Leon Jobst Schubert