Andrew Stewart
Andrew Stewart

Reputation: 45

R/exams in blackboard only producing single question exams

I have been able to get multi-question exams (via R/exams) to work in blackboard without issue, but now all of a sudden any exam I import into blackboard is a single-question exam.

Such as from the example here.

library("exams")
exm <- cbind(c("capitals.Rmd", "swisscapital.Rmd", "switzerland.Rmd"))
exm
##      [,1]              
## [1,] "capitals.Rmd"    
## [2,] "swisscapital.Rmd"
## [3,] "switzerland.Rmd" 
exams2blackboard(exm)

I have tried setting n and nsamp ini exams2blackboard, but every single time exams in blackboard end up with only one question.

Upvotes: 1

Views: 128

Answers (1)

Achim Zeileis
Achim Zeileis

Reputation: 17183

This behavior is expected because you have specified exm as a 1-column matrix (with 3 rows containing different exercises). This will create 1 question pool containing 3 exercises. More generally, specifying an n x k matrix will create k question pools containing n exercises each.

Alternatively, you can specify a vector or a list of k exercises instead of matrix and then set exams2blackboard(exm, n = n) which will also create k question pools with n exercises each.

The reason for the different format is that they are convenient for different things:

  • Vector: Each question pool contains n random replications of the same exercise.
  • List: Each question pool contains a sample of n exercises drawn from each list element. Thus, you have a mixture of (random replications from) potentially different exercises in each pool.
  • Matrix: You have fine control over which (random replications from) exercises exactly will enter each question pool.

Upvotes: 1

Related Questions