Skip to content
Snippets Groups Projects
Commit 03159126 authored by Moritz Strohm's avatar Moritz Strohm
Browse files

added functionality to add a copied course to the course groups of the source course

parent c4ab822d
No related branches found
No related tags found
No related merge requests found
...@@ -45,6 +45,16 @@ class CopyController extends PluginController ...@@ -45,6 +45,16 @@ class CopyController extends PluginController
$newcourse['start_time'] = $semester['beginn']; $newcourse['start_time'] = $semester['beginn'];
$newcourse->store(); $newcourse->store();
//Check if the old course is in at least one course
//group ("LV-Gruppe") of the module managemeny system:
$course_groups = Lvgruppe::findBySeminar($course_id);
if ($course_groups) {
//Add the copied course to all found course groups:
foreach ($course_groups as $course_group) {
$course_group->addSeminar($newcourse->id);
}
}
if ($lock_copied_courses) { if ($lock_copied_courses) {
//Get the ID of the locked admission courseset: //Get the ID of the locked admission courseset:
$locked_admission_id = CourseSet::getGlobalLockedAdmissionSetId(); $locked_admission_id = CourseSet::getGlobalLockedAdmissionSetId();
......
pluginname=CourseCopy pluginname=CourseCopy
pluginclassname=CourseCopy pluginclassname=CourseCopy
version=1.1.2-rrv2 version=1.1.3-rrv2
origin=data-quest origin=data-quest
studipMinVersion=4.0 studipMinVersion=4.0
studipMaxVersion=4.3.99 studipMaxVersion=4.3.99
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment