Community day
At the eZ Winter Conference 2010, meet up with the community in Geneva, jan. 21st.
Register and read more here.
At the eZ Winter Conference 2010, meet up with the community in Geneva, jan. 21st.
Register and read more here.
Hi,
Has anyone here handled a situation where they built an interface to store and retrieve poll results? Our current setup allows people to create normal objects but when they are called the view template converts it to xml which is then processed using smarty templates and html/css.
For the Poll, if we were to send the poll object in xml, could anyone recommend how we could send back the selection and also keep track of the results?
thanks.
Vote!
ezsurvey is good enough for polls - it might just need a custom fetch to make it easy to retrieve the results: fetchSurveyResultBySessionID
static public function fetchSurveyResultBySessionID( $surveyID )
{
$http = eZHTTPTool::instance();
$sessionID = $http->sessionID();
$surveyResultObject = false;
if($surveyID)
{
$surveyResultObject = eZPersistentObject::fetchObject( eZSurveyResult::definition(),
null,
array( 'user_session_id' => $sessionID,
'survey_id' => (int)$surveyID ) );
}
if ( $surveyResultObject === null || $surveyResultObject === false )
{
$retVal = array( 'error' => array( 'error_type' => 'kernel',
'error_code' => eZError::KERNEL_NOT_FOUND ) );
}
else
{
$retVal = array( 'result' => $surveyResultObject );
}
return $retVal;
}
or you can use ezvotecollector
You must be logged in to post messages in this topic.