Show
Ignore:
Timestamp:
04/02/08 15:41:18 (8 months ago)
Author:
aarkerio
Message:

Locale and test improvements

Location:
trunk/app/views/questions
Files:
2 modified

Legend:

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

    r361 r363  
    77?> 
    88 
    9 <div id="loading" style="display: none;"> 
    10            <?php echo $html->image("static/loading.gif", array("alt"=>"Loading")); ?> 
    11 </div> 
     9<div id="loading" style="display: none;"> <?php echo $html->image("static/loading.gif", array("alt"=>"Loading")); ?></div> 
    1210 
    13 <p> 
    14  <?php echo $html->link($html->image('actions/new.png', array("alt"=>"Add new answer", "title"=>"Add new answer")), '#', array("onclick"=>"hU()"), false, false); ?> 
    15 </p> 
     11<?php echo $html->para(null, $html->link($html->image('actions/new.png', array("alt"=>"Add new answer", "title"=>"Add new answer")), '#', array("onclick"=>"hU()"), false, false)); ?> 
     12 
    1613 
    1714<div id="addquestion" style="display:none"> 
     
    3835foreach ($data['Answer'] as $val)  
    3936{ 
    40   $st = ($val["correct"]==1) ? 'Yes' : 'No';       
     37  $st = ($val['correct']==1) ? 'Yes' : 'No';       
    4138  $tmp  = $html->div(null, $html->link('Delete', '/admin/answers/delete/'.$val['id'].'/'.$val['question_id'])); 
    4239  $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 />"; 
     40  $tmp .= "Answer:  "     .    $val["answer"]       . "<br />"; 
     41  $tmp .= "Correct: "     . $html->link($st, '/admin/answers/change/'.$val['id'].'/'.$val['correct'] .'/'.$val['question_id']) . "<br />"; 
    4542 
    4643  echo $html->div('adminblock', $tmp); 
  • trunk/app/views/questions/questions.ctp

    r362 r363  
    99    $i++; 
    1010    echo '<div style="padding:5px;border:1px dotted gray;margin:auto;width:60%"><b>' . $i . '.-</b> '; 
    11     echo $html->div('butonright', $gags->sendEdit($val['id'],   'Question')); 
    12     echo $html->div('butonright', $gags->confirmDel($val['id'], 'Question')); 
    13        echo "Question: "    . $val["question"]       . "<br />"; 
    14        echo "Hint: "        . $val["hint"]           . "<br />"; 
    15        echo "Explanation: " . $val["explanation"]    . "<br />"; 
    16        echo "Worth: "       . $val["worth"]          . "<br /><br />"; 
    17        echo $html->link('View answers ('.$answers.')', '/admin/questions/answers/'.$val["id"]); 
     11    echo $html->div('butonright', $gags->sendEdit($val['Question']['id'],   'Question')); 
     12    echo $html->div('butonright', $gags->confirmDel($val['Question']['id'], 'Question')); 
     13       echo "Question: "    . $val['Question']['question']       . "<br />"; 
     14       echo "Hint: "        . $val['Question']['hint']           . "<br />"; 
     15       echo "Explanation: " . $val['Question']['explanation']    . "<br />"; 
     16       echo "Worth: "       . $val['Question']['worth']          . "<br /><br />"; 
     17       echo $html->link('View answers ('.$answers.')', '/admin/questions/answers/'.$val['Question']['id']); 
    1818    echo '</div>'; 
    1919}