rqti (development version)
The extended schema (
verify_qti(schema = "extended")) accepts OPAL’s test settings:data-downloadsanddata-featuresonassessmentTest(files, calculator and otherAssessmentTestOpalfeatures) andrebuildVariablesonitemSessionControl. OPAL tests exported by rqti now validate against it.The extended schema allows
<details>at any position initemBody,modalFeedbackanddiv, so gap exercises with collapsible details (their content is wrapped in adiv) validate. Before,<details>was only accepted after all other content ofitemBodyandmodalFeedback.The
dropdown-complexRmd template uses a valid choice identifier (no_OOPinstead ofno OOP).New option
rqti.qti_version: set it to"2.2"to export items, tests and content packages as QTI 2.2 (namespace, schema locations, manifest resource types and metadata). QTI 2.1 remains the default, with unchanged output. The export functions (createQtiTask(),createQtiTest(),rmd2xml(),rmd2zip(),upload2opal(),upload2LMS()andrender_opal()) take aqti_versionargument that overrides the option for that call.verify_qti()validates QTI 2.2 documents against the bundled QTI 2.2 schema, soverification = TRUEworks for both versions, and QTI 2.2 uploads are recognised as tests. HTMLdata-*attributes such asdata-allowPasteare valid in QTI 2.2.New extended QTI 2.2 schema:
verify_qti(schema = "extended")(orextended_schema = TRUE) validates QTI 2.2 documents against it, andschema = "qti22extended"selects it explicitly. Like the extended QTI 2.1 schema it accepts the OPAL extensions rqti exports:<details>, tolerant text gaps (mapTolResponse), Maxima templates (customOperatorvalues andsetCorrectResponse), and the test settingsdata-downloads,data-featuresandrebuildVariables. It is generated from the QTI 2.2 schema bytools/build-qti22-extension.R.verify_qti()is 12 to 35 times faster for documents without MathML (about 0.06 s instead of 0.8 s per QTI 2.1 document, 0.15 s instead of 4.9 s for QTI 2.2). Compiling the MathML schemas took most of the time. Documents without MathML now skip them, with identical results; documents with MathML are still checked against the full schemas. QTI 2.2 documents with standard MathML skip only the separate MathML 3 namespace schema, which they do not use.Exporting items and tests is faster because rqti renders its XML without htmltools’ dependency handling. The generated files are unchanged.
Maxima support uses the suggested packages processx, filelock, later, promises and openssl, so other rqti features do not require them. Maxima checks and previews name any missing package and how to install it.
rqti no longer imports base64enc. Embedded files and images are encoded with jsonlite, producing the same data URIs.
Maxima authoring checks warn when a program leaves new global variables or functions behind, with their names and guidance on
block()andlocal(). Globals can force restarts on delivery servers that reuse Maxima instances.Configuration guidance distinguishes R options (
options()/.Rprofile) from environment variables (Sys.setenv()/.Renviron). R options are the preferred public configuration; process-connection variables remain internal.Maxima checks and local previews handle
$and;inside returned strings with older Maxima parsers, including dollar-delimited LaTeX on Maxima 5.44.Previews, XML/ZIP exports and OPAL uploads share option
rqti.task_names:"title"(the default),"filename","both", or"hidden". Per-calltask_namesoverrides the option. Default test constructors inherit the policy at export; explicit legacyfallback_titlessettings remain supported. OPAL repository names default to the selected exported title.Knit and
rmd2xml()preserve source filename hyphens and underscores, independently of the YAML identifier. Existing Knit XML copies are refreshed.Separate Knit sessions read current Maxima and naming options from the preview server. Changing those options no longer requires a server restart. Maxima may be selected by command name (including
maximaon Windows when resolvable) or by a full executable/launcher path.Restored the original
minimal-latex.Rmdcomparison exercise with its dollar-delimited LaTeX output enabled.Maxima string outputs can supply correct text answers with
gap_text(solution_variable = "answer")ortextGap(solution_variable = "answer"). Matching respectscase_sensitive; dynamic spelling tolerance and alternative answer lists are not supported. Seemaxima-text-answer.Rmdin the examples.Rmd template references no longer add a span around
printedVariable. ONYX replaces the reference with text, allowing surrounding inline/display TeX delimiters to be recognized without first opening the online editor.Maxima LaTeX now renders in the local preview, including references inside Markdown inline/display math and output with its own math delimiters. Formulas remain rendered after answer submission. See
maxima-latex.Rmdin the installed examples and the Maxima article.Explicit Maxima executable paths bypass
Sys.which(), supporting long paths and Unicode. Windows batch launchers usecmd.exe /c call. RStudio Knit sessions obtain the currentrqti.maximachoice from the running server.Knit previews write to the running server’s renderer folder across R sessions, including when RStudio uses a development checkout and Knit loads an installed package. Explicit mismatches fail before any preview files are removed.
Maxima authoring checks and previews share a persistent, build-specific cache of compiled libraries. Locks coordinate concurrent R sessions; calculations and random answers remain independent. Old, oversized, and incomplete caches are removed.
rqti.maxima_cache_dircan override or disable persistence.qti.js previews use native Maxima through the local R server, including the RStudio Viewer. Calculations run asynchronously, preserve typed outputs and scoring, and report source diagnostics with retry support. Each item has a fresh process; compiled libraries are reused between jobs. The native backend loads the statistics libraries used by the R authoring checks.
Rmd exercises accept one self-contained
{maxima}chunk returning all named outputs, following the ONYX all-in-one approach. A second chunk is rejected.Rmd files support locally checked
{maxima}template chunks with inferred output names/types and optional explicit declarations.template_value()displays an output, andgap_numeric(solution_variable = ...)binds a dynamic numeric answer.numericGap()and the S4 slot usesolution_variableconsistently. Checks call Maxima directly, preserve syntax/runtime diagnostics, and stop export on failure or timeout. Therimpackage is not required.maxima_variables()also infers types when itsvariablesargument is omitted.Added
maxima_variables()andtemplate_value()constructors. All item constructors now accept a trailingtemplateargument;numericGap()andgapNumeric()acceptsolution_variablefor dynamic correct answers. Existing positional arguments retain their order.NumericGapobjects can usesolution_variableto bind their correct answer to a numeric template variable. Export sets the answer after template calculations and again before response processing, preserving scoring and tolerance settings. OPAL-style response processing uses the extended schema.Added
TemplateVariableRefcontent objects that display declared template variables withprintedVariable, including alongside gaps inEntryitems. Item export rejects references to undeclared template variables.Assessment items now export Maxima template declarations and processing, preserving block order and rejecting conflicting variable identifiers. Programs use the MAXIMA custom operator supported by OPAL/ONYX. XML validation requires the extended rqti schema because OPAL uses
customOperator/@value.Added the
MaximaVariablesS4 model and an empty-by-defaulttemplateslot on assessment items.
rqti 1.4.0
CRAN release: 2026-11-17
New features
single_choice_scoring()configures custom correct, incorrect and omitted credits, the 21 Kanzow et al. (2023) scoring methods, and R/exams penalties. Pass the result tosingleChoice(scoring_scheme = ...), or use the same settings in Rmd YAML. Method-specific restrictions are documented in the helper’s help page. Existing single-choice defaults are unchanged.multiple_choice_scoring()configures multiple-choice scoring throughmultipleChoice(scoring_scheme = ...)or Rmd YAML. It supports five literature methods, explicit weights (including zero weights), andexams::exams_eval()policies, with configurable partial credit and negative score floors. Existing multiple-choice defaults are unchanged. The new choice-scoring rules use standard QTI 2.1 response processing; support in the target LMS should be checked separately.numericGap(),textGap()andtextGapOpal()accept anincorrectscore in points for wrong, nonempty responses. It must be non-positive and defaults to zero. Omissions remain zero. The Rmd helpersgap_numeric()andgap_text()accept the same setting.getScoreBounds()returns the declared minimum and maximum scores of items and gap interactions, accounting for scoring rules and gap penalties.updateCourseGroup()anddeleteCourseGroup()update and delete learning groups in OPAL courses (requires OPAL 2026.10.2 or later). Updates can change the name, description, participant limits, invitation settings and sign-out permission. Waiting lists, automatic promotion, enrollment periods and sign-out deadlines cannot be changed via this API. After renaming a group, check any dependent course visibility and access rules, which OPAL does not update automatically.set_opal_credentials()stores a password securely for an OPAL endpoint. Without an explicitcredential_id, credential services are now derived automatically from the endpoint, allowing different passwords for the same username on different installations. Existingrqtiopalentries remain a fallback, andcredential_idremains an override.RQTI_API_CREDENTIAL_IDcan select a credential set for implicit connections.
Improvements
verify_qti(..., schema = "qti22")uses a smaller, compressed schema bundle with all dependencies included, so validation still works offline.The extended schema accepts the HTML5
downloadattribute on links, including the filename hint generated byprovide_file(). Standard QTI 2.1 validation continues to reject it. The target LMS and browser must also support embedded data URIs.
Bug fixes
Fractional-score roundoff no longer causes full-credit answers to receive incorrect-answer feedback.
QTI.JS preview feedback icons use the response declarations of the correct item and interaction, and matching-table icons are cleared before results are displayed again.
OPAL connections keep separate authentication tokens, preventing one connection from using another connection’s token. Endpoints are normalized to one trailing slash, successful login bodies are no longer parsed as unused XML, and a successful response without an authentication token now produces a clear error.
render_opal()forwards namedendpoint,api_userandcredential_idarguments toopal().Fixed an error when exporting tests with academic grading on systems with an unrecognized language setting.
Assessment sections serialize session controls, time limits, selection and ordering in the order required by the QTI schema.
Contributor dates default to the current date when a contributor is assigned. Explicit dates supplied in YAML or
qtiContributor()are preserved, including when item contributors are collected into test metadata.verify_qti()excludes OpenOlat’s separateQTI21PackageConfig.xmlfrom item/test validation, as already done for the content-package manifest.
rqti 1.3.1
CRAN release: 2026-10-01
New features
-
opal()andupload2opal()now accept an optionalcredential_id, allowing the same username to use different passwords on different OPAL installations. When it is omitted, rqti continues to use the existingrqtiopalcredential service, preserving the behavior of existing code and saved credentials.
Bug fixes
extract_results(level = "item")now supports integer responses and labels them asNumericGap. Missing or unsupported response base types now produce an error identifying the affected item.Fixed Pandoc compatibility by using the appropriate option to disable syntax highlighting based on the capabilities of the installed Pandoc version.
rqti 1.3.0
CRAN release: 2026-09-21
New features
Rmd questions now support
stylesheet_path(one or more local CSS files) andcss: |(CSS text) in YAML. Item stylesheets are written with XML exports and included in item and assessment ZIPs and manifests. Relative paths are resolved against the Rmd source directory.Added
read_qti()as an alias forextract_results().Added OPAL API functions
createCourseGroup()for creating course groups,addGroupUser()for adding users to groups, andremoveGroupUser()for removing users from groups.extract_results(level = "item")now includes task-levelcandidate_commentandscorer_commentcolumns for each item row.Added
provide_audio()helper to embed local audio files directly into QTI/HTML content using Base64 encoding. The function supports both<object>and<audio>rendering methods and self-contained audio embedding for portable assessment items.
Improvements
- Changed the preferred R Markdown YAML configuration for
preview_feedback. The option should now be specified as a top-level YAML field instead of insideparams. The previous syntax withinparamsis deprecated and will be removed in a future release.
Bug fixes
Dropdown items (dropdown()) can now include commas and other punctuation without breaking YAML parsing.
Updated OPAL authentication to use the current REST login endpoint and header-based credentials.
Fixed grade feedback score ranges so that rounding to two decimal places no longer leaves gaps between adjacent grade intervals.
rqti 1.2.0
CRAN release: 2026-05-10
New features
Added support for OpenOlat via a new class
AssessmentTestOpenOlat. It introduced OpenOlat-specific configuration options (e.g., navigation behavior, visibility settings, number of attempts) as slots and corresponding arguments inassessmentTestOpenOlat().Added
fallback_titlesargument totest()andtest4opal()to control how section and item titles are assigned when not explicitly provided. Supported values are “filename” and “generic”. TheAssessmentTestclass now includes afallback_titlesslot.Added a new slot
scoring_schemeto theSingleChoiceclass to control how response options are scored. Supported values are “standard” (default) and “penalty”. Introduced penalty-based scoring for single-choice tasks. Whenscoring_scheme = "penalty", incorrect answers receive a negative score of -points/(k-1), where k is the number of response options. This ensures that random guessing yields an expected score of zero.Added a new
stylesheet_pathslot toAssessmentTestobjects, allowing users to include custom CSS stylesheets at the assessment test level. When academic_grading is enabled, the default styles/rqti.css stylesheet is included automatically, and custom styles can be added to override the default appearance.Added
german_grading(), a helper function that returns a predefined German grading scale for theacademic_gradingargument intest()andtest4opal(), avoiding the need to manually define grading vectors. This grading scheme can also be stored directly in theacademic_gradingslot ofAssessmentTestobjects.Added helper
provide_file()to embed local files directly into .Rmd tasks as # Base64-encoded hyperlinks for downloadable attachments.section()now supports Rmd files created with theexamspackage. Such files are automatically detected and converted to QTI 2.1 XML viaexams::exams2qti21(), so they can be used directly without additional wrapping.Added
exams_task()helper for explicit control over exams-based tasks. Whilesection()can handle exams .Rmd files automatically,exams_task()can be used when additional control is needed, e.g., to assign a custom title. The function converts the Rmd file and returns the path to the generated XML file in a temporary directory, allowing combination with native rqti items.Enhanced LMS Opal API with new functions
getCourseGroups()andgetGroupUsers()for retrieving course groups and group users as data frames.
Improvements
Improved
extract_results()performance for archives with many result files by extracting only relevant XML/result zip files, avoiding repeated row binding, and reducing XPath work for item-level responses.Enhanced
verify_qti()to support different input types, provide more informative validation messages, and use bothxmllintandxml2backends for XML validation.extract_results(level = "task")now includes an additional column containingscorerCommentfor manually scored item results.Images referenced in external XML files are now automatically embedded as Base64. This ensures that tasks are fully self-contained and do not depend on external image files.
Changed the default
time_limitforAssessmentTestandAssessmentTestOpalobjects (and for all related helper functions) to NULL, so time limits are no longer set at the test level by default.Changed the default value of
allow_pasteinEssayitems to TRUE.
Bug fixes
Fixed handling of consecutive gaps in .Rmd tasks.
Fixed identifier validation regex to correctly allow hyphens in valid identifiers.
Fixed
test()andtest4opal()to correctly handle input provided as a list containing a single section.
rqti 1.1.0
CRAN release: 2026-02-23
New features
- Added support for the
RQTI_API_USERenvironment variable. Ifapi_useris not provided explicitly, its value is now read from the environment.
Bug fixes
Fixed an issue in
upload2opal()where argumentsopen_in_browserandas_surveywere not forwarded toupload2LMS().Fixed problems in auto-generated scripts via RStudio template.
Fixed parameter serialization in
dropdown()to preserve long values, normalize numeric and logical formatting, and ensure stable, test-consistent gap interaction output.
Improvements
Rendering functions (
render_qtijs(),render_xml(), andrender_zip()) now accept aqtijs_pathargument (defaulting toqtijs_pkg_path()), allowing explicit control over the qtijs installation path.Added a
daemonargument tostart_server()for improved server control.Exported the
qtijs_pkg_path()helper function for accessing the qtijs installation path.Improved error and warning messages for duplicate identifiers.
rqti 1.0.0
CRAN release: 2025-03-05
New features
Major API Refactor: The API functionality has been refactored to require creating an Opal object for establishing a connection. Methods are now called on this object for interacting with the LMS API, replacing the previous function-based approach.
Added a
verify_qti()function to validate XML documents against the QTI v2.1 schema. Two schema versions are supported: the original IMS Global schema and an extended version that permits additional HTML tags.Added new constructor functions
assessmentTest(),assessmentTestOpal(),assessmentSection().The default values of the “academic_grading” parameter/slot have been updated in the functions
assessmentTest(),assessmentTestOpal(),test(), and in the classesAssessmentTestandAssessmentTestOpal. This parameter/slot is a named numeric vector that defines the grade table shown to candidates as feedback at the end of the test. The updated default follows the German grading system: gt <- c(“1.0” = 0.95, “1.3” = 0.9, “1.7” = 0.85, “2.0” = 0.8, “2.3” = 0.75, “2.7” = 0.7, “3.0” = 0.65, “3.3” = 0.6, “3.7” = 0.55, “4.0” = 0.5, “5.0” = 0), where each grade corresponds to the minimum percentage score required to achieve it. To disable the grading table at the end of the test, set this parameter to NA_real_.Generic functions are now exported to allow advanced users to extend the functionality of S4 classes
(createItemBody(),createResponseDeclaration(),createOutcomeDeclaration(),createResponseProcessing(),createText()).Added support for the
preview_feedbackoption within ‘params’ in the YAML section of R Markdown files.Renamed the service name in the keyring system credential storage to “rqtiopal”.
Renamed the “contributor” slot in
QtiContributorto ‘name’.
Improvements
QTIJS rendering (
DirectedPairtype, round Score and Maxscore values).Added a ‘<div>’ tag as a root child within the ‘itemBody’ element for
Entrytype tasks to ensure compatibility with the LMS OpenOlat.The functions
qti_metadata()andqti_contributor()have been deprecated. UseqtiMetadata()andqtiContributor()instead.The ‘question_type’ column has been removed from the data frame returned by
extract_result(level = "item").
rqti 0.3.0
CRAN release: 2024-07-19
Bug fixes
Fix parsing R Markdown files with tables according the latest pandoc version.
Fix
extract_results(level="items")forOrderingtype, when candidate response is not given.Fix error at
createQtitask(obj, zip=TRUE).
New features
New API OPAL function
get_course_elements()returns a data frame with elements of the course by course id.New API OPAL function
get_course_results()returns an xml with data about results by course id and node id.New API OPAL function
publish_courses()for publishing a course by Resource ID.
rqti 0.2.1
CRAN release: 2024-05-26
New features
method
createQtiTask()can create XML or zip files, to control this use parameter zip=TRUE.QTIJS rendering shows feedback and score for tasks.
rqti 0.2.0
CRAN release: 2024-05-08
Bug fixes
Handle problem with xsd scheme for xml validation.
Handle some problems with html and mathml entities.
New features
Improved the appearance of the tasks in QTIJS viewer.
Added constructor functions for task classes:
singleChoice(),multipleChoice(),essay(),ordering(),entry(),directedPair(),oneInColTable(),oneInRowTable(),myltipleChoiceTable().Added constructor functions for content of Entry class:
numericGap(),textGap(),textGapOpal(),inlineChoice().Added constructor functions for the feedback objects:
modalFeedback(),correctFeedback(),wrongFeedback().Added the ability to upload SURVEY resource type to Opal using the API. The
upload2opal()function now includes a new parameter, “as_survey”, which allows you to specify the resource type. Set “as_survey = TRUE” to upload as a SURVEY resource type.Added the ability to put metadata in the manifest file for tests. To store metadata information
AssessmentItemandAssessmentTestuse slot “@metadata” that takesQtiMetadata(andQtiContributorinside) classes as type. Two construction functions have been added to create objects:qti_metadata()andqti_contributor().