MDL-61081 enrol: Start and end date for courses created by external db
Course created by external db enrolment plugin should have start date as current date and end date is todays date + default course duration
This commit is contained in:
committed by
Sara Arjona
parent
5dcd9c53e3
commit
17147e5204
@@ -783,6 +783,10 @@ class enrol_database_plugin extends enrol_plugin {
|
||||
$template->visible = $courseconfig->visible;
|
||||
$template->lang = $courseconfig->lang;
|
||||
$template->groupmodeforce = $courseconfig->groupmodeforce;
|
||||
$template->startdate = usergetmidnight(time());
|
||||
if ($courseconfig->courseenddateenabled) {
|
||||
$template->enddate = usergetmidnight(time()) + $courseconfig->courseduration;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($createcourses as $fields) {
|
||||
|
||||
Reference in New Issue
Block a user