Skip to content

Commit 3f6ec65

Browse files
author
Matthias Opitz
committed
checking if $CFG->completiondefault is set before trying to use it in mod_form.php
1 parent 6531196 commit 3f6ec65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mod_form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ protected function standard_hsuforum_coursemodule_elements() {
395395

396396
$trackingdefault = COMPLETION_TRACKING_NONE;
397397
// If system and activity default is on, set it.
398-
if ($CFG->completiondefault && $this->_features->defaultcompletion) {
398+
if (isset($CFG->completiondefault) && $CFG->completiondefault && $this->_features->defaultcompletion) {
399399
$hasrules = plugin_supports('mod', $this->_modname, FEATURE_COMPLETION_HAS_RULES, true);
400400
$tracksviews = plugin_supports('mod', $this->_modname, FEATURE_COMPLETION_TRACKS_VIEWS, true);
401401
if ($hasrules || $tracksviews) {

0 commit comments

Comments
 (0)