make.paper | R Documentation |
Requires a tibble of exam items, such as the one returned by question.bank()
and can take one or more .Rmd files with code chunks with code required to generate item data/tables/figures etc.
make.paper( items, code_file = NULL, output_format = "word", out_file_name, yaml_header, title_page, ref_file = NULL, pre_preocessor = NULL, randomise_qs = TRUE, randomise_response_opts = TRUE, sample = FALSE )
code_file |
|
output_format |
|
out_file_name |
|
yaml_header, |
@param title_page |
ref_file |
|
pre_preocessor |
Pre-processor function to include |
randomise_qs |
|
randomise_response_opts |
|
sample |
|
items. |
Data frame of items for a given exam paper. It is recommended to first generate a question bank with |
Function requires a .css and .js files for correct formatting of lab sheets/handouts. These files sit on the stats website in the [root]/sheet_files folder and the path is hard-coded into the function. Look for css and js objects in function body.
Function returns a message if successful and, if sample=FALSE
, produces two versions of paper; one with correct answers (..._WITH_KEY in file name) and one without. A scoring key CSV file gets also generated. If sample=TRUE
,, only the sample paper gets generated.
paper_items <- teachR::question.bank("exam_items.Rmd", authors = "MV") make.paper(paper_items, "exam_code.Rmd", out_file_name = "AnD_MCQ_paper_19_20", yaml_header = boilerplate$yaml, title_page = boiler_plate$title_page, ref_file = file.path(path.package("teachR"), "mcq_format_ref.docx"), pre_processor = teachR:::sus_pre_processor)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.