Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 1866 → Rev 1869

/branches/jmachado/impl/src/web/user/courses/courseReportEdit.jsp
100,7 → 100,7
request.setAttribute("course",courseImpl);
CourseReportDocument courseReport = null;
try {
courseReport = new CourseReportServices().createNewCourseReportDocument("44", "201617");
courseReport = new CourseReportServices().createNewCourseReportDocument(courseCode, "201617");
} catch (Throwable e) {
System.out.println(e);
e.printStackTrace();
196,18 → 196,49
return false;
}
 
$scope.showSep = function(section)
$scope.showSep = function(section,subSection)
{
$(".separatorSectionNav").each(function()
var s;
for(s in section.sections)
{
section.sections[s].active = false;
}
/*$(".separatorSectionNav").each(function()
{
angular.element($(this)).scope().section.active = false;
});
section.active = true;
 
});*/
subSection.active = true;
}
 
/**
* Este metodo devolve o template mais profundo na hierarquia de classes
* permitindo emular o override, quanto mais especifica for a classe
* e caso exista template é esse o template devolvido
* procura um script com o id da classe e se nao existir
* vai subindo nas super classes
* @param obj
* @returns {*}
*/
$scope.class2id = function(obj)
{
var objClassId = obj["@class"].replaceAll(".","_");
if($("script#" + objClassId).length > 0)
{
return objClassId;
}
if(obj.allSuperClasses)
{
var s;
for(s in obj.allSuperClasses)
{
var superClass = obj.allSuperClasses[s];
var superClassId = superClass.replaceAll(".","_");
if($("script#" + superClassId).length > 0)
{
return superClassId;
}
}
}
return obj["@class"].replaceAll(".","_");
}
 
294,31 → 325,14
<div class="form-vertical">
<div id="courseReportApp" ng-app="courseReportApp" ng-controller="courseReportAppController">
 
<div ng-init="section=report;" ng-include="'pt_estgp_estgweb_utils_documentBuilder_DocumentSection'">
 
<ul class="nav nav-tabs">
<li ng-model="section" class="separatorSectionNav" ng-class="{ active: section.active}" ng-repeat="section in report.sections">
<a ng-click="showSep(section)">{{section.title}}</a>
</li>
</ul>
 
 
 
<!--DocumentSection-->
<div ng-model="section" ng-class="{ hidden: !section.active}" ng-repeat="section in report.sections" class="separatorSection clearfix">
 
<div ng-repeat="comp in section.components" ng-include="class2id(comp)">
 
</div>
 
 
</div>
<!--/DocumentSection-->
 
<%--
<pre class="code">{{ report | json }}</pre>
--%>
 
 
 
</div><!--App-->
</div> <!--form-->
 
/branches/jmachado/impl/src/web/user/utils/documentsBuilder.jsp
1,5 → 1,9
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<style>
.sections
{
padding-left: 20px;
}
.buttonTools
{
border: 1px solid gray;
23,7 → 27,12
}
</style>
 
<!--Require templateObj-->
<script type="text/ng-template" id="callDocumentTemplate">
 
<div ng-include="class2id(templateObj)"></div>
</script>
 
<%--
customPane Need component customPane in variable customPane
docAppSelector selector usualy an html ID for ng-app example #docReport
135,4 → 144,184
</div>
</div>
</div>
</script>
 
<!--
@section objeto com seccoes e componentes
@optional @chapter capitulo do documento para esta seccao para contcatenar às subsections
-->
<script type="text/ng-template" id="pt_estgp_estgweb_utils_documentBuilder_DocumentSection">
<div class="sections">
<ul class="nav nav-tabs">
<li ng-model="section" class="separatorSectionNav"
ng-class="{ active : subSection.active}"
ng-repeat="subSection in section.sections">
<a ng-click="showSep(section,subSection)"> {{$chapter}}{{$index+1}} - {{subSection.title}}</a>
</li>
</ul>
<div ng-model="subSection"
ng-class="{ hidden: !subSection.active }"
ng-repeat="subSection in section.sections"
class="separatorSection clearfix">
<div ng-repeat="comp in subSection.components"
ng-include="class2id(comp)">
 
</div>
<div ng-if="subSection.sections"
ng-init="section=subSection;$chapter=$chapter+($index+1)+'.'"
ng-include="class2id(subSection)">
</div>
</div>
</div>
</script>
 
<!--
@section objeto com seccoes e componentes
@optional @chapter capitulo do documento para esta seccao para contcatenar às subsections
-->
 
<script type="text/ng-template" id="pt_estgp_estgweb_services_courses_coursereport_documentmodel_CourseUnitsReportsSection">
<div class="sections">
<a name="indexCus"></a>
<span ng-repeat="cu in section.sections" ng-init="cu.taxaAprovacao = 100 * cu.courseUnitEvaluation.numAlunosAprovTotal/(cu.courseUnitEvaluation.numAlunosInscritos - cu.courseUnitEvaluation.numAlunosSemElementosAvaliacao)">
<a href="#cu{{$index}}" ng-class="{ 'alert-danger': (cu.courseUnitEvaluation.cumprimentoProgramaPercent &lt; 100) || cu.taxaAprovacao &lt; 75 || !cu.courseUnitEvaluation.closed || !cu.courseUnitEvaluation.teacherComplete}">
{{cu.title}}
</a> |
</span>
<div ng-repeat="cu in section.sections"
class="section panel-primary">
 
<a name="cu{{$index}}"></a>
<span ng-if="$index != 0" class="glyphicon glyphicon-backward" ></span><a ng-if="$index != 0" href="#indexCus"> Voltar atrás</a>
<div class="panel-heading"><h2>{{cu.title}}</h2></div>
 
<div style="padding-left:20px">
<div><h3><label class="label label-primary">Estado do Relatório</label></h3></div>
 
<div ng-if="cu.courseUnitEvaluation.closed">
Entregue e Aceite
</div>
<div class="alert-danger" ng-if="cu.courseUnitEvaluation.closed && !cu.courseUnitEvaluation.teacherComplete">
Entregue mas não foi aprovado pela comissão
</div>
<div class="alert-danger" ng-if="!cu.courseUnitEvaluation.closed && !cu.courseUnitEvaluation.teacherComplete">
Não foi entregue pelo docente para validação
</div>
 
</div>
 
 
<div style="padding-left:20px">
<div><h3><label class="label label-primary">Resultados</label></h3></div>
<div>
<table class="tablesorter-blue" width="100%">
<tr>
<th rowspan="2">
Nº Alunos Inscritos
</th>
<th rowspan="2">
Nº de alunos sem elementos de avaliação
</th>
<th colspan="5">
Nº de alunos aprovados em
</th>
<th colspan="2">
Aprovados com a classificação entre 10 e 13 valores
</th>
<th colspan="2">
Aprovados com a classificação entre 14 e 16 valores
</th>
<th colspan="2">
Aprovados com a classificação entre 17 e 20 valores
</th>
</tr>
<tr>
<th>Avaliação de frequência</th>
<th>Exame Época Normal</th>
<th>Exame Época Recurso</th>
<th>Exame Época Especial</th>
<th>Total</th>
<th>Nº</th>
<th>%</th>
<th>Nº</th>
<th>%</th>
<th>Nº</th>
<th>%</th>
</tr>
<tr>
<td class="text-center">
{{cu.courseUnitEvaluation.numAlunosInscritos}}
</td>
<td class="text-center">
{{cu.courseUnitEvaluation.numAlunosSemElementosAvaliacao}}
</td>
<td class="text-center">
{{cu.courseUnitEvaluation.numAlunosAprovFrequencia}}
</td>
<td class="text-center">
{{cu.courseUnitEvaluation.numAlunosAprovNormal}}
</td>
<td class="text-center">
{{cu.courseUnitEvaluation.numAlunosAprovRecurso}}
</td>
<td style="text-align: center">
{{cu.courseUnitEvaluation.numAlunosAprovEspecial}}
</td>
<td class="text-center">
{{cu.courseUnitEvaluation.numAlunosAprovTotal}}
</td>
<td class="text-center">
{{cu.courseUnitEvaluation.numAlunosAprov1013}}
</td>
<td class="text-center">
{{cu.courseUnitEvaluation.numAlunosAprov1013Percent}}
</td>
<td class="text-center">
{{cu.courseUnitEvaluation.numAlunosAprov1416}}
</td>
<td class="text-center">
{{cu.courseUnitEvaluation.numAlunosAprov1416Percent}}
</td>
<td class="text-center">
{{cu.courseUnitEvaluation.numAlunosAprov1720}}
</td>
<td class="text-center">
{{cu.courseUnitEvaluation.numAlunosAprov1720Percent}}
</td>
</tr>
</table>
</div>
</div>
 
<div style="padding-left:20px" >
<div><h3><label class="label label-primary">Taxa de Aprovação</label></h3></div>
<div ng-class="{ 'alert-danger': cu.taxaAprovacao &lt; 75 }">{{cu.taxaAprovacao}}%</div>
</div>
 
 
 
<div style="padding-left:20px">
<div><h3><label class="label label-primary">Apreciação dos resultados quantitativos obtidos pelos estudantes</label></h3></div>
<div>{{cu.courseUnitEvaluation.qualApreciacaoQuantitivos}}</div>
</div>
<div style="padding-left:20px">
<div><h3><label class="label label-primary">Apreciação do funcionamento da UC</label></h3></div>
<div>{{cu.courseUnitEvaluation.qualApreciacaoUC}}</div>
</div>
<div style="padding-left:20px">
<div><h3><label class="label label-primary">Percentagem de cumprimento do programa da UC</label></h3></div>
<div ng-class="{ 'alert-danger': (cu.courseUnitEvaluation.cumprimentoProgramaPercent &lt; 100) }">
{{cu.courseUnitEvaluation.cumprimentoProgramaPercent}}%
</div>
</div>
<div style="padding-left:20px">
<div><h3><label class="label label-primary">Apreciação do cumprimento do programa da UC</label></h3></div>
<div>{{cu.courseUnitEvaluation.qualApreciacaoCumprimentoPrograma}}</div>
</div>
<div style="padding-left:20px">
<div><h3><label class="label label-primary">Conclusões</label></h3></div>
<div>{{cu.courseUnitEvaluation.qualConclusoes}}</div>
</div>
</div>
</div>
</script>