Skip to content

Instantly share code, notes, and snippets.

View ericmerrill's full-sized avatar

Eric Merrill ericmerrill

View GitHub Profile
@ericmerrill
ericmerrill / nodb_allversionshash.php
Created February 10, 2022 04:37
Calculate Moodle code allversionshash without installing
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@ericmerrill
ericmerrill / backup_courses.php
Created April 16, 2021 15:37
A file for creating bulk backups of Moodle courses
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@ericmerrill
ericmerrill / cal_id_backup_restore.php
Last active March 29, 2021 19:20
A file to backup calendar data out of a old Moodle copy and into a new one to fix issues raised in MDL-71156
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@ericmerrill
ericmerrill / upcoming_standard_week.php
Created March 10, 2021 17:11
Upcoming week standardized timesplit class (MDL-69413)
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@ericmerrill
ericmerrill / Mac Dev Setup.md
Last active August 23, 2023 22:24
Basic setup guide for Moodle on Mac

Apple Silicon Macs

If you have a Apple Silicon Macs, anywhere that says /usr/local should be replaced with /opt/homebrew.

Security Warning

This is not meant for a production environment, a system holding sensitive information, or anything else of the sort. This is meant for development environments only, and makes some security tradeoffs for simple development.

Intro

@ericmerrill
ericmerrill / backup_courses.php
Created October 1, 2019 18:39
Moodle Backup and Delete Scripts
<?php
define('CLI_SCRIPT', true);
require(dirname(__FILE__).'/config.php');
require_once($CFG->libdir.'/clilib.php'); // cli only functions
// now get cli options
list($options, $unrecognized) = cli_get_params(array('help' => false,

Some status based on sampling of traffic. Support is based on the talk in MDL-55750 about 'current plus two previous releases'.

Taken from one load balance node, spanning August 2016.

Percent traffic Hit count Browser Supported
25.40% 1694500 Chrome 52.x Y
11.69% 779925 Firefox 47.0 Y
10.90% 727071 Chrome 51.x Y
9.85% 657352 Safari 9.0 Y
<div style="max-width:1280px;position:relative;">
<!-- a transparent image is preferable -->
<img style="opacity:0;display:block;width:100%;height:auto;" src="http://placehold.it/16x9">
<iframe style="position:absolute;top:0;left:0;width:100%; height:100%;" src="https://www.youtube.com/embed/I1qL_XX15oI?rel=0" frameborder="0" allowfullscreen=""></iframe>
</div>
merrill ~$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 5f0040f3ee4093bf03dc47cd307e8227d82b87ca
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit ivybridge
OS X: 10.9.2-x86_64
Xcode: 5.1.1
CLT: 5.1.0.0.1.1396320587
@ericmerrill
ericmerrill / gist:f1b58bd8f993605ce9d2
Created June 3, 2014 17:42
Install Moodle Development Kit (MDK) on Mavericks (Mac OS X 10.9)
sudo easy_install requests
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future sudo easy_install watchdog
brew tap danpoltawski/homebrew-mdk
brew install moodle-sdk