diff --git a/mod/data/css.php b/mod/data/css.php
new file mode 100755
index 00000000000..6e9cf07f940
--- /dev/null
+++ b/mod/data/css.php
@@ -0,0 +1,40 @@
+csstemplate;
+ }
diff --git a/mod/data/templates.php b/mod/data/templates.php
index 56dc23a5967..7c3568f5016 100755
--- a/mod/data/templates.php
+++ b/mod/data/templates.php
@@ -142,7 +142,7 @@
/// Add the HTML editor(s).
echo '
';
- $usehtmleditor = can_use_html_editor();
+ $usehtmleditor = can_use_html_editor() && ($mode != 'csstemplate');
if ($mode == 'listtemplate'){
// Print the list template header.
echo ' | ';
diff --git a/mod/data/view.php b/mod/data/view.php
index d5405f6c983..5d6a9f4f3a7 100755
--- a/mod/data/view.php
+++ b/mod/data/view.php
@@ -139,16 +139,19 @@
}
}
-/// RSS meta
- $rssmeta = '';
+/// RSS and CSS meta
+ $meta = '';
if (isset($CFG->enablerssfeeds) && isset($CFG->data_enablerssfeeds) && $data->rssarticles > 0) {
$rsspath = rss_get_url($course->id, $USER->id, 'data', $data->id);
- $rssmeta = 'shortname.': %fullname%" href="'.$rsspath.'" />';
+ $meta .= 'shortname.': %fullname%" href="'.$rsspath.'" />';
+ }
+ if ($data->csstemplate) {
+ $meta .= ' ';
}
/// Print the page header
- $PAGE->print_header($course->shortname.': %fullname%', '', $rssmeta);
+ $PAGE->print_header($course->shortname.': %fullname%', '', $meta);
echo '