Rev 1899 | Rev 1908 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1899 | Rev 1906 | ||
---|---|---|---|
Line 9... | Line 9... | ||
9 | <!-- |
9 | <!-- |
10 | @section objeto com seccoes e componentes |
10 | @section objeto com seccoes e componentes |
11 | @optional @chapter capitulo do documento para esta seccao para contcatenar às subsections |
11 | @optional @chapter capitulo do documento para esta seccao para contcatenar às subsections |
12 | --> |
12 | --> |
13 | 13 | ||
- | 14 | <script type="text/ng-template" |
|
14 | <script type="text/ng-template" id="pt_estgp_estgweb_services_courses_coursereport_documentmodel_CourseUnitsReportsSection"> |
15 | id="pt_estgp_estgweb_services_courses_coursereport_documentmodel_CourseUnitsReportsSection"> |
15 | <div class="sections"> |
16 | <div class="sections"> |
16 | <a name="indexCus"></a> |
17 | <a name="indexCus"></a> |
- | 18 | <span ng-repeat="cu in section.sections" |
|
17 | <span ng-repeat="cu in section.sections" ng-init="cu.taxaAprovacao = 100 * cu.courseUnitEvaluation.numAlunosAprovTotal/(cu.courseUnitEvaluation.numAlunosInscritos - cu.courseUnitEvaluation.numAlunosSemElementosAvaliacao)"> |
19 | ng-init="cu.taxaAprovacao = 100 * cu.courseUnitEvaluation.numAlunosAprovTotal/(cu.courseUnitEvaluation.numAlunosInscritos - cu.courseUnitEvaluation.numAlunosSemElementosAvaliacao)"> |
- | 20 | <a href="#cu{{$index}}" |
|
18 | <a href="#cu{{$index}}" ng-class="{ 'alert-danger': (cu.courseUnitEvaluation.cumprimentoProgramaPercent < 100) || cu.taxaAprovacao < 75 || !cu.courseUnitEvaluation.closed || !cu.courseUnitEvaluation.teacherComplete}"> |
21 | ng-class="{ 'alert-danger': (cu.courseUnitEvaluation.cumprimentoProgramaPercent < 100) || cu.taxaAprovacao < 75 || !cu.courseUnitEvaluation.closed || !cu.courseUnitEvaluation.teacherComplete}"> |
19 | {{cu.title}} |
22 | {{cu.title}} |
20 | </a> | |
23 | </a> | |
21 | </span> |
24 | </span> |
22 | <div ng-repeat="cu in section.sections" |
25 | <div ng-repeat="cu in section.sections" |
23 | class="section panel-primary"> |
26 | class="section panel-primary"> |
24 | 27 | ||
25 | <a name="cu{{$index}}"></a> |
28 | <a name="cu{{$index}}"></a> |
26 | <span ng-if="$index != 0" class="glyphicon glyphicon-backward" ></span><a ng-if="$index != 0" href="#indexCus"> Voltar atrás</a> |
29 | <span ng-if="$index != 0" class="glyphicon glyphicon-backward"></span><a ng-if="$index != 0" |
- | 30 | href="#indexCus"> Voltar atrás</a> |
|
27 | <div class="panel-heading"><h2>{{cu.title}}</h2></div> |
31 | <div class="panel-heading"><h2>{{cu.title}}</h2></div> |
28 | 32 | ||
29 | <div style="padding-left:20px"> |
33 | <div style="padding-left:20px"> |
30 | <div><h3><label class="label label-primary">Estado do Relatório</label></h3></div> |
34 | <div><h3><label class="label label-primary">Estado do Relatório</label></h3></div> |
31 | 35 | ||
32 | <div ng-if="cu.courseUnitEvaluation.closed"> |
36 | <div ng-if="cu.courseUnitEvaluation.closed"> |
33 | Entregue e Aceite |
37 | Entregue e Aceite |
34 | </div> |
38 | </div> |
- | 39 | <div class="alert-danger" |
|
35 | <div class="alert-danger" ng-if="cu.courseUnitEvaluation.closed && !cu.courseUnitEvaluation.teacherComplete"> |
40 | ng-if="cu.courseUnitEvaluation.closed && !cu.courseUnitEvaluation.teacherComplete"> |
36 | Entregue mas não foi aprovado pela comissão |
41 | Entregue mas não foi aprovado pela comissão |
37 | </div> |
42 | </div> |
- | 43 | <div class="alert-danger" |
|
38 | <div class="alert-danger" ng-if="!cu.courseUnitEvaluation.closed && !cu.courseUnitEvaluation.teacherComplete"> |
44 | ng-if="!cu.courseUnitEvaluation.closed && !cu.courseUnitEvaluation.teacherComplete"> |
39 | Não foi entregue pelo docente para validação |
45 | Não foi entregue pelo docente para validação |
40 | </div> |
46 | </div> |
41 | 47 | ||
42 | </div> |
48 | </div> |
43 | 49 | ||
44 | 50 | ||
45 | <div style="padding-left:20px"> |
51 | <div style="padding-left:20px"> |
46 | <div><h3><label class="label label-primary">Resultados</label></h3></div> |
52 | <div><h3><label class="label label-primary">Resultados</label></h3></div> |
47 | <div> |
53 | <div> |
48 | <table class="tablesorter-blue" width="100%"> |
54 | <table class="tablesorter-blue" width="100%"> |
49 | <tr> |
55 | <tr> |
50 | <th rowspan="2"> |
56 | <th rowspan="2"> |
51 | Nº Alunos Inscritos |
57 | Nº Alunos Inscritos |
52 | </th> |
58 | </th> |
53 | <th rowspan="2"> |
59 | <th rowspan="2"> |
Line 122... | Line 128... | ||
122 | </tr> |
128 | </tr> |
123 | </table> |
129 | </table> |
124 | </div> |
130 | </div> |
125 | </div> |
131 | </div> |
126 | 132 | ||
127 | <div style="padding-left:20px" > |
133 | <div style="padding-left:20px"> |
128 | <div><h3><label class="label label-primary">Taxa de Aprovação</label></h3></div> |
134 | <div><h3><label class="label label-primary">Taxa de Aprovação</label></h3></div> |
129 | <div ng-class="{ 'alert-danger': cu.taxaAprovacao < 75 }">{{cu.taxaAprovacao}}%</div> |
135 | <div ng-class="{ 'alert-danger': cu.taxaAprovacao < 75 }">{{cu.taxaAprovacao}}%</div> |
130 | </div> |
136 | </div> |
131 | 137 | ||
132 | 138 | ||
133 | - | ||
134 | <div style="padding-left:20px"> |
139 | <div style="padding-left:20px"> |
135 | <div><h3><label class="label label-primary">Apreciação dos resultados quantitativos obtidos pelos estudantes</label></h3></div> |
140 | <div><h3><label class="label label-primary">Apreciação dos resultados quantitativos obtidos pelos |
- | 141 | estudantes</label></h3></div> |
|
136 | <div>{{cu.courseUnitEvaluation.qualApreciacaoQuantitivos}}</div> |
142 | <div>{{cu.courseUnitEvaluation.qualApreciacaoQuantitivos}}</div> |
137 | </div> |
143 | </div> |
138 | <div style="padding-left:20px"> |
144 | <div style="padding-left:20px"> |
139 | <div><h3><label class="label label-primary">Apreciação do funcionamento da UC</label></h3></div> |
145 | <div><h3><label class="label label-primary">Apreciação do funcionamento da UC</label></h3></div> |
140 | <div>{{cu.courseUnitEvaluation.qualApreciacaoUC}}</div> |
146 | <div>{{cu.courseUnitEvaluation.qualApreciacaoUC}}</div> |
141 | </div> |
147 | </div> |
142 | <div style="padding-left:20px"> |
148 | <div style="padding-left:20px"> |
143 | <div><h3><label class="label label-primary">Percentagem de cumprimento do programa da UC</label></h3></div> |
149 | <div><h3><label class="label label-primary">Percentagem de cumprimento do programa da UC</label></h3> |
- | 150 | </div> |
|
144 | <div ng-class="{ 'alert-danger': (cu.courseUnitEvaluation.cumprimentoProgramaPercent < 100) }"> |
151 | <div ng-class="{ 'alert-danger': (cu.courseUnitEvaluation.cumprimentoProgramaPercent < 100) }"> |
145 | {{cu.courseUnitEvaluation.cumprimentoProgramaPercent}}% |
152 | {{cu.courseUnitEvaluation.cumprimentoProgramaPercent}}% |
146 | </div> |
153 | </div> |
147 | </div> |
154 | </div> |
148 | <div style="padding-left:20px"> |
155 | <div style="padding-left:20px"> |
149 | <div><h3><label class="label label-primary">Apreciação do cumprimento do programa da UC</label></h3></div> |
156 | <div><h3><label class="label label-primary">Apreciação do cumprimento do programa da UC</label></h3> |
- | 157 | </div> |
|
150 | <div>{{cu.courseUnitEvaluation.qualApreciacaoCumprimentoPrograma}}</div> |
158 | <div>{{cu.courseUnitEvaluation.qualApreciacaoCumprimentoPrograma}}</div> |
151 | </div> |
159 | </div> |
152 | <div style="padding-left:20px"> |
160 | <div style="padding-left:20px"> |
153 | <div><h3><label class="label label-primary">Conclusões</label></h3></div> |
161 | <div><h3><label class="label label-primary">Conclusões</label></h3></div> |
154 | <div>{{cu.courseUnitEvaluation.qualConclusoes}}</div> |
162 | <div>{{cu.courseUnitEvaluation.qualConclusoes}}</div> |
Line 156... | Line 164... | ||
156 | </div> |
164 | </div> |
157 | </div> |
165 | </div> |
158 | </script> |
166 | </script> |
159 | 167 | ||
160 | 168 | ||
161 | - | ||
162 | <style> |
169 | <style> |
163 | .dtpstats td, .dtpstats th{ |
170 | .dtpstats td, .dtpstats th { |
164 | text-align: center !important; |
171 | text-align: center !important; |
165 | } |
172 | } |
166 | </style> |
173 | </style> |
- | 174 | <script type="text/ng-template" |
|
167 | <script type="text/ng-template" id="pt_estgp_estgweb_services_courses_coursereport_documentmodel_reportucsummary_UnitsDtpTable"> |
175 | id="pt_estgp_estgweb_services_courses_coursereport_documentmodel_reportucsummary_UnitsDtpTable"> |
168 | <div class="sections"> |
176 | <div class="sections"> |
169 | 177 | ||
170 | <table class="table dtpstats"> |
178 | <table class="table dtpstats"> |
171 | <thead> |
179 | <thead> |
172 | <tr> |
180 | <tr> |
Line 189... | Line 197... | ||
189 | <tr> |
197 | <tr> |
190 | <th colspan="9">Semestre 1</th> |
198 | <th colspan="9">Semestre 1</th> |
191 | </tr> |
199 | </tr> |
192 | <tr ng-repeat="dtpStat in comp.semester1.courseUnitDtpStats"> |
200 | <tr ng-repeat="dtpStat in comp.semester1.courseUnitDtpStats"> |
193 | <td>{{dtpStat.name}}</td> |
201 | <td>{{dtpStat.name}}</td> |
194 | <td ng-class="{ 'alert-danger' : !dtpStat.planeamentoConteudos }"><input type="checkbox" ng-model="dtpStat.planeamentoConteudos"/></td> |
202 | <td ng-class="{ 'alert-danger' : !dtpStat.planeamentoConteudos }"><input type="checkbox" |
- | 203 | ng-model="dtpStat.planeamentoConteudos"/> |
|
- | 204 | </td> |
|
195 | <td ng-class="{ 'alert-danger' : !dtpStat.planeamentoCalendarizacao }"><input type="checkbox" ng-model="dtpStat.planeamentoCalendarizacao"/></td> |
205 | <td ng-class="{ 'alert-danger' : !dtpStat.planeamentoCalendarizacao }"><input type="checkbox" |
- | 206 | ng-model="dtpStat.planeamentoCalendarizacao"/> |
|
- | 207 | </td> |
|
196 | <td ng-class="{ 'alert-danger' : !dtpStat.ficha }"><input type="checkbox" ng-model="dtpStat.ficha"/></td> |
208 | <td ng-class="{ 'alert-danger' : !dtpStat.ficha }"><input type="checkbox" ng-model="dtpStat.ficha"/> |
- | 209 | </td> |
|
197 | <td ng-class="{ 'alert-danger' : !dtpStat.sumarios }"><input type="checkbox" ng-model="dtpStat.sumarios"/></td> |
210 | <td ng-class="{ 'alert-danger' : !dtpStat.sumarios }"><input type="checkbox" |
- | 211 | ng-model="dtpStat.sumarios"/></td> |
|
198 | <td ng-class="{ 'alert-danger' : !dtpStat.avaliacaoEnunciados }"><input type="checkbox" ng-model="dtpStat.avaliacaoEnunciados"/></td> |
212 | <td ng-class="{ 'alert-danger' : !dtpStat.avaliacaoEnunciados }"><input type="checkbox" |
- | 213 | ng-model="dtpStat.avaliacaoEnunciados"/> |
|
- | 214 | </td> |
|
199 | <td ng-class="{ 'alert-danger' : !dtpStat.avaliacaoPautas }"><input type="checkbox" ng-model="dtpStat.avaliacaoPautas"/></td> |
215 | <td ng-class="{ 'alert-danger' : !dtpStat.avaliacaoPautas }"><input type="checkbox" |
- | 216 | ng-model="dtpStat.avaliacaoPautas"/> |
|
- | 217 | </td> |
|
200 | <td ng-class="{ 'alert-danger' : !dtpStat.relatorio }"><input type="checkbox" ng-model="dtpStat.relatorio"/></td> |
218 | <td ng-class="{ 'alert-danger' : !dtpStat.relatorio }"><input type="checkbox" |
- | 219 | ng-model="dtpStat.relatorio"/></td> |
|
201 | <td ng-class="{ 'alert-danger' : !dtpStat.inquerito }"><input type="checkbox" ng-model="dtpStat.inquerito"/></td> |
220 | <td ng-class="{ 'alert-danger' : !dtpStat.inquerito }"><input type="checkbox" |
- | 221 | ng-model="dtpStat.inquerito"/></td> |
|
202 | </tr> |
222 | </tr> |
203 | <tr> |
223 | <tr> |
204 | <th colspan="9">Semestre 2</th> |
224 | <th colspan="9">Semestre 2</th> |
205 | </tr> |
225 | </tr> |
206 | <tr ng-repeat="dtpStat in comp.semester2.courseUnitDtpStats"> |
226 | <tr ng-repeat="dtpStat in comp.semester2.courseUnitDtpStats"> |
207 | <td>{{dtpStat.name}}</td> |
227 | <td>{{dtpStat.name}}</td> |
208 | <td ng-class="{ 'alert-danger' : !dtpStat.planeamentoConteudos }"><input type="checkbox" ng-model="dtpStat.planeamentoConteudos"/></td> |
228 | <td ng-class="{ 'alert-danger' : !dtpStat.planeamentoConteudos }"><input type="checkbox" |
- | 229 | ng-model="dtpStat.planeamentoConteudos"/> |
|
- | 230 | </td> |
|
209 | <td ng-class="{ 'alert-danger' : !dtpStat.planeamentoCalendarizacao }"><input type="checkbox" ng-model="dtpStat.planeamentoCalendarizacao"/></td> |
231 | <td ng-class="{ 'alert-danger' : !dtpStat.planeamentoCalendarizacao }"><input type="checkbox" |
- | 232 | ng-model="dtpStat.planeamentoCalendarizacao"/> |
|
- | 233 | </td> |
|
210 | <td ng-class="{ 'alert-danger' : !dtpStat.ficha }"><input type="checkbox" ng-model="dtpStat.ficha"/></td> |
234 | <td ng-class="{ 'alert-danger' : !dtpStat.ficha }"><input type="checkbox" ng-model="dtpStat.ficha"/> |
- | 235 | </td> |
|
211 | <td ng-class="{ 'alert-danger' : !dtpStat.sumarios }"><input type="checkbox" ng-model="dtpStat.sumarios"/></td> |
236 | <td ng-class="{ 'alert-danger' : !dtpStat.sumarios }"><input type="checkbox" |
- | 237 | ng-model="dtpStat.sumarios"/></td> |
|
212 | <td ng-class="{ 'alert-danger' : !dtpStat.avaliacaoEnunciados }"><input type="checkbox" ng-model="dtpStat.avaliacaoEnunciados"/></td> |
238 | <td ng-class="{ 'alert-danger' : !dtpStat.avaliacaoEnunciados }"><input type="checkbox" |
- | 239 | ng-model="dtpStat.avaliacaoEnunciados"/> |
|
- | 240 | </td> |
|
213 | <td ng-class="{ 'alert-danger' : !dtpStat.avaliacaoPautas }"><input type="checkbox" ng-model="dtpStat.avaliacaoPautas"/></td> |
241 | <td ng-class="{ 'alert-danger' : !dtpStat.avaliacaoPautas }"><input type="checkbox" |
- | 242 | ng-model="dtpStat.avaliacaoPautas"/> |
|
- | 243 | </td> |
|
214 | <td ng-class="{ 'alert-danger' : !dtpStat.relatorio }"><input type="checkbox" ng-model="dtpStat.relatorio"/></td> |
244 | <td ng-class="{ 'alert-danger' : !dtpStat.relatorio }"><input type="checkbox" |
- | 245 | ng-model="dtpStat.relatorio"/></td> |
|
215 | <td ng-class="{ 'alert-danger' : !dtpStat.inquerito }"><input type="checkbox" ng-model="dtpStat.inquerito"/></td> |
246 | <td ng-class="{ 'alert-danger' : !dtpStat.inquerito }"><input type="checkbox" |
- | 247 | ng-model="dtpStat.inquerito"/></td> |
|
216 | </tr> |
248 | </tr> |
217 | </tbody> |
249 | </tbody> |
218 | </table> |
250 | </table> |
219 | </div> |
251 | </div> |
220 | </script> |
252 | </script> |
221 | 253 | ||
222 | 254 | ||
223 | - | ||
224 | <style> |
255 | <style> |
225 | .learning td |
256 | .learning td { |
226 | { |
- | |
227 | font-size: 0.7em; |
257 | font-size: 0.7em; |
228 | } |
258 | } |
- | 259 | ||
229 | .learning td input{ |
260 | .learning td input { |
230 | width: 50px; |
261 | width: 50px; |
231 | } |
262 | } |
232 | 263 | ||
233 | .learning td input:read-only{ |
264 | .learning td input:read-only { |
234 | width: 50px; |
265 | width: 50px; |
235 | background-color: #cccccc; |
266 | background-color: #cccccc; |
236 | } |
267 | } |
- | 268 | ||
237 | .learning tr.year td { |
269 | .learning tr.year td { |
238 | vertical-align: top; |
270 | vertical-align: top; |
239 | background-color: #aaaaaa; |
271 | background-color: #aaaaaa; |
240 | 272 | ||
241 | font-weight: bold; |
273 | font-weight: bold; |
242 | } |
274 | } |
- | 275 | ||
243 | .learning tr.period td { |
276 | .learning tr.period td { |
244 | vertical-align: top; |
277 | vertical-align: top; |
245 | background-color: #dfdfdf; |
278 | background-color: #dfdfdf; |
246 | 279 | ||
247 | } |
280 | } |
248 | </style> |
281 | </style> |
- | 282 | <script type="text/ng-template" |
|
249 | <script type="text/ng-template" id="pt_estgp_estgweb_services_courses_coursereport_documentmodel_learningresults_components_UnitsLearningResultsTable"> |
283 | id="pt_estgp_estgweb_services_courses_coursereport_documentmodel_learningresults_components_UnitsLearningResultsTable"> |
250 | <unitslearningresultstable> |
284 | <unitslearningresultstable> |
251 | </unitslearningresultstable> |
285 | </unitslearningresultstable> |
252 | </script> |
286 | </script> |
253 | 287 | ||
254 | 288 | ||
255 | - | ||
256 | <script> |
289 | <script> |
257 | angular.module("courseReportApp").directive('boundModel', function() { |
290 | angular.module("courseReportApp").directive('boundModel', function () { |
258 | return { |
291 | return { |
259 | require: 'ngModel', |
292 | require: 'ngModel', |
260 | link: function(scope, elem, attrs, ngModel) { |
293 | link: function (scope, elem, attrs, ngModel) { |
261 | scope.$watch(attrs.boundModel, function(newValue, oldValue) { |
294 | scope.$watch(attrs.boundModel, function (newValue, oldValue) { |
262 | if(newValue != oldValue) { |
295 | if (newValue != oldValue) { |
263 | ngModel.$setViewValue(newValue); |
296 | ngModel.$setViewValue(newValue); |
264 | ngModel.$render(); |
297 | ngModel.$render(); |
- | 298 | } |
|
265 | } |
299 | }); |
266 | }); |
300 | } |
267 | } |
301 | } |
268 | } |
302 | }); |
269 | }); |
- | |
270 | angular.module("courseReportApp").directive('unitslearningresultstable', function() { |
303 | angular.module("courseReportApp").directive('unitslearningresultstable', function () { |
271 | 304 | ||
272 | return { |
305 | return { |
273 | restrict: 'E', |
306 | restrict: 'E', |
274 | link: function($scope, element, attrs) |
307 | link: function ($scope, element, attrs) { |
275 | { |
- | |
276 | 308 | ||
277 | $scope.checkedDocuments = []; |
309 | $scope.checkedDocuments = []; |
278 | $scope.checkUnit = function(document,collection) |
310 | $scope.checkUnit = function (document, collection) { |
- | 311 | if (document.checked) { |
|
- | 312 | var docContainer = |
|
279 | { |
313 | { |
280 | if(document.checked) |
314 | "document": document, |
- | 315 | "collection": collection |
|
281 | { |
316 | } |
282 | var docContainer = |
317 | $scope.checkedDocuments.push(docContainer); |
283 | { |
318 | } |
- | 319 | else { |
|
- | 320 | angular.forEach($scope.checkedDocuments, function (documentContainer, key) { |
|
284 | "document" : document, |
321 | if (documentContainer.document == document) { |
- | 322 | var index = $scope.checkedDocuments.indexOf(documentContainer); |
|
- | 323 | $scope.checkedDocuments.splice(index, 1); |
|
285 | "collection" : collection |
324 | } |
- | 325 | }); |
|
286 | } |
326 | } |
287 | $scope.checkedDocuments.push(docContainer); |
- | |
288 | } |
327 | } |
289 | else |
328 | $scope.changeDocumentCollection = function (collection) { |
290 | { |
- | |
291 | angular.forEach($scope.checkedDocuments, function(documentContainer, key) |
329 | angular.forEach($scope.checkedDocuments, function (documentContainer, key) { |
292 | { |
- | |
293 | if(documentContainer.document == document) |
330 | collection.ucs.push(documentContainer.document); |
294 | { |
- | |
295 | var index = $scope.checkedDocuments.indexOf(documentContainer); |
- | |
296 | $scope.checkedDocuments.splice(index, 1); |
331 | delete documentContainer.document.checked; |
297 | } |
- | |
298 | }); |
332 | }); |
- | 333 | angular.forEach($scope.checkedDocuments, function (documentContainer, key) { |
|
- | 334 | var index = documentContainer.collection.ucs.indexOf(documentContainer.document); |
|
- | 335 | documentContainer.collection.ucs.splice(index, 1); |
|
- | 336 | }); |
|
- | 337 | $scope.checkedDocuments = []; |
|
299 | } |
338 | } |
300 | } |
- | |
301 | $scope.changeDocumentCollection = function(collection) |
- | |
302 | { |
- | |
303 | angular.forEach($scope.checkedDocuments, function(documentContainer, key) |
- | |
304 | { |
- | |
305 | collection.ucs.push(documentContainer.document); |
- | |
306 | delete documentContainer.document.checked; |
- | |
307 | }); |
- | |
308 | angular.forEach($scope.checkedDocuments, function(documentContainer, key) |
- | |
309 | { |
- | |
310 | var index = documentContainer.collection.ucs.indexOf(documentContainer.document); |
- | |
311 | documentContainer.collection.ucs.splice(index, 1); |
- | |
312 | }); |
- | |
313 | $scope.checkedDocuments = []; |
- | |
314 | } |
- | |
315 | $scope.avg = function(field,container, childs) |
339 | $scope.avg = function (field, container, childs) { |
316 | { |
- | |
317 | if(!childs || childs.length == 0) |
340 | if (!childs || childs.length == 0) |
318 | return 0; |
341 | return 0; |
319 | var sum = 0; |
342 | var sum = 0; |
320 | var c; |
343 | var c; |
321 | for(c in childs) |
344 | for (c in childs) { |
- | 345 | if (childs[c] && childs[c][field]) |
|
- | 346 | sum += 1 * childs[c][field]; |
|
322 | { |
347 | } |
323 | if(childs[c] && childs[c][field]) |
348 | container[field] = sum / childs.length; |
324 | sum += 1*childs[c][field]; |
349 | return container[field]; |
325 | } |
350 | } |
326 | container[field] = sum / childs.length; |
351 | $scope.percent = function (n, total) { |
327 | return container[field]; |
352 | if (!n || n == 0 || !total || total == 0) |
328 | } |
353 | return 0; |
329 | $scope.percent = function(n,total) |
354 | return 100 * n / total; |
330 | { |
355 | } |
331 | if(!n || n == 0 || !total || total == 0) |
356 | $scope.reprovados = function (comp) { |
- | 357 | if (comp.alunosInscritos && comp.semElementos && comp.aprovados) |
|
- | 358 | return comp.alunosInscritos - comp.semElementos - comp.aprovados; |
|
332 | return 0; |
359 | return 0; |
333 | return 100 * n / total; |
- | |
334 | } |
- | |
335 | $scope.reprovados = function(comp) |
- | |
336 | { |
- | |
337 | if(comp.alunosInscritos && comp.semElementos && comp.aprovados) |
- | |
338 | return comp.alunosInscritos - comp.semElementos - comp.aprovados; |
- | |
339 | return 0; |
- | |
340 | } |
- | |
341 | $scope.removeComponent = function(index,list) |
- | |
342 | { |
- | |
343 | list.splice(index,1); |
- | |
344 | } |
- | |
345 | $scope.hasYearUnits = function(year) |
- | |
346 | { |
- | |
347 | for(s in year.semesters) |
- | |
348 | { |
- | |
349 | if(year.semesters[s].ucs && year.semesters[s].ucs.length > 0) |
- | |
350 | return true; |
- | |
351 | } |
360 | } |
- | 361 | $scope.removeComponent = function (index, list) { |
|
352 | return false; |
362 | list.splice(index, 1); |
353 | } |
363 | } |
354 | $scope.isInvalidAnfHaveUcs = function(year,years,index) |
364 | $scope.hasYearUnits = function (year) { |
- | 365 | for (s in year.semesters) { |
|
- | 366 | if (year.semesters[s].ucs && year.semesters[s].ucs.length > 0) |
|
355 | { |
367 | return true; |
356 | if(year.ano > 0) |
368 | } |
357 | return false; |
369 | return false; |
358 | - | ||
359 | var s; |
- | |
360 | for(s in year.semesters) |
- | |
361 | { |
- | |
362 | if(year.semesters[s].ucs && year.semesters[s].ucs.length > 0) |
- | |
363 | return true; |
- | |
364 | } |
370 | } |
- | 371 | $scope.isInvalidAnfHaveUcs = function (year, years, index) { |
|
365 | years.splice(index,1); |
372 | if (year.ano > 0) |
366 | return false; |
373 | return false; |
- | 374 | ||
- | 375 | var s; |
|
- | 376 | for (s in year.semesters) { |
|
- | 377 | if (year.semesters[s].ucs && year.semesters[s].ucs.length > 0) |
|
- | 378 | return true; |
|
367 | } |
379 | } |
368 | $scope.addUc = function(semestre) |
380 | years.splice(index, 1); |
- | 381 | return false; |
|
369 | { |
382 | } |
- | 383 | $scope.addUc = function (semestre) { |
|
370 | semestre.ucs.push( |
384 | semestre.ucs.push( |
371 | { |
385 | { |
372 | "@class" : "<%=UnitsLearningResultUc.class.getName()%>", |
386 | "@class": "<%=UnitsLearningResultUc.class.getName()%>", |
373 | manual : true, |
387 | manual: true, |
374 | periodo : semestre.semestre, |
388 | periodo: semestre.semestre, |
375 | alunosInscritos: 0, |
389 | alunosInscritos: 0, |
376 | aprovados: 0, |
390 | aprovados: 0, |
377 | aprovados1013: 0, |
391 | aprovados1013: 0, |
378 | aprovados1013Percent: 0, |
392 | aprovados1013Percent: 0, |
379 | aprovados1416: 0, |
393 | aprovados1416: 0, |
Line 384... | Line 398... | ||
384 | cumprimentoProgramaPercent: 0, |
398 | cumprimentoProgramaPercent: 0, |
385 | reprovados: 0, |
399 | reprovados: 0, |
386 | reprovadosPercent: 0, |
400 | reprovadosPercent: 0, |
387 | semElementos: 0, |
401 | semElementos: 0, |
388 | semElementosPercent: 0, |
402 | semElementosPercent: 0, |
389 | sigesCode : 0 |
403 | sigesCode: 0 |
390 | } |
404 | } |
391 | ); |
405 | ); |
392 | } |
406 | } |
393 | $scope.addAno = function(comp) |
407 | $scope.addAno = function (comp) { |
394 | { |
- | |
395 | if(!comp.years) |
408 | if (!comp.years) |
396 | comp.years = []; |
409 | comp.years = []; |
397 | comp.years.push( |
410 | comp.years.push( |
398 | { |
411 | { |
399 | ano : 1, |
412 | ano: 1, |
400 | "@class" : "<%=UnitsLearningResultYear.class.getName()%>", |
413 | "@class": "<%=UnitsLearningResultYear.class.getName()%>", |
401 | manual : true, |
414 | manual: true, |
402 | "alunosInscritos": 0, |
415 | "alunosInscritos": 0, |
403 | "aprovados": 0, |
416 | "aprovados": 0, |
404 | "aprovados1013": 0, |
417 | "aprovados1013": 0, |
405 | "aprovados1013Percent": 0, |
418 | "aprovados1013Percent": 0, |
406 | "aprovados1416": 0, |
419 | "aprovados1416": 0, |
Line 411... | Line 424... | ||
411 | "cumprimentoProgramaPercent": 0, |
424 | "cumprimentoProgramaPercent": 0, |
412 | "reprovados": 0, |
425 | "reprovados": 0, |
413 | "reprovadosPercent": 0, |
426 | "reprovadosPercent": 0, |
414 | "semElementos": 0, |
427 | "semElementos": 0, |
415 | "semElementosPercent": 0, |
428 | "semElementosPercent": 0, |
416 | semesters : [ |
429 | semesters: [ |
417 | { |
430 | { |
418 | "@class" : "<%=UnitsLearningResultSemester.class.getName()%>", |
431 | "@class": "<%=UnitsLearningResultSemester.class.getName()%>", |
419 | manual : true, |
432 | manual: true, |
420 | semestre : "S1", |
433 | semestre: "S1", |
421 | alunosInscritos: 0, |
434 | alunosInscritos: 0, |
422 | aprovados: 0, |
435 | aprovados: 0, |
423 | aprovados1013: 0, |
436 | aprovados1013: 0, |
424 | aprovados1013Percent: 0, |
437 | aprovados1013Percent: 0, |
425 | aprovados1416: 0, |
438 | aprovados1416: 0, |
Line 430... | Line 443... | ||
430 | cumprimentoProgramaPercent: 0, |
443 | cumprimentoProgramaPercent: 0, |
431 | reprovados: 0, |
444 | reprovados: 0, |
432 | reprovadosPercent: 0, |
445 | reprovadosPercent: 0, |
433 | semElementos: 0, |
446 | semElementos: 0, |
434 | semElementosPercent: 0, |
447 | semElementosPercent: 0, |
435 | ucs : [] |
448 | ucs: [] |
436 | }, |
449 | }, |
437 | { |
450 | { |
438 | "@class" : "<%=UnitsLearningResultSemester.class.getName()%>", |
451 | "@class": "<%=UnitsLearningResultSemester.class.getName()%>", |
439 | manual : true, |
452 | manual: true, |
440 | semestre: "S2", |
453 | semestre: "S2", |
441 | alunosInscritos: 0, |
454 | alunosInscritos: 0, |
442 | aprovados: 0, |
455 | aprovados: 0, |
443 | aprovados1013: 0, |
456 | aprovados1013: 0, |
444 | aprovados1013Percent: 0, |
457 | aprovados1013Percent: 0, |
Line 450... | Line 463... | ||
450 | cumprimentoProgramaPercent: 0, |
463 | cumprimentoProgramaPercent: 0, |
451 | reprovados: 0, |
464 | reprovados: 0, |
452 | reprovadosPercent: 0, |
465 | reprovadosPercent: 0, |
453 | semElementos: 0, |
466 | semElementos: 0, |
454 | semElementosPercent: 0, |
467 | semElementosPercent: 0, |
455 | ucs : [] |
468 | ucs: [] |
456 | } |
469 | } |
457 | ] |
470 | ] |
458 | } |
471 | } |
459 | ); |
472 | ); |
460 | } |
473 | } |
461 | 474 | ||
462 | }, |
475 | }, |
463 | templateUrl: function(elem,attrs) { |
476 | templateUrl: function (elem, attrs) { |
464 | return "unitslearningresultstable"; |
477 | return "unitslearningresultstable"; |
- | 478 | } |
|
465 | } |
479 | } |
466 | } |
480 | }); |
467 | }); |
- | |
468 | </script> |
481 | </script> |
469 | <script type="text/ng-template" id="unitslearningresultstable"> |
482 | <script type="text/ng-template" id="unitslearningresultstable"> |
470 | 483 | ||
471 | 484 | ||
472 | <div class="sections"> |
485 | <div class="sections"> |
473 | <button class="btn btn-success" ng-click="addAno(comp)"><span class="glyphicon glyphicon-plus"></span> Ano Manual</button> |
486 | <button class="btn btn-success" ng-click="addAno(comp)"><span class="glyphicon glyphicon-plus"></span> Ano |
- | 487 | Manual |
|
- | 488 | </button> |
|
474 | <table class="table learning"> |
489 | <table class="table learning"> |
475 | <thead> |
490 | <thead> |
476 | <tr> |
491 | <tr> |
477 | <th rowspan="2">Mover</th> |
492 | <th rowspan="2">Mover</th> |
478 | <th rowspan="2">Código</th> |
493 | <th rowspan="2">Código</th> |
Line 504... | Line 519... | ||
504 | <tbody> |
519 | <tbody> |
505 | <tr colspan="17" ng-if="false" ng-repeat-start="year in comp.years"></tr> |
520 | <tr colspan="17" ng-if="false" ng-repeat-start="year in comp.years"></tr> |
506 | <tr class="year"> |
521 | <tr class="year"> |
507 | <td colspan="3" ng-if="year.ano > 0"> |
522 | <td colspan="3" ng-if="year.ano > 0"> |
508 | 523 | ||
509 | <button ng-disabled="hasYearUnits(year)" class="btn btn-danger btn-xs" ng-click="removeComponent($index,comp.years)"><span class="glyphicon glyphicon-remove"></span></button> |
524 | <button ng-disabled="hasYearUnits(year)" class="btn btn-danger btn-xs" |
- | 525 | ng-click="removeComponent($index,comp.years)"><span |
|
- | 526 | class="glyphicon glyphicon-remove"></span></button> |
|
510 | <span ng-if="!year.manual">{{year.ano}}ª ano</span> |
527 | <span ng-if="!year.manual">{{year.ano}}ª ano</span> |
511 | <span ng-if="year.manual"> |
528 | <span ng-if="year.manual"> |
- | 529 | <select ng-model="year.ano" |
|
512 | <select ng-model="year.ano" ng-options="c.v as c.n for c in [{v:1,n:'1º Ano'},{v:2,n:'2º Ano'},{v:3,n:'3º Ano'},{v:4,n:'4º Ano'},{v:5,n:'5º Ano'}]"> |
530 | ng-options="c.v as c.n for c in [{v:1,n:'1º Ano'},{v:2,n:'2º Ano'},{v:3,n:'3º Ano'},{v:4,n:'4º Ano'},{v:5,n:'5º Ano'}]"> |
513 | </select> |
531 | </select> |
514 | </span> |
532 | </span> |
515 | 533 | ||
516 | </td> |
534 | </td> |
517 | <td colspan="3" style="font-size: 1.0em !important" ng-if="isInvalidAnfHaveUcs(year,comp.years,$index)"> |
535 | <td colspan="3" style="font-size: 1.0em !important" ng-if="isInvalidAnfHaveUcs(year,comp.years,$index)"> |
518 | Unidades que não constam do plano (Verifique a situação com os serviços Académicos antes de continuar) |
536 | Unidades que não constam do plano (Verifique a situação com os serviços Académicos antes de |
- | 537 | continuar) |
|
519 | poderão constar de um plano antigo ou ter o código siges desatualizado. |
538 | poderão constar de um plano antigo ou ter o código siges desatualizado. |
520 | </td> |
539 | </td> |
521 | <td><input readonly="true" type="number" ng-model="year.cumprimentoProgramaPercent" bound-model="avg('cumprimentoProgramaPercent',year,year.semesters)"></td> |
540 | <td><input readonly="true" type="number" ng-model="year.cumprimentoProgramaPercent" |
- | 541 | bound-model="avg('cumprimentoProgramaPercent',year,year.semesters)"></td> |
|
522 | <td><input readonly="true" type="number" ng-model="year.alunosInscritos" bound-model="avg('alunosInscritos',year,year.semesters)"></td> |
542 | <td><input readonly="true" type="number" ng-model="year.alunosInscritos" |
- | 543 | bound-model="avg('alunosInscritos',year,year.semesters)"></td> |
|
- | 544 | <td><input readonly="true" type="number" ng-model="year.semElementos" |
|
- | 545 | bound-model="avg('semElementos',year,year.semesters)"></td> |
|
523 | <td><input readonly="true" type="number" ng-model="year.semElementos" bound-model="avg('semElementos',year,year.semesters)"></td> |
546 | <td><input readonly="true" type="number" ng-model="year.semElementosPercent" |
524 | <td><input readonly="true" type="number" ng-model="year.semElementosPercent" bound-model="percent(year.semElementos,year.alunosInscritos)"></td> |
547 | bound-model="percent(year.semElementos,year.alunosInscritos)"></td> |
525 | <td><input readonly="true" type="number" ng-model="year.reprovados" bound-model="reprovados(year)"></td> |
548 | <td><input readonly="true" type="number" ng-model="year.reprovados" bound-model="reprovados(year)"></td> |
526 | <td><input readonly="true" type="number" ng-model="year.reprovadosPercent" bound-model="percent(year.reprovados,year.alunosInscritos)"></td> |
549 | <td><input readonly="true" type="number" ng-model="year.reprovadosPercent" |
- | 550 | bound-model="percent(year.reprovados,year.alunosInscritos)"></td> |
|
- | 551 | <td><input readonly="true" type="number" ng-model="year.aprovados" |
|
527 | <td><input readonly="true" type="number" ng-model="year.aprovados" bound-model="year.aprovados1013*1 + year.aprovados1416*1 + year.aprovados1720*1"></td> |
552 | bound-model="year.aprovados1013*1 + year.aprovados1416*1 + year.aprovados1720*1"></td> |
528 | <td><input readonly="true" type="number" ng-model="year.aprovadosPercent" bound-model="percent(year.aprovados,year.alunosInscritos)"></td> |
553 | <td><input readonly="true" type="number" ng-model="year.aprovadosPercent" |
- | 554 | bound-model="percent(year.aprovados,year.alunosInscritos)"></td> |
|
529 | 555 | ||
530 | <td><input readonly="true" type="number" ng-model="year.aprovados1013" bound-model="avg('aprovados1013',year,year.semesters)"></td> |
556 | <td><input readonly="true" type="number" ng-model="year.aprovados1013" |
- | 557 | bound-model="avg('aprovados1013',year,year.semesters)"></td> |
|
531 | <td><input readonly="true" type="number" ng-model="year.aprovados1013Percent" bound-model="percent(year.aprovados1013,year.aprovados)"></td> |
558 | <td><input readonly="true" type="number" ng-model="year.aprovados1013Percent" |
- | 559 | bound-model="percent(year.aprovados1013,year.aprovados)"></td> |
|
532 | <td><input readonly="true" type="number" ng-model="year.aprovados1416" bound-model="avg('aprovados1416',year,year.semesters)"></td> |
560 | <td><input readonly="true" type="number" ng-model="year.aprovados1416" |
- | 561 | bound-model="avg('aprovados1416',year,year.semesters)"></td> |
|
533 | <td><input readonly="true" type="number" ng-model="year.aprovados1416Percent" bound-model="percent(year.aprovados1416,year.aprovados)"></td> |
562 | <td><input readonly="true" type="number" ng-model="year.aprovados1416Percent" |
- | 563 | bound-model="percent(year.aprovados1416,year.aprovados)"></td> |
|
534 | <td><input readonly="true" type="number" ng-model="year.aprovados1720" bound-model="avg('aprovados1720',year,year.semesters)"></td> |
564 | <td><input readonly="true" type="number" ng-model="year.aprovados1720" |
- | 565 | bound-model="avg('aprovados1720',year,year.semesters)"></td> |
|
535 | <td><input readonly="true" type="number" ng-model="year.aprovados1720Percent" bound-model="percent(year.aprovados1720,year.aprovados)"></td> |
566 | <td><input readonly="true" type="number" ng-model="year.aprovados1720Percent" |
- | 567 | bound-model="percent(year.aprovados1720,year.aprovados)"></td> |
|
536 | </tr> |
568 | </tr> |
537 | 569 | ||
538 | <tr ng-if="false" ng-repeat-start="s in year.semesters" ></tr> |
570 | <tr ng-if="false" ng-repeat-start="s in year.semesters"></tr> |
539 | <tr class="period" ng-if="year.ano > 0 || s.ucs.length > 0"> |
571 | <tr class="period" ng-if="year.ano > 0 || s.ucs.length > 0"> |
- | 572 | <td colspan="3" class="period">Semestre {{s.semestre}} |
|
540 | <td colspan="3" class="period">Semestre {{s.semestre}} <button ng-click="changeDocumentCollection(s)" data-toggle="tooltip" title="Mover unidades para aqui" class="btn btn-xs btn-warning" ng-show="checkedDocuments.length"><span class="glyphicon glyphicon-arrow-left"></span></button> |
573 | <button ng-click="changeDocumentCollection(s)" data-toggle="tooltip" |
- | 574 | title="Mover unidades para aqui" class="btn btn-xs btn-warning" |
|
- | 575 | ng-show="checkedDocuments.length"><span class="glyphicon glyphicon-arrow-left"></span> |
|
- | 576 | </button> |
|
541 | 577 | ||
542 | <button class="btn btn-success pull-right" ng-click="addUc(s)"><span class="glyphicon glyphicon-plus"></span> UC Manual</button> |
578 | <button class="btn btn-success pull-right" ng-click="addUc(s)"><span |
- | 579 | class="glyphicon glyphicon-plus"></span> UC Manual |
|
- | 580 | </button> |
|
543 | </td> |
581 | </td> |
544 | <td><input readonly="true" type="number" ng-model="s.cumprimentoProgramaPercent" bound-model="avg('cumprimentoProgramaPercent',s,s.ucs)"></td> |
582 | <td><input readonly="true" type="number" ng-model="s.cumprimentoProgramaPercent" |
- | 583 | bound-model="avg('cumprimentoProgramaPercent',s,s.ucs)"></td> |
|
545 | <td><input readonly="true" type="number" ng-model="s.alunosInscritos" bound-model="avg('alunosInscritos',s,s.ucs)"></td> |
584 | <td><input readonly="true" type="number" ng-model="s.alunosInscritos" |
- | 585 | bound-model="avg('alunosInscritos',s,s.ucs)"></td> |
|
546 | <td><input readonly="true" type="number" ng-model="s.semElementos" bound-model="avg('semElementos',s,s.ucs)"></td> |
586 | <td><input readonly="true" type="number" ng-model="s.semElementos" |
- | 587 | bound-model="avg('semElementos',s,s.ucs)"></td> |
|
547 | <td><input readonly="true" type="number" ng-model="s.semElementosPercent" bound-model="percent(s.semElementos,s.alunosInscritos)"></td> |
588 | <td><input readonly="true" type="number" ng-model="s.semElementosPercent" |
- | 589 | bound-model="percent(s.semElementos,s.alunosInscritos)"></td> |
|
548 | <td><input readonly="true" type="number" ng-model="s.reprovados" bound-model="reprovados(s)"></td> |
590 | <td><input readonly="true" type="number" ng-model="s.reprovados" bound-model="reprovados(s)"></td> |
549 | <td><input readonly="true" type="number" ng-model="s.reprovadosPercent" bound-model="percent(s.reprovados,s.alunosInscritos)"></td> |
591 | <td><input readonly="true" type="number" ng-model="s.reprovadosPercent" |
- | 592 | bound-model="percent(s.reprovados,s.alunosInscritos)"></td> |
|
- | 593 | <td><input readonly="true" type="number" ng-model="s.aprovados" |
|
550 | <td><input readonly="true" type="number" ng-model="s.aprovados" bound-model="s.aprovados1013*1 + s.aprovados1416*1 + s.aprovados1720*1"></td> |
594 | bound-model="s.aprovados1013*1 + s.aprovados1416*1 + s.aprovados1720*1"></td> |
551 | <td><input readonly="true" type="number" ng-model="s.aprovadosPercent" bound-model="percent(s.aprovados,s.alunosInscritos)"></td> |
595 | <td><input readonly="true" type="number" ng-model="s.aprovadosPercent" |
- | 596 | bound-model="percent(s.aprovados,s.alunosInscritos)"></td> |
|
552 | 597 | ||
553 | <td><input readonly="true" type="number" ng-model="s.aprovados1013" bound-model="avg('aprovados1013',s,s.ucs)"></td> |
598 | <td><input readonly="true" type="number" ng-model="s.aprovados1013" |
- | 599 | bound-model="avg('aprovados1013',s,s.ucs)"></td> |
|
554 | <td><input readonly="true" type="number" ng-model="s.aprovados1013Percent" bound-model="percent(s.aprovados1013,s.aprovados)"></td> |
600 | <td><input readonly="true" type="number" ng-model="s.aprovados1013Percent" |
- | 601 | bound-model="percent(s.aprovados1013,s.aprovados)"></td> |
|
555 | <td><input readonly="true" type="number" ng-model="s.aprovados1416" bound-model="avg('aprovados1416',s,s.ucs)"></td> |
602 | <td><input readonly="true" type="number" ng-model="s.aprovados1416" |
- | 603 | bound-model="avg('aprovados1416',s,s.ucs)"></td> |
|
556 | <td><input readonly="true" type="number" ng-model="s.aprovados1416Percent" bound-model="percent(s.aprovados1416,s.aprovados)"></td> |
604 | <td><input readonly="true" type="number" ng-model="s.aprovados1416Percent" |
- | 605 | bound-model="percent(s.aprovados1416,s.aprovados)"></td> |
|
557 | <td><input readonly="true" type="number" ng-model="s.aprovados1720" bound-model="avg('aprovados1720',s,s.ucs)"></td> |
606 | <td><input readonly="true" type="number" ng-model="s.aprovados1720" |
- | 607 | bound-model="avg('aprovados1720',s,s.ucs)"></td> |
|
558 | <td><input readonly="true" type="number" ng-model="s.aprovados1720Percent" bound-model="percent(s.aprovados1720,s.aprovados)"></td> |
608 | <td><input readonly="true" type="number" ng-model="s.aprovados1720Percent" |
- | 609 | bound-model="percent(s.aprovados1720,s.aprovados)"></td> |
|
559 | </tr> |
610 | </tr> |
560 | <tr ng-repeat="u in s.ucs" ng-class="{'alert-danger': u.error}" > |
611 | <tr ng-repeat="u in s.ucs" ng-class="{'alert-danger': u.error}"> |
- | 612 | <td><input ng-model="u.error" type="hidden" |
|
561 | <td><input ng-model="u.error" type="hidden" bound-model="u.alunosInscritos < (u.aprovados*1 + u.semElementos*1)"> |
613 | bound-model="u.alunosInscritos < (u.aprovados*1 + u.semElementos*1)"> |
562 | <input ng-model="u.checked" ng-click="checkUnit(u,s)" type="checkbox"></td> |
614 | <input ng-model="u.checked" ng-click="checkUnit(u,s)" type="checkbox"></td> |
563 | <td><input type="text" ng-readonly="!u.manual || u.manual == false" ng-model="u.sigesCode"></td> |
615 | <td><input type="text" ng-readonly="!u.manual || u.manual == false" ng-model="u.sigesCode"></td> |
564 | <td> |
616 | <td> |
565 | 617 | ||
566 | <input type="text" style="width: 150px" ng-if="!(!u.manual || u.manual == false)" ng-model="u.name"> |
618 | <input type="text" style="width: 150px" ng-if="!(!u.manual || u.manual == false)" ng-model="u.name"> |
567 | <span ng-if="(!u.manual || u.manual == false)">{{u.name}}</span> |
619 | <span ng-if="(!u.manual || u.manual == false)">{{u.name}}</span> |
- | 620 | <button class="btn btn-danger btn-xs pull-right" ng-if="!(!u.manual || u.manual == false)" |
|
568 | <button class="btn btn-danger btn-xs pull-right" ng-if="!(!u.manual || u.manual == false)" ng-click="removeComponent(index,s.ucs)"><span class="glyphicon glyphicon-remove"></span></button> |
621 | ng-click="removeComponent(index,s.ucs)"><span class="glyphicon glyphicon-remove"></span> |
- | 622 | </button> |
|
569 | </td> |
623 | </td> |
570 | <td><input type="number" ng-model="u.cumprimentoProgramaPercent"></td> |
624 | <td><input type="number" ng-model="u.cumprimentoProgramaPercent"></td> |
571 | <td><input type="number" ng-model="u.alunosInscritos"></td> |
625 | <td><input type="number" ng-model="u.alunosInscritos"></td> |
572 | <td><input type="number" ng-model="u.semElementos"></td> |
626 | <td><input type="number" ng-model="u.semElementos"></td> |
573 | <td><input readonly="true" type="number" ng-model="u.semElementosPercent" bound-model="percent(u.semElementos,u.alunosInscritos)"></td> |
627 | <td><input readonly="true" type="number" ng-model="u.semElementosPercent" |
- | 628 | bound-model="percent(u.semElementos,u.alunosInscritos)"></td> |
|
574 | <td><input readonly="true" type="number" ng-model="u.reprovados" bound-model="reprovados(u)"></td> |
629 | <td><input readonly="true" type="number" ng-model="u.reprovados" bound-model="reprovados(u)"></td> |
575 | <td><input readonly="true" type="number" ng-model="u.reprovadosPercent" bound-model="percent(u.reprovados,u.alunosInscritos)"></td> |
630 | <td><input readonly="true" type="number" ng-model="u.reprovadosPercent" |
- | 631 | bound-model="percent(u.reprovados,u.alunosInscritos)"></td> |
|
- | 632 | <td><input readonly="true" type="number" ng-model="u.aprovados" |
|
576 | <td><input readonly="true" type="number" ng-model="u.aprovados" bound-model="u.aprovados1013*1 + u.aprovados1416*1 + u.aprovados1720*1"></td> |
633 | bound-model="u.aprovados1013*1 + u.aprovados1416*1 + u.aprovados1720*1"></td> |
577 | <td><input readonly="true" type="number" ng-model="u.aprovadosPercent" bound-model="percent(u.aprovados,u.alunosInscritos)"></td> |
634 | <td><input readonly="true" type="number" ng-model="u.aprovadosPercent" |
- | 635 | bound-model="percent(u.aprovados,u.alunosInscritos)"></td> |
|
578 | 636 | ||
579 | <td><input type="number" ng-model="u.aprovados1013"></td> |
637 | <td><input type="number" ng-model="u.aprovados1013"></td> |
580 | <td><input readonly="true" type="number" ng-model="u.aprovados1013Percent" bound-model="percent(u.aprovados1013,u.aprovados)"></td> |
638 | <td><input readonly="true" type="number" ng-model="u.aprovados1013Percent" |
- | 639 | bound-model="percent(u.aprovados1013,u.aprovados)"></td> |
|
581 | <td><input type="number" ng-model="u.aprovados1416"></td> |
640 | <td><input type="number" ng-model="u.aprovados1416"></td> |
582 | <td><input readonly="true" type="number" ng-model="u.aprovados1416Percent" bound-model="percent(u.aprovados1416,u.aprovados)"></td> |
641 | <td><input readonly="true" type="number" ng-model="u.aprovados1416Percent" |
- | 642 | bound-model="percent(u.aprovados1416,u.aprovados)"></td> |
|
583 | <td><input type="number" ng-model="u.aprovados1720"></td> |
643 | <td><input type="number" ng-model="u.aprovados1720"></td> |
584 | <td><input readonly="true" type="number" ng-model="u.aprovados1720Percent" bound-model="percent(u.aprovados1720,u.aprovados)"></td> |
644 | <td><input readonly="true" type="number" ng-model="u.aprovados1720Percent" |
- | 645 | bound-model="percent(u.aprovados1720,u.aprovados)"></td> |
|
585 | </tr> |
646 | </tr> |
586 | <tr ng-if="false" ng-repeat-end></tr> |
647 | <tr ng-if="false" ng-repeat-end></tr> |
587 | <tr ng-if="false" ng-repeat-end></tr> |
648 | <tr ng-if="false" ng-repeat-end></tr> |
588 | <tr class="year"> |
649 | <tr class="year"> |
589 | <td colspan="3">Resultados Globais</td> |
650 | <td colspan="3">Resultados Globais</td> |
590 | 651 | ||
591 | 652 | ||
592 | <td><input readonly="true" type="number" ng-model="comp.cumprimentoProgramaPercent" bound-model="avg('cumprimentoProgramaPercent',comp,comp.years)"></td> |
653 | <td><input readonly="true" type="number" ng-model="comp.cumprimentoProgramaPercent" |
- | 654 | bound-model="avg('cumprimentoProgramaPercent',comp,comp.years)"></td> |
|
593 | <td><input readonly="true" type="number" ng-model="comp.alunosInscritos" bound-model="avg('alunosInscritos',comp,comp.years)"></td> |
655 | <td><input readonly="true" type="number" ng-model="comp.alunosInscritos" |
- | 656 | bound-model="avg('alunosInscritos',comp,comp.years)"></td> |
|
- | 657 | <td><input readonly="true" type="number" ng-model="comp.semElementos" |
|
- | 658 | bound-model="avg('semElementos',comp,comp.years)"></td> |
|
594 | <td><input readonly="true" type="number" ng-model="comp.semElementos" bound-model="avg('semElementos',comp,comp.years)"></td> |
659 | <td><input readonly="true" type="number" ng-model="comp.semElementosPercent" |
595 | <td><input readonly="true" type="number" ng-model="comp.semElementosPercent" bound-model="percent(comp.semElementos,comp.alunosInscritos)"></td> |
660 | bound-model="percent(comp.semElementos,comp.alunosInscritos)"></td> |
596 | <td><input readonly="true" type="number" ng-model="comp.reprovados" bound-model="reprovados(comp)"></td> |
661 | <td><input readonly="true" type="number" ng-model="comp.reprovados" bound-model="reprovados(comp)"></td> |
597 | <td><input readonly="true" type="number" ng-model="comp.reprovadosPercent" bound-model="percent(comp.reprovados,comp.alunosInscritos)"></td> |
662 | <td><input readonly="true" type="number" ng-model="comp.reprovadosPercent" |
- | 663 | bound-model="percent(comp.reprovados,comp.alunosInscritos)"></td> |
|
- | 664 | <td><input readonly="true" type="number" ng-model="comp.aprovados" |
|
598 | <td><input readonly="true" type="number" ng-model="comp.aprovados" bound-model="comp.aprovados1013*1 + comp.aprovados1416*1 + comp.aprovados1720*1"></td> |
665 | bound-model="comp.aprovados1013*1 + comp.aprovados1416*1 + comp.aprovados1720*1"></td> |
599 | <td><input readonly="true" type="number" ng-model="comp.aprovadosPercent" bound-model="percent(comp.aprovados,comp.alunosInscritos)"></td> |
666 | <td><input readonly="true" type="number" ng-model="comp.aprovadosPercent" |
- | 667 | bound-model="percent(comp.aprovados,comp.alunosInscritos)"></td> |
|
600 | 668 | ||
601 | <td><input readonly="true" type="number" ng-model="comp.aprovados1013" bound-model="avg('aprovados1013',comp,comp.years)"></td> |
669 | <td><input readonly="true" type="number" ng-model="comp.aprovados1013" |
- | 670 | bound-model="avg('aprovados1013',comp,comp.years)"></td> |
|
602 | <td><input readonly="true" type="number" ng-model="comp.aprovados1013Percent" bound-model="percent(comp.aprovados1013,comp.aprovados)"></td> |
671 | <td><input readonly="true" type="number" ng-model="comp.aprovados1013Percent" |
- | 672 | bound-model="percent(comp.aprovados1013,comp.aprovados)"></td> |
|
603 | <td><input readonly="true" type="number" ng-model="comp.aprovados1416" bound-model="avg('aprovados1416',comp,comp.years)"></td> |
673 | <td><input readonly="true" type="number" ng-model="comp.aprovados1416" |
- | 674 | bound-model="avg('aprovados1416',comp,comp.years)"></td> |
|
604 | <td><input readonly="true" type="number" ng-model="comp.aprovados1416Percent" bound-model="percent(comp.aprovados1416,comp.aprovados)"></td> |
675 | <td><input readonly="true" type="number" ng-model="comp.aprovados1416Percent" |
- | 676 | bound-model="percent(comp.aprovados1416,comp.aprovados)"></td> |
|
605 | <td><input readonly="true" type="number" ng-model="comp.aprovados1720" bound-model="avg('aprovados1720',comp,comp.years)"></td> |
677 | <td><input readonly="true" type="number" ng-model="comp.aprovados1720" |
- | 678 | bound-model="avg('aprovados1720',comp,comp.years)"></td> |
|
606 | <td><input readonly="true" type="number" ng-model="comp.aprovados1720Percent" bound-model="percent(comp.aprovados1720,comp.aprovados)"></td> |
679 | <td><input readonly="true" type="number" ng-model="comp.aprovados1720Percent" |
- | 680 | bound-model="percent(comp.aprovados1720,comp.aprovados)"></td> |
|
607 | </tr> |
681 | </tr> |
608 | </tbody> |
682 | </tbody> |
609 | </table> |
683 | </table> |
610 | <%--<pre class="code">{{ comp | json }}</pre>--%> |
684 | <%--<pre class="code">{{ comp | json }}</pre>--%> |
611 | </div> |
685 | </div> |
612 | </script> |
686 | </script> |
613 | 687 | ||
614 | 688 | ||
- | 689 | <script type="text/ng-template" |
|
- | 690 | id="pt_estgp_estgweb_services_courses_coursereport_documentmodel_learningresults_components_GlobalLearningResultsChartImg"> |
|
- | 691 | <globallearningresultschartimg> |
|
- | 692 | </globallearningresultschartimg> |
|
- | 693 | </script> |
|
- | 694 | <script> |
|
- | 695 | angular.module("courseReportApp").directive('globallearningresultschartimg', function () { |
|
615 | 696 | ||
- | 697 | return { |
|
- | 698 | restrict: 'E', |
|
- | 699 | link: function ($scope, element, attrs) { |
|
- | 700 | $scope.generateChart = function (comp) { |
|
616 | 701 | ||
- | 702 | widgetCallWithActionParameters( |
|
- | 703 | "<%=request.getContextPath()%>/user/courseReport.do", |
|
- | 704 | "generateGlobalLearningResultsChartImg", |
|
- | 705 | { |
|
- | 706 | "courseReportDocument": BacoJS.stringifyOrdered(angular.element($("#courseReportApp")).scope().report) |
|
- | 707 | }, |
|
- | 708 | "#courseReportApp", |
|
- | 709 | function (repositoryFile4JsonView) { |
|
- | 710 | comp.image = repositoryFile4JsonView; |
|
- | 711 | comp.imageUrl = "<%=request.getContextPath()%>/repositoryStream/" + comp.image.identifier + "?" + new Date().getTime(); |
|
- | 712 | angular.element($("#courseReportApp")).scope().$apply(); |
|
- | 713 | }, |
|
- | 714 | function () { |
|
- | 715 | } |
|
- | 716 | ); |
|
- | 717 | } |
|
617 | 718 | ||
618 | 719 | ||
- | 720 | }, |
|
- | 721 | templateUrl: function (elem, attrs) { |
|
- | 722 | return "globallearningresultschartimg"; |
|
- | 723 | } |
|
- | 724 | } |
|
- | 725 | }); |
|
- | 726 | </script> |
|
- | 727 | <script type="text/ng-template" id="globallearningresultschartimg"> |
|
- | 728 | <div class="imageComponent component"> |
|
619 | 729 | ||
- | 730 | <div class="componentBody"> |
|
- | 731 | <div class="form-group clearfix"> |
|
- | 732 | <label class="col-md-2 control-label">Legenda</label> |
|
- | 733 | <div class="col-md-10"> |
|
- | 734 | <input type="text" class="form-control" rows="10" ng-model="comp.title"> |
|
- | 735 | </div> |
|
- | 736 | </div> |
|
- | 737 | <div class="form-group clearfix"> |
|
- | 738 | <div class="col-md-2 control-label"> |
|
- | 739 | <button class="btn btn-default" ng-click="generateChart(comp)">Refrescar/Gerar Gráfico</button> |
|
- | 740 | </div> |
|
- | 741 | <div class="col-md-10"> |
|
- | 742 | <label ng-if="comp.image.identifier"> Limites do PDF </label> |
|
- | 743 | <div ng-if="comp.image.identifier" |
|
- | 744 | style="text-align: center; width: 595px; border: 1px solid black; padding: 45px"> |
|
- | 745 | <center> |
|
- | 746 | <div style="width: 200px;height: 200px; max-width: 500px; max-height: 750px" resizable |
|
- | 747 | on-resize="resize($evt, $ui, comp)"> |
|
- | 748 | <img ng-if="comp.imageUrl" style="width: 100%;height: 100%" ng-src="{{comp.imageUrl}}"> |
|
- | 749 | <img ng-if="!comp.imageUrl" style="width: 100%;height: 100%" |
|
- | 750 | ng-src="{{'<%=request.getContextPath()%>/repositoryStream/' + comp.image.identifier}}"> |
|
- | 751 | </div> |
|
- | 752 | (Se desejar altere o tamanho da imagem arrastando no canto inferior direito) |
|
- | 753 | </center> |
|
- | 754 | </div> |
|
- | 755 | </div> |
|
- | 756 | </div> |
|
- | 757 | </div> |
|
- | 758 | </div> |
|
- | 759 | </script> |
|
620 | 760 | ||
621 | 761 | ||
622 | - | ||
623 | - | ||
624 | - | ||
625 | - | ||
- | 762 | <script type="text/ng-template" |
|
626 | <script type="text/ng-template" id="pt_estgp_estgweb_services_courses_coursereport_documentmodel_learningresults_components_GlobalLearningResultsChartImg"> |
763 | id="pt_estgp_estgweb_services_courses_coursereport_documentmodel_learningresults_components_GlobalLearningResultsChartYearImg"> |
627 | <globallearningresultschartimg> |
764 | <globallearningresultschartyearimg> |
628 | </globallearningresultschartimg> |
765 | </globallearningresultschartyearimg> |
629 | </script> |
766 | </script> |
630 | <script> |
767 | <script> |
631 | angular.module("courseReportApp").directive('globallearningresultschartimg', function() { |
768 | angular.module("courseReportApp").directive('globallearningresultschartyearimg', function () { |
632 | 769 | ||
633 | return { |
770 | return { |
634 | restrict: 'E', |
771 | restrict: 'E', |
635 | link: function($scope, element, attrs) |
772 | link: function ($scope, element, attrs) { |
636 | { |
- | |
637 | $scope.generateChart = function(comp) |
773 | $scope.generateChart = function (comp) { |
638 | { |
- | |
639 | 774 | ||
640 | widgetCallWithActionParameters( |
775 | widgetCallWithActionParameters( |
641 | "<%=request.getContextPath()%>/user/courseReport.do", |
776 | "<%=request.getContextPath()%>/user/courseReport.do", |
642 | "generateGlobalLearningResultsChartImg", |
777 | "generateGlobalLearningResultsChartYearImg", |
643 | { |
778 | { |
644 | "courseReportDocument" : BacoJS.stringifyOrdered(angular.element($("#courseReportApp")).scope().report) |
779 | "courseReportDocument": BacoJS.stringifyOrdered(angular.element($("#courseReportApp")).scope().report) |
645 | }, |
780 | }, |
646 | "#courseReportApp", |
781 | "#courseReportApp", |
647 | function(repositoryFile4JsonView) |
782 | function (repositoryFile4JsonView) { |
648 | { |
- | |
649 | comp.image = repositoryFile4JsonView; |
783 | comp.image = repositoryFile4JsonView; |
650 | comp.imageUrl = "<%=request.getContextPath()%>/repositoryStream/" + comp.image.identifier + "?" + new Date().getTime(); |
784 | comp.imageUrl = "<%=request.getContextPath()%>/repositoryStream/" + comp.image.identifier + "?" + new Date().getTime(); |
651 | angular.element($("#courseReportApp")).scope().$apply(); |
785 | angular.element($("#courseReportApp")).scope().$apply(); |
652 | }, |
786 | }, |
653 | function(){} |
787 | function () { |
- | 788 | } |
|
654 | ); |
789 | ); |
655 | } |
790 | } |
656 | 791 | ||
657 | 792 | ||
658 | }, |
793 | }, |
659 | templateUrl: function(elem,attrs) { |
794 | templateUrl: function (elem, attrs) { |
660 | return "globallearningresultschartimg"; |
795 | return "globallearningresultschartyearimg"; |
661 | } |
796 | } |
662 | } |
797 | } |
663 | }); |
798 | }); |
664 | </script> |
799 | </script> |
665 | <script type="text/ng-template" id="globallearningresultschartimg"> |
800 | <script type="text/ng-template" id="globallearningresultschartyearimg"> |
666 | <div class="imageComponent component"> |
801 | <div class="imageComponent component"> |
667 | 802 | ||
668 | <div class="componentBody"> |
803 | <div class="componentBody"> |
669 | <div class="form-group clearfix"> |
804 | <div class="form-group clearfix"> |
670 | <label class="col-md-2 control-label">Legenda</label> |
805 | <label class="col-md-2 control-label">Legenda</label> |
Line 676... | Line 811... | ||
676 | <div class="col-md-2 control-label"> |
811 | <div class="col-md-2 control-label"> |
677 | <button class="btn btn-default" ng-click="generateChart(comp)">Refrescar/Gerar Gráfico</button> |
812 | <button class="btn btn-default" ng-click="generateChart(comp)">Refrescar/Gerar Gráfico</button> |
678 | </div> |
813 | </div> |
679 | <div class="col-md-10"> |
814 | <div class="col-md-10"> |
680 | <label ng-if="comp.image.identifier"> Limites do PDF </label> |
815 | <label ng-if="comp.image.identifier"> Limites do PDF </label> |
- | 816 | <div ng-if="comp.image.identifier" |
|
681 | <div ng-if="comp.image.identifier" style="text-align: center; width: 595px; border: 1px solid black; padding: 45px"> |
817 | style="text-align: center; width: 595px; border: 1px solid black; padding: 45px"> |
682 | <center> |
818 | <center> |
683 | <div style="width: 200px;height: 200px; max-width: 500px; max-height: 750px" resizable on-resize="resize($evt, $ui, comp)"> |
819 | <div style="width: 200px;height: 200px; max-width: 500px; max-height: 750px" resizable |
- | 820 | on-resize="resize($evt, $ui, comp)"> |
|
684 | <img ng-if="comp.imageUrl" style="width: 100%;height: 100%" ng-src="{{comp.imageUrl}}"> |
821 | <img ng-if="comp.imageUrl" style="width: 100%;height: 100%" ng-src="{{comp.imageUrl}}"> |
- | 822 | <img ng-if="!comp.imageUrl" style="width: 100%;height: 100%" |
|
685 | <img ng-if="!comp.imageUrl" style="width: 100%;height: 100%" ng-src="{{'<%=request.getContextPath()%>/repositoryStream/' + comp.image.identifier}}"> |
823 | ng-src="{{'<%=request.getContextPath()%>/repositoryStream/' + comp.image.identifier}}"> |
686 | </div> |
824 | </div> |
687 | (Se desejar altere o tamanho da imagem arrastando no canto inferior direito) |
825 | (Se desejar altere o tamanho da imagem arrastando no canto inferior direito) |
688 | </center> |
826 | </center> |
689 | </div> |
827 | </div> |
690 | </div> |
828 | </div> |