Skip to content

Instantly share code, notes, and snippets.

View mhughes2k's full-sized avatar

Michael Hughes mhughes2k

  • University of Strathclyde, Learning Technology Enhancement Team
  • Glasgow,UK
View GitHub Profile
<html>
<body>
<form>
<script type="text/javascript" src="http://cdn.datacamp.com/dcl-react.js.gz"></script>
The R session below has a data set called <span class="" style="font-family: &quot;Courier New&quot;, Courier, mono;">bp</span> pre-loaded which contains information on the age (<span class="" style="font-family: &quot;Courier New&quot;, Courier, mono;">Age</span>)
and systolic blood pressure (<span class="" style="font-family: &quot;Courier New&quot;, Courier, mono;">BP</span>) of 30 individuals.&nbsp;
<p>Using the tool below fit a linear regression model called <span class="" style="font-family: &quot;Courier New&quot;, Courier, mono;">BP_mod</span>, which takes <span class="" style="font-family: &quot;Courier New&quot;, Courier, mono;">BP</span> as the
response using <span class="" style="font-family: &quot;Courier New&quot;, Courier, mono;">Age</span> as the independent variable, then print the model results.<br>
@mhughes2k
mhughes2k / emailpreview.php
Last active January 24, 2019 19:58
Generating Emails in Moodle...
<?php
//Preview an email
require_once("../../../../config.php");
require_once($CFG->dirroot . '/mod/assign/locallib.php');
$ex =\assignsubmission_strathfm\local\model\extension_request::get_record(['id' => 11]);
$u = core_user::get_user($ex->get('userid'));
@mhughes2k
mhughes2k / run.php
Created March 21, 2018 14:39
Moodle SAR developer script
<?php
/**
* A Script to help work with Moodle's Privacy API.
* @author Michael Hughes <michaelhughes@strath.ac.uk>, University of Strathclyde,
* Creates and SAR for specified user.
* Optionally can
* * unpack the resulting SAR to a specified location
* * add the SAR request to the cron queue (instead of processing it immediately).
*/
define('CLI_SCRIPT', true);