예제 #1
0
 public function listAction()
 {
     $lop = new Model_Lophoc();
     $lecturer_id = $this->sessionGlobal->lecturer_id;
     $listHocky = $lop->listschoolyears();
     $this->view->listHocky = $listHocky;
     $listLop = $lop->getLopByLecturerID($lecturer_id);
     $this->view->listlop2 = $listLop;
     if ($this->_request->isPost()) {
         $params = $this->_getParam('searchParam');
         $semester = $params['semester'];
         $schoolyears_id = $params['schoolyears_id'];
         $schoolyears_name = $lop->findschoolyears($schoolyears_id);
         $this->view->semester = $semester;
         $this->view->schoolyears_name = $schoolyears_name;
         $listLop = $lop->getLop($lecturer_id, $semester, $schoolyears_id);
         //var_dump($listLop);
         $this->view->listlop2 = $listLop;
         foreach ($listLop as $a) {
             $idlop = $a->classes_id;
             $sb[$idlop] = $lop->dembuoi($idlop);
         }
         $this->view->sb = $sb;
     }
 }