diff --git a/controllers/copy.php b/controllers/copy.php index 804e6b8efab18e36eec2c49b9c135a0eb9d4ac94..c8fdac29a2aa15c6af2b6d9f009441278cf8b46d 100755 --- a/controllers/copy.php +++ b/controllers/copy.php @@ -97,6 +97,7 @@ class CopyController extends PluginController $newcourse['mkdate'] = time(); $newcourse->setId($newcourse->getNewId()); $newcourse['start_time'] = $semester['beginn']; + $newcourse['duration_time'] = 0; if ($invisible_copied_courses) { $newcourse['visible'] = 0; } @@ -242,10 +243,8 @@ class CopyController extends PluginController $newcycle->setData($cycledate->toArray()); $newcycle->setId($newcycle->getNewId()); $newcycle['seminar_id'] = $newcourse->getId(); - $newcycle['week_offset'] = Request::get("week_offset"); - $newcycle['end_offset'] = Request::get("end_offset") !== 10000 - ? Request::get("end_offset") - : floor(($semester['vorles_ende'] - $semester['vorles_beginn']) / (86400 * 7)); + $newcycle['week_offset'] = Request::int("week_offset"); + $newcycle['end_offset'] = Request::int("end_offset"); $newcycle['mkdate'] = time(); $newcycle['chdate'] = time(); $newcycle->store(); diff --git a/plugin.manifest b/plugin.manifest index ca81a4628888ee70285243c3d68e48e1589a9c12..024778581085fac7ae1cdbf86829faa062d5c42c 100755 --- a/plugin.manifest +++ b/plugin.manifest @@ -1,6 +1,6 @@ pluginname=CourseCopy pluginclassname=CourseCopy -version=1.9.3 +version=1.9.4 origin=data-quest studipMinVersion=4.0 studipMaxVersion=5.3.99 diff --git a/views/copy/semester_start_und_ende.php b/views/copy/semester_start_und_ende.php index fbceb897c7b0dcdf315034b6d3fc9acacdf174ed..1044aaf34139a9bea3e30b361f1a0d62b6f45103 100755 --- a/views/copy/semester_start_und_ende.php +++ b/views/copy/semester_start_und_ende.php @@ -18,9 +18,6 @@ <label> <?= _("Endwoche") ?> <select name="end_offset"> - <option value="10000"<?= UserConfig::get($GLOBALS['user']->id)->COURSECOPY_SETTINGS_END_OFFSET == 10000 ? " checked" : "" ?>> - <?= _("Letzte Semesterwoche") ?> - </option> <? $i = floor(($semester['vorles_ende'] - $semester['vorles_beginn']) / (86400 * 7)) - 1 ?> <? while ($i >= 0) : ?> <option value="<?= $i ?>"<?= UserConfig::get($GLOBALS['user']->id)->COURSECOPY_SETTINGS_END_OFFSET == $i ? " checked" : "" ?>>