Ejemplo n.º 1
0
 /**
  * A method to find out if this meeting is the next meeting
  * @return bool true if it is the next meeting
  */
 public function getIsNext()
 {
     # If the variable IsNext is not set yet, set it
     if (!$this->IsNext) {
         if (MeetingFactory::getNextMeeting()) {
             $this->IsNext = $this->ID == MeetingFactory::getNextMeeting()->getID();
         }
     }
     # Otherwise just return
     return $this->IsNext;
 }
 public function __construct()
 {
     # Get the action points values
     $this->toBeDone = ActionPointFactory::getActionPointsCount(self::TO_BE_DONE);
     $this->runningOverDeadline = ActionPointFactory::getActionPointsCount(self::RUNNING_OVER_DEADLINE);
     $this->finished = ActionPointFactory::getActionPointsCount(self::FINISHED);
     $this->finishedAfterDeadline = ActionPointFactory::getActionPointsCount(self::FINISHED_AFTER_DEADLINE);
     $this->avgGrade = ActionPointFactory::getActionPointsCount(self::AVG_GRADE);
     # Get the meetings values
     $this->takenPlace = MeetingFactory::getMeetingsCount(self::TAKEN_PLACE);
     $this->studentArrivedOnTime = MeetingFactory::getMeetingsCount(self::STUDENT_ARRIVED_ON_TIME);
     $this->cancelled = MeetingFactory::getMeetingsCount(self::CANCELLED);
     $this->noShow = MeetingFactory::getMeetingsCount(self::NO_SHOW);
     $this->mTotal = MeetingFactory::getMeetingsCount(self::M_TOTAL);
     ### Code for testing the algorithm ###
     # First test
     # Action points
     /*$this->toBeDone = 4;
       $this->runningOverDeadline = 2;
       $this->finished = 4;
       $this->finishedAfterDeadline = 2;
       $this->avgGrade = 11;
       # Meetings
       $this->takenPlace = 4;
       $this->studentArrivedOnTime = 2;
       $this->cancelled = 2;
       $this->mTotal = 4;
       $this->noShow = 2;*/
     # Second test
     # Action points
     /*$this->toBeDone = 0;
       $this->runningOverDeadline = 0;
       $this->finished = 0;
       $this->finishedAfterDeadline = 0;
       $this->avgGrade = 0;
       # Meetings
       $this->takenPlace = 0;
       $this->studentArrivedOnTime = 0;
       $this->cancelled = 0;
       $this->mTotal = 0;
       $this->noShow = 0;*/
     # Third test
     # Action points
     /*$this->toBeDone = 4;
       $this->runningOverDeadline = 0;
       $this->finished = 4;
       $this->finishedAfterDeadline = 0;
       $this->avgGrade = 22;
       # Meetings
       $this->takenPlace = 4;
       $this->studentArrivedOnTime = 4;
       $this->cancelled = 0;
       $this->mTotal = 4;
       $this->noShow = 0;*/
     # Forth test
     # Action points
     /*$this->toBeDone = 2;
       $this->runningOverDeadline = 2;
       $this->finished = 2;
       $this->finishedAfterDeadline = 2;
       $this->avgGrade = 1;
       # Meetings
       $this->takenPlace = 2;
       $this->studentArrivedOnTime = 0;
       $this->cancelled = 2;
       $this->mTotal = 2;
       $this->noShow = 2;*/
     ### End of the code for testing ###
 }