generate_exam: Generate Exam Files

Description Usage Arguments Details Value Author(s) Examples

View source: R/generate_exam.R

Description

Generates pandoc documents for exam and solutions

Usage

1

Arguments

author

character string, the author of the exam

title

character string, the title of the course/exam

date

character string, the date of the exam (by default the system date)

output

character string, indicating in what format the exam and solution should be generated. either 'markdown', 'html', 'pdf', 'odt' or 'docx'. Default:pdf

file

character, the path/filename of the excel-sheet containing the questions to be read

year

character vector indicating from which years questions should be selected, if empty (NULL) questions from all years are selected.

mock

logical, if TRUE, only mock exam questions are selected (FALSE by default)

topic

character vector, indicating which question topics should be selected ('topic' column), defaults to NULL

types

list, indicates how many questions should be selected from each type, default: one each

type_headers

list, indicating the headers to be used for each question type section (see example)

Details

The...

Value

a list of pandoc objects (the function also generates output to disk, see output)

Author(s)

Ulrich Matter <umatter@protonmail.com>

Examples

1
2
myfile <- "inst/exdata/exam_questions.xlsx"
generate_exam(author="Ulrich Matter", title="Econ 101", output="pdf", file = myfile)

umatter/examr documentation built on Oct. 25, 2020, 8:12 a.m.