Skip to content

Commit

Permalink
Merge branch 'MDL-37390-34' of git://github.com/sarjona/moodle into M…
Browse files Browse the repository at this point in the history
…OODLE_34_STABLE
  • Loading branch information
stronk7 committed Jan 15, 2018
2 parents 43b5384 + 9b55ca1 commit b36c124
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions course/lib.php
Expand Up @@ -3017,6 +3017,10 @@ public function approve() {
$data->lang = $courseconfig->lang;
$data->enablecompletion = $courseconfig->enablecompletion;
$data->numsections = $courseconfig->numsections;
$data->startdate = usergetmidnight(time());
if ($courseconfig->courseenddateenabled) {
$data->enddate = usergetmidnight(time()) + $courseconfig->courseduration;
}

$course = create_course($data);
$context = context_course::instance($course->id, MUST_EXIST);
Expand Down

0 comments on commit b36c124

Please sign in to comment.