This file contains hidden or 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
/* Not logged in */ | |
.usermenu .login { | |
color: red; | |
} | |
.usermenu .login a { | |
color: green; | |
} | |
.usermenu .login a:focus, | |
.usermenu .login a:hover { | |
color: yellow; |
This file contains hidden or 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
body, | |
html { | |
height: 100%; | |
padding-top: 0; /* Revert default padding for navbar */ | |
} | |
.wrapper { | |
min-height: 100%; | |
margin-bottom: -150px; /* Negative footer minimum height */ | |
} | |
.wrapper::after { |
This file contains hidden or 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 | |
/** | |
* Gets the sort direction for a given field | |
* | |
* @param string $field | |
* @return string ASC or DESC | |
*/ | |
public function get_field_sort_direction($field) { | |
$dir = $this->sortdirection || self::DEFAULTSORTDIRECTION; |
This file contains hidden or 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
.anchor-offset-setup(@offset) { | |
h2[id]::before, | |
h3[id]::before, | |
h4[id]::before, | |
h5[id]::before, | |
h6[id]::before { | |
display: block; | |
content: ""; | |
padding-top: (@offset + 10); | |
margin-top: -(@offset + 10); |
This file contains hidden or 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 | |
// Preparing the query. | |
$qb = new mod_glossary_entry_query_builder($glossary); | |
if (!empty($options['includenotapproved']) && has_capability('mod/glossary:approve', $context)) { | |
$qb->filter_by_non_approved(mod_glossary_entry_query_builder::NON_APPROVED_ALL); | |
} else { | |
$qb->filter_by_non_approved(mod_glossary_entry_query_builder::NON_APPROVED_SELF); | |
} |
This file contains hidden or 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
import logging | |
import mdk | |
from mdk.tools import parseBranch | |
from mdk.moodle import Moodle | |
from mdk.fetch import FetchTracker | |
logging.basicConfig(format='%(message)s', level=logging.DEBUG) | |
M = Moodle('/home/fred/www/repositories/sm/moodle', 'sm') | |
# mdl = parseBranch(M.currentBranch())['issue'] |
This file contains hidden or 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
Show hidden characters
{ | |
"cmd": ["php", "$file"], | |
"file_regex": "php$", | |
"selector": "source.php", | |
"file_regex": "^PHP .+ in (.+) on line ([0-9]+)$", | |
} |
This file contains hidden or 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 | |
// 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 |
This file contains hidden or 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
{{! | |
@template core/pix_test | |
Example context (json): | |
{ | |
"icon": "t/edit", | |
"component": "core" | |
} | |
}} | |
<ul> |
This file contains hidden or 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
# Add this to .git/hooks/prepare-commit-msg | |
# Then chmod +x .git/hooks/prepare-commit-msg | |
# | |
# /!\ Note, it is assumed that you have the alias `git cb` | |
# which returns the current branch. | |
if [ -z "$2" ]; then | |
branch=`git cb` | |
mdl=`expr match "$branch" 'MDL-\([0-9]\+\)-.*'` | |
if [ -n "$mdl" ]; then |