-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtester.shtml
More file actions
107 lines (104 loc) · 5.59 KB
/
tester.shtml
File metadata and controls
107 lines (104 loc) · 5.59 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
<!DOCTYPE HTML>
<html manifest="cache.manifest" lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<!--#include virtual="html/common.html" -->
<script src="scripts/javascript/tester.js" type="text/javascript"></script>
<script src="scripts/javascript/tester-ui.js" type="text/javascript"></script>
<script src="scripts/javascript/tester-ui-source-element.js" type="text/javascript"></script>
<script src="scripts/javascript/tester-ui-audio.js" type="text/javascript"></script>
<script src="scripts/javascript/tester-ui-images.js" type="text/javascript"></script>
<script src="scripts/javascript/progress.js" type="text/javascript"></script>
<script type="text/javascript">
var progress;
var tester;
$(function () {
var tests = urlParameters.getURLParameter('testList');
if (tests == '') {
alert("You did not specify any tests, you are being redirected to a nonsense set of tests. You should specify the `testList' URL parameter.");
document.location.search = '?testList=' + JSON.stringify([['foo', 'bar'], ['bar', 'baz'], ['baz', 'qux']]);
} else {
tests = JSON.parse(decodeURIComponent(decodeURIComponent(tests)));
tester = new TesterUI('#prompt', '#response', '#submit-response', '#test', '#num-rounds-left', '#test-num', '#test-count',
'.show-tests', '#show-tests-number-input', '.prompt',
progress, tests);
mixinTesterImages(tester);
mixinTesterAudio(tester);
setTimeout(function () { tester.beginTesting(); }, 1); // let modifications to tester happen
// allow editing of the word list
$('#testList').attr('value', encodeURIComponent(JSON.stringify(tests)));
}
});
</script>
<title>Vocabulary Tester v<!--#include virtual="VERSION" --></title>
</head>
<body>
<!--#include virtual="html/autoupdate.html" -->
<div class="only-when-cached">
<div class="results">
<p>If you answer all the questions correctly in this round, you will have <span id="num-rounds-left">0</span> rounds left to do.</p>
</div>
<form>
<div id="test-holder" style="display:table">
<label id="test" style="display:table-row">
<span class="prompt">
<span id="test-num">1</span> of <span id="test-count">0</span>:
<span id="prompt"></span>
</span>
<span class="response"><input type="text" name="response" id="response" autofocus autocomplete="off" style="width:100%"/></span>
</label>
</div>
<br>
<button type="submit" id="submit-response">Next Question</button>
</form>
<div class="results" id="results">
<div class="progress" id="progress">
<div class="progress-bar-holder">
<div class="actual-progress-bar-holder">
<div class="actual-progress-bar"></div>
</div>
<div class="overlay-progress-bar-holder ui-widget ui-progressbar ui-widget-content ui-corner-all">
<div class="correct-progress-bar ui-corner-left ui-progressbar"></div>
<div class="incorrect-progress-bar ui-progressbar"></div>
</div>
</div>
<div class="progress-message" id="progress_message">
Out of the first <span id="progress-message-num-done">0</span> questions in this round: <br>
Number Right: <span id="progress-message-num-correct">0</span> <br>
Number Wrong: <span id="progress-message-num-incorrect">0</span>
</div>
</div>
<script type="text/javascript">
progress = new Progress(0,
'.progress', '.progress-message', '.progress-bar-holder',
'.actual-progress-bar', '.overlay-progress-bar-holder',
'.correct-progress-bar', '.incorrect-progress-bar',
'#progress-message-num-correct',
'#progress-message-num-incorrect',
'#progress-message-num-done');
</script>
</div>
<hr>
<div>
<form action="list-editor.shtml" method="get">
<input type="hidden" name="testList" id="testList">
<input type="submit" value="Edit word list" id="edit-word-list-button">
</form>
</div>
<hr>
<div id="options">
<fieldset style="display: inline-block; vertical-align: top">
<legend>Which past tests should be shown?</legend>
<label><input type="radio" name="show-tests" id="show-tests" class="show-tests" value="round" checked="checked">All the ones from this round.</label><br>
<label><input type="radio" name="show-tests" id="show-tests" class="show-tests" value="all">All of them.</label><br>
<label><input type="radio" name="show-tests" id="show-tests" class="show-tests" value="one">Only the most recent one.</label><br>
<label><input type="radio" name="show-tests" id="show-tests" class="show-tests" value="none">None of them.</label><br>
<label><input type="radio" name="show-tests" id="show-tests-custom" class="show-tests" value="custom">
<input type="number" min="0" step="1" value="5" id="show-tests-number-input"
onchange="document.getElementById('show-tests-custom').checked = 'checked';"/> of them.</label>
</fieldset>
<!--#include virtual="html/comparator.html" -->
</div>
</div>
</body>
</html>