Changeset 745 for trunk/app/controllers
- Timestamp:
- 09/01/08 12:14:13 (3 months ago)
- Location:
- trunk/app/controllers
- Files:
-
- 2 modified
-
tests_controller.php (modified) (2 diffs)
-
vclassrooms_controller.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/tests_controller.php
r732 r745 107 107 if ( $res['Answer']['correct'] == 1): // is the answer correct? 108 108 $points += (int) $res['Question']['worth']; //sum good points 109 $this->data['Result']['correct'] = 1;110 else:111 $this->data['Result']['correct'] = 0;112 109 endif; 113 110 $this->data['Result']['question_id'] = $k; … … 185 182 186 183 /** === ADMIN METHODS ==== **/ 187 /** Select classroom to link*/ 184 public function admin_tempo() 185 { // test_id, user_id vclassroom_id 186 $data = $this->Test->getPoints(2, 4, 2); 187 } 188 /** Select classrooms to link*/ 188 189 public function admin_vclassrooms($test_id) 189 190 { -
trunk/app/controllers/vclassrooms_controller.php
r739 r745 321 321 public function admin_record($student_id, $vclassroom_id) 322 322 { 323 $this->layout = 'admin';324 325 $this->pageTitle = __('Student record', true);323 $this->layout = 'admin'; 324 325 $this->pageTitle = __('Student record', true); 326 326 327 $this->set('data', $this->Vclassroom->studentRecord($student_id, $vclassroom_id));327 $this->set('data', $this->Vclassroom->studentRecord($student_id, $vclassroom_id)); 328 328 } 329 329 330 330 public function admin_points($student_id, $vclassroom_id) 331 331 { 332 $this->layout = 'ajax';332 $this->layout = 'ajax'; 333 333 334 $this->set('points', $this->Vclassroom->studentPoints($student_id, $vclassroom_id));334 $this->set('points', $this->Vclassroom->studentPoints($student_id, $vclassroom_id)); 335 335 336 $this->render('points', 'ajax');336 $this->render('points', 'ajax'); 337 337 } 338 338 … … 340 340 { 341 341 if (empty($this->data['Vclassroom'])): 342 $this->layout = 'admin'; 343 342 $this->layout = 'admin'; 344 343 $this->data = $this->Vclassroom->read(null, $vclassroom_id); 345 344 else: 346 345 347 346 $this->Sanitize = new Sanitize; 348 349 347 $this->Sanitize->clean($this->data['Vclassroom']); 350 348
