diff --git a/enrol/ldap/lib.php b/enrol/ldap/lib.php
index <HASH>..<HASH> 100644
--- a/enrol/ldap/lib.php
+++ b/enrol/ldap/lib.php
@@ -962,7 +962,7 @@ class enrol_ldap_plugin extends enrol_plugin {
             $template->groupmodeforce = $courseconfig->groupmodeforce;
             $template->visible        = $courseconfig->visible;
             $template->lang           = $courseconfig->lang;
-            $template->groupmodeforce = $courseconfig->groupmodeforce;
+            $template->enablecompletion = $courseconfig->enablecompletion;
         }
         $course = $template;
MDL-<I> enrol/ldap course default settings when no course template is selected