Changeset 745 for trunk/app/controllers

Show
Ignore:
Timestamp:
09/01/08 12:14:13 (3 months ago)
Author:
aarkerio
Message:

Little Bugs fixed

Location:
trunk/app/controllers
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/tests_controller.php

    r732 r745  
    107107         if ( $res['Answer']['correct'] == 1):    // is the answer correct? 
    108108         $points += (int) $res['Question']['worth'];   //sum good points         
    109          $this->data['Result']['correct'] = 1; 
    110          else: 
    111          $this->data['Result']['correct'] = 0; 
    112109     endif; 
    113110         $this->data['Result']['question_id']  = $k; 
     
    185182   
    186183 /**   === 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*/ 
    188189 public function admin_vclassrooms($test_id) 
    189190 {     
  • trunk/app/controllers/vclassrooms_controller.php

    r739 r745  
    321321 public function admin_record($student_id, $vclassroom_id)  
    322322 { 
    323     $this->layout    = 'admin'; 
    324  
    325     $this->pageTitle = __('Student record', true); 
     323   $this->layout    = 'admin'; 
     324 
     325   $this->pageTitle = __('Student record', true); 
    326326     
    327     $this->set('data', $this->Vclassroom->studentRecord($student_id, $vclassroom_id)); 
     327   $this->set('data', $this->Vclassroom->studentRecord($student_id, $vclassroom_id)); 
    328328 } 
    329329 
    330330 public function admin_points($student_id, $vclassroom_id)  
    331331 { 
    332     $this->layout    = 'ajax'; 
     332   $this->layout    = 'ajax'; 
    333333     
    334     $this->set('points', $this->Vclassroom->studentPoints($student_id, $vclassroom_id)); 
     334   $this->set('points', $this->Vclassroom->studentPoints($student_id, $vclassroom_id)); 
    335335     
    336     $this->render('points', 'ajax'); 
     336   $this->render('points', 'ajax'); 
    337337 } 
    338338 
     
    340340 { 
    341341  if (empty($this->data['Vclassroom'])): 
    342         $this->layout = 'admin'; 
    343          
     342        $this->layout = 'admin';      
    344343        $this->data = $this->Vclassroom->read(null, $vclassroom_id); 
    345344  else: 
    346345     
    347346       $this->Sanitize = new Sanitize; 
    348         
    349347       $this->Sanitize->clean($this->data['Vclassroom']); 
    350348