Beispiel #1
0
 /**
  * Check if user will see any content (vote/result)
  * 
  * @param int $a_user_id
  * @return boolean 
  */
 public function hasAnyContent($a_user_id, $a_ref_id)
 {
     if (!sizeof($this->answers)) {
         return false;
     }
     include_once "Modules/Poll/classes/class.ilObjPollAccess.php";
     $this->active = ilObjPollAccess::_isActivated($a_ref_id);
     if (!$this->active) {
         return false;
     }
     if (!$this->mayVote($a_user_id) && !$this->maySeeResults($a_user_id)) {
         return false;
     }
     return true;
 }
 /**
  * Get item properties
  *
  * @return	array		array of property arrays:
  *						"alert" (boolean) => display as an alert property (usually in red)
  *						"property" (string) => property name
  *						"value" (string) => property value
  */
 function getProperties()
 {
     global $lng;
     // BEGIN WebDAV: Get parent properties
     // BEGIN ChangeEvent: Get parent properties
     $props = parent::getProperties();
     // END ChangeEvent: Get parent properties
     // END WebDAV: Get parent properties
     // offline
     include_once 'Modules/Poll/classes/class.ilObjPollAccess.php';
     if (!ilObjPollAccess::_lookupOnline($this->obj_id)) {
         $props[] = array("alert" => true, "property" => $lng->txt("status"), "value" => $lng->txt("offline"));
     }
     return $props;
 }