Skip to content
Snippets Groups Projects
Commit 249b5a68 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

check for source_id before copying data, fixes #4348

Closes #4348

Merge request studip/studip!3151
parent 5161c261
No related branches found
No related tags found
Loading
...@@ -404,7 +404,7 @@ class BasicDataWizardStep implements CourseWizardStep ...@@ -404,7 +404,7 @@ class BasicDataWizardStep implements CourseWizardStep
$values = $values[__CLASS__]; $values = $values[__CLASS__];
$seminar = new Seminar($course); $seminar = new Seminar($course);
if ($copy_basic_data) { if ($source_id && $copy_basic_data) {
$this->copyBasicData( $this->copyBasicData(
$course, $course,
$source_id $source_id
...@@ -472,7 +472,9 @@ class BasicDataWizardStep implements CourseWizardStep ...@@ -472,7 +472,9 @@ class BasicDataWizardStep implements CourseWizardStep
CourseSet::addCourseToSet($course_set_id, $course->id); CourseSet::addCourseToSet($course_set_id, $course->id);
} }
self::copyParticipantsAndGroups($course, $source_id, $copy_participants, $copy_groups, $copy_members); if ($source_id && ($copy_participants || $copy_groups || $copy_members)) {
self::copyParticipantsAndGroups($course, $source_id, $copy_participants, $copy_groups, $copy_members);
}
return $course; return $course;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment