コード例 #1
0
 /**
  * @deprecated not in use
  * Enter description here ...
  */
 public function fillstudentgridAction()
 {
     $request = $this->getRequest();
     $valid = $request->getParam('nd');
     $test_Info_id = $request->getParam('test_info_id');
     if ($request->isXmlHttpRequest() and $valid) {
         $this->gridparam['page'] = $request->getParam('page', 1);
         // get the requested page
         $this->gridparam['limit'] = $request->getParam('rows', 20);
         // rows limit in Grid
         $this->gridparam['sidx'] = $request->getParam('sidx', 1);
         // get index column - i.e. user click to sort
         $this->gridparam['sord'] = $request->getParam('sord', 'asc');
         // sort direction
         $model = new Acad_Model_Test_Sessional($test_Info_id);
         $marks = $model->fetchStudents();
         $this->_count = count($marks);
         $this->total_pages = 1;
         $this->offset = 0;
         $response = new stdClass();
         $response->page = $this->gridparam['page'];
         $response->total = $this->total_pages;
         $response->records = $this->_count;
         foreach ($marks as $key => $row) {
             $response->rows[$key]['id'] = $row->getTest_info_id();
             $response->rows[$key]['cell'] = array($row->getStudents(), $row->getMarks(), $row->getMax_marks(), $row->getStatus());
         }
         //$this->_helper->json($response);
         $this->_helper->logger($response);
     }
 }