MDL-59076 format_weeks: if 'enddate' does not exist in backup then use 0
This commit is contained in:
@@ -162,8 +162,11 @@ class restore_format_weeks_plugin extends restore_format_plugin {
|
||||
|
||||
$data = $this->connectionpoint->get_data();
|
||||
|
||||
// Backup may not include the end date, so set it to 0.
|
||||
$enddate = isset($data['tags']['enddate']) ? $data['tags']['enddate'] : 0;
|
||||
|
||||
// Set the automatic end date setting and the course end date (if applicable).
|
||||
$this->update_automatic_end_date($data['tags']['enddate']);
|
||||
$this->update_automatic_end_date($enddate);
|
||||
|
||||
if (isset($data['tags']['numsections'])) {
|
||||
// Update course sections visibility.
|
||||
|
||||
Reference in New Issue
Block a user