Beispiel #1
0
 /**
  * Primary function to edit date-informations
  * @param      $termin_id
  * @param null $metadate_id
  */
 public function editDate_action($termin_id)
 {
     $this->date = CourseDate::find($termin_id) ?: CourseExDate::find($termin_id);
     $this->attributes = array();
     if ($request = RoomRequest::findByDate($this->date->id)) {
         $this->params = array('request_id' => $request->getId());
     } else {
         $this->params = array('new_room_request_type' => 'date_' . $this->date->id);
     }
     $this->params['fromDialog'] = Request::get('fromDialog');
     if (Request::get('fromDialog') == 'true') {
         $this->attributes['data-dialog'] = 'size=big';
     } else {
         $this->attributes['fromDialog'] = 'false';
     }
     $this->resList = ResourcesUserRoomsList::getInstance($GLOBALS['user']->id, true, false, true);
     //UMSTELLEN AUF COURSE
     $this->dozenten = $this->course->getMembers('dozent');
     $this->gruppen = Statusgruppen::findBySeminar_id($this->course->id);
     $this->related_persons = array();
     foreach (User::findDozentenByTermin_id($this->date->id) as $user) {
         $this->related_persons[] = $user->user_id;
     }
     $this->related_groups = array();
     foreach (Statusgruppen::findByTermin_id($this->date->id) as $group) {
         $this->related_groups[] = $group->statusgruppe_id;
     }
 }
Beispiel #2
0
 function getRoomRequest()
 {
     if ($request = RoomRequest::findByDate($this->termin_id)) {
         $this->room_request = $request;
         return $this->room_request;
     }
     return false;
 }