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 | |
class palindrome | |
{ | |
private static $caseSensitive = false; | |
static function isPalindrome($word) | |
{ | |
$reversedWord = strrev($word); | |
if (!self::$caseSensitive) { |
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
function fizzBuzzWoof($n) | |
{ | |
for ($i=1; $i<=$n; $i++) { | |
$special = false; | |
if ($i % 3 === 0) { | |
echo "Fizz"; | |
$special = true; | |
} | |
if ($i % 5 === 0) { | |
echo "Buzz"; |
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
protected function render_custom_menu(custom_menu $menu) { | |
global $USER; | |
// If the menu has no children return an empty string | |
if (!$menu->has_children()) { | |
return ''; | |
} | |
if (isloggedin()){ | |
$useremail=$USER->email; | |
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
<head> | |
<script language="javascript" type="text/javascript"> | |
<?php | |
global $DB; | |
$category = $DB->get_record('course_categories',array('id'=>$COURSE->category)); | |
$path = explode('/',$category->path); | |
$root_category_id = $path[1]; | |
$root_category = $DB->get_record('course_categories',array('id'=>$root_category_id)); | |
if (‘Medicine and Dentistry’ === $root_category->name) { ?> | |
tinyMCE.init({ |