MDL-51128 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.
This commit is contained in:
Jun Pataleta
2015-10-12 21:48:27 -05:00
parent 74fad2ce3d
commit cef93f97ae
@@ -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;