| 8 | | echo $html->div('title_section', 'Answers to ' . $data['Question']['question']); |
| | 8 | echo $html->para(null, __('Answers to', true) .': <b>'. $data['Question']['question'].'</b>'); |
| | 9 | |
| | 10 | echo $html->div(null, $html->image('static/loading.gif', array('alt'=>'Loading')), array('id'=>'loading','style'=>'display: none;')); |
| | 11 | |
| | 12 | echo $html->para(null, $html->link($html->image('actions/new.png',array('alt'=>__('Add new', true),'title'=>__('Add new', true))), '#', array("onclick"=>"hU()"), false, false)); |
| | 13 | |
| 24 | | echo $html->div('required',$form->input('Answer.answer', array("size" => 55, "maxlength" => 120))); |
| 25 | | echo $html->div('required',$form->label('Answer.correct','Answer is correct:').$form->checkbox('Answer.correct', array("value" => 1))); |
| 26 | | echo $ajax->submit('Save', array("url" => "/admin/answers/add", |
| | 24 | echo $html->div('required',$form->input('Answer.answer', array('size'=>55, 'maxlength'=>120, 'label'=>__('Answer',true)))); |
| | 25 | echo $html->div('required',$form->label('Answer.correct', __('Answer is correct', true)).$form->checkbox('Answer.correct', array('value' => 1))); |
| | 26 | echo $ajax->submit(__('Save', true), array("url" => "/admin/answers/add", |
| 37 | | foreach ($data['Answer'] as $val) |
| 38 | | { |
| 39 | | $st = ($val['correct']==1) ? 'Yes' : 'No'; |
| 40 | | $tmp = $html->div(null, $html->link('Delete', '/admin/answers/delete/'.$val['id'].'/'.$val['question_id'])); |
| 41 | | $tmp .= $html->div(null, $html->link('Edit', '/admin/answers/edit/' .$val['id'])); |
| 42 | | $tmp .= "Answer: " . $val["answer"] . "<br />"; |
| 43 | | $tmp .= "Correct: " . $html->link($st, '/admin/answers/change/'.$val['id'].'/'.$val['correct'] .'/'.$val['question_id']) . "<br />"; |
| | 37 | foreach ($data['Answer'] as $val): |
| | 38 | |
| | 39 | $st = ($val['correct']==1) ? __('Yes', true) : 'No'; |
| | 40 | $tmp = __('Answer', true) .': ' . $val['answer'] . '<br />'; |
| | 41 | $tmp .= __('Correct', true).': ' . $html->link($st, '/admin/answers/change/'.$val['id'].'/'.$val['correct'] .'/'.$val['question_id']) . "<br /><br />"; |
| | 42 | $tmp .= $html->div(null, $html->link(__('Delete', true), '/admin/answers/delete/'.$val['id'].'/'.$val['question_id'])); |
| | 43 | $tmp .= $html->div(null, $html->link(__('Edit', true), '/admin/answers/edit/' .$val['id'])); |