question.bank: Create a question bank from .Rmd exam item files.

View source: R/question_bank.R

question.bankR Documentation

Create a question bank from .Rmd exam item files.

Description

Produces a data frame that can be used as first argument to make.paper().

Usage

question.bank(question_files, authors)

Arguments

question_files

character. Paths to Rmd files with items. Best to have one file per author if there are multiple authors of exam items. See mcq_example.Rmd.Rmd in package folder for the correct markdown.

authors

character. Requires one author per Rmd file.

Value

Function returns a data.frame with following columns:

  • q_num Original item number in the Rmd file

  • week Week of course/module the item pertains to

  • diff Difficulty (Simple, Easy, Medium, Hard)

  • author Author of the item

  • stem Stem/lead-in

  • opts Response options

  • correct Correct answer

  • group If item is a part of a group tht share a group stem, ID number identifying all items from the same group

  • group_stem Stem shared by a group of items.

Week, and difficulty are extracted from the question tag, e.g. 02S for week 2, simple. See mcq_example.Rmd in package folder for the correct markdown.

Examples

question.bank("exam/and_qu_MV.Rmd", "MV")

mivalek/teachR documentation built on Aug. 26, 2022, 6 a.m.