summaryrefslogtreecommitdiff
path: root/src/www/TransQuiz/translation_quiz.html
blob: ed3269caa27dc91f85d2eb6fde2de86e1d6687cd (plain)
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!-- Copyright © Elnaz Abolahrar, 2011 -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>GF Translation Quiz</title>

<link rel=stylesheet type="text/css" href="minibar_quiz.css">

<meta name = "viewport" content = "width = device-width">
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<meta charset="UTF-8">

<script type="text/JavaScript" src="support.js"></script>
<script type="text/JavaScript" src="minibar_quiz.js"></script>
<script type="text/JavaScript" src="pgf_online.js"></script>
<script type="text/JavaScript" src="quiz_support.js"></script>
<script type="text/javascript" src="translation_quiz.js"></script>
<script type="text/JavaScript" src="quiz_pre_start.js"></script>

</head>

<body>

<div id = "info" >
<a href="javascript:popUp('quiz_about.html', 'about')">About GF Translation Quiz</a>
<h2 style=" padding-left: 35px;"><i> Welcome to GF Translation Quiz </i></h2>

<p style="font-size:20px;"> 
    To start the quiz choose a grammar, From and To languages
	<br/>  as well as a quiz mode, then press the "Start Quiz" button. 
	<br/> <b>Note:</b> You may not change these settings in the middle of
    <br/>  a quiz.
	The quiz is over when you have done at least
	<span style="color:#2E8B57;"><b><script type="text/javascript"> document.write(min_no_questions); </script></b></span> 
	<br/>examples with a minimum success of  
	<span style="color:#2E8B57;"><b><script type="text/javascript"> document.write(pass_percentage * 100); </script> % </b></span> 
	. However <br/> you can restart or quit the quiz 
	at any time by clicking <br/>on the "Restart Quiz" or "End Quiz" buttons.
</p>

<a style="font-size:18px;" href="javascript:popUp('quiz_help.html', 'help')">Click here to learn more about how the Quiz works.</a>
<br/>

</div>

<div id = "toggle_hide"; class="shift_left"; ><a href="javascript: toggle_info()">Hide Information</a></div>
<div id = "toggle_show"; class="shift_left"; ><a href="javascript: toggle_info()">Show Information</a></div>

<hr noshade size=0 />

<div id = "minibar1" class="bold">
</div>

<hr noshade size=0 /> 

<table  frame="void" cellpadding="5" >
		<tr>
			<td><b>Quiz  Question:</b></td>
		</tr>
		<tr>
		  <td>
			<form name="question">
				<textarea class="quest" name="question_text" wrap="virtual" readonly="true">
				</textarea>
			</form>
		  </td>
		</tr>
</table>

<form name="answer" onsubmit="check_answer_quiz(); return false;">
  <fieldset>
  
   <legend><b>Your Answer: </b></legend>
    <div id = "minibar_buttons" class="shift_left";></div>
    <div id = "minibar_contin"></div>
	<table cellpadding="2">
			<tr>
			  <td>
				<input class="answer1" type="text" id="user_answer" name="answer_text" value="" />
			  </td>
			</tr>
			<tr>
				<td>
					<div id="hint_txt" class="hint">
				</td>
			</tr>
			
			<tr>
			  <td>
				<div id = "buttons_bar"></div>
			  </td>
			</tr> 
            <tr>
			  <td>
				<div id = "history_bar"></div>
			  </td>
			</tr> 			
	</table>		
		
  </fieldset>
</form>


<table  frame="void" cellpadding="5" >
		<tr>
			<td><b>Explanation:</b></td>
		</tr>
		<tr>
		  <td>
			<form name="explanation">
				<textarea class="explain" name="explanation_text" wrap="virtual" readonly="true">
				</textarea>
			</form>
		  </td>
		</tr>
</table>

<table cellpadding="1" cellspacing="10">
		<tr>
		    <td><b>Current Quiz Mode:</b></td>
			<td><b>Answered Questions</b></td>
			<td><b>Your Score</b></td>
		</tr>   
		<tr>
		    <td><input type="text" id="mode" style="border: 0; text-align:left; color:#CD5C5C; background-color:#ccc;"  class="number" size="18" readonly="true"/></td>
			<td><input type="text" id="counter_display" class="number" size="4" readonly="true"  value="0" /></td>
			<td><input type="text" id="score_display"  style="color:#2E8B57" class="number" size="3" readonly="true" value="0" /></td>
		</tr>
</table>
 
<div id="history_part">
</div>

<script type="text/javascript">

 var online_options={
  //grammars_url: "http://www.grammaticalframework.org/grammars/"
  //grammars_url: "http://tournesol.cs.chalmers.se:41296/grammars",
  //grammars_url: "http://localhost:41296/grammars",
  //grammar_list: ["Foods.pgf"], // leave undefined to get list from server
  }

  if(/^\?\/tmp\//.test(location.search)) {
    online_options.grammars_url=location.search.substr(1);
  }

  var server=pgf_online(online_options);

  var minibar_options= {
    show_abstract: false,
    show_trees: false,
    show_grouped_translations: false,
    default_source_language: "Eng",
    try_google: false
   } 

  var minibar=new Minibar(server,minibar_options,"minibar1");
  
  pre_start();
 
</script>

</body>

</html>