-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstudent.html
More file actions
157 lines (140 loc) · 6.59 KB
/
student.html
File metadata and controls
157 lines (140 loc) · 6.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
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
<!DOCTYPE HTML>
<!-- this page is the main login that you are redirected to with the normal url. -->
<html>
<head>
<meta charset="UTF-8">
<title>MathNet Student View</title>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css"/>
<link rel="stylesheet" href="css/student.css"/>
<link type="text/css" rel="stylesheet" href="css/groupgraph.css" />
</head>
<body hidden>
<div class="container" id="main">
<div class="row">
<!-- Login View -->
<div class="login_view" hidden>
<div class="col-md-4">
<h4 id="error_frame"></h4>
</div>
<!-- Title -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4 col-md-offset-4 col-sm-offset-4">
<h2 id="login_title"> Student Login </h2>
</div>
</div>
<br/>
<!-- Text Fields and Login Button -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4 col-md-offset-4 col-sm-offset-4">
<input type="text" class="form-control class_id" id="class_id" name="class_id" required="" placeholder="Class ID"/>
<p class = "error error_class_id" hidden> Class ID does not exist </p> <br/>
<input type="text" class="form-control nickname" id="nickname" name="nickname" required="" placeholder="Nickname"/>
<p class = "error error_nickname" hidden> Nickname already taken </p> <br/>
<input class="btn btn-lg btn-primary btn-block login" type="submit" value="Login" id="login"/><br/>
</div>
</div>
<h5 class = "ping"> Ping : 0 </h5>
</div> <!-- ***** End of login_view ***** -->
<div class="class_view">
<div class="col-md-12 col-sm-12">
<!-- Title -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4 col-md-offset-4 col-sm-offset-4">
<h3> Student Groups </h3>
</div>
</div>
<!-- Group Buttons -->
<div class="col-md-12 col-sm-12">
<div class="col-md-6 col-sm-6 col-md-offset-3 col-sm-offset-3">
<!-- add in class name, display buttons based on the class's groups to enter the individual groups -->
<h3 id="buttons"> </h3>
</div>
</div>
<!-- Log Out button -->
<div class="col-md-12 col-sm-12">
<div class="col-md-4 col-sm-4 col-md-offset-4 col-sm-offset-4">
<!-- foreach group, create a html button with onclick to emit action to a group -->
<input type="button" class="btn btn-danger" value="Log Out" id="logout" />
</div>
</div>
</div>
<h5 class = "ping"> Ping : 0 </h5>
</div> <!-- ***** End of class_view ***** -->
<!-- ***** Group View ***** -->
<div class="group_view">
<div class="col-md-12 col-lg-12 col-sm-12">
<h2>
<span id="number">Group</span>
<input class="btn btn-danger" type="button" value="Leave Group" id="leave_group"/>
</h2>
<!-- add in class name, display buttons based on the class's groups to enter the individual groups -->
<!-- foreach group, create a html button with onclick to emit action to a group -->
<div class="javascriptapplet">
<div class="geogebrawebapplet applet-student" id="appletContainer"></div>
</div>
<div class="col-md-4 col-lg-6 col-sm-6">
<br/>
<div class="arrow-keys-ui" id="arrow_keys" style="white-space:nowrap;">
<button class="btn btn-primary" id="arrow_up_button" style="margin-left:78px;">Up (I)</button>
<br/><br/>
<button class="btn btn-primary" id="arrow_left_button">Left (J)</button>
Selected: <label for="cur_label">-</label>
<button class="btn btn-primary" id="arrow_right_button" style="margin-left:2px;">Right (L)</button>
<br/><br/>
<button class="btn btn-primary" id="arrow_down_button" style="margin-left:67px;">Down (K)</button>
<br/>
Step Size: <label for="step_size_label">1</label>
<input id="step_size_slider" type="range" min="0" max="100" value="10" style="width:250px;">
</div>
<br/>
</div>
</div>
<h5 class = "ping"> Ping : 0 </h5>
</div><!-- ***** End of group_view ***** -->
</div>
</div> <!-- End of Container -->
<footer>
<!-- normal communications library stuff -->
<script src="js/socket.io-2.2.0.js"></script>
<script src="js/jquery-2.2.3.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/deployggb.js"></script>
<script type="text/javascript" src="js/ggbapplet_functions.js"></script>
<script src="js/student_vars.js"></script>
<script src="js/host.js"></script>
<script src="js/student_sockets.js"></script>
<script src="js/student_functions.js"></script>
<script src="js/login.js"></script>
<script src="js/class.js"></script>
<script src="js/groups.js"></script>
<script src="js/Queue.js"></script>
<script>
var xml_update_queue = new Queue();
var socket = Student.Socket(io(host));
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-87061901-2', 'auto');
ga('send', 'pageview');
//Code for Pre-filling Class ID if URL contains it
$(document).ready(function() {
if($('.login_view').is(":visible"))
{
var url = new URL(window.location.href);
var class_id = url.searchParams.get("class_id");
if(class_id != null)
{
$('.class_id').val(class_id);
}
}
});
//End of Code for Pre-filling Class ID
</script>
</footer>
</body>
</html>