Skip to contents

[Experimental]

count_answers() counts student's answers from every "Response" columns from from a Moodle Responses report(s). Answers from Moodle's quiz can be one of 3 types: single answered, multiple answered, or embedded answers (Cloze). Each of these answers types formatted differently in the "Response" column. count_answers() knows each type of answers and count the answers by the best counting method it thinks.

Usage

count_answers(
  data,
  count_type = c("auto", "single", "multi", "cloze"),
  sort = TRUE,
  round_digits = 2
)

Arguments

data

A data.frame of Moodle Responses report(s) (not Grades report)

count_type

A character indicate type of counting methods. Must be one of:

  • "auto" (default): This function detects the type of questions automatically and choose the best counting method it thinks for each type.

  • "single": It will simply count each answers by assuming that the question is a single answer type. If the question is multiple answers type, counts of every combinations of the answers will be returned.

  • "multi": If the question is multiple answers type, this will give the count be each answers.

  • "cloze": If the question is embedded answers (Cloze), this will give the count by every "Parts" of the Cloze question pooled together.

sort

(Logical) TRUE: sort the counted results

round_digits

Integer to round the counted percentage or NULL to not round.

Value

A data.frame