Changeset 803 for trunk/app/controllers
- Timestamp:
- 10/09/08 22:07:55 (8 weeks ago)
- Files:
-
- 1 modified
-
trunk/app/controllers/ecourses_controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/ecourses_controller.php
r785 r803 26 26 public function admin_listing($page=1) 27 27 { 28 $this->layout = 'admin';28 $this->layout = 'admin'; 29 29 30 $conditions = array("user_id"=>$this->Auth->user('id'));31 $fields = array('id', 'title', 'status', 'description');32 $order = "Ecourse.id DESC";33 $limit = 10;30 $conditions = array('user_id'=>$this->Auth->user('id')); 31 $fields = array('id', 'title', 'status', 'description'); 32 $order = 'Ecourse.title'; 33 $limit = 20; 34 34 35 $this->set('data', $this->Ecourse->findAll($conditions, $fields));35 $this->set('data', $this->Ecourse->findAll($conditions, $fields, $order, $limit)); 36 36 } 37 37 38 38 public function admin_vclassrooms($ecourse_id, $historic = null) 39 39 { 40 $this->layout = 'admin';40 $this->layout = 'admin'; 41 41 42 $lmt = 25; // limit news42 $lmt = 25; // limit news 43 43 44 $conditions = array("Ecourse.user_id"=>$this->Auth->user('id'), "Ecourse.id"=>$ecourse_id);44 $conditions = array("Ecourse.user_id"=>$this->Auth->user('id'), "Ecourse.id"=>$ecourse_id); 45 45 46 if ( $historic === 'historic' ): 47 $this->Ecourse->filed(); //show filed classrooms 48 49 $this->set('historic', true); 50 endif; 46 if ( $historic === 'historic' ): 47 $this->Ecourse->filed(); //show filed classrooms 48 $this->set('historic', true); 49 endif; 51 50 52 $order = "Ecourse.id DESC";51 $order = 'Ecourse.title DESC'; 53 52 54 $this->set('data', $this->Ecourse->find($conditions));53 $this->set('data', $this->Ecourse->find($conditions)); 55 54 } 56 55
