This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Survey</title> | |
<style> | |
div{margin-block-start: 1rem;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// you would probably use this within your theme or block - anywhere inside a course context. | |
// a moodle function for returning the url adjacent to the current page in a course | |
// tested in Moodle 3 and higher. | |
// sourced from within https://moodle.org/plugins/block_navbuttons then refactored a bit to my needs | |
// lets say you are on http://mymoodle.com/mod/page/view.php?id=302 | |
// and you want to know what the activity immediately after this one is. You'd ask |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>argh!</title> | |
<script type="text/javascript"> | |
message = "The quick brown 🦊 jumps over the lazy 🐶 "; | |
function step() { | |
message = message.substr(1) + message.substr(0,1); | |
document.title = message.substr(0,15); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>sort dom nodes</title> | |
</head> | |
<body> | |
<p>Some typical markup. Input + Label, then a break. Super responsive, super accessible. We want to present them in random order but can't change the source because it is being injected by a black-box process as a template. Vanilla javascript can help us.</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function blobToDataURL(blob) { | |
return new Promise((fulfill, reject) => { | |
let reader = new FileReader(); | |
reader.onerror = reject; | |
reader.onload = (e) => fulfill(reader.result); | |
reader.readAsDataURL(blob); | |
}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{>theme_mytheme/inc_start}} | |
<div id="page" class="container-fluid"> | |
{{{ output.full_header }}} | |
<div id="page-content" class="row"> | |
<div id="region-main-box" class="col-12"> | |
{{#hasregionmainsettingsmenu}} | |
<div id="region-main-settings-menu" class="d-print-none"> | |
<div> {{{ output.region_main_settings_menu }}} </div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// there's more to this file than this: | |
public function get_content() | |
{ | |
global $CFG, $DB, $USER; | |
if (!is_siteadmin()) { | |
return null; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Send xAPI statement</title> | |
<script type="text/javascript" src="xAPIWrapper-master/lib/cryptojs_v3.1.2.js"></script> | |
<script type="text/javascript" src="xAPIWrapper-master/lib/utf8-text-encoding.js"></script> | |
<script type="text/javascript" src="xAPIWrapper-master/src/activitytypes.js"></script> | |
<script type="text/javascript" src="xAPIWrapper-master/src/verbs.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
You have markdown files in nested folders which comtain | |
--01.getting-started | |
| | | |
| +--02.finalisation | |
| | | | |
| | docs.md | |
| | picture.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// e.g. $("#my-child-div").fillRemainingHeight(); | |
(function( $ ){ | |
$.fn.fillRemainingHeight = function( ) { | |
return this.each(function () { | |
var $this = $(this), | |
_h = $this.parent().height(), | |
_used = 0; | |
$this.siblings().each(function(){ _used+= $(this).outerHeight(); }); | |
$this.css("height", _h - _used); | |
}); |
NewerOlder