diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-06-28 13:37:13 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-06-28 13:37:13 +0000 |
| commit | 249b5a689f6e459a046eb744517665320f0094fb (patch) | |
| tree | de14f6cbd6e54769b1f0870b26c608d3a2410c1e /lib/classes/coursewizardsteps/BasicDataWizardStep.php | |
| parent | 5161c2610f0894ec81625815c638bb213e63bed7 (diff) | |
check for source_id before copying data, fixes #4348
Closes #4348
Merge request studip/studip!3151
Diffstat (limited to 'lib/classes/coursewizardsteps/BasicDataWizardStep.php')
| -rw-r--r-- | lib/classes/coursewizardsteps/BasicDataWizardStep.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/classes/coursewizardsteps/BasicDataWizardStep.php b/lib/classes/coursewizardsteps/BasicDataWizardStep.php index c312972..22b80ed 100644 --- a/lib/classes/coursewizardsteps/BasicDataWizardStep.php +++ b/lib/classes/coursewizardsteps/BasicDataWizardStep.php @@ -404,7 +404,7 @@ class BasicDataWizardStep implements CourseWizardStep $values = $values[__CLASS__]; $seminar = new Seminar($course); - if ($copy_basic_data) { + if ($source_id && $copy_basic_data) { $this->copyBasicData( $course, $source_id @@ -472,7 +472,9 @@ class BasicDataWizardStep implements CourseWizardStep 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; } |
