-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuestionTypeList.php
More file actions
121 lines (118 loc) · 3.87 KB
/
QuestionTypeList.php
File metadata and controls
121 lines (118 loc) · 3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?php
include_once 'Header.php';
$sql = "SELECT *
FROM mdl_qpg_question_type_master cqtm";
$questionTypes = GetAll($sql);
?>
<script type="text/javascript">
chapterListInit();
</script>
<div class="qpgContent">
<div class="qpgChapterList">
<table style="border:1px solid #cccccc;width:500px;" cellspacing="0" align="center">
<tr style="background: #0099FF;">
<td>
S.No
</td>
<td>
Question Type
</td>
<td>
Description
</td>
<td>
Default Mark
</td>
<td>
Status
</td>
</tr>
<?php
foreach($questionTypes as $key => $questionType)
{
?>
<tr class="qpgChapterRow" id="<?php echo $questionType['id'] ?>">
<td>
<?php echo ($key + 1); ?>
</td>
<td>
<?php echo $questionType['name']; ?>
</td>
<td>
<?php echo $questionType['description']; ?>
</td>
<td>
<?php echo $questionType['default_mark']; ?>
</td>
<td>
<?php if($questionType['visible']){ echo "Visible"; } else { echo "Hidden";}; ?>
</td>
</tr>
<?php
}
?>
</table>
<div style="text-align: center;">
<input type="button" value="Add Question Type" onclick="addChapter()" />
<input type="button" value="Back" onclick="location.href='QuestionPaperList.php';" />
</div>
</div>
<div class="qpgChapterContents">
<div id="qpgChapterContainer">
<br />
<table style="width:400px;border-collapse: collapse;" align="center" border="1" cellspacing="0" cellpadding="10">
<tr>
<td>
ID
</td>
<td>
<span id="idContainer">
</span>
</td>
</tr>
<tr>
<td>
Name
</td>
<td>
<input type="text" id="nameContainer" value="" />
</td>
</tr>
<tr>
<td>
Description
</td>
<td>
<input type="text" id="descriptionContainer" value="" />
</td>
</tr>
<tr>
<td>
Default Mark
</td>
<td>
<input type="text" id="markContainer" value="" />
</td>
</tr>
<tr>
<td>
Visibility
</td>
<td>
<select id="visibContainer">
<option value="1">Visible</option>
<option value="0">Hidden</option>
</select>
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" value="Add" id="addChapter" onclick="updateChapterDetails('1')" />
<input type="button" value="Update" id="updateChapter" onclick="updateChapterDetails('2')" />
<input type="button" value="Cancel" onclick="cancelClicked()" />
</td>
</tr>
</table>
</div>
</div>
</div>