moved code up one level to eliminate the docs subdirectory
[acontent.git] / themes / default / tests / question_db_top.tmpl.php
1 <?php\r
2 /************************************************************************/\r
3 /* AContent                                                             */\r
4 /************************************************************************/\r
5 /* Copyright (c) 2010                                                   */\r
6 /* Inclusive Design Institute                                           */\r
7 /*                                                                      */\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 \r
13 require_once(TR_INCLUDE_PATH.'../tests/classes/TestsUtility.class.php');\r
14 \r
15 ?>\r
16 <div class="input-form">\r
17 <table class="qdb_table">\r
18 <tr>\r
19 <td>\r
20         <fieldset class="group_form1" ><legend class="group_form1"><?php echo _AT('create_new_question'); ?></legend>\r
21                 <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">\r
22                         <input type="hidden" name="tid" value="<?php echo $this->tid; ?>" />\r
23                         <input type="hidden" name="_course_id" value="<?php echo $this->course_id; ?>" />\r
24                         <label for="question"><?php echo _AT('create_new_question'); ?></label><br />\r
25                         <select name="question_type" class="dropdown" id="question" size="8">\r
26                         <?php foreach ($this->questions as $type => $name): ?>\r
27                                 <option value="<?php echo $type; ?>"><?php echo $name; ?></option>\r
28                         <?php endforeach; ?>\r
29                         </select><br /><br />\r
30                         <div class="row buttons">\r
31                         <input type="submit" name="submit_create" value="<?php echo _AT('create'); ?>" />\r
32                         </div>\r
33                 </form>\r
34         </fieldset>\r
35 </td>\r
36 <td>\r
37         <fieldset class="group_form1" ><legend class="group_form1"><?php echo _AT('import_question'); ?></legend>\r
38                 <form method="post" action="<?php echo 'tests/question_import.php?_course_id='.$this->course_id; ?>" enctype="multipart/form-data" >    <label for="to_file"><?php echo _AT('upload_question'); ?></label><br />\r
39                         <input type="file" name="file" id="to_file" /><br /><br />\r
40                         <div class="row buttons">\r
41                         <input type="submit" name="submit_import" value="<?php echo _AT('import'); ?>" />\r
42                         </div>\r
43                 </form>\r
44         </fieldset>\r
45 </td>\r
46 <td>\r
47         <fieldset class="group_form1"><legend class="group_form1"><?php echo _AT('category'); ?></legend>\r
48         <form method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">\r
49                 <input type="hidden" name="_course_id" value="<?php echo $this->course_id; ?>" />\r
50                 <div class="row">\r
51                         <label for="cats"><?php echo _AT('category'); ?></label><br />\r
52                         <select name="category_id" id="cats">\r
53                                 <option value="-1"><?php echo _AT('cats_all'); ?></option>\r
54                                 <?php TestsUtility::printQuestionCatsInDropDown($_GET['category_id']); ?>\r
55                         </select>\r
56                 </div>\r
57                 <div class="row buttons">\r
58                         <input type="submit" name="filter" value="<?php echo _AT('filter'); ?>" />\r
59                         <input type="submit" name="reset_filter" value="<?php echo _AT('reset_filter'); ?>" />\r
60                 </div>\r
61         </form>\r
62 \r
63         </fieldset>\r
64 \r
65 </td></tr></table>\r
66 </div>