-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
148 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<%@ page import="model.service.exercise.ExerciseManager" %> | ||
<%@ page import="model.entity.Exercise" %> | ||
<%@ page import="java.util.List" %> | ||
<%@ page import="model.entity.ExerciseGlossary" %> | ||
<%@ page import="java.util.Map" %> | ||
<!DOCTYPE html> | ||
<html lang="it" style="background-color: #f7fcff; "> | ||
<% | ||
Integer userIdp = (Integer) session.getAttribute("id"); | ||
if(userIdp == null) { | ||
response.sendRedirect("../errorPage/403.html"); | ||
} | ||
else { | ||
int userId = (Integer) session.getAttribute("id"); | ||
%> | ||
<head> | ||
<%@page contentType="text/html;charset=UTF-8"%> | ||
<meta charset="utf-8" /> | ||
<link href="../CSS/userReport.css" type="text/css" rel = "stylesheet"> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | ||
|
||
</head> | ||
<body> | ||
<script> | ||
let varcalc; | ||
</script> | ||
<div class="container"> | ||
<div class="up"> | ||
<div class="div_up"> | ||
<img src="../Image/pngwing.com.png" id="back"> | ||
<h2>Report del vostro progresso</h2> | ||
</div> | ||
</div> | ||
<img src="../Image/profilo_utente.png" id="paziente"> | ||
<div class="down"> | ||
<div class="container"> | ||
<div class="margin20"> | ||
<div class="navigation-title"> | ||
<div class="current-lesson">Resoconto progressi:</div> | ||
</div> | ||
</div> | ||
|
||
<% | ||
ExerciseManager exerciseManager = new ExerciseManager(); | ||
Map<String,Integer> dict = exerciseManager.retrieveAllStats((int)session.getAttribute("id")); | ||
if(!dict.isEmpty()){ | ||
int Counter = 0; | ||
for(Map.Entry<String, Integer> exercise : dict.entrySet()) { | ||
%> | ||
<div class="prova"> | ||
<h2><%= exercise.getKey()%></h2> | ||
<svg class="eimg" width="160" height="160" xmlns="http://www.w3.org/2000/svg"> | ||
<g> | ||
<title>Layer 1</title> | ||
|
||
<circle id="circle_animation<%=Counter%>" class="circle_animation" r="69.85699" cy="81" cx="81" stroke-width="8" stroke="#6fdb6f" fill="none"></circle> | ||
<text x="81" y="81" font-size="30" text-anchor="middle" dominant-baseline="middle" fill="green"><%=exercise.getValue()%>%</text> | ||
</g> | ||
</svg> | ||
</div> | ||
|
||
<script> | ||
varcalc= (440 / 100 * <%=exercise.getValue()%>)+440; | ||
document.querySelector('#circle_animation<%=Counter%>').style.strokeDashoffset = varcalc; // 50% | ||
</script> | ||
<% | ||
Counter++; | ||
} | ||
} | ||
else { | ||
%> | ||
%> | ||
<div class="discovering-english">Esercizi non disponibili</div> | ||
<% | ||
} | ||
%> | ||
|
||
</div> | ||
<div> | ||
<jsp:include page="navbar.jsp"></jsp:include> | ||
<div id="userInfo" hidden | ||
data-type = "<%= session.getAttribute("type")%>" | ||
></div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> | ||
<% | ||
} | ||
%> |