2 /************************************************************************/
\r
4 /************************************************************************/
\r
5 /* Copyright (c) 2010 */
\r
6 /* Inclusive Design Institute */
\r
8 /* This program is free software. You can redistribute it and/or */
\r
9 /* modify it under the terms of the GNU General Public License */
\r
10 /* as published by the Free Software Foundation. */
\r
11 /************************************************************************/
\r
12 global $strlen, $substr;
\r
16 <form action="<?php echo $_SERVER['PHP_SELF']; ?>?tid=<?php echo $this->tid.SEP; ?>_course_id=<?php echo $this->course_id;?>" method="post" name="form">
\r
17 <input type="hidden" name="tid" value="<?php echo $this->tid; ?>" />
\r
18 <input type="hidden" name="_course_id" value="<?php echo $this->course_id; ?>" />
\r
19 <table class="data static" summary="" rules="rows">
\r
22 <th scope="col"><?php echo _AT('num'); ?></th>
\r
23 <th scope="col"><?php echo _AT('points'); ?></th>
\r
24 <th scope="col"><?php echo _AT('order'); ?></th>
\r
25 <th scope="col"><?php echo _AT('question'); ?></th>
\r
26 <th scope="col"><?php echo _AT('type'); ?></th>
\r
27 <th scope="col"><?php echo _AT('category'); ?></th>
\r
28 <th scope="col"> </th>
\r
32 if (is_array($this->rows)) {
\r
33 foreach ($this->rows as $row) {
\r
36 if (isset($_POST['submit'])) {
\r
37 $row['weight'] = $_POST['weight'][$row['question_id']];
\r
38 $row['required'] = (isset($_POST['required'][$row['question_id']]) ? 1 : 0);
\r
42 <td class="row1" align="center"><strong><?php echo $count; ?></strong></td>
\r
43 <td class="row1" align="center">
\r
45 <?php if ($row['type'] == 4) {?>
\r
46 <?php echo _AT('na'); ?>
\r
47 <input type="hidden" value="0" name="weight[<?php echo $row['question_id']; ?>]" />
\r
49 <input type="text" value="<?php echo $row['weight']; ?>" name="weight[<?php echo $row['question_id']; ?>]" size="2" />
\r
53 <td class="row1" align="center"><input type="text" name="ordering[<?php echo $row['question_id']; ?>]" value="<?php echo $row['ordering']; ?>" size="2" /></td>
\r
56 <?php if ($strlen($row['question']) > 45) {
\r
57 echo htmlspecialchars(AT_print($substr($row['question'], 0, 43), 'tests_questions.question'), ENT_COMPAT, "UTF-8") . '...';
\r
59 echo AT_print(htmlspecialchars($row['question'], ENT_COMPAT, "UTF-8"), 'tests_questions.question');
\r
63 <td nowrap="nowrap">
\r
64 <?php $o = TestQuestions::getQuestion($row['type']); echo $o->printName();
\r
65 $link = 'tests/edit_question_'.$o->getPrefix().'.php?tid='.$this->tid.SEP.'qid='.$row['question_id'].SEP.'_course_id='.$this->course_id;?>
\r
68 <td align="center"><?php echo $this->cats[$row['category_id']]; ?></td>
\r
70 <td nowrap="nowrap">
\r
71 <a href="<?php echo $link; ?>"><?php echo _AT('edit'); ?></a> |
\r
72 <a href="tests/question_remove.php?tid=<?php echo $this->tid . SEP; ?>qid=<?php echo $row['question_id'].SEP; ?>_course_id=<?php echo $this->course_id; ?>"><?php echo _AT('remove'); ?></a>
\r
80 <td colspan="6" align="left" nowrap="nowrap"><input type="submit" value="<?php echo _AT('update'); ?>" name="submit" /></td>
\r
84 <tr><td colspan="6" ><?php echo _AT('none_found'); ?></td></tr>
\r