Skip to content

Commit

Permalink
MDL-37390 course: Set startdate properly for approved course
Browse files Browse the repository at this point in the history
Once a course is approved the startdate is not set properly
This patch sets current midnight date as startdate and leave
enddate to 0
  • Loading branch information
Farhan Karmali authored and sarjona committed Jan 12, 2018
1 parent 7c9b7fe commit c16fd22
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions course/lib.php
Expand Up @@ -3015,6 +3015,7 @@ public function approve() {
$data->lang = $courseconfig->lang;
$data->enablecompletion = $courseconfig->enablecompletion;
$data->numsections = $courseconfig->numsections;
$data->startdate = usergetmidnight(time());

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

0 comments on commit c16fd22

Please sign in to comment.