Skip to content

Instantly share code, notes, and snippets.

View georgekinnear's full-sized avatar

George Kinnear georgekinnear

View GitHub Profile
@georgekinnear
georgekinnear / moodle-sql.md
Created March 12, 2024 08:40
SQL queries for use with Moodle's ad-hoc database plugin

Summarising student activity

Number of times each student attempted each quiz question

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,

@georgekinnear
georgekinnear / raw-initial-scss
Created August 8, 2023 11:22
2023-boost-mods
$activity-icon-colors: (
"administration": #004F71,
"assessment": #830065,
"collaboration": #154734,
"communication": #C25E03,
"content": #0099AB,
"interface": #61BF1A
);
@georgekinnear
georgekinnear / anon.R
Last active May 12, 2022 11:08
Simple R script to anonymise data, by reading in multiple CSV files and replacing ID fields with a hashed version
#
# 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 {