Skip to content
Snippets Groups Projects
Commit 3f13e0c2 authored by André Noack's avatar André Noack
Browse files

check dozent permission when used with DedicatedAdmin

parent c386fc4b
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ class CopyController extends PluginController
{
public function info_action()
{
if (Request::getArray("c")) {
PageLayout::setTitle(_("Wie soll kopiert werden?"));
$this->dozentensearch = new SQLSearch(
"SELECT DISTINCT auth_user_md5.user_id, CONCAT(auth_user_md5.Vorname, \" \", auth_user_md5.Nachname), auth_user_md5.perms, auth_user_md5.username " .
......@@ -19,8 +20,13 @@ class CopyController extends PluginController
$this->semester = UserConfig::get($GLOBALS['user']->id)->COURSECOPY_SETTINGS_SEMESTER_ID
? Semester::find(UserConfig::get($GLOBALS['user']->id)->COURSECOPY_SETTINGS_SEMESTER_ID)
: $this->semesters[0];
if (Seminar_Perm::get()->have_perm('admin')) {
$this->have_coursegroups = true;
}
} else {
throw new Trails_Exception(400);
}
}
public function semester_start_und_ende_action($semester_id)
{
......@@ -30,7 +36,7 @@ class CopyController extends PluginController
public function process_action()
{
if (Request::isPost()) {
if (Request::isPost() && count(Request::getArray("c"))) {
$params = [
"semester_id", "dozent_id", "lock_copied_courses",
"invisible_copied_courses", "cycles", "resource_assignments",
......
pluginname=CourseCopy
pluginclassname=CourseCopy
version=1.6
version=1.7
origin=data-quest
studipMinVersion=4.0
studipMaxVersion=4.99.99
<? if (Seminar_Perm::get()->have_studip_perm('dozent', $course_id)) : ?>
<input type="checkbox" name="c[]" value="<?= htmlReady($course_id) ?>">
<? endif ?>
\ No newline at end of file
......@@ -20,7 +20,7 @@
<? endforeach ?>
</select>
</label>
<? if (Seminar_Perm::get()->have_perm('admin')) : ?>
<label>
<?= _("Lehrende ersetzen durch ...") ?>
<?
......@@ -35,6 +35,7 @@
?>
<label>
<? endif ?>
<input type="checkbox" name="copy_tutors" value="1"<?= UserConfig::get($GLOBALS['user']->id)->COURSECOPY_SETTINGS_COPY_TUTORS ? " checked" : "" ?>>
<?= _('Tutor/-innen mit übernehmen') ?>
</label>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment