Skip to content

Instantly share code, notes, and snippets.

@sela
Created April 4, 2016 10:12
Show Gist options
  • Save sela/2dd5600b83e4a0ef0b93409602b0c3b1 to your computer and use it in GitHub Desktop.
Save sela/2dd5600b83e4a0ef0b93409602b0c3b1 to your computer and use it in GitHub Desktop.
<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({
theme : "advanced",
mode : "textareas",
plugins : "media",
theme_advanced_buttons1_add : "media"
});
<?php
{
?>
</script>
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment