Skip to content

Commit 3ff82c6

Browse files
author
Tamara Gunkel
committed
stop acl deletion if mapping couldnt be deleted
1 parent 2ab04c4 commit 3ff82c6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

classes/external.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,15 @@ public static function unlink_series(int $contextid, int $ocinstanceid, string $
297297
}
298298
}
299299

300+
if (!$mapping->delete()) {
301+
throw new moodle_exception('delete_series_failed', 'block_opencast');
302+
}
303+
300304
// Unlinking series from course.
301305
$apibridge = apibridge::get_instance($params['ocinstanceid']);
302306
$seriesunlinked = $apibridge->unlink_series_from_course($course->id, $params['seriesid']);
303307

304-
if (!$seriesunlinked || !$mapping->delete()) {
308+
if (!$seriesunlinked) {
305309
throw new moodle_exception('delete_series_failed', 'block_opencast');
306310
}
307311
}

0 commit comments

Comments
 (0)