2

I would like to generate a bunch of exams with schoice questions using the exams2moodle() function. Each question will have 4 alternative answers with one and only one TRUE answer. That's pretty normal but I would like to change the deafult behaviour for the marks. The usual behaviour is that you get 100% if you select the right answer and -33% if you select one of the 3 bad answers, but I would like to change this to 100% but -25%. It's that possible? Thanks

pjperez
  • 425
  • 4
  • 9

1 Answers1

2

This is not officially supported. Note that the reason for the default negative points of 1/#false is that then random guessing has an expectation of 0. Your suggestion would still have a slightly positive expectation.

For exams2moodle() (but not for all other interfaces) one can use a somewhat hacky workarund:

ee <- exams_eval()
ee$pointvec <- function(correct) {
  if(is.logical(correct)) correct <- paste(as.integer(correct), collapse = "")
  c(pos = 1, neg = -1/nchar(correct))
}

This yields:

ee$pointvec("1000")
##  pos   neg 
## 1.00 -0.25 

And in case of exams2moodle() the $pointvec is the only part of the evaluation strategy that is used. Hence, you can then do:

exams2moodle(..., schoice = list(eval = ee))

leading to the desired behavior.

Achim Zeileis
  • 15,710
  • 1
  • 39
  • 49
  • 1
    Thanks Achim!! It works. Of course, you are the creator of the package!! Thanks again – pjperez May 11 '20 at 06:46
  • 2
    Note: I just updated the `ee$pointvec(correct)` function so that it is a bit more robust and can also be used in `cloze` exercises for `exams2moodle()`. – Achim Zeileis Jun 05 '20 at 00:26
  • 1
    Hi @AchimZeileis, can you explain how this could be used in a cloze exercise with schoice and num items? – JPMD Jun 21 '20 at 10:24
  • See this discussion in the forum on R-Forge: https://R-Forge.R-project.org/forum/forum.php?thread_id=33969&forum_id=4377&group_id=1337 – Achim Zeileis Jun 21 '20 at 12:30