-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
86 lines (78 loc) · 3.54 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en" ng-app="onlinetest">
<head>
<meta charset="UTF-8">
<title>Online Test Taking System</title>
<script src="js/angular.min.js"></script>
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/getTempFile.js"></script>
<script src="js/app.js"></script>
</head>
<body>
<h2>Your Online Test</h2>
<div ng-controller="QuestionController as question" ng-switch="question.module.type">
<div id="exam-ref">
{{question.examRefNo}}<br/>
{{question.studentName}}<br/>
{{question.examSubject}}<br/>
{{question.examTimeTotal | date:'HH:mm:ss':'UTC'}}<br/>
{{question.examTimeRemain | date:'HH:mm:ss':'UTC'}}<br/>
{{question.clock | date:'HH:mm:ss':'UTC'}}<br/>
</div>
<div id="question-set">
<div id="question">
<label for ="question-number">
<span id="question-number">Q {{question.module.no}}.</span>
</label>
<label for="question-text">
<span id="question-text">{{question.module.question}}</span>
</label>
</div>
<div id="radio" ng-switch-when="single">
<label ng-repeat="option in question.module.option">
<input type="radio" name="radio" ng-checked="question.module.answer.indexOf(option) > -1" ng-click="question.radioAnswer(option)" value="{{option}}">{{option}}<br/>
</label>
</div>
<div id="checkbox" ng-switch-when="multiple">
<label ng-repeat="option in question.module.option" >
<input type="checkbox" name="checkbox" ng-checked="question.module.answer.indexOf(option) > -1" ng-click="question.boxAnswer(option)" value="{{option}}">{{option}}<br/>
</label>
</div>
<div id="text" ng-switch-when="blank">
<label ng-repeat="option in question.module.option">
<input type="text" ng-model="question.module.answer[$index]"><br/>
</label>
</div>
</div>
<span>{{question.module.answer}}</span><br/>
<span>{{question.id}}</span>
<span>{{question.maxId}}</span>
<span ng-show="question.module.review">Review</span><br/>
<span ng-show="question.module.skip">Skip</span><br/>
<div id="button-set">
<label for="btn-prev">
<input type="button" id="btn-prev" ng-disabled="question.id==0" ng-click="question.setPrevId()" value="Previous"/>
</label>
<label for="btn-review">
<input type="button" id="btn-review" ng-hide="question.module.review" ng-click="question.setReview()" value="Review"/>
</label>
<label for="btn-unreview">
<input type="button" id="btn-unreview" ng-show="question.module.review" ng-click="question.unsetReview()" value="Un-Review"/>
</label>
<label for="btn-reset">
<input type="button" id="btn-reset" ng-click="question.reset()" value="Reset"/>
</label>
<label for="btn-next">
<input type="button" id="btn-next" ng-disabled="question.id==question.maxId" ng-click="question.setNextId()" value="Next"/>
</label>
</div>
<div id="question-table">
<table border="1">
<tr ng-repeat="i in question.questionListRow track by $index" ng-init="idx = $index">
<td ng-repeat="j in question.questionListCol track by $index" ng-init="idy = $index" ><a href="" ng-click="question.setQuestionId((idx*5)+idy)">{{question.questions[(idx*5)+idy].no}}</a></td>
</tr>
</table>
</div>
</div>
</body>
</html>