public function __construct($uid)
 {
     require_once ROOT . DS . 'plugin/PHPExcel.php';
     require_once ROOT . DS . 'plugin/PHPExcel/IOFactory.php';
     $this->uid = $uid;
     $this->workbook = new PHPExcel();
     $this->workbook->getDefaultStyle()->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP);
     $this->workbook->removeSheetByIndex(0);
     $reportData = new ReportData();
     $userOperator = new UserBatchOperator();
     $emptySurvey = $userOperator->getEmptyUserData($uid);
     $populatedData = $this->populateEmptydata($emptySurvey);
     $this->summary = array_merge($reportData->getFormSummary($uid), $populatedData);
     unset($this->summary['hirotaka.suzuki']);
     unset($this->summary['setsuo.suzuki']);
     unset($this->summary['adam.jiang']);
 }
 function defaultAction($param = NULL)
 {
     $userOperator = new UserBatchOperator();
     $data = new ReportData();
     $periodIndex = $data->getAvailablePeriod();
     $accessRight = $userOperator->getUserAccessRight($this->user->username);
     $userList = $accessRight["accessable_user"];
     $this->header = 'surveyHeader.php';
     $this->extraCSS = 'report/report.css';
     $this->content = 'report.php';
     $this->extraCSS = array("report/report.css", "jquery-ui.css");
     $this->extraJS = array("jquery-2.1.3.js", "jquery-ui.js", "report.js");
     $param['periodIndex'] = $periodIndex;
     if (!empty($param['uid'])) {
         $param['data'] = $data->getFormSummary($param['uid'], $userList);
     }
     foreach ($userOperator->getEmptyUserData($param['uid']) as $emptyUserData) {
         if (in_array($emptyUserData["username"], $userList)) {
             $param['empty_survey'][] = $emptyUserData;
         }
     }
     $this->view($param);
 }