SCM

Forum: support

Monitor Forum | Start New Thread Start New Thread
RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2023-03-20 00:02
[forum:49628]
Thanks Achim, I will send you an email and we can work off-list.

Regards,
Michael

RE: Support for Inspera [ Reply ]
By: Achim Zeileis on 2023-03-19 23:55
[forum:49627]
Michael, sorry for the long silence. Before christmas too many other things came up and then it took me a while before digging into this again. But I finally had a closer look at the .zip you attached. I see three main differences compared to what I get with

install.packages("exams", repos = "https://R-Forge.R-project.org")
library("exams")
exams2inspera("boxplots", name = "bxp")

in the development version of the exams package:

(1) Instead of "resources" the folder with the supplementary files is called "media".

(2) The supplementary image is directly in the resources folder, namely: resources/ID_133950037.png. However, in the exams2inspera output, there is a separate sub-directory for each random replication, e.g., media/supplements1/boxplots-002.png.

(3) In the imsmanifest, there is a single <resource> containing both the <file href="ID_133950039-item.xml"/> and the <file href="resources/ID_133950037.png"/>. In the exams2inspera output we have two separate <resource> tags for the .xml and the .png file.

The name in (1) would be relatively easy to change but (2) and (3) would be harder to do.

Maybe you could play around with the output from the exams2inspera() example above to see which changes you have to make until Inspera is able to import the .zip? Then we can decide whether it is worth the effort to change exams2qti21() to allow for this.

P.S.: This thread already became quite long. We can also do this off-list and then report back when we have some results.

Best wishes, Achim

RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2022-12-16 04:39
[forum:49558]

InsperaAssessmentExport_1911065615_133950039.zip (2) downloads
See attachment, as referenced by the previous post.

RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2022-12-16 04:38
[forum:49557]

questions-PHYS3112-5223_01102-Exercise 1-20221216-1515.zip (1) downloads
To further explore the problem with boxplot.Rmd, I created a Moodle XML file using

exams2moodle("boxplot.Rmd", n=2)

imported this into Moodle, and then exported using the Moodle UNSW QTI 2.1 format. See the attached output file (which inadvertently included an additional question). I then imported that file into Inspera. It worked fine, and I exported one of the boxplot questions from Inspera using Inspera's QTI 2.1 format. The result will be in my next post (since only one attachment per post is allowed).

RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2022-12-14 07:24
[forum:49553]
(1) Yes, the pandoc mathml conversion fixes the LaTeX issue.
(2) N/A.
(3) I tried renaming media to resources (both in the XML files and in the folder structure) - no difference, Inspera still says "no questions in the file". I tried removing the supplementary folders, no difference. So it looks like there is some other issue here.

RE: Support for Inspera [ Reply ]
By: Achim Zeileis on 2022-12-14 00:42
[forum:49551]
Thanks for this! A couple of follow-up questions:

(1) Does exams2inspera(..., converter = "pandoc-mathml") work for Inspera? Using MathML might be easier than fixing the math classes after running pandoc.

(2) If MathML does not work: Does only "math inline" need to be changes or also the "math display" parts?

(3) For the boxplots.Rmd exercise: Does renaming the "media/" folder to "resources/" in the .zip and the imsmanifest.xml file avoid the problems? Or do we additionally need to remove the "supplements*/" folder(s) within the resources/ folder? (The former is relatively easy to change, the latter is more difficult...)

RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2022-12-13 03:12
[forum:49550]
To confirm: if I replace "math inline" with "math-tex" in the XML files, then the LaTeX renders with Inspera.

RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2022-12-13 03:08
[forum:49549]
OK, I tried those individual questions and here are the results:

(1) boxplt; Inspera replies with "no questions in file"

(2) deriv2; the question looks fine apart from LaTeX not being interpreted, i.e., the backslashes are present on the screen (e.g.., "\x = 1". I suspect this may be due to the <span math-tex> and <span math inline> difference that I mentioned near my first post.

(3) ttest works fine I think. Note that with two questions in the file, each is given the title "1".

(4) deriv; the question looks OK (apart from the same issue with LaTeX not being shown as before); any attempt to enter an answer in the box says "autosave failed, if this error persists, see an invigilator" and clicking on "Check answer" gives no results; maybe this is because I am using a preview mode?

(5) lm; import fails with the error message:

media/supplements1/regression.csv
Error at line 1, column 1: Content is not allowed in prolog. (public id null).

RE: Support for Inspera [ Reply ]
By: Achim Zeileis on 2022-12-12 23:36
[forum:49548]

exams_2.4-1.tar.gz (2) downloads
Thanks for the feedback and sorry for messing up the duplicated </resource> tag: a copy & paste error that I should have noticed. Other than that, it's great that at least a basic import now works. Attached is a version that fixes this problem and also sets the default base64 = FALSE so that supplementary files are not base64-encoded by included in the .zip directly.

Now let's see whether we can get more complicated files to work as well. The underlying exams2qti21() function organizes the supplementary files in media/supplements*/*.* rather than resources/*.*. Maybe we are lucky and Insperia tolerates this as well.

Before trying all exercises in one file you could try to do

exams2inspera("...Rmd", n = 2)

for different exercise templates, e.g., boxplots.Rmd (graphics file), deriv2.Rmd (mathematical notation), ttest.Rmd (verbatim code output), deriv.Rmd (numeric exercise), lm.Rmd (cloze exercise with embedded data).

RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2022-12-12 21:35
[forum:49547]

InsperaAssessmentExport_2133277476_132964262.zip (3) downloads
I had to delete the additional </resource> tag again, but then the import failed at the "data:image/png" file with the error "file is missing".

I generated a question with an image in Inspera, and exported the question (see attached). Inspera likes to create a directory called "resources" in the zip file that contains the images - the questions then point to these files rather than have them encoded in-line.

RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2022-12-12 21:13
[forum:49546]

InsperaAssessmentExport_769668489_132962443.zip (2) downloads
That worked after I removed a duplicate </resource> tag in the imsmanifest.xml file. It is the 2nd line below:

<file href="inspera_127395328_section_1_item_1_mchoice.xml"/>
</resource>
</resource>
</resources>

The question looks fine in Inspera. I have attached the result of exporting the question from Inspera. There are some differences, I'm not sure how important they are.

Thanks again! Incidentally, the documentation for R-exams is extremely good.

RE: Support for Inspera [ Reply ]
By: Achim Zeileis on 2022-12-12 01:57
[forum:49533]

inspera.zip (4) downloads
To try something more adventurous you can also do:

library("exams")
myexam <- list(
"boxplots.Rmd",
c("tstat.Rmd", "ttest.Rmd", "confint2.Rmd"),
c("regression.Rmd", "anova.Rmd"),
c("scatterplot.Rmd", "boxhist.Rmd"),
"relfreq.Rmd"
)

set.seed(0)
exams2inspera(myexam, n = 3)

The resulting .zip file is also attached here. This creates three random draws from the five list elements in "myexam". These contain a mixture of exercises with mathematical content (to be rendered via MathJax), embedded images or data files. The type of items vary between numeric, multiple-choice, and cloze. Hence, I would expect that some of this does not yet work out of the box but it's worth a try...

RE: Support for Inspera [ Reply ]
By: Achim Zeileis on 2022-12-12 01:54
[forum:49532]

exams_2.4-1.tar.gz (3) downloads
I have implemented now a version of this in R/exams but haven't committed this, yet, on R-Forge. Please find attached the .tar.gz source package that you can install to try it out. I would hope that at least

exams2inspera("capitals.Rmd")

should work which also just creates a single multiple-choice question without any markup/images/data/etc.

RE: Support for Inspera [ Reply ]
By: Achim Zeileis on 2022-12-10 10:19
[forum:49522]
Nice, I'll try to integrate this into exams2qti21().

I would expect that most of the standard stuff _within_ an exercise (aka item) then works as well, including embedding images, data sets, etc. and penalties for multiple-choice and single-choice questions.

The mapping of points to marks would be a property of the test as a whole, which does not seem to be supported in the exchange format. Maybe your IT team would know more about that.

Relatedly, I'm not sure how I would specify tests with random selections of items. That would be one of the main strengths of R/exams that I can readily draw many random variations of an exercise and import all of these in one go. Without having to put together a test from the many random variations in the LMS. Maybe you just have to do this in Inspera - but maybe your IT team also knows a way to achieve this.

RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2022-12-10 08:48
[forum:49521]
Yes, qti21_combined.zip worked just fine! I really appreciate your help with this. If you have time, I would be happy to provide any other samples of Inspera QTI 2.1 exported questions that might help.

Are other details of the format standardized? E.g., mark allocation, penalties for guessing the wrong answers in a multiple choice question, image attachments, etc.

RE: Support for Inspera [ Reply ]
By: Achim Zeileis on 2022-12-10 02:46
[forum:49520]

qti21_combined.zip (3) downloads
As a wild guess I combined the imsmanifest.xml from Inspera with the item .xml from R/exams, trying to change the IDs appropriately.

Maybe this leads to a different error upon import...

RE: Support for Inspera [ Reply ]
By: Achim Zeileis on 2022-12-10 02:38
[forum:49519]

1+1.Rmd (2) downloads
This is the item that I used with exams2qti21("1+1.Rmd").

RE: Support for Inspera [ Reply ]
By: Achim Zeileis on 2022-12-10 02:38
[forum:49518]

qti21.zip (1) downloads
Thanks for this. I did the same with exams2qti21(), resulting .zip attached.

The biggest difference between these is that the .zip from R/exams has the following structure:

- imsmanifest. declaring two <resources>, an imsqti_test and a imsqti_item
- the imsqti_test has the <assessmentTest>
- the imsqti_item has the <assessmentItem>

The .zip from Inspera just has:

- imsmanifest. just declares an imsqti_item
- the imsqti_item has the <assessmentItem>

So there is no "test" around the individual items while there is in the export from R/exams. Possibly the presence of the "test" confuses Inspera and hence the "item" is not detected?

RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2022-12-09 22:46
[forum:49517]

InsperaAssessmentExport_494526161_132676799.zip (4) downloads
Note that I made the "1 + 1" in that question formated with LaTeX, just to try it out. I found in earlier testing that Moodle uses <span math inline> whereas Inspera uses <span math-tex> (from memory).

And I have attached another file, generated from the same question, with the option "include Inspera namespaces and content" clicked.

RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2022-12-09 22:42
[forum:49516]

InsperaAssessmentExport_1062176270_132676799.zip (3) downloads
Here you go. I exported this as QTI 2.1. I am just about to start traveling so won't be able to respond quickly for a bit.

RE: Support for Inspera [ Reply ]
By: Achim Zeileis on 2022-12-09 21:57
[forum:49515]
Can you do so for a simple single-choice question and upload the result here in the forum? Say "What is 1 + 1?" with options "1", "2", "3", and "4".

The I will take a look. I cannot promise that I will see much but maybe...


RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2022-12-09 21:42
[forum:49514]
OK, will do. I can pretty easily manually enter that question into Inspera and then export a QTI file.

RE: Support for Inspera [ Reply ]
By: Achim Zeileis on 2022-12-09 21:28
[forum:49513]
That sounds promising! It would be great if they could have a look at a simple QTI 2.1 output from R/exams, e.g.,

exams2qti21("swisscapital.Rmd", n = 2)

or something like that. And then they might be able to tell us which modifications in the XML are necessary to make the file readable in Inspera.

If you or your IT support have insights from this and can tell us what needs to be done differently for Inspera, then we might be able to incorporate it into R/exams.

RE: Support for Inspera [ Reply ]
By: Michael Ashley on 2022-12-09 10:43
[forum:49512]
Thanks for your quick reply. I can't immediately see any exact QTI specification for Inspera. There may be some expertise about this at my university (UNSW), so I will ask around. I know that we are trying to migrate a lot of Moodle questions into Inspera, and we do have a plugin for Moodle that generates QTI 2.2 that is supposed to be compatible with Inspera, although when I tried it on some LaTeX, it had problems.

RE: Support for Inspera [ Reply ]
By: Achim Zeileis on 2022-12-09 10:20
[forum:49511]
With the QTI-based imports devil is typically in the detail. The different learning management systems (LMS) typically implement the QTI readers in such a way that they rely on a very specific usage of the general QTI standard. And if you deviate from that, there may be problems or errors.

In case of QTI 2.1 we have tested our exports with QTIWorks and OpenOlat. For other systems, like Inspera (which I wasn't aware of before), it may be necessary to make certain modifications. Is there a documentation of the exact QTI specification that they use?

My expectation would be that there isn't (as for other LMS as well). Then we proceeded by generating questions in the LMS, exporting it to QTI, and checking for differences with the QTI generated by R/exams. Sometimes this reveals what the problem is and how the format can be tweaked.

My suspicion is that this may be due to the usage of nested assessment sections in our QTI format. But this is just a wild guess...

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