From a55b253cff0c5bede6ffd8e1d7c811fc0c213700 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Mon, 17 Dec 2018 16:41:21 +0800 Subject: [PATCH] Fixed logic so site templates work as expected (#160) --- element/date/classes/element.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/element/date/classes/element.php b/element/date/classes/element.php index c91662e..dcf6a6f 100644 --- a/element/date/classes/element.php +++ b/element/date/classes/element.php @@ -73,7 +73,7 @@ class element extends \mod_customcert\element { // Get the possible date options. $dateoptions = array(); $dateoptions[CUSTOMCERT_DATE_ISSUE] = get_string('issueddate', 'customcertelement_date'); - $completionenabled = $CFG->enablecompletion && $COURSE->enablecompletion; + $completionenabled = $CFG->enablecompletion && ($COURSE->id == SITEID || $COURSE->enablecompletion); if ($completionenabled) { $dateoptions[CUSTOMCERT_DATE_COMPLETION] = get_string('completiondate', 'customcertelement_date'); }