From 42812529d4e313efaf43891ce805db57c5be41f7 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Sun, 3 Sep 2017 17:30:04 +0800 Subject: [PATCH] #134 Do not load templates in site templates --- edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit.php b/edit.php index 72dd9a5..60cf5b7 100644 --- a/edit.php +++ b/edit.php @@ -232,7 +232,7 @@ if ($data = $mform->get_data()) { echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('editcustomcert', 'customcert')); $mform->display(); -if ($tid) { +if ($tid && $context->contextlevel == CONTEXT_MODULE) { $loadtemplateurl = new moodle_url('/mod/customcert/load_template.php', array('tid' => $tid)); $loadtemplateform = new \mod_customcert\load_template_form($loadtemplateurl, array('context' => $context), 'post', '', array('id' => 'loadtemplateform'));