diff --git a/course/modedit.php b/course/modedit.php
index 36dd265..c067043 100644
--- a/course/modedit.php
+++ b/course/modedit.php
@@ -369,6 +369,7 @@ if ($mform->is_cancelled()) {
         // first add course_module record because we need the context
         $newcm = new stdClass();
         $newcm->course           = $course->id;
+        $newcm->delay            = '';
         $newcm->module           = $fromform->module;
         $newcm->instance         = 0; // not known yet, will be updated later (this is similar to restore code)
         $newcm->visible          = $fromform->visible;
