/branches/v3/impl/conf/language/MessageResources.properties |
---|
126,6 → 126,7 |
user.role.questionarios.tipologias.admin=Questionarios Tipologias |
user.role.questionarios.atribuicoes.admin=Questionarios Atribuições |
user.role.questionarios.admin=Administrador de Questionarios |
questionarios.atributions.check=Consulta de Atribuições |
user.role.all=Todos |
user.role.admin=Administrador |
/branches/v3/impl/conf/WEB-INF/struts/tiles-pae-questionarios.xml |
---|
74,6 → 74,11 |
</definition> |
<definition name="page.pae.questionario.atributions.check" extends="page.pae.separators.home"> |
<put name="separator" value="1" type="string"/> |
<put name="topnav" value="/user/questionarios/pedagogicoEstudante/atributionsCheck/topnavQuestionarioAtributionsCheck.jsp"/> |
<put name="body" value="/user/questionarios/pedagogicoEstudante/atributionsCheck/atributionsCheck.jsp"/> |
</definition> |
/branches/v3/impl/conf/WEB-INF/struts/struts-pae-questionarios.xml |
---|
35,6 → 35,7 |
<!-- Start Pages --> |
<action path="/user/questionariosAtribuicoesCheck" forward="page.pae.questionario.atributions.check"/> |
<action path="/user/startNewQuestionario" forward="/user/questionariosPaeNoValidation.do?dispatch=startNew"/> |
/branches/v3/impl/src/web/user/home/panels/questionarios.jsp |
---|
12,8 → 12,9 |
<div class="panel-body"> |
<div class="list-group"> |
<baco:hasRole role="admin,all,services,questionarios.gerais,questionarios.admin,pedagogicCouncil.president"> |
<baco:hasRole role="admin,all,services,questionarios.gerais,questionarios.admin"> |
<baco:hasRole role="admin,all,services,questionarios.gerais,questionarios.admin,pedagogicCouncil.president"> |
<div class="list-group-item"><html:link action="/user/listQuestionarios">Administração de Questionários</html:link></div> |
<div class="list-group-item"><html:link action="/user/questionariosAtribuicoesCheck">Consulta de Atribuições</html:link></div> |
</baco:hasRole> |
<baco:hasRole role="admin,all,services,questionarios.gerais,questionarios.admin,pedagogicCouncil.president"> |
<div class="list-group-item"><html:link action="/user/seeQuestionarios">Acompanhamento de Questionários</html:link></div> |
/branches/v3/impl/src/web/user/questionarios/pedagogicoEstudante/atributionsCheck/atributionsCheckSemestre.jsp |
---|
New file |
0,0 → 1,44 |
<%@ taglib prefix="bean" uri="http://jakarta.apache.org/struts/tags-nested" %> |
<%@ page import="jomm.dao.impl.AbstractDao" %> |
<%@ page import="org.hibernate.Query" %> |
<%@ page import="pt.estgp.estgweb.domain.QuestionarioPedagogicoTipologiaRequisitada" %> |
<%@ page import="pt.estgp.estgweb.domain.Teacher" %> |
<%@ page import="java.util.List" %> |
<%-- |
Created by IntelliJ IDEA. |
User: jorgemachado |
Date: 28/01/17 |
Time: 16:23 |
To change this template use File | Settings | File Templates. |
--%> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<% |
String year = request.getParameter("year"); |
String semestre = request.getParameter("semestre"); |
AbstractDao.getCurrentSession().beginTransaction(); |
Query qTeacher = AbstractDao.getCurrentSession().createQuery( |
"select distinct(t.docenteAfeto)" + |
" from " + QuestionarioPedagogicoTipologiaRequisitada.class.getName() + " t where t.unidadeAfeta.cursoAfeto.questionario.year = :year and t.unidadeAfeta.cursoAfeto.questionario.semestre = :semestre order by t.docenteAfeto.name asc"); |
qTeacher.setString("year",year); |
qTeacher.setString("semestre",semestre); |
List<Teacher> teachers = qTeacher.list(); |
for(Teacher teacher: teachers) |
{ |
request.setAttribute("teacher",teacher); |
%> |
<div class="panel panel-info"> |
<div class="panel-heading"> |
<button type="button" class="btn btn-default" onclick="openQuestAtribuicoesSemestreProf('<%=year%>','<%=semestre%>','${teacher.sigesCode}')">${teacher.name} (${teacher.sigesCode})</button> |
</div> |
<div class="panel-body" id="teacher<%=year%>_<%=semestre%>_${teacher.sigesCode}"> |
</div> |
</div> |
<% |
} |
AbstractDao.getCurrentSession().getTransaction().commit(); |
%> |
/branches/v3/impl/src/web/user/questionarios/pedagogicoEstudante/atributionsCheck/topnavQuestionarioAtributionsCheck.jsp |
---|
New file |
0,0 → 1,10 |
<%@page contentType="text/html"%> |
<%@page pageEncoding="UTF-8"%> |
<%@page import="jomm.web.utils.NavPlaceServer"%> |
<%@ page import="jomm.web.utils.TopNav" %> |
<% |
TopNav topNav = NavPlaceServer.getInstance().createTopNav(request); |
topNav.addNavPlace("/user/homePae.do", "intranet.separator.home.back"); |
topNav.addNavPlace(null, "questionarios.atributions.check"); |
%> |
<jsp:include page="/layout/topnav.jsp"/> |
/branches/v3/impl/src/web/user/questionarios/pedagogicoEstudante/atributionsCheck/atributionsCheckTeacher.jsp |
---|
New file |
0,0 → 1,168 |
<%@ page import="jomm.dao.impl.AbstractDao" %> |
<%@ page import="org.hibernate.Query" %> |
<%@ page import="java.util.ArrayList" %> |
<%@ page import="java.util.List" %> |
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
<%@ page import="pt.estgp.estgweb.domain.*" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
<%@taglib prefix="reports" tagdir="/WEB-INF/tags/reports" %> |
<%-- |
Created by IntelliJ IDEA. |
User: jorgemachado |
Date: 28/01/17 |
Time: 16:23 |
To change this template use File | Settings | File Templates. |
--%> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<% |
String year = request.getParameter("year"); |
String semestre = request.getParameter("semestre"); |
String sigesCode = request.getParameter("sigesCode"); |
AbstractDao.getCurrentSession().beginTransaction(); |
Query qUnidadeCurricular = AbstractDao.getCurrentSession().createQuery( |
"select distinct(u)" + |
" from " + |
QuestionarioPedagogicoUnidadeCurricularAfeta.class.getName() + " u, " + |
Teacher.class.getName() + " t " + |
" where t.sigesCode = :sigesCode and u.cursoAfeto.questionario.year = :year and " + |
" u.cursoAfeto.questionario.semestre = :semestre and " + |
" t in elements(u.courseUnit.teachers) " + |
" order by u.nome asc"); |
qUnidadeCurricular.setString("year",year); |
qUnidadeCurricular.setString("semestre",semestre); |
qUnidadeCurricular.setString("sigesCode",sigesCode); |
List<QuestionarioPedagogicoUnidadeCurricularAfeta> unidadesAfetas = qUnidadeCurricular.list(); |
%> |
<table class="tablesorter-blue"> |
<thead> |
<tr> |
<th>Unidade Curricular</th> |
<th>Código (UC)</th> |
<th>Curso</th> |
<th>Código(C)</th> |
<th>Selecionada</th> |
<td>Observações Seleção</td> |
</tr> |
</thead> |
<tbody> |
<% |
for(QuestionarioPedagogicoUnidadeCurricularAfeta unidadeAfeta: unidadesAfetas) |
{ |
request.setAttribute("unidadeAfeta",unidadeAfeta); |
%> |
<tr> |
<td>${unidadeAfeta.nome}</td> |
<td>${unidadeAfeta.codigoUnidade}</td> |
<td>${unidadeAfeta.cursoAfeto.nome}</td> |
<td>${unidadeAfeta.cursoAfeto.codigoCurso}</td> |
<td <%=!unidadeAfeta.isUsar()? "style=\"background-color:red\"":"style=\"background-color:lightgreen\""%>><bean:message key="yes.no.${unidadeAfeta.usar}"/></td> |
<td><% if(!unidadeAfeta.isUsar()){%>${unidadeAfeta.obs}<%}%></td> |
</tr> |
<% |
if(unidadeAfeta.isUsar()) |
{ |
CourseUnitImpl cuImpl = (CourseUnitImpl) DaoFactory.getCourseUnitDaoImpl().narrow((unidadeAfeta.getCourseUnit())); |
CourseUnitImpl.Tipologias tipologias = cuImpl.getTipologiasClass(); |
ArrayList<CourseUnitImpl.Tipologia> tipologiaList = tipologias.obtainTipologiasSimples(cuImpl); |
%> |
<tr> |
<td colspan="6" style="padding-left: 40px"> |
<p>Tipologias Configuradas na fase Atribuições</p> |
<table class="tablesorter-blue"> |
<thead> |
<tr> |
<th>Turma</th> |
<th>Codigo Docente</th> |
<th>Docente</th> |
<th>Selecionada</th> |
</tr> |
</thead> |
<tbody> |
<% |
for(CourseUnitImpl.Tipologia t: tipologiaList) |
{ |
CourseUnitImpl.TipologiaPersistent tp = cuImpl.loadPersistent(t); |
request.setAttribute("tp",tp); |
request.setAttribute("t",t); |
%> |
<tr> |
<td>${t.cdTurma}</td> |
<td>${t.cdDocente}</td> |
<td>${tp.teacher.name}</td> |
<td <%=t.isExclude()? "style=\"background-color:red\"":"style=\"background-color:lightgreen\""%>><%=t.isExclude()? "Excluida":"Sim"%></td> |
</tr> |
<% |
} |
%> |
</tbody> |
</table> |
<p>Tipologias Requisitadas na fase de Respostas</p> |
<table class="tablesorter-blue"> |
<thead> |
<tr> |
<th>Turma</th> |
<th>Codigo Docente</th> |
<th>Docente</th> |
<th>Respostas Requisitadas</th> |
<th>Respostas Fornecidas</th> |
</tr> |
</thead> |
<tbody> |
<% |
for(QuestionarioPedagogicoTipologiaRequisitada tReq : unidadeAfeta.getTipologiasRequisitadas()) |
{ |
request.setAttribute("tReq",tReq); |
%> |
<tr> |
<td>${tReq.cdTurma}</td> |
<td>${tReq.cdDocente}</td> |
<td>${tReq.docenteAfeto.name}</td> |
<td><%=tReq.getAlunosRequisitados().size()%></td> |
<td> |
<% |
int count = 0; |
for(QuestionarioPedagogicoAlunoRequisitado ar: tReq.getAlunosRequisitados()){ |
if(ar.getRespostaRequisitada() != null && ar.getRespostaRequisitada().getResposta() != null) |
count++; |
} |
request.setAttribute("count",count); |
request.setAttribute("total",tReq.getAlunosRequisitados().size()); |
%> |
<reports:progressPercent parcel="${count}" total="${total}" isUserType="true"/> |
</td> |
</tr> |
<% |
} |
%> |
</tbody> |
</table> |
</td> |
</tr> |
<% |
} |
} |
%> |
</tbody> |
</table> |
<% |
AbstractDao.getCurrentSession().getTransaction().commit(); |
%> |
/branches/v3/impl/src/web/user/questionarios/pedagogicoEstudante/atributionsCheck/atributionsCheck.jsp |
---|
New file |
0,0 → 1,77 |
<%@ page import="jomm.dao.impl.AbstractDao" %> |
<%@ page import="org.hibernate.Query" %> |
<%@ page import="pt.estgp.estgweb.domain.CourseUnit" %> |
<%@ page import="pt.estgp.estgweb.domain.Questionario" %> |
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
<%@ page import="java.util.List" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
<script> |
function openQuestAtribuicoesSemestreProf(year,semestre,code) |
{ |
$.post('<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/atributionsCheck/atributionsCheckTeacher.jsp?year=' + year + '&semestre=' + semestre + '&sigesCode=' + code, |
function(data) |
{ |
var id = "#teacher" + year + "_" + semestre + "_" + code; |
$(id).html(data); |
$( document ).ajaxComplete(function() { |
evaluateTableSorters("#" + id); |
}); |
}); |
} |
function openQuestAtribuicoesSemestre(year,semestre) |
{ |
$.post('<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/atributionsCheck/atributionsCheckSemestre.jsp?year=' + year + '&semestre=' + semestre, |
function(data) |
{ |
$("#semestre" + year + "_" + semestre).html(data); |
}); |
} |
function openQuestAtribuicoesYear(year) |
{ |
$.post('<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/atributionsCheck/atributionsCheckYear.jsp?year=' + year, |
function(data) |
{ |
$("#year" + year).html(data); |
}); |
} |
</script> |
<div class="container-fluid"> |
<% |
AbstractDao.getCurrentSession().beginTransaction(); |
Query qYear = AbstractDao.getCurrentSession().createQuery("select distinct(year) from " + Questionario.class.getName() + " order by year asc"); |
List<Object> years = qYear.list(); |
for(Object year: years) |
{ |
%> |
<div class="panel panel-primary"> |
<div class="panel-heading"> |
<button type="button" class="btn btn-default" onclick="openQuestAtribuicoesYear('<%=year%>');"><span class="glyphicon glyphicon-folder-open"></span> Abrir <%=year%></button> |
</div> |
<div class="panel-body" id="year<%=year%>"> |
</div> |
</div> |
<% |
} |
AbstractDao.getCurrentSession().getTransaction().commit(); |
%> |
</div> |
/branches/v3/impl/src/web/user/questionarios/pedagogicoEstudante/atributionsCheck/atributionsCheckYear.jsp |
---|
New file |
0,0 → 1,39 |
<%@ taglib prefix="bean" uri="http://jakarta.apache.org/struts/tags-nested" %> |
<%@ page import="jomm.dao.impl.AbstractDao" %> |
<%@ page import="org.hibernate.Query" %> |
<%@ page import="pt.estgp.estgweb.domain.Questionario" %> |
<%@ page import="java.util.List" %> |
<%-- |
Created by IntelliJ IDEA. |
User: jorgemachado |
Date: 28/01/17 |
Time: 16:23 |
To change this template use File | Settings | File Templates. |
--%> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<% |
String year = request.getParameter("year"); |
AbstractDao.getCurrentSession().beginTransaction(); |
Query qSemestre = AbstractDao.getCurrentSession().createQuery("select distinct(semestre) from " + Questionario.class.getName() + " where year = :year order by semestre asc"); |
qSemestre.setString("year",year); |
List<Object> semestres = qSemestre.list(); |
for(Object semestre: semestres) |
{ |
request.setAttribute("semestre",semestre); |
%> |
<div class="panel panel-default"> |
<div class="panel-heading"> |
<button type="button" class="btn btn-default" onclick="openQuestAtribuicoesSemestre('<%=year%>','<%=semestre%>')"><bean:message key="courseunit.${semestre}"/></button> |
</div> |
<div class="panel-body" id="semestre<%=year%>_<%=semestre%>"> |
</div> |
</div> |
<% |
} |
AbstractDao.getCurrentSession().getTransaction().commit(); |
%> |