diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-06-11 20:32:43 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2024-06-11 20:32:43 +0000 |
| commit | cac4551262c87b71cb0d1b0767fd5c35731af9a3 (patch) | |
| tree | b4007deba89a7946ead9b2d37e70f6820e0fdad9 /app/controllers/consultation/admin.php | |
| parent | cca44456cc9132981d05c7ed2f66f023a7c5dc94 (diff) | |
convert consultation creator to vue and fix several problems, fixes #3349
Closes #3349, #1872, #1871, and #3350
Merge request studip/studip!3039
Diffstat (limited to 'app/controllers/consultation/admin.php')
| -rw-r--r-- | app/controllers/consultation/admin.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/app/controllers/consultation/admin.php b/app/controllers/consultation/admin.php index bc63a1a..8ee7575 100644 --- a/app/controllers/consultation/admin.php +++ b/app/controllers/consultation/admin.php @@ -138,6 +138,7 @@ class Consultation_AdminController extends ConsultationController $this->room = ''; $this->responsible = false; + $this->slot_count_threshold = self::SLOT_COUNT_THRESHOLD; // TODO: inst_default? if ($this->range instanceof User) { @@ -155,6 +156,8 @@ class Consultation_AdminController extends ConsultationController $block->range = $this->range; $this->responsible = $block->getPossibleResponsibilites(); } + + $this->response->add_header('X-No-Buttons', ''); } public function store_action() @@ -186,7 +189,7 @@ class Consultation_AdminController extends ConsultationController $end, Request::int('day-of-week'), Request::int('interval'), - Request::int('duration'), + $duration, $pause_time, $pause_duration ); @@ -214,6 +217,7 @@ class Consultation_AdminController extends ConsultationController $block->note = Request::get('note'); $block->size = Request::int('size', 1); $block->lock_time = Request::int('lock_time'); + $block->consecutive = Request::bool('consecutive', false); $slots = $block->createSlots(Request::int('duration'), $pause_time, $pause_duration); if (count($slots) === 0) { @@ -403,6 +407,7 @@ class Consultation_AdminController extends ConsultationController $this->block->mail_to_tutors = Request::bool('mail-to-tutors', false); $this->block->confirmation_text = trim(Request::get('confirmation-text')); $this->block->lock_time = Request::int('lock_time'); + $this->block->consecutive = Request::bool('consecutive', false); foreach ($this->block->slots as $slot) { $slot->note = ''; @@ -535,7 +540,7 @@ class Consultation_AdminController extends ConsultationController public function toggle_action($what, $state, $expired = false) { if ($what === 'messages') { - // TODO: Applicable everywhere? + // TODO: Applicable everywhere? $this->getUserConfig()->store( 'CONSULTATION_SEND_MESSAGES', (bool) $state @@ -808,7 +813,7 @@ class Consultation_AdminController extends ConsultationController _('Terminblöcke anlegen'), $this->createURL(), Icon::create('add') - )->asDialog('size=auto'); + )->asDialog('size=big'); $actions->addLink( _('Namen des Reiters ändern'), $this->tabURL($action === 'expired'), |
