Rev 1586 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1586 | Rev 1612 | ||
---|---|---|---|
1 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
1 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
2 | <%@ page import="pt.estgp.estgweb.Globals" %> |
- | |
3 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioReportCursoFile" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioReportCursoFile" %> |
4 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioReportFile" %> |
3 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioReportFile" %> |
5 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioReportFileGroupCursosAno" %> |
4 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioReportFileGroupCursosAno" %> |
6 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
5 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
- | 6 | <%@ page import="pt.estgp.estgweb.filters.filters.ResourceAccessControlQuestionariosReportBoardsPedagogicoFilter" %> |
|
7 | <%@ page import="java.util.Set" %> |
7 | <%@ page import="java.util.Set" %> |
8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
9 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
9 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
10 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
10 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
11 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
11 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
12 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
12 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
13 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
13 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
14 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
14 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
15 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
15 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
16 | <%@taglib prefix="reports" tagdir="/WEB-INF/tags/reports" %> |
16 | <%@taglib prefix="reports" tagdir="/WEB-INF/tags/reports" %> |
17 | <%@taglib prefix="bacoTags" tagdir="/WEB-INF/tags" %> |
17 | <%@taglib prefix="bacoTags" tagdir="/WEB-INF/tags" %> |
18 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/> |
18 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/> |
19 | 19 | ||
20 | <!-- |
20 | <!-- |
21 | <script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script> |
21 | <script type='text/javascript' src='https://www.gstatic.com/charts/loader.js'></script> |
22 | <script type='text/javascript'> |
22 | <script type='text/javascript'> |
23 | google.charts.load('upcoming', {'packages': ['geochart','gauge'],mapsApiKey: 'AIzaSyBd66v8v8y49E7U0zzr3RjD33VdDHZLZRY'}); |
23 | google.charts.load('upcoming', {'packages': ['geochart','gauge'],mapsApiKey: 'AIzaSyBd66v8v8y49E7U0zzr3RjD33VdDHZLZRY'}); |
24 | google.charts.setOnLoadCallback(drawMarkersMap); |
24 | google.charts.setOnLoadCallback(drawMarkersMap); |
25 | 25 | ||
26 | function drawMarkersMap() { |
26 | function drawMarkersMap() { |
27 | var data = google.visualization.arrayToDataTable([ |
27 | var data = google.visualization.arrayToDataTable([ |
28 | ['Distrito','Respostas'], |
28 | ['Distrito','Respostas'], |
29 | ['Leiria',23], |
29 | ['Leiria',23], |
30 | ['Lisboa',34], |
30 | ['Lisboa',34], |
31 | ['Portalegre',90], |
31 | ['Portalegre',90], |
32 | ['Braga',4], |
32 | ['Braga',4], |
33 | ['Faro',2] |
33 | ['Faro',2] |
34 | 34 | ||
35 | ]); |
35 | ]); |
36 | 36 | ||
37 | var options = { |
37 | var options = { |
38 | region: 'PT', |
38 | region: 'PT', |
39 | displayMode: 'markers', |
39 | displayMode: 'markers', |
40 | //dataMode: 'markers', |
40 | //dataMode: 'markers', |
41 | colorAxis: {colors: ['blue']}, |
41 | colorAxis: {colors: ['blue']}, |
42 | backgroundColor: '#81d4fa', |
42 | backgroundColor: '#81d4fa', |
43 | width: 150, height: 150 |
43 | width: 150, height: 150 |
44 | //, |
44 | //, |
45 | 45 | ||
46 | //showLegend: false, |
46 | //showLegend: false, |
47 | 47 | ||
48 | //dataMode: 'regions', |
48 | //dataMode: 'regions', |
49 | //chartArea: {left:0,top:0,'width': '100%', 'height': '100%'} |
49 | //chartArea: {left:0,top:0,'width': '100%', 'height': '100%'} |
50 | }; |
50 | }; |
51 | 51 | ||
52 | //var geomap = new google.visualization.GeoMap(container); |
52 | //var geomap = new google.visualization.GeoMap(container); |
53 | var chart = new google.visualization.GeoChart(document.getElementById('chart_div')); |
53 | var chart = new google.visualization.GeoChart(document.getElementById('chart_div')); |
54 | chart.draw(data, options); |
54 | chart.draw(data, options); |
55 | 55 | ||
56 | 56 | ||
57 | 57 | ||
58 | var data2 = google.visualization.arrayToDataTable([ |
58 | var data2 = google.visualization.arrayToDataTable([ |
59 | ['Label', 'Value'], |
59 | ['Label', 'Value'], |
60 | ['Particip. %', 80] |
60 | ['Particip. %', 80] |
61 | ]); |
61 | ]); |
62 | 62 | ||
63 | var options2 = { |
63 | var options2 = { |
64 | min:0, max:100, |
64 | min:0, max:100, |
65 | width: 100, height: 100, |
65 | width: 100, height: 100, |
66 | greenFrom: 70, greenTo: 100, |
66 | greenFrom: 70, greenTo: 100, |
67 | yellowFrom:25, yellowTo: 50, |
67 | yellowFrom:25, yellowTo: 50, |
68 | redFrom:0, redTo: 25, |
68 | redFrom:0, redTo: 25, |
69 | minorTicks: 5 |
69 | minorTicks: 5 |
70 | }; |
70 | }; |
71 | 71 | ||
72 | var chart2 = new google.visualization.Gauge(document.getElementById('chart_div2')); |
72 | var chart2 = new google.visualization.Gauge(document.getElementById('chart_div2')); |
73 | 73 | ||
74 | chart2.draw(data2, options2); |
74 | chart2.draw(data2, options2); |
75 | 75 | ||
76 | /*setInterval(function() { |
76 | /*setInterval(function() { |
77 | data2.setValue(0, 1, 40 + Math.round(60 * Math.random())); |
77 | data2.setValue(0, 1, 40 + Math.round(60 * Math.random())); |
78 | chart2.draw(data2, options2); |
78 | chart2.draw(data2, options2); |
79 | }, 13000); |
79 | }, 13000); |
80 | setInterval(function() { |
80 | setInterval(function() { |
81 | data2.setValue(1, 1, 40 + Math.round(60 * Math.random())); |
81 | data2.setValue(1, 1, 40 + Math.round(60 * Math.random())); |
82 | chart2.draw(data2, options2); |
82 | chart2.draw(data2, options2); |
83 | }, 5000); |
83 | }, 5000); |
84 | setInterval(function() { |
84 | setInterval(function() { |
85 | data2.setValue(2, 1, 60 + Math.round(20 * Math.random())); |
85 | data2.setValue(2, 1, 60 + Math.round(20 * Math.random())); |
86 | chart2.draw(data2, options2); |
86 | chart2.draw(data2, options2); |
87 | }, 26000);*/ |
87 | }, 26000);*/ |
88 | }; |
88 | }; |
89 | </script> |
89 | </script> |
90 | --> |
90 | --> |
91 | <div class="container-fluid"> |
91 | <div class="container-fluid"> |
92 | 92 | ||
93 | <% |
93 | <% |
94 | AbstractDao.getCurrentSession().beginTransaction(); |
94 | AbstractDao.getCurrentSession().beginTransaction(); |
95 | String id = request.getParameter("id"); |
95 | String id = request.getParameter("id"); |
96 | 96 | ||
97 | QuestionarioReportFileGroupCursosAno reportGroup = DaoFactory.getQuestionarioReportFileGroupCursosAnoDaoImpl().load(Long.parseLong(id)); |
97 | QuestionarioReportFileGroupCursosAno reportGroup = DaoFactory.getQuestionarioReportFileGroupCursosAnoDaoImpl().load(Long.parseLong(id)); |
98 | request.setAttribute("reportGroup",reportGroup); |
98 | request.setAttribute("reportGroup",reportGroup); |
99 | %> |
99 | %> |
100 | <reports:reportGroupPanel reportGroup="${reportGroup}" title="Relatório de Curso - Ano: ${reportGroup.importYearFormatted}"/> |
100 | <reports:reportGroupPanel reportGroup="${reportGroup}" title="Relatório de Curso - Ano: ${reportGroup.importYearFormatted}"/> |
101 | 101 | ||
102 | <div class="web-messages-table"> |
102 | <div class="web-messages-table"> |
103 | <div class="web-messages"></div> |
103 | <div class="web-messages"></div> |
104 | </div> |
104 | </div> |
105 | <table class="tablesorterfiltered"> |
105 | <table class="tablesorterfiltered"> |
106 | <thead> |
106 | <thead> |
107 | <tr> |
107 | <tr> |
108 | <th>Código</th> |
108 | <th>Código</th> |
109 | <th class="filter-name filter-select" data-placeholder="Todos">Tipo Curso</th> |
109 | <th class="filter-name filter-select" data-placeholder="Todos">Tipo Curso</th> |
110 | <th class="filter-name filter-select" data-placeholder="Todos">Curso</th> |
110 | <th class="filter-name filter-select" data-placeholder="Todos">Curso</th> |
111 | <th class="filter-name filter-select" data-placeholder="Todas">Escola</th> |
111 | <th class="filter-name filter-select" data-placeholder="Todas">Escola</th> |
112 | <th>Alunos com Resposta %</th> |
112 | <th>Alunos com Resposta %</th> |
113 | <th>Alunos com Resposta</th> |
113 | <th>Alunos com Resposta</th> |
114 | <th>Alunos Selecionados</th> |
114 | <th>Alunos Selecionados</th> |
115 | <th>Respostas %</th> |
115 | <th>Respostas %</th> |
116 | <th>Respostas</th> |
116 | <th>Respostas</th> |
117 | <th>Repostas Requisitadas</th> |
117 | <th>Repostas Requisitadas</th> |
118 | <th>Descarregar Relatório</th> |
118 | <th>Descarregar Relatório</th> |
119 | <baco:hasRole role="admin,super,questionarios.admin"> |
119 | <baco:hasRole role="admin,super,questionarios.admin"> |
120 | <th>Visivel</th> |
120 | <th>Visivel</th> |
121 | </baco:hasRole> |
121 | </baco:hasRole> |
122 | </tr> |
122 | </tr> |
123 | </thead> |
123 | </thead> |
124 | <tbody> |
124 | <tbody> |
125 | <% |
125 | <% |
126 | Set<QuestionarioReportFile> reports = reportGroup.getReportFiles(); |
126 | Set<QuestionarioReportFile> reports = reportGroup.getReportFiles(); |
127 | for(QuestionarioReportFile report: reports) |
127 | for(QuestionarioReportFile report: reports) |
128 | { |
128 | { |
129 | QuestionarioReportCursoFile cursoFile = (QuestionarioReportCursoFile) report; |
129 | QuestionarioReportCursoFile cursoFile = (QuestionarioReportCursoFile) report; |
130 | request.setAttribute("cursoFile",cursoFile); |
130 | request.setAttribute("cursoFile",cursoFile); |
131 | if(cursoFile.isActive() || UserSession.getUser().isSuperuserOrAdmin() || UserSession.getUser().hasRole(Globals.QUESTIONARIOS_ADMIN)) |
131 | if(cursoFile.isActive() || ResourceAccessControlQuestionariosReportBoardsPedagogicoFilter.canAccessResource(UserSession)) |
132 | { |
132 | { |
133 | %> |
133 | %> |
134 | <tr> |
134 | <tr> |
135 | <td>${cursoFile.entityCode}</td> |
135 | <td>${cursoFile.entityCode}</td> |
136 | <td>${cursoFile.tipoCurso}</td> |
136 | <td>${cursoFile.tipoCurso}</td> |
137 | <td>${cursoFile.entityName}</td> |
137 | <td>${cursoFile.entityName}</td> |
138 | <td>${cursoFile.escola}</td> |
138 | <td>${cursoFile.escola}</td> |
139 | 139 | ||
140 | <!--INQUIRIDOS--> |
140 | <!--INQUIRIDOS--> |
141 | <td> |
141 | <td> |
142 | <reports:progressPercent parcel="${cursoFile.inquiridosComResposta}" total="${cursoFile.inquiridos}" isUserType="true"/> |
142 | <reports:progressPercent parcel="${cursoFile.inquiridosComResposta}" total="${cursoFile.inquiridos}" isUserType="true"/> |
143 | </td> |
143 | </td> |
144 | <!--${percentageColor} comes from progress Percent--> |
144 | <!--${percentageColor} comes from progress Percent--> |
145 | <td><label class="label label-${percentageColor}" style="font-size: 1em"> ${cursoFile.inquiridosComResposta}</label><span class="icon icon-user"> </span></td> |
145 | <td><label class="label label-${percentageColor}" style="font-size: 1em"> ${cursoFile.inquiridosComResposta}</label><span class="icon icon-user"> </span></td> |
146 | <td><label class="label label-primary">${cursoFile.inquiridos}</label><span class="icon icon-users"> </span></td> |
146 | <td><label class="label label-primary">${cursoFile.inquiridos}</label><span class="icon icon-users"> </span></td> |
147 | 147 | ||
148 | 148 | ||
149 | <!--RESPOSTAS--> |
149 | <!--RESPOSTAS--> |
150 | <td> |
150 | <td> |
151 | <reports:progressPercent parcel="${cursoFile.respostas}" total="${cursoFile.respostasRequisitadas}" isFilesType="true"/> |
151 | <reports:progressPercent parcel="${cursoFile.respostas}" total="${cursoFile.respostasRequisitadas}" isFilesType="true"/> |
152 | </td> |
152 | </td> |
153 | <!--${percentageColor} comes from progress Percent--> |
153 | <!--${percentageColor} comes from progress Percent--> |
154 | <td class="text-nowrap"><label class="label label-${percentageColor}" style="font-size: 1em">${cursoFile.respostas}</label> <span class="icon icon-file-text2"> </span></td> |
154 | <td class="text-nowrap"><label class="label label-${percentageColor}" style="font-size: 1em">${cursoFile.respostas}</label> <span class="icon icon-file-text2"> </span></td> |
155 | <td class="text-nowrap"><label class="label label-primary" style="font-size: 1em">${cursoFile.respostasRequisitadas}</label> <span class="icon icon-files-empty"> </span> </td> |
155 | <td class="text-nowrap"><label class="label label-primary" style="font-size: 1em">${cursoFile.respostasRequisitadas}</label> <span class="icon icon-files-empty"> </span> </td> |
156 | 156 | ||
157 | 157 | ||
158 | <td> |
158 | <td> |
159 | <bacoTags:repositoryFile transactional="true" repositoryStream="${cursoFile.repositoryStream}"/> |
159 | <bacoTags:repositoryFile transactional="true" repositoryStream="${cursoFile.repositoryStream}"/> |
160 | </td> |
160 | </td> |
161 | <baco:hasRole role="admin,super,questionarios.admin"> |
161 | <baco:hasRole role="admin,super,questionarios.admin"> |
162 | <td id="updateReport${cursoFile.id}container"> |
162 | <td id="updateReport${cursoFile.id}container"> |
163 | <reports:reportCheckboxVisibiltyReportFile reportFile="${cursoFile}" containerRefSelect="updateReport${cursoFile.id}container"/> |
163 | <reports:reportCheckboxVisibiltyReportFile reportFile="${cursoFile}" containerRefSelect="updateReport${cursoFile.id}container"/> |
164 | </td> |
164 | </td> |
165 | </baco:hasRole> |
165 | </baco:hasRole> |
166 | </tr> |
166 | </tr> |
167 | <% |
167 | <% |
168 | } |
168 | } |
169 | } |
169 | } |
170 | 170 | ||
171 | %> |
171 | %> |
172 | </tbody> |
172 | </tbody> |
173 | </table> |
173 | </table> |
174 | </div> |
174 | </div> |
175 | 175 | ||
176 | <% |
176 | <% |
177 | AbstractDao.getCurrentSession().getTransaction().commit(); |
177 | AbstractDao.getCurrentSession().getTransaction().commit(); |
178 | %> |
178 | %> |
179 | 179 | ||
180 | Generated by GNU Enscript 1.6.5.2. |
180 | Generated by GNU Enscript 1.6.5.2. |
181 | 181 | ||
182 | 182 |