Filters summarise_questions() to questions whose mean percent is below a
threshold and that have enough observed activity.
Usage
detect_difficult_questions(
con,
tutorial_id,
rule = c("last", "best", "first"),
include_unregistered = TRUE,
group_id = NULL,
max_mean_percent = 60,
min_students = 1,
min_attempts = 1
)Arguments
- con
A DBI connection.
- tutorial_id
Tutorial identifier. Required.
- rule
Scoring rule used to select one attempt per student and question.
- include_unregistered
If
TRUE, include attempted questions not registered withregister_questions().- group_id
Optional registered student group identifier. If supplied, only attempts from students in that group are included.
- max_mean_percent
Maximum mean percent used to flag a question. Defaults to
60.- min_students
Minimum number of students with a selected attempt. Defaults to
1.- min_attempts
Minimum number of raw attempts. Defaults to
1.
Examples
db_path <- tempfile(fileext = ".sqlite")
con <- init_tracking_db(db_path, overwrite = TRUE)
track_attempt(con, "student_001", "module_01", "q1", "wrong", score = 0, max_score = 1)
detect_difficult_questions(con, "module_01")
#> # A tibble: 1 × 14
#> tutorial_id question_id question_label question_type max_score
#> <chr> <chr> <chr> <chr> <dbl>
#> 1 module_01 q1 q1 NA 1
#> # ℹ 9 more variables: n_possible_students <int>, n_students <int>,
#> # n_attempts <int>, n_answered <int>, n_full_credit <int>, mean_score <dbl>,
#> # mean_percent <dbl>, full_credit_rate <dbl>, mean_attempts_per_student <dbl>
DBI::dbDisconnect(con)