コード例 #1
0
 /**
  * Method that checks if the max allocation of a room is exceeded.
  */
 private function isRoomOverbooked()
 {
     $room = new ilRoomSharingRoom($this->pool_id, $this->room_id);
     $max_alloc = $room->getMaxAlloc();
     $filtered_participants = array_filter($this->participants, array($this, "filterValidParticipants"));
     $overbooked = count($filtered_participants) >= $max_alloc;
     return $overbooked;
 }
 private function getMaxRoomAllocationInfo()
 {
     $room = new ilRoomSharingRoom($this->pool_id, $this->room_id);
     $max_alloc = $this->lng->txt("rep_robj_xrs_at_most") . ": " . ($room->getMaxAlloc() - self::NUM_PERSON_RESPONSIBLE);
     return $max_alloc;
 }
コード例 #3
0
 /**
  * @covers ilRoomSharingRoom::setMaxAlloc
  */
 public function testSetMaxAlloc()
 {
     self::$room->setMaxAlloc(1200);
     $this->assertEquals(1200, self::$room->getMaxAlloc());
 }