public function editAction()
 {
     $auth = Zend_Auth::getInstance();
     if ($auth->hasIdentity()) {
         $loginUserId = $auth->getStorage()->read()->id;
     }
     try {
         $message = $this->_getParam('msg');
         $flags = $this->_getParam('flags');
         if ($message == 'saved') {
             if ($flags == 'draft') {
                 $this->_helper->getHelper("FlashMessenger")->addMessage(array("success" => 'Employee response drafted successfully'));
                 $this->_redirect('feedforwardemployee/edit');
             }
         }
         $ffEmpRatingsModel = new Default_Model_Feedforwardemployeeratings();
         $ffEmpRatingsData = $ffEmpRatingsModel->getFFDataByEmpID($loginUserId);
         if (sizeof($ffEmpRatingsData) > 0 && $ffEmpRatingsData[0]['employee_id'] == $loginUserId && $ffEmpRatingsData[0]['status'] == 1 && $ffEmpRatingsData[0]['ff_status'] == APP_PENDING_EMP) {
             $ques_csv = '';
             if ($ffEmpRatingsData[0]['qs_privileges']) {
                 $ques_csv .= $ffEmpRatingsData[0]['questions'];
             }
             // get all questions data based on above question ids
             $questions_data = $ffEmpRatingsModel->getFFQuesDataByIDs($ques_csv);
             // Employee response
             $emp_response = array();
             if ($ffEmpRatingsData[0]['employee_response']) {
                 $emp_response = json_decode($ffEmpRatingsData[0]['employee_response'], true);
             }
             $question_previs = array();
             if ($ffEmpRatingsData[0]['qs_privileges']) {
                 $question_previs = json_decode($ffEmpRatingsData[0]['qs_privileges'], true);
             }
             // get rating details using configuration id
             $ratingsData = $ffEmpRatingsModel->getAppRatingsDataByConfgId($ffEmpRatingsData[0]['appraisal_id']);
             $ratingType = $ratingsData[0]['rating_type'];
             $ratingText = array();
             $ratingTextDisplay = array();
             $ratingValues = array();
             foreach ($ratingsData as $rd) {
                 $ratingText[] = $rd['rating_text'];
                 $ratingTextDisplay[$rd['id']] = $rd['rating_text'];
                 $ratingValues[$rd['id']] = $rd['rating_value'];
             }
             $this->view->ffEmpRatingsData = $ffEmpRatingsData;
             $this->view->questions_data = $questions_data;
             $this->view->ratingType = $ratingType;
             $this->view->ratingTextDisplay = $ratingTextDisplay;
             $this->view->ratingText = json_encode($ratingText);
             $this->view->ratingValues = $ratingValues;
             $this->view->emp_response = $emp_response;
             $this->view->question_previs = $question_previs;
             $this->view->check_ratings_exists = $ratingsData;
             $this->view->messages = $this->_helper->flashMessenger->getMessages();
         } else {
             $this->view->rowexist = "norows";
         }
     } catch (Exception $e) {
         $this->view->rowexist = "norows";
     }
 }