/branches/v3/impl/conf/language/MessageResources.properties |
---|
399,8 → 399,8 |
add=Adicionar |
put=Colocar |
remove=Remover |
yeas.no.true=Sim |
yeas.no.false=Não |
yes.no.true=Sim |
yes.no.false=Não |
yes=Sim |
no=Não |
url=URL |
1185,6 → 1185,7 |
course.unit.work=Ficha de Trabalho |
course.unit.works=Trabalhos |
course.unit.stats=Estatisticas |
course.course.unit.stats=Estatisticas de Unidades Curriculares |
courseunit.works=Trabalhos |
courseunit.new=Criar Unidade Curricular |
courseunit.edit=Editar Unidade Curricular |
/branches/v3/impl/conf/WEB-INF/struts/struts-courseunits.xml |
---|
187,6 → 187,7 |
<action path="/user/startLoadCourseCourseUnitsStatistics" forward="page.load.course.courseunit.stats.from.home"/> |
</action-mappings> |
</struts-config> |
/branches/v3/impl/conf/WEB-INF/struts/tiles-courseunits.xml |
---|
65,11 → 65,16 |
<put name="body" value="/user/courseunits/courseunitworks.jsp"/> |
</definition> |
<definition name="page.load.courseunit.stats.from.home" extends="base.separators"> |
<put name="title" value="Trabalhos da Unidade Curricular"/> |
<put name="title" value="Estatisticas da Unidade Curricular"/> |
<put name="topnav" value="/user/home/topnavCourseUnitStats.jsp"/> |
<put name="left" value="/user/courseunits/menu.jsp"/> |
<put name="body" value="/user/courseunits/courseunitsStatistics.jsp"/> |
</definition> |
<definition name="page.load.course.courseunit.stats.from.home" extends="base.separators.semleft"> |
<put name="title" value="Estatisticas das Unidades Curriculares"/> |
<put name="topnav" value="/user/home/topnavCourseCourseUnitStats.jsp"/> |
<put name="body" value="/user/courseunits/courseCourseunitsStatistics.jsp"/> |
</definition> |
<definition name="page.load.courseunit.assignement.from.home" extends="base.separators"> |
<put name="title" value="Trabalho da Unidade Curricular"/> |
<put name="topnav" value="/user/home/topnavCourseUnitAssignement.jsp"/> |
/branches/v3/impl/conf/berserk/sd.xml |
---|
873,6 → 873,7 |
<service> |
<name>LoadCourseUnit</name> |
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadCourseUnitService</implementationClass> |
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadCourseUnitService</implementationClass> |
<description>Load course unit</description> |
<isTransactional>true</isTransactional> |
<filterChains> |
881,6 → 882,19 |
</filterChains> |
</service> |
<service> |
<name>LoadCourseUnitCleared</name> |
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadCourseUnitService</implementationClass> |
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadCourseUnitService</implementationClass> |
<description>Load course unit</description> |
<isTransactional>true</isTransactional> |
<defaultMethod>runCleared</defaultMethod> |
<filterChains> |
<chain name="Logger"/> |
<chain name="Session"/> |
<chain name="CourseUnitProgramClearancesPreSerializable"/> |
</filterChains> |
</service> |
<service> |
<name>LoadCourseUnitStudents</name> |
<implementationClass>pt.estgp.estgweb.services.courseunits.LoadCourseUnitService</implementationClass> |
<description>Load course unit students</description> |
/branches/v3/impl/src/java/pt/estgp/estgweb/Globals.java |
---|
114,7 → 114,7 |
public static final String ALL_ROLE = ConfigProperties.getProperty("user.super"); |
public static final String SERVICES_PROGRAMS_ROLE = ConfigProperties.getProperty("user.servicesPrograms"); |
public static final String COURSE_COMMISSION_PROGRAMS_ROLES_PRPFIX = ConfigProperties.getProperty("user.courseValidateProgram.prefix"); |
public static final String COURSE_COMMISSION_PROGRAMS_ROLES_PREFIX = ConfigProperties.getProperty("user.courseValidateProgram.prefix"); |
public static final String ACTUAL_RELATIVE_PATH = "ACTUAL_RELATIVE_PATH"; |
public static final String ADMIN_ROLE = ConfigProperties.getProperty("user.admin"); |
/branches/v3/impl/src/java/pt/estgp/estgweb/services/profile/CurriculumService.java |
---|
204,7 → 204,7 |
public List<CourseUnitGradeView> loadGrades(long userId, UserSession userSession) throws ServiceException |
{ |
//todo change security |
if(userId != userSession.getUser().getId()) |
if(userId != userSession.getUser().getId() && !userSession.getUser().isSuperuserOrAdmin() && !userSession.getUser().isTeacher()) |
{ |
logger.warn("Trying see grades of other user"); |
return null; |
/branches/v3/impl/src/java/pt/estgp/estgweb/web/controllers/courseunits/CourseUnitsController.java |
---|
135,6 → 135,26 |
throw e; |
} |
} |
protected CourseUnitView loadCourseUnitViewCleared(long id, boolean initTeachers, boolean initStudents, ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) |
throws Throwable, InvalidFilterException, ServiceManagerException, InvalidFilterExpressionException, IncompatibleFilterException, FilterRetrieveException, NoCookiesException |
{ |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{"serializable"}; |
Object[] args = new Object[]{id,initTeachers,initStudents,false}; |
try |
{ |
CourseUnitView cV = (CourseUnitView) sm.execute(RequestUtils.getRequester(request, response), "LoadCourseUnitCleared", args, names); |
return cV; |
} |
catch (ExecutedFilterException e) |
{ |
if (e.getCause() instanceof ObjectNotFoundException) |
{ |
throw new NotFoundException(e.getCause().toString()); |
} |
throw e; |
} |
} |
protected CourseUnitView loadCourseUnitViewAndCourse(long id, boolean initTeachers, boolean initStudents, ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) |
throws Throwable, InvalidFilterException, ServiceManagerException, InvalidFilterExpressionException, IncompatibleFilterException, FilterRetrieveException, NoCookiesException |
173,7 → 193,7 |
else |
id = Long.parseLong(request.getParameter("id")); |
CourseUnitView cV = loadCourseUnitView(id,false,false, mapping, request, response); |
CourseUnitView cV = loadCourseUnitViewCleared(id,false,false, mapping, request, response); |
cUF.setCourseUnitView(cV); |
request.setAttribute("CourseUnitView", cV); |
return mapping.findForward("loadStats"); |
/branches/v3/impl/src/java/pt/estgp/estgweb/web/filters/UserRoleProxy.java |
---|
125,6 → 125,11 |
public static String getMessage(String role,Locale locale) |
{ |
UserRoleConfig c = userRoleConfigs.get(role); |
if(c == null) |
{ |
logger.error("ATENTION: " + role + " role does not exist, please create"); |
return role; |
} |
if(locale == null) |
return c.getValue(); |
String msg = null; |
/branches/v3/impl/src/web/layout/headerTools.jsp |
---|
206,4 → 206,25 |
</div> |
</div> |
</div> |
</div> |
</div> |
<div class="modal fade" id="modalPleaseWait" role="dialog" > |
<div class="modal-dialog" data-width="960" style="display: block; width: 960px; margin-top: 50px;" aria-hidden="false"> |
<!-- Modal content--> |
<div class="modal-content"> |
<div class="modal-header clearfix"> |
<h3 class="modal-title"> |
<label class="title-wrap"></label> |
</h3> |
</div> |
<div class="modal-body"> |
<div class="panel panel-info"> |
<div class="panel-body"> |
<p>Por favor aguarde um momento, o sistema está a carregar <img src="<%=request.getContextPath()%>/imgs/wait.gif"/></p> |
</div> |
</div> |
</div> |
</div> |
</div> |
</div> |
/branches/v3/impl/src/web/public/profile/profileGrades.jsp |
---|
62,18 → 62,13 |
{ |
%> |
<script type="text/javascript" language="JavaScript"> |
//TABLE SORTER |
$(document).ready(function() |
{ |
$("#myTable$").tablesorter(); |
} |
); |
</script> |
<div class="block"> |
<% |
Map<Long,Integer> unidadeNota = new HashMap<Long,Integer>(); |
Map<Long,Integer> unidadePositiva = new HashMap<Long,Integer>(); |
for(CourseUnitGradeView grade: ProfileForm.getUserView().getGrades()) |
{ |
Integer notaUnidade = unidadeNota.get(grade.getCourseUnit().getId()); |
83,16 → 78,30 |
{ |
unidadeNota.put(grade.getCourseUnit().getId(),grade.getGrade()); |
} |
if(grade.getGrade() >= 10) |
{ |
if(unidadePositiva.get(grade.getCourseUnit().getId())== null |
|| (unidadePositiva.get(grade.getCourseUnit().getId())!=null && unidadePositiva.get(grade.getCourseUnit().getId())>grade.getGrade())) |
{ |
unidadePositiva.put(grade.getCourseUnit().getId(),grade.getGrade()); |
} |
} |
} |
} |
float total = 0; |
for(Integer nota: unidadeNota.values()) |
for(Integer nota: unidadePositiva.values()) |
total+=nota; |
float media = total/((float)unidadeNota.size()); |
float media = total/((float)unidadePositiva.size()); |
%> |
<%--Média: <%=media%>--%> |
<p>Média: <%=media%></p> |
<p>Unidades Completas: <%=unidadePositiva.size()%></p> |
</div> |
<table id="myTable" class="dataTable tablesorter"> |
<button class="btn btn-default" onclick="$('#studentGrades .S_N').toggle()">Limpar/Mostrar S/N</button> |
<button class="btn btn-default" onclick="$('#studentGrades .NEGATIVA').toggle()">Limpar/Mostrar apenas positivas</button> |
<table id="studentGrades" class="tablesorterfiltered"> |
<thead> |
<tr> |
<th> |
120,7 → 129,8 |
</thead> |
<tbody> |
<logic:iterate id="grade" name="ProfileForm" property="userView.grades" type="pt.estgp.estgweb.domain.views.CourseUnitGradeView"> |
<tr> |
<tr class="<logic:lessThan value="0" name="grade" property="grade">S_N</logic:lessThan> <logic:lessThan value="10" name="grade" property="grade">NEGATIVA</logic:lessThan>"> |
<td> |
${grade.courseUnit.code} |
</td> |
/branches/v3/impl/src/web/public/profile/profileGradesAjax.jsp |
---|
10,6 → 10,9 |
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
<%@ page import="pt.estgp.estgweb.domain.views.UserView" %> |
<%@ page import="pt.estgp.estgweb.web.form.profile.ProfileForm" %> |
<%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %> |
<%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %> |
<%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
22,14 → 25,14 |
Long userId = Long.parseLong(request.getParameter("userId")); |
if(UserSession.getUser().isSuperuserOrAdmin() || UserSession.getUser().isTeacher()) |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
Student student = DaoFactory.getStudentDaoImpl().load(userId); |
UserView userView = new UserView(student); |
ProfileForm profileForm = new pt.estgp.estgweb.web.form.profile.ProfileForm(userView); |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{"serializable"}; |
Object[] args = new Object[]{userId}; |
UserView uV = (UserView) sm.execute(RequestUtils.getRequester(request, response), "LoadUserWithGradesById", args, names); |
ProfileForm profileForm = new pt.estgp.estgweb.web.form.profile.ProfileForm(uV); |
request.setAttribute("ProfileForm",profileForm); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
%> |
<jsp:include page="profileGrades.jsp"/> |
<% |
/branches/v3/impl/src/web/public/profile/profileHomeAjax.jsp |
---|
7,6 → 7,9 |
<%@ page import="pt.estgp.estgweb.domain.views.UserView" %> |
<%@ page import="pt.estgp.estgweb.web.form.profile.ProfileForm" %> |
<%@ page import="java.util.List" %> |
<%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %> |
<%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %> |
<%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
19,18 → 22,16 |
Long userId = Long.parseLong(request.getParameter("userId")); |
if(UserSession.getUser().isSuperuserOrAdmin() || UserSession.getUser().isTeacher()) |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
Student student = DaoFactory.getStudentDaoImpl().load(userId); |
UserView userView = new UserView(student); |
ProfileForm profileForm = new pt.estgp.estgweb.web.form.profile.ProfileForm(userView); |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{"serializable"}; |
Object[] args = new Object[]{userId}; |
UserView uV = (UserView) sm.execute(RequestUtils.getRequester(request, response), "LoadUserWithRecordsById", args, names); |
ProfileForm profileForm = new pt.estgp.estgweb.web.form.profile.ProfileForm(uV); |
request.setAttribute("ProfileForm",profileForm); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
%> |
<div> |
<jsp:include page="profileHomeSimple.jsp"/> |
</div> |
<% |
} |
%> |
/branches/v3/impl/src/web/public/profile/profileHomeSimple.jsp |
---|
62,7 → 62,7 |
<% |
} |
%> |
<p><strong><bean:message key="email.institucion"/>:</strong> ${ProfileForm.userView.safeEmail}</p> |
<p><strong><bean:message key="email.institucion"/>:</strong> ${ProfileForm.userView.email}</p> |
/branches/v3/impl/src/web/user/courseunits/statsAjax.jsp |
---|
New file |
0,0 → 1,28 |
<%@ page import="pt.estgp.estgweb.domain.views.UserView" %> |
<%@ page import="pt.estgp.estgweb.web.form.profile.ProfileForm" %> |
<%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %> |
<%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %> |
<%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %> |
<%@ page import="pt.estgp.estgweb.domain.views.CourseUnitView" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
<jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/> |
<% |
Long courseUnitId = Long.parseLong(request.getParameter("courseUnitId")); |
IServiceManager sm = ServiceManager.getInstance(); |
String[] names = new String[]{"serializable"}; |
Object[] args = new Object[]{courseUnitId,false,false,false}; |
CourseUnitView cV = (CourseUnitView) sm.execute(RequestUtils.getRequester(request, response), "LoadCourseUnitCleared", args, names); |
request.setAttribute("CourseUnitView",cV); |
%> |
<jsp:include page="courseunitsStatistics.jsp"/> |
<% |
%> |
/branches/v3/impl/src/web/user/courseunits/students.jsp |
---|
76,6 → 76,7 |
<baco:hasRole role="teacher"> |
<th><bean:message key="phone.number"/></th> |
<th>Notas</th> |
</baco:hasRole> |
<th class="filter-name filter-select" data-placeholder="Todas">Turma</th> |
108,6 → 109,12 |
</td> |
<baco:hasRole role="teacher"> |
<td>${student.phonenumber} </td> |
<td> |
<a class="btn btn-default" href="#" data-href="<%=request.getContextPath()%>/public/profile/profileGradesAjax.jsp?userId=${student.id}" data-title="Notas do aluno ${student.name} (${student.code})" data-toggle="modal" data-target="#modalAjaxRequest"> |
Notas |
</a> |
</td> |
</baco:hasRole> |
<td> |
${student.studentTurma} |
/branches/v3/impl/src/web/user/courseunits/submitCourseComissionMessage.jsp |
---|
29,12 → 29,13 |
$(document).ready( |
function(){ |
setText(); |
} |
); |
function setText() |
{ |
$("#editor").html('<bean:write name="MessagesForm" property="text" filter="false"/>'); |
$("#editor").html('<bean:write name="MessagesForm" property="text" filter="false"/>'); |
} |
</script> |
47,7 → 48,7 |
<html:errors/> |
<html:form styleClass="form-horizontal" action="/user/submitMessageCourseComission" enctype="multipart/form-data" onsubmit="this.form.text.value=$('#editor').html()"> |
<html:form styleId="formSubmitMessage" styleClass="form-horizontal" action="/user/submitMessageCourseComission" enctype="multipart/form-data" onsubmit="this.form.text.value=$('#editor').html();"> |
<input type="hidden" name="dispatch" value="sendMessage" > |
<html:hidden property="text"/> |
<html:hidden styleId="sendAnnouncementLike" property="fromRole" value="courseCoordinator"/> |
75,7 → 76,8 |
<div class="form-group row"> |
<div class="control-label col-sm-2" for="course"><bean:message key="courseunit.course"/></div> |
<div class="col-sm-10"> |
<html:select styleId="course" styleClass="form-control" property="courseId" onchange="this.form.text.value=$('#editor').html();set(this.form,'loadCourse');this.form.submit()"> |
<html:select styleId="course" styleClass="form-control" property="courseId" onchange="this.form.text.value=$('#editor').html();set(this.form,'loadCourse');this.form.submit();$('#modalPleaseWait').modal({show: 'true'})"> |
<option value="0"></option> |
<logic:notEmpty name="MessagesForm" property="courseViews"> |
<logic:iterate id="courseView" name="MessagesForm" property="courseViews" type="pt.estgp.estgweb.domain.views.CourseView"> |
<% |
/branches/v3/impl/src/web/user/courseunits/courseCourseunitsStatistics.jsp |
---|
New file |
0,0 → 1,294 |
<%@ page import="jomm.dao.impl.AbstractDao" %> |
<%@ page import="org.hibernate.Criteria" %> |
<%@ page import="org.hibernate.criterion.Order" %> |
<%@ page import="org.hibernate.criterion.Projections" %> |
<%@ page import="pt.estgp.estgweb.Globals" %> |
<%@ page import="pt.estgp.estgweb.domain.Course" %> |
<%@ page import="pt.estgp.estgweb.domain.CourseUnit" %> |
<%@ page import="static org.hibernate.criterion.Restrictions.eq" %> |
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
<%@ page import="static org.hibernate.criterion.Restrictions.eq" %> |
<%@ page import="static org.hibernate.criterion.Restrictions.or" %> |
<%@ page import="static org.hibernate.criterion.Restrictions.*" %> |
<%@ page import="java.util.ArrayList" %> |
<%@ page import="java.util.List" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/baco.tld" prefix="baco" %> |
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> |
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %> |
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> |
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> |
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> |
<jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSessionImpl" scope="request"/> |
<div class="panel panel-default"> |
<div class="panel-heading"> |
Estatisticas Unidades nos Cursos |
</div> |
<div class="panel-body"> |
<% |
boolean allCourses = false; |
List<String> comissionsRoles = null; |
if(UserSession.getUser().isSuperuserOrAdmin() || UserSession.getUser().hasRole(Globals.SERVICES_PROGRAMS_ROLE) || UserSession.getUser().hasRole(Globals.COURSE_DIRECTOR_ROLE) || UserSession.getUser().hasRole(Globals.COURSE_COORDINATOR_ROLE) || UserSession.getUser().hasRole("services")) |
{ |
allCourses = true; |
AbstractDao.getCurrentSession().beginTransaction(); |
Criteria c = AbstractDao.getCurrentSession().createCriteria(CourseUnit.class) |
.setProjection(Projections.projectionList().add(Projections.groupProperty("c.validationRole")) |
.add(Projections.property("c.id")).add(Projections.property("c.name")).add(Projections.property("c.code"))) |
.createAlias("course", "c") |
.add(eq("importYear", UserSession.getNowConfiguration().getInterfaceImportYear())); |
List<Object[]> validationRoles = c.list(); |
AbstractDao.getCurrentSession().getTransaction().commit(); |
comissionsRoles = new ArrayList<String>(); |
%> |
<div class="avisosWarning" style="display: none"> |
<div class="alert alert-warning">Existem cursos sem papel de comissão atribuido |
<button class="btn btn-warning" onclick="$('.avisos').toggle()">Ver/Ocultar Avisos</button> |
</div> |
</div> |
<div class="avisos" style="display: none"> |
<% |
boolean avisos = false; |
for(Object[] validationRolesObj: validationRoles) |
{ |
String role = ((String) validationRolesObj[0]); |
if(role == null || role.trim().length() == 0) |
{ |
avisos = true; |
%> |
<div class="alert alert-warning">Atenção o curso <%=validationRolesObj[1]%> (<%=validationRolesObj[2]%>) não tem papel de comissão de curso associado</div> |
<% |
}else{ |
comissionsRoles.add(role); |
} |
} |
if(avisos) |
{ |
%> |
<script> |
$(document).ready(function() |
{ |
$(".avisosWarning").show(); |
}); |
</script> |
<% |
} |
%> |
</div> |
<% |
} |
else |
{ |
UserSession.getUser().getRolesList(); |
comissionsRoles = new ArrayList<String>(); |
for(String role: UserSession.getUser().getRolesList()) |
{ |
if(role.startsWith(Globals.COURSE_COMMISSION_PROGRAMS_ROLES_PREFIX)) |
comissionsRoles.add(role); |
} |
} |
if(comissionsRoles.size() == 0) |
{ |
%> |
<div class="alert alert-warning"> |
Lamentamos mas não têm qualquer comissão de curso associada |
</div> |
<% |
} |
else |
{ |
%> |
<script> |
$(document).ready( |
function() |
{ |
$("#ROLE_VALIDATION_<%=comissionsRoles.get(0)%>").show(); |
} |
); |
function showRoleSeparator(role) |
{ |
<% |
for(String roleCourse: comissionsRoles) |
{ |
%> |
if(role == '<%=roleCourse%>') |
{ |
$("#ROLE_VALIDATION_<%=roleCourse%>").show(); |
$("#rolesSeparators<%=roleCourse%>").addClass("active"); |
} |
else |
{ |
$("#ROLE_VALIDATION_<%=roleCourse%>").hide(); |
$("#rolesSeparators<%=roleCourse%>").removeClass("active"); |
} |
<% |
} |
%> |
} |
</script> |
<% |
try |
{ |
AbstractDao.getCurrentSession().beginTransaction(); |
%> |
<div class="dropdown"> |
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Escolha Comissão |
<span class="caret"></span></button> |
<ul class="dropdown-menu"> |
<%--<ul class="nav nav-tabs">--%> |
<% |
for(String roleCourse: comissionsRoles) |
{ |
request.setAttribute("roleCourse",roleCourse); |
%> |
<li id="rolesSeparators<%=roleCourse%>"><a href="javascript:showRoleSeparator('<%=roleCourse%>')"><bean:message key="user.role.${roleCourse}"/></a></li> |
<% |
} |
%> |
</ul> |
</div> |
<% |
for(String roleCourse: comissionsRoles) |
{ |
request.setAttribute("roleCourse",roleCourse); |
%> |
<div id="ROLE_VALIDATION_<%=roleCourse%>" style="display: none"> |
<h1><bean:message key="user.role.${roleCourse}"/></h1> |
<% |
Criteria c = AbstractDao.getCurrentSession().createCriteria(CourseUnit.class) |
.setProjection(Projections.projectionList() |
.add(Projections.groupProperty("c.id")) |
.add(Projections.property("c.name")) |
.add(Projections.property("c.code"))) |
.createAlias("course", "c") |
.add(eq("importYear", UserSession.getNowConfiguration().getInterfaceImportYear())) |
.add(eq("c.validationRole", roleCourse)); |
List<Object[]> coursesForRole = c.list(); |
if(coursesForRole.size() > 1) |
{ |
%> |
<div class="alert alert-info alert-small">Mais que um curso para o papel <bean:message key="user.role.${roleCourse}"/></div> |
<% |
} |
%> |
<hr/> |
<% |
for(Object[] courseArray: coursesForRole) |
{ |
Long courseId = (Long) courseArray[0]; |
String courseName = (String) courseArray[1]; |
String courseCode = (String) courseArray[2]; |
c = AbstractDao.getCurrentSession().createCriteria(CourseUnit.class) |
.setProjection(Projections.distinct(Projections.property("id"))) |
.createAlias("course", "c") |
.add(eq("importYear", UserSession.getNowConfiguration().getInterfaceImportYear())) |
.add(eq("c.id", courseId)) |
; |
c.addOrder(Order.asc("name")); |
List<Long> courseUnits = c.list(); |
if(courseUnits.size() == 0) |
{ |
%> |
<h2><bean:message key="user.role.${roleCourse}"/> </h2> |
<div class="alert alert-info alert-small"> |
Não foram encontradas unidades curriculares no ano ${UserSession.nowConfiguration.interfaceImportYear} |
</div> |
<% |
} |
else |
{ |
// |
// List<Student> students = DaoFactory.getStudentDaoImpl().loadFromCoursesWithValidationRoles(comissionsRoles,UserSession.getNowConfiguration().getInterfaceImportYear()); |
%> |
<h2><%=courseName%> (<%=courseCode%>)</h2> |
<div class="alert alert-info alert-small"> |
Existem <%=courseUnits.size()%> unidades no ano ${UserSession.nowConfiguration.interfaceImportYear} |
</div> |
<table class="tablesorter tablesorterfiltered"> |
<thead> |
<tr> |
<th>Cod.</th> |
<th class="filter-name filter-select">Sem.</th> |
<th>Nome</th> |
<th>Sums</th> |
<th>Sums Pre</th> |
<th>Sums Falt</th> |
<th>Plan</th> |
<th class="filter-name filter-select">Ficha</th> |
<th>Aval.Enu</th> |
<th>Aval.Paut</th> |
<th class="filter-name filter-select">Relat.</th> |
<th class="filter-name filter-select">Pedag.</th> |
<th>Conteud.</th> |
<th class="filter-name filter-select">Detalhes</th> |
</tr> |
</thead> |
<tbody> |
<% |
for(Long unit: courseUnits) |
{ |
Long unitId = unit; |
CourseUnit cu = DaoFactory.getCourseUnitDaoImpl().load(unitId); |
request.setAttribute("cu",cu); |
%> |
<tr> |
<td>${cu.code}</td> |
<td>${cu.semestre}</td> |
<td><html:link target="_blank" action="/user/startLoadCourseUnitFromHome?id=${cu.id}"> ${cu.name}</html:link></td> |
<td>${cu.statdtpSumaries}</td> |
<td>${cu.statdtpSumariesPrelancados}</td> |
<td>${cu.statdtpSumariesMissing}</td> |
<td>${cu.statdtpPlaneamentoFiles}</td> |
<td><bean:message key="yes.no.${cu.statdtpFichaCurricularValid}"/></td> |
<td>${cu.statdtpAvaliacaoEnunciadosFiles}</td> |
<td>${cu.statdtpAvaliacaoPautasFiles}</td> |
<td>${cu.statdtpEvaluationReportState}</td> |
<td>${cu.statdtpInqueritoPedagogicoFiles}</td> |
<td>${cu.statcontentsFiles}</td> |
<td><button class="btn btn-default" data-href="<%=request.getContextPath()%>/user/courseunits/statsAjax.jsp?courseUnitId=${cu.id}" data-title="Estatisticas da Unidade ${cu.name} (${cu.code})" data-toggle="modal" data-target="#modalAjaxRequest"><span class="glyphicon glyphicon-zoom-in"/></button> </td> |
</tr> |
<% |
} |
%> |
</tbody> |
</table> |
<% |
} |
} |
%> |
</div> <!--FIM DE ROLE VALIDATION--> |
<% |
} |
AbstractDao.getCurrentSession().getTransaction().commit(); |
} |
catch(Exception e) |
{ |
System.out.println(e.toString()); |
e.printStackTrace(); |
} |
} |
%> |
</div> |
</div> |
/branches/v3/impl/src/web/user/home/teacher.jsp |
---|
164,7 → 164,7 |
</html:link> |
</div> |
<div class="list-group-item"> |
<html:link action="/user/courseComissions">Consultar estatisticas das Unidades Curriculares</html:link> |
<html:link action="/user/startLoadCourseCourseUnitsStatistics">Consultar estatisticas das Unidades Curriculares</html:link> |
</div> |
<div class="list-group-item"> |
<html:link action="/user/listStudentsCourseComission"> |
/branches/v3/impl/src/web/user/home/user.jsp |
---|
39,6 → 39,9 |
<div class="list-group-item"><html:link action="/admin/courseUnitsDeleteAdmin">Administração de Unidades Curriculares (Remoções)</html:link></div> |
</baco:isAdmin> |
<div class="list-group-item">Situação de Propinas de Alunos (Por implementar)</div> |
<div class="list-group-item"> |
<html:link action="/user/startLoadCourseCourseUnitsStatistics">Consultar estatisticas das Unidades Curriculares</html:link> |
</div> |
<div class="list-group-item"><html:link action="/user/findProfile"><bean:message key="profile.search.user"/></html:link></div> |
<div class="list-group-item"><html:link action="/user/startFindCourseUnitAdminFromServiceZone"><bean:message key="courseunit.search"/></html:link></div> |
<div class="list-group-item"><html:link action="/user/courseComissions">Informação Adicional de Cursos</html:link></div> |
/branches/v3/impl/src/web/user/home/topnavCourseCourseUnitStats.jsp |
---|
New file |
0,0 → 1,11 |
<%@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/startHome.do", "intranet.separator.home.back"); |
topNav.addNavPlace(null, "course.course.unit.stats"); |
%> |
<jsp:include page="/layout/topnav.jsp"/> |
/branches/v3/impl/src/web/user/questionarios/pedagogicoEstudante/pedagogicoEstudanteCoursesSelection.jsp |
---|
112,7 → 112,7 |
{ |
String institutionName = ConfigProperties.getProperty("institution.code." + institutionCode); |
%> |
<li id="institutionsSeparators<%=institutionCode%>"><a href="javascript:showInstitutionCode('<%=institutionCode%>')"><%=institutionName%></a></li> |
<li id="institutionsSeparators<%=institutionCode%>"><a href="javascript:showInstitutionCode('<%=institutionCode%>')"><%=institutionName%></a></li> |
<% |
} |
%> |
/branches/v3/impl/src/web/user/contacts/listCourseComissionStudents.jsp |
---|
32,7 → 32,7 |
List<String> comissionsRoles = new ArrayList<String>(); |
for(String role: UserSession.getUser().getRolesList()) |
{ |
if(role.startsWith(Globals.COURSE_COMMISSION_PROGRAMS_ROLES_PRPFIX)) |
if(role.startsWith(Globals.COURSE_COMMISSION_PROGRAMS_ROLES_PREFIX)) |
comissionsRoles.add(role); |
} |
if(comissionsRoles.size() == 0) |
114,7 → 114,7 |
<td>${student.name}</td> |
<td>${student.email}</td> |
<td>${student.phonenumber}</td> |
<td><bean:message key="yeas.no.${student.propinasEmDia}"/></td> |
<td><bean:message key="yes.no.${student.propinasEmDia}"/></td> |
<td> |
<a class="btn btn-default" href="#" data-href="<%=request.getContextPath()%>/public/profile/profileHomeAjax.jsp?userId=${student.id}" data-title="Notas do aluno ${student.name} (${student.sigesCode})" data-toggle="modal" data-target="#modalAjaxRequest"> |
<%=cadeirasInscrito%> |