rquiz 1.0.0
Complete overhaul of the package, including new features, accessibility improvements, unified design, and CRAN-ready packaging. Migrated from GitLab (private) to GitHub (public) and submitted to CRAN.
Breaking changes
Renamed
fillGaps()tofillBlanks()for consistency with the “fill-in-the-blank” terminology used throughout the documentation.Shiny render functions renamed to follow camelCase convention:
rendersingleQuestion->renderSingleQuestion,rendermultiQuestions->renderMultiQuestions,renderFillGaps->renderFillBlanks.Parameter naming unified across all quiz functions: all color parameters now use the short form (
Col/Bg), e.g.titleCol,titleBg,questionCol,questionBg,mainCol,mainBg,optionBg.Renamed
submitButtonCol/submitButtonBgtonavButtonCol/navButtonBginsingleQuestion()andfillBlanks()for consistency withmultiQuestions().Removed
answersCol,answersBg, andhoverBgparameters frommultiQuestions(). UsemainColandoptionBginstead. Hover color is now auto-derived (30% darker).convert2JSON()is no longer exported (internal function only).Default for
scrollchanged toFALSEin all quiz functions. Setscroll = TRUEexplicitly for HTML slide presentations.Default for
showSolutionButtonchanged toTRUEin all quiz functions.
New features
Added multiple-choice support to
singleQuestion()andmultiQuestions(). The mode is auto-detected from the answer vector.singleQuestion()in multiple-choice mode shows Submit, Show tips, and Show solution buttons with customizable colors.Added
shuffleparameter tosingleQuestion()(shuffles answer options) andmultiQuestions()(shuffles question order, including on “Try again”).Added
languageparameter to all quiz functions. Built-in support for English ("en"), German ("de"), French ("fr"), and Spanish ("es"). Translations stored ininst/translations.json.Added
rquizTheme()for creating reusable themes that can be applied to any quiz function via thethemeparameter. Explicit arguments always override theme values.Added input validation functions:
checkSingleQuestion(),checkMultiQuestions(), andcheckFillBlanks(). These are called internally but also exported for manual use.Added
titleAlignparameter to all quiz functions.Added
mainCol/mainBgparameters tosingleQuestion()andfillBlanks()(already existed inmultiQuestions()).Added
optionBgparameter tosingleQuestion()for styling answer option rows (already existed inmultiQuestions()asanswersBg).Added
questionColparameter tomultiQuestions()for independent question text color. Also addedquestionCol/questionBgtofillBlanks()for the description container.Added
questionFontSizeparameter tosingleQuestion().Added
blanksWidth = "auto"mode tofillBlanks()that automatically sizes input fields based on the longest correct answer (minimum 50px).Added
descriptionparameter tofillBlanks()with automatic default text based on language setting.fillBlanks()description container now provides visual feedback (green/red) after submission.multiQuestions()now remembers selected answers when navigating back to previous questions.Added tip button support to
multiQuestions()(per-question tips, with auto-generated tip for MC questions showing number of correct answers).Added tip and solution button support to
singleQuestion()in single-choice mode.
Accessibility
Added ARIA attributes:
role,tabindex,aria-label,aria-checkedon interactive elements;aria-expandedandaria-controlson toggle buttons (Tip/Solution).Added keyboard navigation: Tab through options and buttons, Enter/Space to select options, focus management on page transitions.
Added CSS
:focusoutlines for keyboard users (hidden for mouse clicks via:focus-visible).Click event propagation stopped inside quiz widgets to prevent conflicts with slide frameworks (e.g. slidy).
Improvements
Removed jQuery dependency: all JavaScript code now uses Vanilla JS. This eliminates the bundled jQuery 3.5.1, jQuery UI, and jQuery UI Touch Punch libraries, reducing the package size.
Replaced fragile
paste0()-based JSON generation inconvert2JSON()withjsonlite::toJSON(). Special characters in questions (quotes, backslashes) are now correctly escaped.Unified HTML structure across all three quiz types: consistent class naming (title, question, main, options, buttons), consistent padding, font sizes, and container hierarchy.
Unified design defaults across all three quiz types (consistent colors, button styles, border-radius, responsive layout).
Fixed widget scoping: all DOM queries are now scoped to the widget container, preventing conflicts when multiple quiz widgets appear on the same page.
Fixed unscoped CSS selectors that could affect elements outside the quiz (e.g. in ioslides presentations).
Responsive button layout: buttons wrap to next line on narrow screens.
Added pkgdown website with vignette, interactive gallery, and demo files for Quarto, Slidy, and RevealJS.
Changed license from CC BY 4.0 to MIT for CRAN compatibility.
Migrated repository from GitLab to GitHub (https://github.com/saskiaotto/rquiz).
rquiz 0.3.0
- Removed
dragAndDrop()due to persistent touch/interaction issues on tablets and in slide presentations. - Added
fillGaps()as a replacement: a fill-in-the-blank cloze quiz where users type answers into input fields instead of dragging items.
rquiz 0.2.0
- Added
dragAndDrop(): a cloze drag-and-drop quiz where users drag answer options to blank fields in the text.
rquiz 0.1.0
- Initial release of the package with two quiz types:
-
singleQuestion(): Single-choice quiz with immediate feedback. -
multiQuestions(): Multi-page quiz with timer and results page.
-
- Built with a mix of vanilla JavaScript and jQuery/jQuery UI.
- Used in Data Science lectures at the University of Hamburg since 2020.
