diff --git a/admin/tool/generator/classes/course_backend.php b/admin/tool/generator/classes/course_backend.php
index <HASH>..<HASH> 100644
--- a/admin/tool/generator/classes/course_backend.php
+++ b/admin/tool/generator/classes/course_backend.php
@@ -253,7 +253,8 @@ class tool_generator_course_backend extends tool_generator_backend {
         $courserecord = array(
             'shortname' => $this->shortname,
             'fullname' => $this->fullname,
-            'numsections' => self::$paramsections[$this->size]
+            'numsections' => self::$paramsections[$this->size],
+            'startdate' => usergetmidnight(time())
         );
         if (strlen($this->summary) > 0) {
             $courserecord['summary'] = $this->summary;
MDL-<I> course: Add startdate for generated course

Added course start date for the course generated by the course
generator in order to prevent incorrect date calculations
(i.e. in assignment due dates) when the generated course is reset.