diff --git a/CourseCopy.class.php b/CourseCopy.class.php index 4501425dd134a17edeafebfaa74c8a3735b94a02..aab4a417ccff1473747265d1f0fa98750289044b 100755 --- a/CourseCopy.class.php +++ b/CourseCopy.class.php @@ -4,18 +4,21 @@ class CourseCopy extends StudIPPlugin implements AdminCourseAction { public function getAdminActionURL() { - return PluginEngine::getURL($this, array(), "copy/info"); + return PluginEngine::getURL($this, [], "copy/info"); } - public function useMultimode() { - if (version_compare($GLOBALS['SOFTWARE_VERSION'], "3.4.99", ">=")) { - //Damit es im Dialog geöffnet wird - return \Studip\Button::createAccept(_("Kopieren"), "edit", array('data-dialog' => 1)); - } else { - return _("Kopieren"); - } + + public function useMultimode() + { + //Damit es im Dialog geöffnet wird + return \Studip\Button::createAccept( + dgettext('CourseCopy', 'Kopieren'), + 'edit', + ['data-dialog' => 1] + ); } + public function getAdminCourseActionTemplate($course_id, $values = null, $semester = null) { $factory = new Flexi_TemplateFactory(__DIR__."/views"); $template = $factory->open("action/checkbox.php"); @@ -23,4 +26,4 @@ class CourseCopy extends StudIPPlugin implements AdminCourseAction $template->set_attribute("plugin", $this); return $template; } -} \ No newline at end of file +} diff --git a/controllers/copy.php b/controllers/copy.php index a3ece22c9b3b855d631d5ef7f596b73cd2e8abb8..474a8d7dd4074d2e9332fcc70f9b3ced2591c353 100755 --- a/controllers/copy.php +++ b/controllers/copy.php @@ -114,4 +114,4 @@ class CopyController extends PluginController } $this->redirect(URLHelper::getURL("dispatch.php/admin/courses/index")); } -} \ No newline at end of file +} diff --git a/views/copy/info.php b/views/copy/info.php index af20d7ee647921811a0e7ddf1a3730b737bbee1e..1e31ee0e835cf6ac39405637edfe32a266834431 100755 --- a/views/copy/info.php +++ b/views/copy/info.php @@ -28,8 +28,12 @@ <input type="checkbox" name="cycles" value="1" checked> <?= _("Regelmäßige Termine mit kopieren") ?> </label> + <label> + <input type="checkbox" name="lock_copied_courses" value="1"> + <?= _('Kopierte Veranstaltungen sperren') ?> + </label> </fieldset> <div data-dialog-button> <?= \Studip\Button::create(_("Kopieren"), "copy", array('onclick' => "return window.confirm('"._("Wirklich kopieren?")."');")) ?> </div> -</form> \ No newline at end of file +</form>