r-examsopenolat

How to ask a question of type "file upload"


Using exams2openolat for exporting exercises from R/exams to OpenOlat, is there a way to ask a question where the student can upload a file as an answer (pdf, jpg, ...)? This would be useful for mathematical proofs for example which are just easier written by hand and then scanned rather than typed.

According to this tweet

[...] The QTI engine in OpenOlat is very cool & powerful!

We're trying to catch up with its interaction features (e.g., matching, ordering) but some (e.g., file upload) have been added in #rexams devel. [...]

https://twitter.com/achimzeileis/status/1333912916299485184

there should be such an option in the development version of R/exams, but I can not find anything else about that.


Solution

  • Extended string items

    Indeed, this feature is available in exams2openolat (and exams2qti21 more generally; partially also in exams2moodle) starting from version 2.4-0. The simple idea is that you can set a "type" for string exercises and string elements in cloze exercises:

    Simple string example

    A very basic example asking for a proof (as described in your question) is provided below. The exstringtype is set to file and hence no exsolution is needed (because it cannot be scored automatically) which is therefore set to nil. The exercise uses R/Markdown .Rmd markup - it would, of course, be also possible to use R/LaTeX .Rnw markup. Also you could include a Solution section if you wanted to.

    Question
    ========
    Under which assumptions is the ordinary least squares (OLS) estimator
    for the coefficients in the linear regression model unbiased?
    Outline the steps for the corresponding proof.
    
    Please upload your solution as an image file (PDF, PNG, JPG, ...).
    
    Meta-information
    ================
    exname: Unbiasedness OLS
    extype: string
    exstringtype: file
    exsolution: nil
    

    More complex cloze example

    Similarly, in a cloze exercise you could set the exclozetype to essay or file for a certain element. A worked example is available in the development version of the package as lm3.Rmd which combines all possible elements in a single cloze: string, mchoice, num, schoice, essay, file. Try: exams2openolat("lm3.Rmd", ...). In OpenOlat the open-ended elements (essay and file) have to be scored by the lecturer while the remaining elements can be scored automatically as usual.