For each quiz in the course, for every student who attempted it, count how many attempts they made at each question.
SELECT q.name AS quiz, MIN(qa.slot) AS slot,
| /* Compute a JSXGraph boundingbox [xmin, ymax, xmax, ymin] | |
| that contains: | |
| - all includePoints exactly | |
| - a radius `radius` neighborhood around each point in circleCenters | |
| Options: | |
| - pad: extra margin on all sides | |
| - minWidth, minHeight: enforce minimum visible span | |
| */ | |
| function makeBoundingBox({ |
| The issue is that not all types of questions were asked in every lecture. | |
| In those cases, we need to add rows that say there were 0 questions of that type. | |
| The `complete` function provides a way to add in the "missing" rows. | |
| ```{r} | |
| all_qs_all_lecs %>% | |
| summarise( | |
| num_questions = n(), | |
| .by = c(course, session, code_name) | |
| ) %>% |
| SELECT | |
| qa.*, | |
| qas_last.*, | |
| qas_last.timecreated AS stepdate, | |
| u.email, | |
| u.firstname, | |
| u.lastname | |
| FROM {course_modules} cm | |
| JOIN {quiz_attempts} quiza ON quiza.quiz = cm.instance | |
| JOIN {question_usages} qu ON qu.id = quiza.uniqueid |
| /* | |
| customise the CSS applied within the iframe | |
| */ | |
| document.addEventListener("DOMContentLoaded", (event) => { | |
| let style = document.createElement('style'); | |
| style.type = 'text/css'; | |
| style.innerHTML = ` | |
| .jxgbox { | |
| border-style: none; | |
| background: none; |
| $activity-icon-colors: ( | |
| "administration": #004F71, | |
| "assessment": #830065, | |
| "collaboration": #154734, | |
| "communication": #C25E03, | |
| "content": #0099AB, | |
| "interface": #61BF1A | |
| ); |
| # | |
| # Anonymise data by replacing UUN with a hashed unique ID | |
| # | |
| # Note - in order to prevent "rainbow table" hacking of the hashing, a salt string is added in the anonymise function | |
| # This string must not be published. | |
| # | |
| library(tidyverse) | |
| library(digest) # see https://jangorecki.github.io/blog/2014-11-07/Data-Anonymization-in-R.html |
| <style> | |
| /* overall look */ | |
| body { | |
| font-family: Arial; | |
| } | |
| .page-context-header { | |
| padding: 0; | |
| } | |
| /* styling of course overview pages */ | |
| .topics a { |