This repository has been archived by the owner on Jun 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 279
/
progressEval.html
470 lines (458 loc) · 24.9 KB
/
progressEval.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
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
Course Progress Evaluator
</title>
<style>
body {
font-family: sans-serif;
color: black;
}
input[type="text"] {
color: black;
}
input {
height: 20px;
padding: 0px 4px;
width: 155px;
}
input:invalid {
border: 2px solid red;
}
</style>
</head>
<body>
<h2>Course Progress Evaluator</h2>
<form role="form" id="grades" name="grades">
<p> What week is it? </p>
<select class="" id="weekselect" onchange="calculate()">
<option id="week" value="0" disabled selected>Please Choose a Week</option>
<option id="week" value="1">Week 1</option>
<option id="week" value="2">Week 2</option>
<option id="week" value="3">Week 3</option>
<option id="week" value="4">Week 4</option>
<option id="week" value="5">Week 5</option>
<option id="week" value="6">Week 6</option>
<option id="week" value="7">Week 7</option>
<option id="week" value="8">Week 8</option>
<option id="week" value="9">Week 9</option>
<option id="week" value="10">Week 10</option>
<option id="week" value="11">Week 11</option>
<option id="week" value="12">Week 12</option>
<option id="week" value="13">Week 13</option>
<option id="week" value="14">Week 14</option>
<option id="week" value="15">Week 15</option>
</select>
<p>Fill in the table below to see your progress.</p>
<table style="width:80%">
<tr>
<th>Week Number</th>
<th>Attendance</th>
<th>Homework</th>
<th>Advanced Homework</th>
<th>Extra Credit</th>
</tr>
<tr>
<td id="week0">Please Select a Week</td>
<td id="week0Alt" style="visibility: hidden;" align="center">Enter 0 to 3</td>
<td id="week0Alt2" style="visibility: hidden;" align="center">Enter 0 to 4</td>
<td id="week0Alt3" style="visibility: hidden;" align="center">Enter 1 if completed</td>
<td></td>
</tr>
<tr id="week1" style="visibility: hidden;">
<td>Week 1</td>
<td><input type="number" id="att1" onchange="calculate()" value="" placeholder="No Attendance Week 1" disabled step=3 min=0 max=3></td>
<td><input type="number" id="hw1" onchange="calculate()" value="" placeholder="Homework Week 1" step=2 min=0 max=4></td>
<td><input type="number" id="adv1" onchange="calculate()" value="" placeholder="No Advanced Week 1" disabled step=1 min=0 max=1></td>
<td><input type="number" id="ec1" onchange="calculate()" value="" placeholder="Extra Credit Week 1"></td>
</tr>
<tr id="week2" style="visibility: hidden;">
<td>Week 2</td>
<td><input type="number" id="att2" onchange="calculate()" value="" placeholder="Attendance Week 2" step=3 min=0 max=3></td>
<td><input type="number" id="hw2" onchange="calculate()" value="" placeholder="Homework Week 2" step=2 min=0 max=4></td>
<td><input type="number" id="adv2" onchange="calculate()" value="" placeholder="Advanced Week 2" step=1 min=0 max=1></td>
<td><input type="number" id="ec2" onchange="calculate()" value="" placeholder="Extra Credit Week 2"></td>
</tr>
<tr id="week3" style="visibility: hidden;">
<td>Week 3</td>
<td><input type="number" id="att3" onchange="calculate()" value="" placeholder="Attendance Week 3" step=3 min=0 max=3></td>
<td><input type="number" id="hw3" onchange="calculate()" value="" placeholder="Homework Week 3" step=2 min=0 max=4></td>
<td><input type="number" id="adv3" onchange="calculate()" value="" placeholder="Advanced Week 3" step=1 min=0 max=1></td>
<td><input type="number" id="ec3" onchange="calculate()" value="" placeholder="Extra Credit Week 3"></td>
</tr>
<tr id="week4" style="visibility: hidden;">
<td>Week 4</td>
<td><input type="number" id="att4" onchange="calculate()" value="" placeholder="Attendance Week 4" step=3 min=0 max=3></td>
<td><input type="number" id="hw4" onchange="calculate()" value="" placeholder="Homework Week 4" step=2 min=0 max=4></td>
<td><input type="number" id="adv4" onchange="calculate()" value="" placeholder="Advanced Week 4" step=1 min=0 max=1></td>
<td><input type="number" id="ec4" onchange="calculate()" value="" placeholder="Extra Credit Week 4"></td>
</tr>
<tr id="week5" style="visibility: hidden;">
<td>Week 5</td>
<td><input type="number" id="att5" onchange="calculate()" value="" placeholder="Attendance Week 5" step=3 min=0 max=3></td>
<td><input type="number" id="hw5" onchange="calculate()" value="" placeholder="Homework Week 5" step=2 min=0 max=4></td>
<td><input type="number" id="adv5" onchange="calculate()" value="" placeholder="Advanced Week 5" step=1 min=0 max=1></td>
<td><input type="number" id="ec5" onchange="calculate()" value="" placeholder="Extra Credit Week 5"></td>
</tr>
<tr id="week6" style="visibility: hidden;">
<td>Week 6</td>
<td><input type="number" id="att6" onchange="calculate()" value="" placeholder="Attendance Week 6" step=3 min=0 max=3></td>
<td><input type="number" id="hw6" onchange="calculate()" value="" placeholder="Homework Week 6" step=2 min=0 max=4></td>
<td><input type="number" id="adv6" onchange="calculate()" value="" placeholder="Advanced Week 6" step=1 min=0 max=1></td>
<td><input type="number" id="ec6" onchange="calculate()" value="" placeholder="Extra Credit Week 6"></td>
</tr>
<tr id="week7" style="visibility: hidden;">
<td>Week 7</td>
<td><input type="number" id="att7" onchange="calculate()" value="" placeholder="Attendance Week 7" step=3 min=0 max=3></td>
<td><input type="number" id="hw7" onchange="calculate()" value="" placeholder="Homework Week 7" step=2 min=0 max=4></td>
<td><input type="number" id="adv7" onchange="calculate()" value="" placeholder="Advanced Week 7" step=1 min=0 max=1></td>
<td><input type="number" id="ec7" onchange="calculate()" value="" placeholder="Extra Credit Week 7"></td>
</tr>
<tr id="week8" style="visibility: hidden;">
<td>Week 8</td>
<td><input type="number" id="att8" onchange="calculate()" value="" placeholder="Opt. Attendance Week 8" disabled step=3 min=0 max=3></td>
<td><input type="number" id="hw8" onchange="calculate()" value="" placeholder="No Homework Week 8" disabled step=2 min=0 max=4></td>
<td><input type="number" id="adv8" onchange="calculate()" value="" placeholder="No Advanced Week 8" disabled step=1 min=0 max=1></td>
<td><input type="number" id="ec8" onchange="calculate()" value="" placeholder="Extra Credit Week 8"></td>
</tr>
<tr id="week9" style="visibility: hidden;">
<td>Week 9</td>
<td><input type="number" id="att9" onchange="calculate()" value="" placeholder="No Attendance Week 9" disabled step=3 min=0 max=3></td>
<td><input type="number" id="hw9" onchange="calculate()" value="" placeholder="No Homework Week 9" disabled step=2 min=0 max=4></td>
<td><input type="number" id="adv9" onchange="calculate()" value="" placeholder="No Advanced Week 9" disabled step=1 min=0 max=1></td>
<td><input type="number" id="ec9" onchange="calculate()" value="" placeholder="Extra Credit Week 9"></td>
</tr>
<tr id="week10" style="visibility: hidden;">
<td>Week 10</td>
<td><input type="number" id="att10" onchange="calculate()" value="" placeholder="Attendance Week 10" step=3 min=0 max=3></td>
<td><input type="number" id="hw10" onchange="calculate()" value="" placeholder="Homework Week 10" step=2 min=0 max=4></td>
<td><input type="number" id="adv10" onchange="calculate()" value="" placeholder="Advanced Week 10" step=1 min=0 max=1></td>
<td><input type="number" id="ec10" onchange="calculate()" value="" placeholder="Extra Credit Week 10"></td>
</tr>
<tr id="week11" style="visibility: hidden;">
<td>Week 11</td>
<td><input type="number" id="att11" onchange="calculate()" value="" placeholder="Attendance Week 11" step=3 min=0 max=3></td>
<td><input type="number" id="hw11" onchange="calculate()" value="" placeholder="Homework Week 11" step=2 min=0 max=4></td>
<td><input type="number" id="adv11" onchange="calculate()" value="" placeholder="Advanced Week 11" step=1 min=0 max=1></td>
<td><input type="number" id="ec11" onchange="calculate()" value="" placeholder="Extra Credit Week 11"></td>
</tr>
<tr id="week12" style="visibility: hidden;">
<td>Week 12</td>
<td><input type="number" id="att12" onchange="calculate()" value="" placeholder="Attendance Week 12" step=3 min=0 max=3></td>
<td><input type="number" id="hw12" onchange="calculate()" value="" placeholder="Homework Week 12" step=2 min=0 max=4></td>
<td><input type="number" id="adv12" onchange="calculate()" value="" placeholder="Advanced Week 12" step=1 min=0 max=1></td>
<td><input type="number" id="ec12" onchange="calculate()" value="" placeholder="Extra Credit Week 12"></td>
</tr>
<tr id="week13" style="visibility: hidden;">
<td>Week 13</td>
<td><input type="number" id="att13" onchange="calculate()" value="" placeholder="Attendance Week 13" step=3 min=0 max=3></td>
<td><input type="number" id="hw13" onchange="calculate()" value="" placeholder="Homework Week 13" step=2 min=0 max=4></td>
<td><input type="number" id="adv13" onchange="calculate()" value="" placeholder="Advanced Week 13" step=1 min=0 max=1></td>
<td><input type="number" id="ec13" onchange="calculate()" value="" placeholder="Extra Credit Week 13"></td>
</tr>
<tr id="week14" style="visibility: hidden;">
<td>Week 14</td>
<td><input type="number" id="att14" onchange="calculate()" value="" placeholder="Attendance Week 14" step=3 min=0 max=3></td>
<td><input type="number" id="hw14" onchange="calculate()" value="" placeholder="Homework Week 14" step=2 min=0 max=4></td>
<td><input type="number" id="adv14" onchange="calculate()" value="" placeholder="Advanced Week 14" step=1 min=0 max=1></td>
<td><input type="number" id="ec14" onchange="calculate()" value="" placeholder="Extra Credit Week 14"></td>
</tr>
<tr id="week15" style="visibility: hidden;">
<td>Week 15</td>
<td><input type="number" id="att15" onchange="calculate()" value="" placeholder="Attendance Week 15" step=3 min=0 max=3></td>
<td><input type="number" id="hw15" onchange="calculate()" value="" placeholder="No Homework Week 15" disabled step=2 min=0 max=4></td>
<td><input type="number" id="adv15" onchange="calculate()" value="" placeholder="No Advanced Week 15" disabled step=1 min=0 max=1></td>
<td><input type="number" id="ec15" onchange="calculate()" value="" placeholder="Extra Credit Week 15"></td>
</tr>
<tr id="totals">
<td>Totals</td>
<td><input type="number" id="attTot" value="" placeholder="Attendance Total" disabled></td>
<td><input type="number" id="hwTot" value="" placeholder="Homework Total" disabled></td>
<td><input type="number" id="advTot" value="" placeholder="Advanced Total" disabled></td>
<td><input type="number" id="ecTot" value="" placeholder="Extra Credit Total" disabled></td>
</tr>
</table>
<p> Right now you have
<input type="number" id="numPoints" value="" placeholder="Total" disabled>
points, which is a(n)
<input type="text" id="curGrade" value="" placeholder="A" disabled>
</p>
<p> If your point-to-week ratio stays constant, you will earn
<input type="number" id="predPoints" value="" placeholder="Total" disabled>
points, which is a(n)
<input type="text" id="predGrade" value="" placeholder="A" disabled>
</p>
</form>
<script type="text/javascript">
function calculate(grades){
var week = document.getElementById("weekselect").value || 0;
var attTotal = 0;
var hwTotal = 0;
var advTotal = 0;
var ecTotal = 0;
document.getElementById("week0").style.visibility="hidden";
document.getElementById("week0Alt").style.visibility="visible";
document.getElementById("week0Alt2").style.visibility="visible";
document.getElementById("week0Alt3").style.visibility="visible";
if(week >= 1){
document.getElementById("week1").style.visibility="visible";
//no attendance
hwTotal += parseFloat(document.getElementById("hw1").value || 0);
//no advHomework
ecTotal += parseFloat(document.getElementById("ec1").value || 0);
}
else document.getElementById("week1").style.visibility="hidden";
if(week >= 2){
document.getElementById("week2").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec2").value || 0);
attTotal += parseFloat(document.getElementById("att2").value || 0);
hwTotal += parseFloat(document.getElementById("hw2").value || 0);
var temp = parseFloat(document.getElementById("adv2").value || 0);
if(temp != 0)
advTotal += 10;
}
else document.getElementById("week2").style.visibility="hidden";
if(week >= 3){
document.getElementById("week3").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec3").value || 0);
attTotal += parseFloat(document.getElementById("att3").value || 0);
hwTotal += parseFloat(document.getElementById("hw3").value || 0);
var temp = parseFloat(document.getElementById("adv3").value || 0);
if(temp != 0 && advTotal == 0)
advTotal += 10;
else if(temp != 0)
advTotal += 5;
}
else document.getElementById("week3").style.visibility="hidden";
if(week >= 4){
document.getElementById("week4").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec4").value || 0);
attTotal += parseFloat(document.getElementById("att4").value || 0);
hwTotal += parseFloat(document.getElementById("hw4").value || 0);
var temp = parseFloat(document.getElementById("adv4").value || 0);
if(temp != 0)
advTotal += 10;
}
else document.getElementById("week4").style.visibility="hidden";
if(week >= 5){
document.getElementById("week5").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec5").value || 0);
attTotal += parseFloat(document.getElementById("att5").value || 0);
hwTotal += parseFloat(document.getElementById("hw5").value || 0);
var temp4 = parseFloat(document.getElementById("adv4").value || 0);
var temp5 = parseFloat(document.getElementById("adv5").value || 0);
if(temp4 == 0 && temp5 != 0)
advTotal += 10;
else if(temp4 != 0 && temp5 != 0)
advTotal += 5;
}
else document.getElementById("week5").style.visibility="hidden";
if(week >= 6){
document.getElementById("week6").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec6").value || 0);
attTotal += parseFloat(document.getElementById("att6").value || 0);
hwTotal += parseFloat(document.getElementById("hw6").value || 0);
var temp4 = parseFloat(document.getElementById("adv4").value || 0);
var temp5 = parseFloat(document.getElementById("adv5").value || 0);
var temp6 = parseFloat(document.getElementById("adv6").value || 0);
if(temp4 == 0 && temp5 == 0 && temp6 != 0)
advTotal += 10;
else if((temp4 != 0 || temp5 != 0) && temp6 != 0 )
advTotal += 5;
}
else document.getElementById("week6").style.visibility="hidden";
if(week >= 7){
document.getElementById("week7").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec7").value || 0);
attTotal += parseFloat(document.getElementById("att7").value || 0);
hwTotal += parseFloat(document.getElementById("hw7").value || 0);
var temp = parseFloat(document.getElementById("adv7").value || 0);
if(temp != 0)
advTotal += 10;
}
else document.getElementById("week7").style.visibility="hidden";
if(week >= 8){
document.getElementById("week8").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec8").value || 0);
attTotal += parseFloat(document.getElementById("att8").value || 0);
//no homework week 8
//no advanced week 8
}
else document.getElementById("week8").style.visibility="hidden";
if(week >= 9){
document.getElementById("week9").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec9").value || 0);
//no attendance week 9
//no homework week 9
//no advanced homework week 9
}
else document.getElementById("week9").style.visibility="hidden";
if(week >= 10){
document.getElementById("week10").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec10").value || 0);
attTotal += parseFloat(document.getElementById("att10").value || 0);
hwTotal += parseFloat(document.getElementById("hw10").value || 0);
var temp7 = parseFloat(document.getElementById("adv7").value || 0);
var temp10 = parseFloat(document.getElementById("adv10").value || 0);
if(temp7 == 0 && temp10 != 0)
advTotal += 10;
else if(temp7 != 0 && temp10 != 0 )
advTotal += 5;
}
else document.getElementById("week10").style.visibility="hidden";
if(week >= 11){
document.getElementById("week11").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec11").value || 0);
attTotal += parseFloat(document.getElementById("att11").value || 0);
hwTotal += parseFloat(document.getElementById("hw11").value || 0);
var temp7 = parseFloat(document.getElementById("adv7").value || 0);
var temp10 = parseFloat(document.getElementById("adv10").value || 0);
var temp11 = parseFloat(document.getElementById("adv11").value || 0);
if(temp7 == 0 && temp10 == 0 && temp11 != 0)
advTotal += 10;
else if((temp7 != 0 || temp10 != 0) && temp11 != 0 )
advTotal += 5;
}
else document.getElementById("week11").style.visibility="hidden";
if(week >= 12){
document.getElementById("week12").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec12").value || 0);
attTotal += parseFloat(document.getElementById("att12").value || 0);
hwTotal += parseFloat(document.getElementById("hw12").value || 0);
var temp = parseFloat(document.getElementById("adv12").value || 0);
if(temp != 0 && advTotal < 30)
advTotal += 10;
else if(temp != 0 && advTotal >= 30)
advTotal += 5;
}
else document.getElementById("week12").style.visibility="hidden";
if(week >= 13){
document.getElementById("week13").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec13").value || 0);
var att = parseFloat(document.getElementById("att13").value || 0);
if(attTotal >= 30)
attTotal += att/2;
else{
while(att > 0 && attTotal < 30){
attTotal++;
att--;
}
attTotal += att;
}
var hw = parseFloat(document.getElementById("hw13").value || 0);
if(hwTotal >= 40)
hwTotal += hw/2;
else{
while(hw > 0 && hwTotal < 40){
hwTotal++;
hw--;
}
hwTotal += hw/2;
}
var temp12 = parseFloat(document.getElementById("adv12").value || 0);
var temp13 = parseFloat(document.getElementById("adv13").value || 0);
if(temp12 == 0 && temp13 != 0 && advTotal < 30)
advTotal += 10;
else if(temp12 == 0 && temp13 != 0 && advTotal >= 30)
advTotal += 5;
else if(temp12 != 0 && temp13 != 0)
advTotal += 5;
}
else document.getElementById("week13").style.visibility="hidden";
if(week >= 14){
document.getElementById("week14").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec14").value || 0);
var att = parseFloat(document.getElementById("att14").value || 0);
if(attTotal >= 30)
attTotal += att/2;
else{
while(att > 0 && attTotal < 30){
attTotal++;
att--;
}
attTotal += att;
}
var hw = parseFloat(document.getElementById("hw14").value || 0);
if(hwTotal >= 40)
hwTotal += hw/2;
else{
while(hw > 0 && hwTotal < 40){
hwTotal++;
hw--;
}
hwTotal += hw/2;
}
var temp12 = parseFloat(document.getElementById("adv12").value || 0);
var temp13 = parseFloat(document.getElementById("adv13").value || 0);
var temp14 = parseFloat(document.getElementById("adv14").value || 0);
if(temp12 == 0 && temp13 == 0 && temp14 != 0 && advTotal < 30)
advTotal += 10;
else if(temp12 == 0 && temp13 == 0 && temp14 != 0 && advTotal >= 30)
advTotal += 5;
else if((temp12 != 0 || temp13 != 0) && temp14 != 0 )
advTotal += 5;
}
else document.getElementById("week14").style.visibility="hidden";
if(week >= 15){
document.getElementById("week15").style.visibility="visible";
ecTotal += parseFloat(document.getElementById("ec15").value || 0);
var att = parseFloat(document.getElementById("att15").value || 0);
if(attTotal >= 30)
attTotal += att/2;
else{
while(att > 0 && attTotal < 30){
attTotal++;
att--;
}
attTotal += att;
}
//no homework week 15
//no advanced homework week 15
}
else document.getElementById("week15").style.visibility="hidden";
document.getElementById("attTot").value=attTotal;
document.getElementById("hwTot").value=hwTotal;
document.getElementById("advTot").value=advTotal;
document.getElementById("ecTot").value=ecTotal;
var points = (attTotal+hwTotal+advTotal+ecTotal);
document.getElementById("numPoints").value=points;
if(points > 100) document.getElementById("curGrade").value="A+";
else if(points >= 93) document.getElementById("curGrade").value="A";
else if(points >= 90) document.getElementById("curGrade").value="A-";
else if(points >= 86.7) document.getElementById("curGrade").value="B+";
else if(points >= 83.3) document.getElementById("curGrade").value="B";
else if(points >= 80) document.getElementById("curGrade").value="B-";
else if(points >= 76.7) document.getElementById("curGrade").value="C+";
else if(points >= 73.3) document.getElementById("curGrade").value="C";
else if(points >= 70) document.getElementById("curGrade").value="C-";
else if(points >= 66.7) document.getElementById("curGrade").value="D+";
else if(points >= 63.3) document.getElementById("curGrade").value="D";
else if(points >= 60) document.getElementById("curGrade").value="D-";
else document.getElementById("curGrade").value="F";
var predictedPoints = 0;
if(week > 7) predictedPoints = (points/(week-2))*12
else if(week > 0) predictedPoints = (points/week)*12;
document.getElementById("predPoints").value=predictedPoints;
if(predictedPoints > 100) document.getElementById("predGrade").value="A+";
else if(predictedPoints >= 93) document.getElementById("predGrade").value="A";
else if(predictedPoints >= 90) document.getElementById("predGrade").value="A-";
else if(predictedPoints >= 86.7) document.getElementById("predGrade").value="B+";
else if(predictedPoints >= 83.3) document.getElementById("predGrade").value="B";
else if(predictedPoints >= 80) document.getElementById("predGrade").value="B-";
else if(predictedPoints >= 76.7) document.getElementById("predGrade").value="C+";
else if(predictedPoints >= 73.3) document.getElementById("predGrade").value="C";
else if(predictedPoints >= 70) document.getElementById("predGrade").value="C-";
else if(predictedPoints >= 66.7) document.getElementById("predGrade").value="D+";
else if(predictedPoints >= 63.3) document.getElementById("predGrade").value="D";
else if(predictedPoints >= 60) document.getElementById("predGrade").value="D-";
else document.getElementById("predGrade").value="F";
/* TODO:
- calculate best possible grade
*/
}
</script>
</body>