Show
Ignore:
Timestamp:
05/28/08 13:53:03 (6 months ago)
Author:
aarkerio
Message:

Tests improved

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/views/questions/questions.ctp

    r419 r575  
    22//die(debug($data)); 
    33 
     4echo $html->div(null, '<!--just break -->',array('style'=>'clear:both;')); 
     5 
    46$i = 0; 
    57 
    6 foreach ($data as $val)  
    7 {       
     8foreach ($data as $val):       
    89    $answers = count($val['Answer']); 
    910    $i++; 
    10     echo '<div style="padding:5px;border:1px dotted gray;margin:auto;width:60%"><b>' . $i . '.-</b> '; 
     11    echo '<div style="padding:5px;border:1px dotted gray;margin:3px auto;width:70%"><b>' . $i . '.-</b> '; 
    1112    echo $html->div('butonright', $gags->sendEdit($val['Question']['id'],   'Question')); 
    1213    echo $html->div('butonright',  
    1314                    $form->create('Question', array('action'=>'delete', 'onsubmit'=>'return confirm("are you sure?")')). 
    14             $form->hidden('Question.id', array('value'=>$val['Question']['id'])).$form->hidden('Question.test_id', array('value'=>$val['Question']['test_id'])).$form->end('Delete'));  
     15            $form->hidden('Question.id', array('value'=>$val['Question']['id'])). 
     16                    $form->hidden('Question.test_id', array('value'=>$val['Question']['test_id'])). 
     17                    $form->end('Delete'));  
    1518 
    16        echo "Question: "    . $val['Question']['question']       . "<br />"; 
    17        echo "Hint: "        . $val['Question']['hint']           . "<br />"; 
    18        echo "Explanation: " . $val['Question']['explanation']    . "<br />"; 
    19        echo "Worth: "       . $val['Question']['worth']          . "<br /><br />"; 
     19       echo "<b>Question</b>: "    . $val['Question']['question']       . "<br />"; 
     20       echo "<b>Hint</b>: "        . $val['Question']['hint']           . "<br />"; 
     21       echo "<b>Explanation</b>: " . $val['Question']['explanation']    . "<br />"; 
     22       echo "<b>Worth</b>: "       . $val['Question']['worth']          . "<br /><br />"; 
    2023       echo $html->link('View answers ('.$answers.')', '/admin/questions/answers/'.$val['Question']['id']); 
    2124    echo '</div>'; 
    22 } 
     25endforeach; 
    2326?>