SCM

Forum: support

Monitor Forum | Start New Thread Start New Thread
RE: Correctly using exams2qti12 [ Reply ]
By: Achim Zeileis on 2018-02-23 00:20
[forum:45707]
Niels & Jamie, thanks for your comments & follow-up!

tikz: Yes, dynamic graphics are definitely possibly - both via standard R graphics and via tikz (requiring some more processing but doable). If you come up with an example - either a nice one that works or one where you need help (or both) - I would definitely be interested. Probably worth starting a new thread.

Preview warning: I get the same warning when fully importing (instead of just previewing) an exercise. But everything looks ok. I didn't try a full assessment though.

Other D2L/Blackboard issues: Thanks for the insights, Niels. Let's discuss some more off-list and report back when there is some more progress.

RE: Correctly using exams2qti12 [ Reply ]
By: Jamie MacDonald on 2018-02-22 23:37
[forum:45706]
Thank you Achim for the info on graphics using Tikz. I’ll take a closer look at this soon. Ideally I would like the graphics/graphs to be “dynamic” in some questions, so hoping that is possible...

RE: Correctly using exams2qti12 [ Reply ]
By: Jamie MacDonald on 2018-02-22 18:11
[forum:45705]
Thank you Niels for looking into this! When you have a chance to fine tune things in Canvas, I would love to hear whether the files transfer over to D2L as well.

In the meantime, I will spend some time creating a few exercises in R Exams that I would use in my high school mathematics courses (some with images and graphs).

RE: Correctly using exams2qti12 [ Reply ]
By: Niels Smits on 2018-02-22 09:36
[forum:45704]
Hi Jamie and Achim,

* Yes, I guess this would need some finetuning to work properly. In the coming months I am planning to do a similar thing for the new learning environment of my institution called "Canvas". D2L looks like Canvas, so I will check if the finetuning needed for that system will work in D2L as well.

* When previewing an exercise with embedded plots the program shows a warning: "Failed to upload image: params.UploadLocation is null". This may need attention, because in Blackboard okay previews are no guarantee for okay assessments. (I did no longer succeed in instead of encoding plots, simply put them in the directory of bb zip. Perhaps this has to do with the recent change allowing for the external files)

* num exercises do not appear. My guess is that it has to do with how tolerance is implemented in blackboard.

* Indeed, both in schoice ("MC") and mchoice ("M-S"), the correct answers fail to be read.

* Feedback seems to be okay to me (but Achim said something about tweeking its appearance?). In exams2blackboard I allowed for a single, general, feedback, shown after both correct and incorrect answers. D2L (like modern versions of Blackboard) allows for feedback at the item option level. For mchoice D2L shows this feedback at the option level indeed. Apart from feedback, it seems to allow for "Comment: (given as feedback)" and Hints as well. For schoice D2L it only presents the general feedback (called "Overall Feedback"); somehow previewing the whole exercise is not possible (whereas for mchoice it is).

RE: Correctly using exams2qti12 [ Reply ]
By: Achim Zeileis on 2018-02-21 21:28
[forum:45699]

include_tikz.R (13) downloads
Re: mchoice. Having to flag the right alternatives is certainly not normal. I hope that Niels - as our exams2blackboard expert - can have a stab at this...maybe it's not that much that is missing to make it fly.

Re: tikz. The HTML converters that R/exams uses (tth/ttm or pandoc) do not convert tikz code into HTML (at least not fully). Hence, the best thing you can do is run LaTeX on the tikz code, convert the resulting PDF into either PNG or SVG, and embed this using \includegraphics{}. The development version of R/exams here on R-Forge has an enhanced version of tex2image() that can be leveraged to do so. There is also a snippet called include_tikz() which is not included in the package yet (but is in the SVN and attached). It also includes a short example. See the manual page ?tex2image for the dependencies required for this.

RE: Correctly using exams2qti12 [ Reply ]
By: Jamie MacDonald on 2018-02-21 21:08
[forum:45698]
Thank you! I really appreciate the time and effort you are putting into this.

The exams2blackboard() command worked very nicely on a multiple choice question I tried importing into D2L. It appears that I will have to manually select the correct answer choice. Is that normal within the various learning management systems?

I regularly use the Tikz package in LaTeX for diagrams and the pgf plots package for graphs, so look forward to experimenting with how well these import into D2L as well. To be honest, I'm not even sure whether Tikz and pgf plots even work within R Studio (or R Exams), so I shall give that a try later...

RE: Correctly using exams2qti12 [ Reply ]
By: Achim Zeileis on 2018-02-21 12:17
[forum:45691]
Nice, Niels! I just created a test account at https://trial.brightspace.com/ and played around with this. Summary:

- exams2blackboard() output can in principle be imported.
- Graphics, MathML, and verbatim code output seem to work ok.
- num exercises do _not_ appear to work.
- schoice/mchoice exercises look ok but hints/feedback probably need to be tweaked to appear correctly.

Furthermore:

- My exams2d2l() snippets works ok for the switzerland example.
- However (as expected) the anova example does not work because all HTML elements (graphics, MathML, R code) are shown verbatim instead of rendered.

Niels, maybe you could have a look whether you can tweak adjust the hint/verbatim structure for D2L in exams2blackboard(). Then this might be a nice way to go.

RE: Correctly using exams2qti12 [ Reply ]
By: Niels Smits on 2018-02-21 08:15
[forum:45687]
Hi,

Did you try to try to create an exam using exams2blackboard and upload it in your system?

Some sources claim that d2l would allow for uploading tests created in blackboard:

https://support.uwlax.edu/helpdesk/WebObjects/Helpdesk.woa/wa/CommonActions/download?dl=SyK6R9pcslYdUC_eq3SKhw&id=1

RE: Correctly using exams2qti12 [ Reply ]
By: Achim Zeileis on 2018-02-21 03:00
[forum:45684]

exams2d2l.R (29) downloads
Thanks, this does not look so complicated. The question is whether it also works with more complicated HTML input (e.g., graphics in Base64 and mathematics in MathML etc.)

Attached is a quick draft for converting a single mchoice question into a .csv with a single question only. (If this works we can expand it later.) For a simple check you could run:

library("exams")
source("exams2d2l.R")
exams2d2l("switzerland")

and try to import the resulting swtizerland.csv output into D2L. If that works you can try to get more adventurous with

exams2d2l("anova")

...where I would expect that at least part of the formatting gets messed up. Let's see.

Also, I didn't put any effort into computing the correct percentages for the answer alternatives yet. That will probably need some more testing.

RE: Correctly using exams2qti12 [ Reply ]
By: Jamie MacDonald on 2018-02-21 02:23
[forum:45683]

Sample_Question_Import.csv (46) downloads
Attached is the .csv template (MS excel file) that D2L uses. The templates for the various question types (multiple choice, short answer, etc.) are there. Hope this helps.

I wasn't able to export a question bank created within D2L in .csv format.

Let me know what you think.

Thanks.

RE: Correctly using exams2qti12 [ Reply ]
By: Achim Zeileis on 2018-02-21 01:30
[forum:45682]
Thanks for posting this, Jamie. This makes it clear that D2L does not use a plain QTI 2.1 but a custom adaptation. The whole <objectbank> approach is non-standard, coming from a special desire2learn namespace.

The <presentation> and <resprocessing> look pretty standard at first sight, so I think it should be possible do write a dedicated exams2d2l(). But it will require more work than just adapting the XML template. Hence before exploring this further, it's probably easier to have a look at the CSV format.

RE: Correctly using exams2qti12 [ Reply ]
By: Jamie MacDonald on 2018-02-21 01:08
[forum:45681]

questiondb.pdf (78) downloads
Okay, so I made up 2 questions in a D2L question bank (1 multiple choice and 1 short answer), then exported the question bank. Attached is a pdf of the code generated for the 2 questions. There was also the imsmanifest file in the .zip folder.

Based on what you see in the code generated by D2L, does it seem reasonable to adapt your existing exams2qti21() to a modified exams2qti21() that should work with D2L?

If so, I could use some guidance as this is all very unfamiliar to me...

Thanks!

RE: Correctly using exams2qti12 [ Reply ]
By: Achim Zeileis on 2018-02-20 21:49
[forum:45680]
To the best of my knowledge there is no unified .csv standard for exchanging exercises, so R/exams currently does not have such a format. But there are already application-specific .csv outputs (e.g., for ARSnova) and these are typically not very hard to code.

Again, I would suggest that you create an example by exporting exercises created within D2L and post the output here.

You could try to include some formatting (e.g., bold face or italics) so that we can see whether this is simply coded as HTML in the .csv. If so, we can probably get mathematical notation into D2L via the .csv. Same for images...

RE: Correctly using exams2qti12 [ Reply ]
By: Jamie MacDonald on 2018-02-20 21:38
[forum:45679]
Thanks Achim, that’s what I figured. I may take a closer look at the code for each at some point to see how they compare.

Not sure if this helps, but D2L also accepts .csv files in their question banks. Can R Exams questions be converted to .csv, or is that not possible? Not sure whether .csv can handle mathematical equations...

Thanks again.

RE: Correctly using exams2qti12 [ Reply ]
By: Achim Zeileis on 2018-02-20 21:14
[forum:45678]
Unfortunately this is not completely unusual. As I mentioned before: The QTI specifications leave a lot of flexibility to accomplish the same exam strategy in different ways. And different learning management systems expect different "flavors" of the XML standard. Unfortunately, it's usually not really documented which flavor exactly is expected.

What you could do: Create a dummy exam, say with a numeric and a multiple-choice question, within D2L and then export it in their QTI 2.1 flavor. Possibly they use the sections and items somewhat differently. If so, it might be possible to tweak the qti21.xml template shipped within R/exams, e.g., to qti21-d2l.xml. And then you could use exams2qti21(..., template = "qti21-d2l.xml", ...).

Doing so is typically not very difficult - but often takes some time and trial-and-error. Because you need to go back and forth between tweaking the code and trying to import it etc. If you're willing to try, though, keep us posted. And we might be able to help with some of the details.

RE: Correctly using exams2qti12 [ Reply ]
By: Jamie MacDonald on 2018-02-20 01:03
[forum:45673]
I tried using exams2qti21 and the .zip was successfully created. However, when importing into D2L, I get the following error message this time:

"We didn't find any questions or sections in demo.zip"

Here is what I typed into R studio prior to attempting to import into D2L.

> library("exams")
> exams2qti21(c("deriv","deriv2"),n=2,name="demo")
adding: demo_674012283.xml (deflated 73%)
adding: demo_674012283_section_1_item_1_num.xml (deflated 85%)
adding: demo_674012283_section_1_item_2_num.xml (deflated 85%)
adding: demo_674012283_section_2_item_1_schoice.xml (deflated 85%)
adding: demo_674012283_section_2_item_2_schoice.xml (deflated 85%)
adding: imsmanifest.xml (deflated 74%)

Is there something else I should try?

RE: Correctly using exams2qti12 [ Reply ]
By: Achim Zeileis on 2018-02-20 00:01
[forum:45672]
The imsmanifest.xml is part of the QTI 2.1 specification (as opposed to the older/simpler QTI 1.2 format). Try using exams2qti21() instead of exams2qti12().

RE: Correctly using exams2qti12 [ Reply ]
By: Jamie MacDonald on 2018-02-19 23:49
[forum:45671]
Thanks for the helpful information Achim. I installed Rtools and the .zip was successfully generated. However, when I tried importing into D2L, I got the following error message:

"The following file is missing from your course package: imsmanifest.xml"

Any suggestions?

Thanks again!
Jamie

RE: Correctly using exams2qti12 [ Reply ]
By: Achim Zeileis on 2018-02-18 16:15
[forum:45669]
Jamie, thanks for your interest. The error message indicates that the "zip" command is not available but is needed. (This should probably be caught in an explicit error message by R/exams here.) Please also install the so-called Rtools for your R version: https://CRAN.R-project.org/bin/windows/Rtools/

This should resolve the problem. Possibly, depending on your system's configuration you might have to adapt the search path (but possibly the installer can do this automatically). Hence, if necessary, you can follow the advice from: https://stackoverflow.com/questions/29129681/create-zip-file-error-running-command-had-status-127

When you have been able to successfully generate the .zip in QTI 1.2 format, I would be interested whether it can be imported into D2L. So far I haven't heard from anyone using R/exams with D2L. Of course, this may mean that nobody tried - or tried and everything worked ok - or did not work properly but wasn't reported to us. Hence, I'm curious.

As a heads-up: The QTI 1.2 format is quite flexible and not all learning management systems employ it in the same way. The format QTI 1.2 produces by default works ok with OLAT and Canvas - but some tweaks were necessary for Ilias and Sakai.

Good luck!

Correctly using exams2qti12 [ Reply ]
By: Jamie MacDonald on 2018-02-17 18:49
[forum:45666]
I really like the idea of potentially using r exams with our LMS.

I am a high school math teacher and our school board uses the learning management system Brightspace D2L ("Desire to Learn"). It appears that the question bank in D2L will accept file type IMS QTI.

Can you give a quick example of the R commands required to convert say 5 versions of 2 questions (using say your built in questions "deriv" and "deriv2") to the file type mentioned above? I wasn't able to find a clear example of how to do this. A similar example was given to convert to moodle in a recent post. My attempts have resulted in errors such as the following:

> library("exams")
> library("tth")
> exams2qti12(c("deriv","deriv2"),n=5,name="demo")

Warning messages:
1: running command '"zip" -r9X "demo.zip" "qti.xml" ' had status 127
2: In file.copy(file.path(test_dir, zipname), dir, recursive = TRUE) :
problem copying C:\Users\jamie\AppData\Local\Temp\Rtmp8YgbDr\file275873f227\demo\demo.zip to .\demo.zip: No such file or directory

Thanks!
Jamie

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