Changeset 575 for trunk/app/views/questions
- Timestamp:
- 05/28/08 13:53:03 (6 months ago)
- Files:
-
- 1 modified
-
trunk/app/views/questions/questions.ctp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/views/questions/questions.ctp
r419 r575 2 2 //die(debug($data)); 3 3 4 echo $html->div(null, '<!--just break -->',array('style'=>'clear:both;')); 5 4 6 $i = 0; 5 7 6 foreach ($data as $val) 7 { 8 foreach ($data as $val): 8 9 $answers = count($val['Answer']); 9 10 $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> '; 11 12 echo $html->div('butonright', $gags->sendEdit($val['Question']['id'], 'Question')); 12 13 echo $html->div('butonright', 13 14 $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')); 15 18 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 />"; 20 23 echo $html->link('View answers ('.$answers.')', '/admin/questions/answers/'.$val['Question']['id']); 21 24 echo '</div>'; 22 } 25 endforeach; 23 26 ?>
