/** * Landing page for mulitpersonsearch, adds the selected users to the * user list. * @param $userlistId string ID of the userlist to edit */ public function add_members_action($userlistId) { $mp = MultiPersonSearch::load("add_userlist_member_" . $userlistId); $users = $mp->getDefaultSelectedUsersIDs(); $oldsize = count($users); foreach ($mp->getAddedUsers() as $u) { $users[] = $u; } $newsize = count($users); $this->flash['users'] = $users; PageLayout::postInfo(sprintf(ngettext('Eine Person wurde der Liste hinzugefügt.', '%u Personen wurden der Liste hinzugefügt, die Liste ist aber noch nicht gespeichert.', $newsize - $oldsize), $newsize - $oldsize)); $this->redirect($this->url_for('admission/userlist/configure', $userlistId)); }
/** * Edits a cycle * * @param String $cycle_id Id of the cycle to be edited */ public function editCycle_action($cycle_id) { $cycle = SeminarCycleDate::find($cycle_id); // Prepare Request for saving Request $cycle->start_time = date('H:i:00', strtotime(Request::get('start_time'))); $cycle->end_time = date('H:i:00', strtotime(Request::get('end_time'))); $cycle->weekday = Request::int('day'); $cycle->description = Request::get('description'); $cycle->sws = Request::get('teacher_sws'); $cycle->cycle = Request::get('cycle'); $cycle->week_offset = Request::get('startWeek'); $cycle->end_offset = Request::int('endWeek') ?: null; if ($cycle->isDirty()) { $cycle->chdate = time(); $cycle->store(); } else { PageLayout::postInfo(_('Es wurden keine Änderungen vorgenommen')); } $this->redirect('course/timesrooms/index'); }