Fixed logic so site templates work as expected (#160)
This commit is contained in:
parent
d06da0993f
commit
d9576aac13
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ class element extends \mod_customcert\element {
|
||||||
// Get the possible date options.
|
// Get the possible date options.
|
||||||
$dateoptions = array();
|
$dateoptions = array();
|
||||||
$dateoptions[CUSTOMCERT_DATE_ISSUE] = get_string('issueddate', 'customcertelement_date');
|
$dateoptions[CUSTOMCERT_DATE_ISSUE] = get_string('issueddate', 'customcertelement_date');
|
||||||
$completionenabled = $CFG->enablecompletion && $COURSE->enablecompletion;
|
$completionenabled = $CFG->enablecompletion && ($COURSE->id == SITEID || $COURSE->enablecompletion);
|
||||||
if ($completionenabled) {
|
if ($completionenabled) {
|
||||||
$dateoptions[CUSTOMCERT_DATE_COMPLETION] = get_string('completiondate', 'customcertelement_date');
|
$dateoptions[CUSTOMCERT_DATE_COMPLETION] = get_string('completiondate', 'customcertelement_date');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue