SCM

Forum: support

Monitor Forum | Start New Thread Start New Thread
RE: Support for video or audio in questions? [ Reply ]
By: Achim Zeileis on 2025-11-04 01:03
[forum:50113]
Mayeul, thanks for all the details, this looks like a nice project!

Thanks also for the link to "moodef", I wasn't aware of that.

Re: Simple definition via CSV. This makes sense for schoice/mchoice questions with short questions/answers, relatively little formatting, and no randomization beyond simple shuffling. As this is just a subset of the R/exams functionality we never wrote a special interface for this. However, I posted some simple csv2rmd() function in this discussion:

https://r-forge.r-project.org/forum/message.php?msg_id=48195

The "examling" package on GitHub (which unfortunately does not seem to be maintained anymore) generalized this to various other formats:

https://examling.github.io/examling/

Regarding the exchange format: Given that you develop your own functionality, you are not tied to Moodle XML, are you? So you could also use any other format to import questions into quizplayr, couldn't you? For example JSON strings might be an alternative to XML.

If you want to support an interface to input from R/exams exercises you could set up a custom exams2quizplayr() function. Of course, you can also make the function a small wrapper to exams2moodle() with some custom processing. With a separate function you could also decide to process the $solution and $solutionlist elements differently. In principle, these can hold item-specific feedback (which can be leveraged in Moodle).

RE: Support for video or audio in questions? [ Reply ]
By: Mayeul Kauffmann on 2025-11-03 16:36
[forum:50112]
Thank you Achim for these detailed answers!
With respect to:

"What works well here will depend on the system that you use for deploying the exercises"

It will be deployed in an R/Shiny app, whose ui function is here:

https://gricad-gitlab.univ-grenoble-alpes.fr/kauffmma/quizplayr/-/blob/main/app.R?ref_type=heads#L217

A screenshot of the current interface is here:

https://gricad-gitlab.univ-grenoble-alpes.fr/kauffmma/quizplayr#visuals

Currently, for each run, the game host says the question verbally and has to select the number of possible answers (+ or - keys) and the correct answer (by pressing 0 - for 0 red button, or 1 to 4).

I aim to develop a solution that interacts nicely with R packages such as exams and moodef; I've successfully tested the beta app at universities and in (open/public) sessions for adults in (NGO) festivals (in beta: I must read the questions; I cannot show pictures ineternal app as the Shiny app loses the focus). Next public session in Paris on November 15th.

I like the moodef way of creating questions (in a table, in Libre Office Calc); but exports to Moodle xml format (and import with exams) seems to convert the video into a static image (which is heavy/embedded). See my moodef - exams workflow here: https://github.com/josesamos/moodef/issues/17
(The other advantage I see in mooodef over exams is the possibility to have answer-specific feedback (different feedback for different wrong answer); but mooded does not allow to specify an order of answers; those are, so far, side issues to be dealt after my next session).


RE: Support for video or audio in questions? [ Reply ]
By: Achim Zeileis on 2025-11-01 09:21
[forum:50111]

audio.zip (2) downloads
In principle, you can include any static file as a supplement via

invlude_supplement("myname.fil", ...)

See https://www.R-exams.org/templates/Rlogo/ for a worked example with a simple image.

In the same way it is possible to embed audio or video files. Attached is a .zip file containing three .mp3 files and a simple corresponding cloze exercise. (The R code also makes sure that a neutral file name is used for the audio files so that no information about the correct solution is conveyed by the file name.)

There are two possible caveats:

(1) The files can become quite big (especially for video) which can be inconvenient to transfer and import via Base 64 encoded XML files etc. So storing the files elsewhere - be it commercial providers such as YouTube or some solution within university infrastructure (LMS, cloud, etc.) - may be preferable.

(2) For nicer embedding you might want to leverage an audio or video player rather than relying on the browser default. What works well here will depend on the system that you use for deploying the exercises (Moodle, Canvas, standalone HTML, ...). It's possible that you may have to include the HTML code directly (rather than simple Markdown), e.g., via an <iframe> or <video> tag as in the StackOverflow post you linked.

Support for video or audio in questions? [ Reply ]
By: Mayeul Kauffmann on 2025-10-31 13:07
[forum:50110]
Is it possible to include video or audio in questions?

(The video or sound being the main question and/or a hint)

It might depend obviously of what external sytems - Moodle or other -can accept.
Ideally:

- video file (saved in current computer)
- video URL (maybe youtube or other platform)
- audio file (saved in current computer)

Ideally, the current various question types should be able to manage this.


I saw that it should be possible to include videos in R markdown (untested):
https://stackoverflow.com/questions/43840742/how-to-embed-local-video-in-r-
markdown

but I'm unsure about whether this is the way to go.
Thanks.
Mayeul

Thanks to:
Vienna University of Economics and Business Powered By FusionForge