Changeset 427

Show
Ignore:
Timestamp:
04/24/08 14:57:03 (9 months ago)
Author:
aarkerio
Message:

Tests and answers

Location:
trunk/app
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/app_controller.php

    r425 r427  
    1212class AppController extends Controller { 
    1313  
    14  public $components = array('Auth', 'Cookie', 'Session', 'Security'); // set Security component later 
     14 public $components = array('Auth', 'Cookie', 'Session'); // set Security component later 
    1515  
    1616 public $helpers    = array('Html', 'Form', 'Session'); 
  • trunk/app/views/tests/view.ctp

    r426 r427  
    2525 
    2626  foreach ($data['Question'] as $val): 
    27        //exit(var_dump($val)); 
     27    //exit(debug($val)); 
    2828       echo '<div>'; 
    2929        
    3030          $options = array(); // to build options radio buttons 
    31         
     31                  
     32          echo $form->label('Result.'.$v[''], $val['worth'] .' points, '.$val['question']).'<br>'; 
     33 
    3234          foreach ($val['Answer'] as $v): 
    3335                   $options[$v['id']] = $v['answer']; 
    3436          endforeach; 
     37  
     38          echo $form->radio('Result.'.$v['id'], $options, array('separator'=>'&nbsp;', 'legend'=>false)) . '<br /><br />'; 
    3539           
    36           echo $form->label('Result.'.$v['id'], $val['worth'] .' points, '.$val['question']);  
    37           echo $form->radio('Result.'.$v['id'], $options); 
    38  
    3940          echo $html->para(null, $val['hint']); 
    4041       echo '</div>';