Ejemplo n.º 1
0
 function mustClose()
 {
     if ($this->isAutoclose() && $this->isActive()) {
         $dateClose = self::getDebutEnquete($this->getIdEnquete());
         if ($this->getDxDefAttributeVal('maxDays')) {
             $dateClose->addDays($this->getDxDefAttributeVal('maxDays'));
         } else {
             if ($this->getDxDefAttributeVal('obligDays')) {
                 $dateClose->addDays($this->getDxDefAttributeVal('obligDays'));
             }
         }
         if ($this->getDxDefAttributeVal('dateEnd')) {
             $dateClose = new clDate($this->getDxDefAttributeVal('dateEnd'));
         }
         if ($dateClose->earlierThan(clDate::getInstance())) {
             return true;
         }
     }
     return false;
 }