forked from adityagirisha/Codeshaala
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstat.html
More file actions
147 lines (130 loc) · 5.97 KB
/
stat.html
File metadata and controls
147 lines (130 loc) · 5.97 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
<!DOCTYPE html>
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<title>CodeShaala</title>
<!--DO NOT TOUCH-->
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300,600,400italic,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/animate.css">
<link rel="stylesheet" href="css/icomoon.css">
<link rel="stylesheet" href="css/simple-line-icons.css">
<link rel="stylesheet" href="css/magnific-popup.css">
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/style.css">
<script src="js/modernizr-2.6.2.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.waypoints.min.js"></script>
<script src="js/jquery.stellar.min.js"></script>
<script src="js/jquery.countTo.js"></script>
<script src="js/jquery.magnific-popup.min.js"></script>
<script src="js/magnific-popup-options.js"></script>
<script src="js/main.js"></script>
<!--DO NOT TOUCH-->
<script>
// document.getElementById("dis").disabled = true;
var user=sessionStorage.getItem("user");
var payLoad ={'user':user};
$.ajax({
type : 'POST',
url : '/api/v1/get_stats',
data : payLoad,
success: function(response){
console.log(response);
// document.getElementById("dis").disabled = false;
document.getElementById('ccounter').setAttribute("data-to", response.courses);
document.getElementById('qcounter').setAttribute("data-to", response.quizes);
document.getElementById('tcounter').setAttribute("data-to", response.time);
document.getElementById('scounter').setAttribute("data-to", response.score);
}
});
var i=100000;
while(i>0){
i--;
}
if(sessionStorage.getItem("user")==null){
window.location.assign("http://localhost:8081/index.html");
}
function logout(){
sessionStorage.removeItem("user")
sessionStorage.removeItem("course")
sessionStorage.removeItem("quiz")
window.location.assign("http://localhost:8081/index.html");
}
function dash(){
// sessionStorage.removeItem("course")
window.location.assign("http://localhost:8081/dashboard.html");
}
setInterval(function() {
console.log(payLoad);
$.ajax({
type : 'POST',
url : '/api/v1/update_clock',
data : payLoad,
success: function(response){
console.log("time!");
}
});
}, 60 * 1000);
</script>
</head>
<body >
<header role="banner" id="fh5co-header">
<div class="container">
<nav class="navbar navbar-default">
<div class="navbar-header">
<a href="#" class="js-fh5co-nav-toggle fh5co-nav-toggle" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"><i></i></a>
<a class="navbar-brand" href="index.html">CodeShaala</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li ><a onclick="dash()"><span>Home</span></a></li>
<li class="active"><a href="#" data-nav-section="about"><span>Statistics</span></a></li>
<li><a onclick="logout()" ><span>Logout</span></a></li>
</ul>
</div>
</nav>
</div>
</header>
<section id="fh5co-counters" style="background-image: url(images/full_image_1.jpg);" data-stellar-background-ratio="0.5">
<div class="fh5co-overlay" ></div>
<div class="container">
<div class="row">
<div class="col-md-12 section-heading text-center to-animate">
<h2>The Stats.</h2>
</div>
</div>
<div id="dis" class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="fh5co-counter to-animate">
<i class="fh5co-counter-icon icon-code to-animate-2"></i>
<span id="ccounter" class="fh5co-counter-number js-counter" data-from="0" data-to="-1" data-speed="2000" data-refresh-interval="20">0</span>
<span class="fh5co-counter-label">Courses Enrolled</span>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="fh5co-counter to-animate">
<i class="fh5co-counter-icon icon-briefcase to-animate-2"></i>
<span id="qcounter" class="fh5co-counter-number js-counter" data-from="0" data-to="-1" data-speed="2000" data-refresh-interval="20">0</span>
<span class="fh5co-counter-label">Quizes Taken</span>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="fh5co-counter to-animate">
<i class="fh5co-counter-icon icon-cup to-animate-2"></i>
<span id="tcounter"class="fh5co-counter-number js-counter" data-from="0" data-to="-1" data-speed="2000" data-refresh-interval="20">0</span>
<span class="fh5co-counter-label">Minutes Spent</span>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="fh5co-counter to-animate">
<i class="fh5co-counter-icon icon-people to-animate-2"></i>
<span id="scounter" class="fh5co-counter-number js-counter" data-from="0" data-to="-1" data-speed="2000" data-refresh-interval="20">0</span>
<span class="fh5co-counter-label">Points</span>
</div>
</div>
</div>
</div>
</section>
</body>
</html>