Skip to content

Commit

Permalink
Import: Fix restore for acl with only series setting
Browse files Browse the repository at this point in the history
  • Loading branch information
justusdieckmann committed May 21, 2024
1 parent 32fbc56 commit e7cb7c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backup/moodle2/backup_opencast_block_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ protected function define_my_steps() {
$ocinstances = settings_api::get_ocinstances();
$courseid = $this->get_courseid();
foreach ($ocinstances as $ocinstance) {
$importmode = get_config('block_opencast', 'importmode_' . $ocinstance->id);
$includesettingname = 'opencast_videos_' . $ocinstance->id . '_included';
// Checking the main level inclusion.
if (!$this->setting_exists($includesettingname)) {
Expand Down Expand Up @@ -201,11 +202,10 @@ protected function define_my_steps() {
foreach ($result->videos as $video) {
// Checking the episode inclusion.
$episodesettingname = 'opencast_videos_' . $ocinstance->id . '_episode_' . $video->identifier . '_included';
if (!$this->setting_exists($episodesettingname) || empty($this->get_setting_value($episodesettingname))) {
continue;
if ($importmode === 'acl' || $this->setting_exists($episodesettingname) && $this->get_setting_value($episodesettingname)) {
// We store the episode of series in backupstructuredata.
$backupstructuredata[$series->series][] = $video->identifier;
}
// We store the episode of series in backupstructuredata.
$backupstructuredata[$series->series][] = $video->identifier;
}
}

Expand Down

0 comments on commit e7cb7c5

Please sign in to comment.