Learn R Programming

rqti

The objective of rqti is to establish a robust and stand-alone R library tailored for crafting exercises and exams in adherence to the QTI v2.1 standard directly from R. Users have the flexibility to render the exercises either locally (using qtijs) or integrate them seamlessly into the OPAL learning management system. Our primary audience comprises instructors specializing in research methods and statistics who seek to harness the full capabilities of R while aligning with the QTI standard. In particular, instructors utilizing OPAL will find our package especially advantageous, as it capitalizes on OPAL’s robust API.

Documentation

Comprehensive documentation, encompassing installation instructions, a quick start guide, example usage, and detailed functionality documentation, can be accessed at the following link: https://shevandrin.github.io/rqti/

Testing

Our commitment to robustness is reflected in our pursuit of high test coverage through automated tests, located in the “tests” folder. Note that the qtijs-server and the Opal API cannot be tested with github actions (continuous integration); local test coverage is around 82%.

Support and Bug Reports

Should you find any missing features or encounter issues, please do not hesitate to inform us via email or open an issue on GitHub. We will offer support until the project’s funding concludes in September 2024. Following that, we will maintain a stable, usable version, with support for new features provided as time permits.

Contribute

To contribute to this package, clone the repository, implement your feature, and submit a pull request. Kindly adhere to the tidyverse style and the general package guidelines outlined at https://r-pkgs.org. Your contributions are greatly appreciated.

The need for rqti / comparison with exams

Why do we need another package for creating exams when there is already the exams-package? The philosophy of exams is one for all, whereas rqti follows the Unix-philosophy: do one thing and do it well. tldr:

  • rqti renders QTI files directly in the browser (or the RStudio Viewer pane) from within R, allowing you to see and interact with the exercise before uploading it to the LMS.
  • rqti supports more QTI-specific features (e.g., exercise types) than exams.
  • Built with S4 object-oriented programming, rqti is easy to extend for LMS-specific needs.
  • The Rmd interface is cleaner, focusing exclusively on QTI.
  • Low-level functions can be used flexibly to create exercises — something not possible in exams.
  • Includes functions for uploading files to an LMS via REST API (implemented for OPAL, but you can adapt it to your own LMS).

If you work exclusively with QTI exercises, you should try our package. If you need additional formats besides QTI — for example, print output or LMS platforms without QTI support — exams remains the better choice.

Copy Link

Version

Install

install.packages('rqti')

Monthly Downloads

308

Version

1.1.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Andrey Shevandrin

Last Published

February 23rd, 2026

Functions in rqti (1.1.0)

LMS-class

LMS Class
InlineChoice-class

Class "InlineChoice"
OneInRowTable-class

Class "OneInRowTable"
MultipleChoice-class

Class "MultipleChoice"
NumericGap-class

Class "NumericGap"
MultipleChoiceTable-class

Class "MultipleChoiceTable"
MatchTaable-classs

Class "MatchTable"
OneInColTable-class

Class "OneInColTable"
ModalFeedback-class

Class "ModalFeedback"
Opal-class

Class Opal
Ordering-class

Class "Ordering"
QtiContributor-class

Class QtiContributor
TextGapOpal-class

Class "TextGapOpal"
TextGap-class

Class "TextGap"
buildAssessmentSection

Build tags for AssessmentSection in assessmentTest
WrongFeedback-class

Class "WrongFeedback"
authLMS

Authenticate with LMS
assessmentSection

Create an object AssessmentSection
assessmentTest

Create an object AssessmentTest
assessmentTestOpal

Create an object AssessmentTestOpal
directedPair

Create object DirectedPair
correctFeedback

Create object CorrectFeedback
createAssessmentTest

Create an element assessmentTest of a qti-xml document for test
create_question_object

Create rqti S4 AssessmentItem Object from Rmd
entry

Create object Entry
dropdown

Create YAML string for InlineChoice object (dropdown list)
createResponseProcessing

Create an element responseProcessing of a qti-xml document
createText

Compose a set of html elements to display question in qti-xml document
create_qti_test

Create XML file for exam test specification
create_qti_task

Create XML file for question specification
createResponseDeclaration

Create an element responseDeclaration of a qti-xml document
createOutcomeDeclaration

Create an element outcomeDeclaration of a qti-xml document
createZip

Create an Zip archive of QTI test
createQtiTest-methods

Create zip-archive of the qti test specification
createQtiTask-methods

Create XML or zip file for question specification
essay

Create object Essay
getPoints-methods

Get points from AssessmentItem object
getObject-methods

Get object
extract_results

Create data frame with test results
gap_numeric

Create YAML string for NumericGap object
create_assessment_item

Compose a root element AssessmentItem of xml task
getAssessmentItems

Get list of AssessmentItems for AssessmentSection
gap_text

Create YAML string for TextGap object
getLMSResources

Get records of all current user's resources on LMS
getContributors-methods

Get list of contributors values
getFiles-methods

Get file paths for attachment of test
SingleChoice-class

Class "SingleChoice"
createItemBody

Create an element itemBody of a qti-xml document
QtiMetadata-class

Class QtiMetadata
getLMSResourceURL

Create an URL using the resource's display name on LMS
getCalculator-methods

Get value of the slot 'calculator'
getIdentifier-methods

Get identifier
qtijs_pkg_path

Shortcut for the qtijs path of the rqti package local installation.
mdlist

Create a markdown list for answer options
getCourseElements

Get elements of the course by courseId from LMS
isUserLoggedIn

Check if User is Logged in LMS
render_opal

Render Rmd directly in Opal via API
%>%

Pipe operator
createMetadata

Create an element of metadata
getResponse

Get and process a piece of question content
getCourseResult

Get zip with course results by resource id and node id
oneInColTable

Create object OneInColTable
ordering

Create object Ordering
opal

Create an Opal LMS Connection Object
prepareQTIJSFiles-methods

Prepare files to render them with QTIJS
prepare_renderer

Prepare qtijs renderer.
singleChoice

Create object SingleChoice
qti_contributor

Constructor function for class QtiContributor
qti_metadata

Constructor function for class QtiMetadata
oneInRowTable

Create object OneInRowTable
publishCourse,missing-method

Publish a course on LMS
inlineChoice

Create object InlineChoice
getLMSResourcesByName

Get select records about user resources by name.
multipleChoice

Create object MultipleChoice
modalFeedback

Create object ModalFeedback
verify_qti

Verify QTI XML against XSD Schema QTI v2.1
stop_server

Stop QTIJS local server
publishCourse,Opal-method

Publish a course on LMS Opal
publishCourse

Publish a course on LMS
test4opal

Create a test for LMS OPAL
render_zip

Render a zipped qti archive with qtijs.
start_server

Start qtijs renderer as a local server.
textGapOpal

Create object TextGapOpal
test

Create a test
qtiMetadata

Constructor function for class QtiMetadata
multipleChoiceTable

Create object MultipleChoiceTable
numericGap

Create object NumericGap
qtiContributor

Constructor function for class QtiContributor
updateCourseElementResource,missing-method

Update the referenced learning resource of a course element in the LMS
updateCourseElementResource

Update the referenced learning resource of a course element in the LMS
section

Create a section as part of a test content
rmd2zip

Create test zip file with one task xml file from Rmd (md) description
wrongFeedback

Create object WrongFeedback
render_qtijs

Render an Rmd/md/xml file or rqti-object as qti xml with qtijs.
rmd2xml

Create qti-XML task file from Rmd (md) description
updateCourseElementResource,Opal-method

Update the referenced learning resource of a course element in the LMS Opal
textGap

Create object TextGap
render_xml

Render a single xml file with qtijs.
upload2LMS

Upload content to LMS
upload2opal

Upload a resource on OPAL
Choice-class

Class "Choice"
Entry-class

Class "Entry"
CorrectFeedback-class

Class "CorrectFeedback"
Essay-class

Class "Essay"
AssessmentSection-class

Class "AssessmentSection"
DirectedPair-class

Class "DirectedPair"
AssessmentTestOpal-class

Class "AssessmentTestOpal"
AssessmentTest-class

Class "AssessmentTest"
AssessmentItem-class

Class AssessmentItem
Gap-class

Class "Gap"