Ejemplo n.º 1
0
 public function voteAction()
 {
     parent::isParticipanActive();
     $_voteId = $this->getRequest()->getParam("vid");
     $_answerId = $this->getRequest()->getParam("aid");
     $_t = new ParticipantAnswerTable();
     $_t->vote($_voteId, $_answerId, $this->_participant->id);
     $this->_redirect(APPLICATION_BASEURL_INDEX . "/participant/subscriptions");
 }
Ejemplo n.º 2
0
 /**
  * 
  *
  * @return null if participant is not voted yet or Answer object
  */
 public function isVotedBy($participantId)
 {
     $_t = new ParticipantAnswerTable();
     return $_t->findParticipantAnswerForVote($participantId, $this->id);
 }