| 2 | | // die(print_r($data)); |
| 3 | | if ( isset($javascript) ): |
| 4 | | echo $html->charsetTag('UTF-8'); |
| 5 | | echo $javascript->link('prototype'); |
| 6 | | echo $javascript->link('scriptaculous.js?load=effects'); |
| 7 | | endif; |
| 8 | | |
| 9 | | echo $html->addCrumb('Control Tools', '/admin/entries/start'); |
| 10 | | echo $html->addCrumb('Tests', '/admin/tests/listing'); |
| 11 | | echo $html->getCrumbs(' / '); |
| | 2 | echo $html->addCrumb('Control Tools', '/admin/entries/start'); |
| | 3 | echo $html->addCrumb('Tests', '/admin/tests/listing'); |
| | 4 | echo $html->getCrumbs(' / '); |
| | 5 | |
| | 6 | echo $html->div('title_section', 'Answers to ' . $data['Question']['question']); |
| 30 | | <fieldset> |
| 31 | | <legend>New answer</legend> |
| 32 | | |
| 33 | | <div class="required"> |
| 34 | | <?php echo $form->labelTag('Answer/answer', 'Answer:' ); ?> |
| 35 | | <?php echo $html->input('Answer/answer', array("size" => 55, "maxlength" => 120)); ?> |
| 36 | | <?php echo $html->tagErrorMsg('Answer/answer', 'Answer is required.'); ?> |
| 37 | | </div> |
| 38 | | <div class="required"> |
| 39 | | <?php echo $form->labelTag('Answer/correct', 'Answer is correct:' ); ?> |
| 40 | | <?php echo $html->checkbox('Answer/correct', null, array("value" => 1)); ?> |
| 41 | | </div> |
| 42 | | <div> |
| | 23 | <fieldset><legend>New answer</legend> |
| 44 | | echo $ajax->submit('Save', array("url" => "/admin/answers/add", |
| | 25 | echo $html->div('required',$form->input('Answer.answer', array("size" => 55, "maxlength" => 120))); |
| | 26 | echo $html->div('required',$form->label('Answer.correct','Answer is correct:').$form->checkbox('Answer.correct', array("value" => 1))); |
| | 27 | echo $ajax->submit('Save', array("url" => "/admin/answers/add", |
| 60 | | echo '<div style="padding:5px;border:1px dotted gray;margin:4px;">'; |
| 61 | | echo '<div class="butonright">' . $html->link('Delete', '/admin/answers/delete/'.$val['id'].'/'.$val['question_id']) . '</div>'; |
| 62 | | echo '<div class="butonright">' . $html->link('Edit', '/admin/answers/edit/' .$val['id']) . '</div>'; |
| 63 | | echo "Answer: " . $val["answer"] . "<br />"; |
| 64 | | echo "Correct: " . $st . "<br />"; |
| 65 | | echo '</div>'; |
| | 41 | $tmp = $html->div(null, $html->link('Delete', '/admin/answers/delete/'.$val['id'].'/'.$val['question_id'])); |
| | 42 | $tmp .= $html->div(null, $html->link('Edit', '/admin/answers/edit/' .$val['id'])); |
| | 43 | $tmp .= "Answer: " . $val["answer"] . "<br />"; |
| | 44 | $tmp .= "Correct: " . $html->link($st, '/admin/answers/changed/'.$val['id'].'/'.$val['question_id']) . "<br />"; |
| | 45 | |
| | 46 | echo $html->div('adminblock', $tmp); |