public function skillTestViewAction() { $this->_helper->layout->disableLayout(); $client = PR_Session::getSession(PR_Session::SESSION_USER); $CandidateID = $client["CandidateProfileID"]; $PR_Api = new PR_Api_Core_CandidateClass(); $request = $this->getRequest(); $params = $this->getRequest()->getParams(); $TestID = $params['testID']; $testName = $params['testName']; if (isset($params['SaveTestAnswer'])) { if ($params['SaveTestAnswer']) { $TestQuestionAnswerID = $params['TestQuestionAnswerID']; $PR_Api->saveAnswerTest($CandidateID, $TestQuestionAnswerID); } } $page = $params['page']; $size = 1; if (!empty($page)) { $page = $page; } else { $page = 1; } $offset = $page * $size - $size; $questionAnswerList = ""; $countRows = ""; $paginator = ""; $rsRow = ""; if ($TestID != "") { $questionAnswerList = $PR_Api->getQuestionsAnswer($TestID, $CandidateID, 0, 0); $rsRow = $PR_Api->getQuestionsAnswer($TestID, $CandidateID, $size, $offset); $countRows = count($questionAnswerList); // $paginator = new Zend_Paginator(new Zend_Paginator_Adapter_Array($rsRow)); // $paginator = Zend_Paginator::factory($rsRow); // $paginator->setItemCountPerPage(1) // ->setPageRange(1) // ->setCurrentPageNumber($page); } /*echo "<pre>"; print_r($questionAnswerList); echo "</pre>"; die(); */ $this->view->questionAnswerList = $questionAnswerList; // $this->view->paginator = $paginator; $this->view->paginator = $rsRow; $this->view->numberTestQuests = $countRows; $this->view->page = $page; $this->view->TestID = $TestID; $this->view->testName = $testName; }