How can I create a moodle question via the {exams}
package that scores multiple choice questions with at least zero points?
I already tried:
exams2moodle(..., mchoice = list(eval = list(negative = FALSE)))
If I understand your question correctly then the default setting in exams_eval()
and hence also in exams2moodle()
does what you look for:
partial = TRUE
, i.e., there are partial credits for each correct list item that is checked.rule = "false2"
, i.e., there are negative partial credicts for each incorrect list item that is checked.negative = FALSE
, i.e., the sum of points within the exercise cannot become negative.As an illustration I generated exams2moodle("switzerland", points = 5)
which generates an exercise where the first two list items are correct (yielding 5/2 positive points each) and the other three list items are incorrect (yielding 5/3 negative points each).
With 1 correct and 1 incorrect item you get 0.83 points = 5/2 - 5/3.
The point some of 1 correct and 2 incorrect items would be -0.83 points = 5/2 - 2 * 5/3; but it is constrained to be zero:
And a last variation to show how this works: 2 correct and 2 incorrect yielding 1.67 points = 2 * 5/2 - 2 * 5/3.