Merge com o projeto de Perris
Esse commit está contido em:
@@ -101,6 +101,7 @@
|
||||
<form-property name="keywords" type="java.lang.String" />
|
||||
</form-bean>
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
<form-bean name="formSocialInteractionMonitoring"
|
||||
type="org.apache.struts.validator.DynaValidatorForm">
|
||||
@@ -132,6 +133,13 @@
|
||||
<form-bean name="formSocialInteractionMonitoringReports"
|
||||
type="org.apache.struts.validator.DynaValidatorForm">
|
||||
|
||||
=======
|
||||
<form-bean name="formCriarGrupo" type="org.apache.struts.action.DynaActionForm">
|
||||
<form-property name="courseId" type="java.lang.Integer"/>
|
||||
<form-property name="nomeGrupo" type="java.lang.String"/>
|
||||
<form-property name="listaAlunos" type="java.lang.String"/>
|
||||
<form-property name="Concluir" type="java.lang.String"/>
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
</form-bean>
|
||||
|
||||
</form-beans>
|
||||
@@ -161,6 +169,17 @@
|
||||
<forward name="fShowViewCourseEvaluations" path="/jsp/course/viewCourseEvaluations.jsp"/>
|
||||
<forward name="fShowViewSendMail" path="/jsp/course/viewSendMail.jsp"/>
|
||||
<forward name="fShowViewGraphic" path="/jsp/course/viewGraphic.jsp"/>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<forward name="fShowViewGroups" path="/jsp/course/viewGroups.jsp"/>
|
||||
<forward name="fShowGroupDayTimeline" path="/jsp/course/viewGroupDayTimeline.jsp"/>
|
||||
<forward name="fShowPersonDayTimeline" path="/jsp/course/viewPersonDayTimeline.jsp"/>
|
||||
<forward name="fShowViewGroupTimeline" path="/jsp/course/viewGroupTimeline.jsp"/>
|
||||
<forward name="fShowViewPersonTimeline" path="/jsp/course/ViewPersonTimeline.jsp"/>
|
||||
<forward name="fShowViewOneGroup" path="/jsp/course/viewOneGroup.jsp"/>
|
||||
<forward name="fShowViewGroupsRelatorio" path="/jsp/course/viewGroupsRelatorio.jsp"/>
|
||||
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
</global-forwards>
|
||||
<action-mappings>
|
||||
@@ -230,6 +249,7 @@
|
||||
<action name="formEditCourse" input="/course.do?method=showViewEditCourse"
|
||||
path="/editCourse" parameter="editCourse" scope="request"
|
||||
type="br.ufpe.cin.amadeus.amadeus_web.struts.action.CourseActions">
|
||||
<<<<<<< HEAD
|
||||
</action>
|
||||
|
||||
<action name="formSocialInteractionMonitoring" input="/course.do?method=showViewSocialInteractionMonitoring"
|
||||
@@ -241,6 +261,14 @@
|
||||
path="/socialInteractionMonitoringReports" parameter="socialInteractionMonitoringReports" scope="request"
|
||||
type="br.ufpe.cin.amadeus.amadeus_web.struts.action.CourseActions">
|
||||
</action>
|
||||
=======
|
||||
</action>
|
||||
|
||||
<action name="formCriarGrupo" input="/course.do?method=showViewCreateGroup"
|
||||
path="/course.do?method=showViewCreateGroup" parameter="criarGrupo" scope="request"
|
||||
type="br.ufpe.cin.amadeus.amadeus_web.struts.action.CourseActions">
|
||||
</action>
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
<action path="/fViewDeleteConfirmation"
|
||||
parameter="/jsp/course/viewCourseDeleteConfirmation.jsp"
|
||||
|
||||
@@ -50,9 +50,13 @@
|
||||
/WEB-INF/struts/struts-config-mobile.xml,
|
||||
/WEB-INF/struts/struts-config-openid.xml,
|
||||
/WEB-INF/struts/struts-config-settings.xml,
|
||||
<<<<<<< HEAD
|
||||
/WEB-INF/struts/struts-config-log.xml,
|
||||
/WEB-INF/struts/struts-config-messenger.xml,
|
||||
/WEB-INF/struts/struts-config-twittertool.xml</param-value>
|
||||
=======
|
||||
/WEB-INF/struts/struts-config-log.xml</param-value>
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
</init-param>
|
||||
<load-on-startup>2</load-on-startup>
|
||||
</servlet>
|
||||
|
||||
@@ -202,6 +202,17 @@ function showScoreGameGrupo(type,idMMJogos){
|
||||
UtilDWR.getInclude('/changeOrderGame.do?method=changeOrderGame&type='+type+'&idMMJogos='+idMMJogos,
|
||||
function(data) {
|
||||
dwr.util.setValue('percepcao'+idMMJogos, data, { escapeHtml:false });
|
||||
<<<<<<< HEAD
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function showScoreGameIndividual(type,idMMJogos,idUser){
|
||||
UtilDWR.getInclude('/changeOrderGame.do?method=changeOrderGame&type='+type+'&idMMJogos='+idMMJogos+'&idUser='+idUser,
|
||||
function(data) {
|
||||
dwr.util.setValue('percepcao'+idMMJogos, data, { escapeHtml:false });
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -254,6 +265,45 @@ function log(idGame, numFases, tempo, pontuacao, meta)
|
||||
}
|
||||
|
||||
|
||||
function modalGameWin(gameId) {
|
||||
window.open('playGameActivity.do?method=showPlayGame&gameId='+gameId,'Game',
|
||||
'height=800,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,modal=yes,directories=no');
|
||||
}
|
||||
|
||||
function openGameExternal(gameUrl){
|
||||
|
||||
var external = window.open(gameUrl,'Game',
|
||||
'height=800,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');
|
||||
|
||||
//resize para a tela não ficar preta
|
||||
external.onload = resizeExternal(external);
|
||||
}
|
||||
|
||||
function resizeExternal(win)
|
||||
{
|
||||
win.resizeTo(10,10);
|
||||
win.resizeTo(811,611);
|
||||
}
|
||||
|
||||
|
||||
function modalVisualizacaoWin(gameId) {
|
||||
if (window.showModalDialog) {
|
||||
window.showModalDialog('graphicGameActivity.do?method=showGraphicGame&gameId='+gameId+'&graphic=sel',"Game Graphic",
|
||||
"dialogWidth:800px;dialogHeight:600px");
|
||||
} else {
|
||||
window.open('graphicGameActivity.do?method=showGraphicGame&gameId='+gameId+'&graphic=sel','Game Graphic',
|
||||
'height=800,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes');
|
||||
}
|
||||
}
|
||||
|
||||
function log(idGame, numFases, tempo, pontuacao, meta)
|
||||
{
|
||||
window.open('saveLog.do?method=saveLog&jogo='+idGame+'&fases='+numFases+'&tempo='+tempo+'&pontuacao='+pontuacao+'&metaAlternativa='+meta,'Game Graphic',
|
||||
'height=100,width=100,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
|
||||
|
||||
}
|
||||
|
||||
|
||||
// ***FIM - ATIVIDADE JOGOS ***
|
||||
|
||||
//*** INICIO - ATIVIDADE LEARNING OBJECTS ***
|
||||
|
||||
@@ -33,6 +33,15 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
|
||||
<c:if test="${selectedPosition == 4}"><li><b>Avaliações do Curso</b></li></c:if>
|
||||
<c:if test="${selectedPosition != 4}"><li><html:link action="course.do?method=showViewCourseEvaluations&courseId=${course.id}">Avaliações do Curso</html:link></li></c:if>
|
||||
</c:if>
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
<c:if test="${canViewGroups}">
|
||||
<c:if test="${selectedPosition == 6}"><li><b>Grupos</b></li></c:if>
|
||||
<c:if test="${selectedPosition != 6}"><li><html:link action="course.do?method=showViewGroups&courseId=${course.id}">Grupos</html:link></li></c:if>
|
||||
</c:if>
|
||||
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
<c:if test="${canViewGraphic}">
|
||||
<c:if test="${selectedPosition == 5}"><li><b>Módulo de Visualização</b></li></c:if>
|
||||
<c:if test="${selectedPosition != 5}"><li><html:link action="course.do?method=showViewGraphic&courseId=${course.id}&graphic=sel&moduleSel=-1&idAluno=-1&idGame=-1">Módulo de Visualização</html:link></li></c:if>
|
||||
|
||||
@@ -20,12 +20,16 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
|
||||
|
||||
<link href="themes/default/css/css.css" rel="stylesheet" type="text/css" />
|
||||
<link href="themes/default/css/amadeus.css" rel="stylesheet" type="text/css" />
|
||||
<<<<<<< HEAD
|
||||
<link href="themes/default/css/messenger.css" rel="stylesheet" type="text/css" />
|
||||
<link href="themes/default/css/twittertool.css" rel="stylesheet" type="text/css" />
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
<link href="themes/default/css/content_management.css" rel="stylesheet" type="text/css" />
|
||||
<link href="themes/default/css/jqueryui/smoothness/jquery-ui-1.7.1.custom.css" rel="stylesheet" type="text/css" />
|
||||
<link href="themes/default/imgs/favicon.ico" rel="shortcut icon" />
|
||||
|
||||
<<<<<<< HEAD
|
||||
<!-- <link href="themes/default/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="themes/default/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> -->
|
||||
<link href="themes/default/css/nyroModal.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -48,6 +52,15 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
|
||||
<script type="text/javascript" src="js/amadeus.js"></script>
|
||||
<script type="text/javascript" src="js/messenger.js"></script>
|
||||
<script type="text/javascript" src="js/twittertool.js"></script>
|
||||
=======
|
||||
<script type='text/javascript' src='dwr/interface/UtilDWR.js'></script>
|
||||
<script type='text/javascript' src='dwr/engine.js'></script>
|
||||
<script type='text/javascript' src='dwr/util.js'></script>
|
||||
<script type="text/javascript" src="js/jqueryui/jquery-1.3.2.min.js"></script>
|
||||
<script type="text/javascript" src="js/jqueryui/jquery-ui-1.7.1.custom.min.js"></script>
|
||||
<script type="text/javascript" src="js/openid.js"></script>
|
||||
<script type="text/javascript" src="js/amadeus.js"></script>
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
||||
<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Time Line - Aluno ${nomePerson} do Grupo ${nomeGroup}</title>
|
||||
<style type="text/css">
|
||||
input
|
||||
{
|
||||
cursor: pointer;
|
||||
background: #ffffff;
|
||||
color: #000000;
|
||||
border: none;
|
||||
}
|
||||
input.class1
|
||||
{
|
||||
font-size:12px;
|
||||
}
|
||||
input.class2
|
||||
{
|
||||
font-size:15px;
|
||||
}
|
||||
input.class3
|
||||
{
|
||||
font-size:18px;
|
||||
}
|
||||
input.class4
|
||||
{
|
||||
font-size:21px;
|
||||
}
|
||||
input.class5
|
||||
{
|
||||
font-size:24px;
|
||||
}
|
||||
input.class6
|
||||
{
|
||||
font-size:27px;
|
||||
}
|
||||
input.class7
|
||||
{
|
||||
font-size:30px;
|
||||
}
|
||||
input.class8
|
||||
{
|
||||
font-size:33px;
|
||||
}
|
||||
input.class9
|
||||
{
|
||||
font-size:36px;
|
||||
}
|
||||
input.class10
|
||||
{
|
||||
font-size:39px;
|
||||
}
|
||||
div.cloud
|
||||
{
|
||||
border: 1px solid grey;
|
||||
}
|
||||
input.voltar
|
||||
{
|
||||
border: 1px solid grey;
|
||||
border-radius: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function openJ(date)
|
||||
{
|
||||
var groupId = <%= request.getAttribute("groupID")%>;
|
||||
var personID = <%= request.getAttribute("personID")%>;
|
||||
var external = window.open("http://"+'localhost:8080/amadeuslms' + "/course.do?method=showViewPersonDayTimeline&groupID="+groupId+"&personID="+personID+"&data="+date,'Grupo',
|
||||
'height=450,width=500,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no ,modal=yes');
|
||||
}
|
||||
function resize()
|
||||
{
|
||||
window.resizeTo(480,600);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onLoad="resize();">
|
||||
<h2>Time Line - Aluno ${nomePerson} do Grupo ${nomeGroup}</h2>
|
||||
<div class="cloud">
|
||||
<c:forEach var="tag" items="${timeline}" varStatus="status">
|
||||
<input type="button" onClick="openJ('${tag.date}')" class="${tag.classe}" value="${tag.date}"/>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div>
|
||||
<p/>
|
||||
<input class="voltar" type="button" value="<< Voltar" onClick="history.back(-1);"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -100,11 +100,14 @@ function selectGame()
|
||||
<div id="pLeftMenu" class="pLeftMenu">
|
||||
<c:set var="selectedPosition" value="5" scope="request" />
|
||||
<jsp:include page="/jsp/conf/courseMenu.jsp" />
|
||||
<<<<<<< HEAD
|
||||
|
||||
<!-- Added By Nailson Cunha -->
|
||||
<div id="twitter-container">
|
||||
<jsp:include page="/jsp/twittertool/userTwitter.jsp" />
|
||||
</div>
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
</div>
|
||||
<div id="pContent" class="pContent2">
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="UTF-8"%>
|
||||
<%@page import="antlr.collections.List"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store" />
|
||||
<link href="themes/default/css/displaytag.css" rel="stylesheet" type="text/css"></link>
|
||||
<style type="text/css">
|
||||
table
|
||||
{
|
||||
width: 400px;
|
||||
}
|
||||
input
|
||||
{
|
||||
border: 1px solid grey;
|
||||
border-radius: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function resize()
|
||||
{
|
||||
window.resizeTo(450,500);
|
||||
}
|
||||
</script>
|
||||
<title>Atividades Grupo ${nomeGrupo} - ${data}</title>
|
||||
</head>
|
||||
<body onload="resize();">
|
||||
<h2>Atividades Grupo ${nomeGrupo} - ${data}</h2>
|
||||
<div>
|
||||
<input type="button" value="<< Voltar" onClick="history.back(-1);"/>
|
||||
<p/>
|
||||
<table border="1" cellpadding="5" cellspacing="0">
|
||||
<tr bgcolor="#AAAAAA">
|
||||
<th>Hora</th>
|
||||
<th>Atividade</th>
|
||||
</tr>
|
||||
<c:forEach var="log" items="${logs}" varStatus="status">
|
||||
<tr>
|
||||
<td><fmt:formatDate value="${log.date}" pattern="HH:mm:ss"/></td>
|
||||
<td>
|
||||
<c:if test="${log.codigo == 1}">Login</c:if>
|
||||
<c:if test="${log.codigo == 2}">Logout</c:if>
|
||||
<c:if test="${log.codigo == 3}">Nova Postagem no Fórum</c:if>
|
||||
<c:if test="${log.codigo == 4}">Visualização do Fórum</c:if>
|
||||
<c:if test="${log.codigo == 5}">Visualização de Material - ${log.materialName}</c:if>
|
||||
<c:if test="${log.codigo == 6}">Respondeu Enquete</c:if>
|
||||
<c:if test="${log.codigo == 7}">Abriu Jogo</c:if>
|
||||
<c:if test="${log.codigo == 8}">Jogou</c:if>
|
||||
<c:if test="${log.codigo == 9}">Entregou Material</c:if>
|
||||
<c:if test="${log.codigo == 10}">Visualização de Video</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
<p/>
|
||||
<input type="button" value="<< Voltar" onClick="history.back(-1);"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,87 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
||||
<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Time Line - Grupo ${nomeGroup}</title>
|
||||
<style type="text/css">
|
||||
input
|
||||
{
|
||||
cursor: pointer;
|
||||
background: #ffffff;
|
||||
color: #000000;
|
||||
border: none;
|
||||
}
|
||||
input.class1
|
||||
{
|
||||
font-size:12px;
|
||||
}
|
||||
input.class2
|
||||
{
|
||||
font-size:15px;
|
||||
}
|
||||
input.class3
|
||||
{
|
||||
font-size:18px;
|
||||
}
|
||||
input.class4
|
||||
{
|
||||
font-size:21px;
|
||||
}
|
||||
input.class5
|
||||
{
|
||||
font-size:24px;
|
||||
}
|
||||
input.class6
|
||||
{
|
||||
font-size:27px;
|
||||
}
|
||||
input.class7
|
||||
{
|
||||
font-size:30px;
|
||||
}
|
||||
input.class8
|
||||
{
|
||||
font-size:33px;
|
||||
}
|
||||
input.class9
|
||||
{
|
||||
font-size:36px;
|
||||
}
|
||||
input.class10
|
||||
{
|
||||
font-size:39px;
|
||||
}
|
||||
div.cloud
|
||||
{
|
||||
border: 1px solid grey;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function openJ(date)
|
||||
{
|
||||
var groupId = <%= request.getAttribute("groupId")%>;
|
||||
var external = window.open("http://"+'localhost:8080/amadeuslms' + "/course.do?method=showViewGroupDayTimeline&groupId="+groupId+"&data="+date,'Grupo',
|
||||
'height=450,width=500,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no ,modal=yes');
|
||||
}
|
||||
function resize()
|
||||
{
|
||||
window.resizeTo(480,600);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onLoad="resize();">
|
||||
<h2>Time Line - Grupo ${nomeGroup}</h2>
|
||||
<div class="cloud">
|
||||
<c:forEach var="tag" items="${timeline}" varStatus="status">
|
||||
<input type="button" onClick="openJ('${tag.date}')" class="${tag.classe}" value="${tag.date}"/>
|
||||
</c:forEach>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,394 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<!--
|
||||
Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco
|
||||
|
||||
Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS
|
||||
|
||||
O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como
|
||||
publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença.
|
||||
|
||||
Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes.
|
||||
|
||||
Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
-->
|
||||
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
|
||||
<%@ taglib uri="/WEB-INF/struts-logic" prefix="logic"%>
|
||||
<%@ taglib uri="/WEB-INF/struts-html" prefix="html"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib prefix="display" uri="http://displaytag.sf.net/el" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
|
||||
|
||||
|
||||
<logic:notPresent name="user">
|
||||
<logic:redirect action="system.do?method=showViewWelcome"/>
|
||||
</logic:notPresent>
|
||||
|
||||
|
||||
<%@page import="br.ufpe.cin.amadeus.amadeus_web.syncronize.*"%>
|
||||
<%@page import="antlr.collections.List"%><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store" />
|
||||
<jsp:include page="/jsp/conf/header.jsp" />
|
||||
<link href="themes/default/css/displaytag.css" rel="stylesheet" type="text/css"></link>
|
||||
<style type="text/css">
|
||||
input.button_add {
|
||||
background-image: url(<%=request.getContextPath()%>/themes/default/imgs/icons/button_cancel-15.png); /* 16px x 16px */
|
||||
background-color: transparent;
|
||||
background-repeat: no-repeat;
|
||||
border: none;
|
||||
cursor: pointer; /* make the cursor like hovering over an <a> element */
|
||||
height: 16px;
|
||||
padding-left: 16px; /* make text start to the right of the image */
|
||||
vertical-align: middle; /* align the text vertically centered */
|
||||
}
|
||||
table.visualizarGrupo
|
||||
{
|
||||
width: 450px;
|
||||
}
|
||||
table.criarGrupos
|
||||
{
|
||||
border-collapse:collapse;
|
||||
border:1px solid grey;
|
||||
}
|
||||
th.criarGrupos
|
||||
{
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
tr.criarGrupos, td.criarGrupos
|
||||
{
|
||||
border:none;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
td.disable
|
||||
{
|
||||
border:none;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color:grey;
|
||||
}
|
||||
input.groups
|
||||
{
|
||||
border: none;
|
||||
}
|
||||
input.groupsName
|
||||
{
|
||||
width: 129px;
|
||||
}
|
||||
input.convidarRetirar
|
||||
{
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function habilitarDesabilitarCriarGrupo()
|
||||
{
|
||||
var flag_habilitar_grupo = document.getElementById("inputCourseFlag_habilitar_grupo").value;
|
||||
var habilitarDesabilitar = false;
|
||||
|
||||
if(flag_habilitar_grupo == "true")
|
||||
{
|
||||
var desabilitarWindow=confirm("Desabilitar Criação de Grupos?");
|
||||
|
||||
if (desabilitarWindow==true)
|
||||
{
|
||||
habilitarDesabilitar = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var habilitarWindow=confirm("Habilitar Criação de Grupos?");
|
||||
if (habilitarWindow==true)
|
||||
{
|
||||
habilitarDesabilitar = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(habilitarDesabilitar)
|
||||
{
|
||||
var courseId = document.getElementById("inputCourseID").value;
|
||||
window.location = "http://"+'localhost:8080/amadeuslms' + "/course.do?method=habilitarDesabilitarCriarGrupos&courseId=" + courseId;
|
||||
}
|
||||
}
|
||||
|
||||
function convidarPerson()
|
||||
{
|
||||
var countAlunos = document.getElementById("inputCountAlunosCourse").value;
|
||||
|
||||
var i;
|
||||
for (i=0; i<countAlunos; i++)
|
||||
{
|
||||
checkTemp = document.getElementById("inputAlunoCourse"+i);
|
||||
if(checkTemp.checked && !checkTemp.disabled)
|
||||
{
|
||||
var table = document.getElementById("tabelaParticipantesGrupos");
|
||||
var rowCount = table.rows.length;
|
||||
var row = table.insertRow(rowCount);
|
||||
|
||||
var aluno = checkTemp.value;
|
||||
|
||||
var nomeAluno = document.getElementById("inputhiddennamealuno"+i).value;
|
||||
var alunoRow = row.insertCell(0);
|
||||
alunoRow.innerHTML = "<input id='inputButtonExcluirAlunoGrupo"+i+"' class='button_add' type='button' name='"+i+"'/><input id='inputAlunoGrupo"+i+"' type='hidden' value='"+aluno+"'/>"+nomeAluno;
|
||||
alunoRow.className = "criarGrupos";
|
||||
|
||||
checkTemp.disabled = "disabled";
|
||||
document.getElementById("tdAlunoCourse"+i).style.color='grey';
|
||||
|
||||
var btnExcluir = document.getElementById("inputButtonExcluirAlunoGrupo"+i);
|
||||
|
||||
btnExcluir.onclick = function(e)
|
||||
{
|
||||
var targ;
|
||||
if (!e)
|
||||
{
|
||||
var e = window.event;
|
||||
}
|
||||
if (e.target)
|
||||
{
|
||||
targ = e.target;
|
||||
}
|
||||
|
||||
var tableIn = document.getElementById("tabelaParticipantesGrupos");
|
||||
var rowCountIn = tableIn.rows.length;
|
||||
|
||||
for (var j=2; j<rowCountIn; j++)
|
||||
{
|
||||
var rowIn = tableIn.rows[j];
|
||||
var input = rowIn.cells[0].childNodes[0];
|
||||
if(input != null && input.id == targ.id)
|
||||
{
|
||||
tableIn.deleteRow(j);
|
||||
|
||||
var checkCurso = document.getElementById("inputAlunoCourse"+targ.name);
|
||||
checkCurso.disabled = "";
|
||||
checkCurso.checked = "";
|
||||
document.getElementById("tdAlunoCourse"+targ.name).style.color='black';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function montarLista()
|
||||
{
|
||||
var nameGroup = document.getElementById("inputNameGroup").value;
|
||||
if(nameGroup == null || nameGroup == "" )
|
||||
{
|
||||
alert('Preencha o nome do grupo.');
|
||||
return false;
|
||||
}
|
||||
|
||||
var confirmacaoCriarGrupo=confirm("Deseja concluir a criação do novo grupo?");
|
||||
if (confirmacaoCriarGrupo!=true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
var countAlunos = document.getElementById("inputCountAlunosCourse").value;
|
||||
|
||||
var courseId = document.getElementById("inputCourseID").value;
|
||||
var stringAction = "course.do?method=showViewCreateGroup&courseId="+courseId+"&nomeCourse="+nameGroup;
|
||||
|
||||
var indice = 0;
|
||||
var entrou = false;
|
||||
for (var i=-1; i<countAlunos; i++)
|
||||
{
|
||||
var aluno = document.getElementById("inputAlunoGrupo"+i);
|
||||
if(aluno != null)
|
||||
{
|
||||
stringAction += "&alunoId"+indice+"="+aluno.value;
|
||||
indice++;
|
||||
entrou = true;
|
||||
}
|
||||
}
|
||||
|
||||
stringAction += "&qtdAlunos="+indice;
|
||||
|
||||
|
||||
if(!entrou)
|
||||
{
|
||||
alert('Convide algum aluno do curso para o grupo.')
|
||||
return false;
|
||||
}
|
||||
|
||||
document.getElementById("formCreateGroup").action = stringAction;
|
||||
}
|
||||
}
|
||||
|
||||
function openOneGroup(groupID)
|
||||
{
|
||||
var courseId = document.getElementById("inputCourseID").value;
|
||||
var external = window.open("http://"+'localhost:8080/amadeuslms' + "/course.do?method=showViewOneGroup&courseId="+courseId+"&groupID="+groupID,'Grupo',
|
||||
'height=400,width=480,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no ,modal=yes');
|
||||
}
|
||||
|
||||
function openTimeline(groupID)
|
||||
{
|
||||
var external = window.open("http://"+'localhost:8080/amadeuslms' + "/course.do?method=showViewGroupTimeline&groupID="+groupID,'Grupo',
|
||||
'height=480,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no ,modal=yes');
|
||||
}
|
||||
|
||||
function openRelatorio()
|
||||
{
|
||||
var courseId = document.getElementById("inputCourseID").value;
|
||||
var external = window.open("http://"+'localhost:8080/amadeuslms' + "/course.do?method=showViewRelatorioAtividade&courseId="+courseId,'Grupo',
|
||||
'height=400,width=480,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no ,modal=yes');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<input id="inputCourseFlag_habilitar_grupo" type="hidden" value="${course.flag_habilitar_grupo}"/>
|
||||
<input id="inputCourseID" type="hidden" value="${course.id}"/>
|
||||
<div id="pBody" class="pBody">
|
||||
<div id="pHeader" class="pHeader">
|
||||
<jsp:include page="/jsp/conf/login.jsp" />
|
||||
</div>
|
||||
<jsp:include page="/jsp/conf/logo.jsp" />
|
||||
<div id="pTitle" class="pTitle">
|
||||
<h2>Grupos</h2>
|
||||
</div>
|
||||
<div id="pBreadCrumbs" class="pBreadCrumbs">
|
||||
<ul id="breadcrumb">
|
||||
<li><html:link action="system.do?method=showViewMenu"><bean:message key="menu.name"/></html:link></li>
|
||||
<li><html:link action="course.do?method=showViewCourse&courseId=${course.id}"><bean:write name="course" property="name"/></html:link></li>
|
||||
<li>Grupos</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="pLeftMenu" class="pLeftMenu">
|
||||
<c:set var="selectedPosition" value="6" scope="request" />
|
||||
<jsp:include page="/jsp/conf/courseMenu.jsp" />
|
||||
</div>
|
||||
<div id="pContent" class="pContent2">
|
||||
<div id="comboBoxGroupsContent">
|
||||
<c:if test="${canViewEnableGroups}">
|
||||
<c:if test="${course.flag_habilitar_grupo}">
|
||||
<li><a href="#" onclick="habilitarDesabilitarCriarGrupo();">Desabilitar Criar Grupos</a></li>
|
||||
</c:if>
|
||||
<c:if test="${!course.flag_habilitar_grupo}">
|
||||
<li><a href="#" onclick="habilitarDesabilitarCriarGrupo();">Habilitar Criar Grupos</a></li>
|
||||
</c:if>
|
||||
</c:if>
|
||||
<c:if test="${canCreateGroups && (canViewEnableGroups || course.flag_habilitar_grupo)}">
|
||||
<li><html:link action="course.do?method=showViewGroups&courseId=${course.id}&viewCreateGroup=1">Criar Grupo</html:link></li>
|
||||
</c:if>
|
||||
<li><html:link action="course.do?method=showViewGroups&courseId=${course.id}&viewCreateGroup=2">Visualizar Grupos</html:link></li>
|
||||
<c:if test="${canViewEnableGroups}">
|
||||
<li><a href="#" onclick="openRelatorio();">Relatório das Atividades</a></li>
|
||||
</c:if>
|
||||
</div>
|
||||
<p/>
|
||||
<p/>
|
||||
<c:choose>
|
||||
<c:when test="${viewCreateGroup == '2'}">
|
||||
<div>
|
||||
<table border="1" cellpadding="5" cellspacing="0" class="visualizarGrupo">
|
||||
<tr bgcolor="#AAAAAA">
|
||||
<th>Nome do Grupo</th>
|
||||
<th>Integrantes</th>
|
||||
<th>Timeline</th>
|
||||
<th>Atividades</th>
|
||||
</tr>
|
||||
<c:forEach var="group" items="${groups}" varStatus="status">
|
||||
<tr>
|
||||
<td><a href="#" onclick="openOneGroup(${group.id})">${group.name}</a></td>
|
||||
<td>${group.qtdMembros}</td>
|
||||
<td><a href="#" onclick="openTimeline(${group.id})">Visualizar</a></td>
|
||||
<td align="center">
|
||||
<c:if test="${group.status}">
|
||||
<img src = "/amadeuslms/themes/default/imgs/icons/green.png" />
|
||||
</c:if>
|
||||
<c:if test="${!group.status}">
|
||||
<img src = "/amadeuslms/themes/default/imgs/icons/red.png" />
|
||||
</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:when test="${canCreateGroups && viewCreateGroup == '1'}">
|
||||
<div id="criarGrupos">
|
||||
<form id="formCreateGroup" method="post" action="" onsubmit="return montarLista();">
|
||||
<table border=1 class="criarGrupos">
|
||||
<tr class="criarGrupos">
|
||||
<td class="criarGrupos">
|
||||
<div>
|
||||
<b>Nome do Grupo:</b>
|
||||
</div>
|
||||
<div>
|
||||
<input id="inputNameGroup" class="groupsName" type="text" name="nomeGrupo"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="criarGrupos">
|
||||
<td class="criarGrupos">
|
||||
<table id="tabelaParticipantesGrupos" border=1 class="criarGrupos">
|
||||
<tr class="criarGrupos">
|
||||
<th class="criarGrupos" colspan="2">
|
||||
Participantes do Grupo:
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<c:if test="${!canViewEnableGroups}">
|
||||
<td>
|
||||
<input id='inputAlunoGrupo-1' class='groups' type='hidden' value='${user.person.id}'/>${user.person.name}
|
||||
</td>
|
||||
</c:if>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="criarGrupos">
|
||||
<input class='convidarRetirar' type="button" value="Convidar" onclick="convidarPerson();"/>
|
||||
</td>
|
||||
<td class="criarGrupos">
|
||||
<div>
|
||||
<table border=1 class="criarGrupos">
|
||||
<tr class="criarGrupos">
|
||||
<th class="criarGrupos">
|
||||
Participantes do Curso:
|
||||
<input id="inputCountAlunosCourse" type="hidden" value="${fn:length(students)}"/>
|
||||
</th>
|
||||
</tr>
|
||||
<c:forEach var="student" items="${students}" varStatus="status">
|
||||
<tr>
|
||||
<input id="inputhiddennamealuno${student.position}" type="hidden" value="${student.name}">
|
||||
<c:if test="${student.haveGroup}">
|
||||
<td id="tdAlunoCourse${student.position}" class="disable"><input id="inputAlunoCourse${student.position}" class="groups" type="checkbox" disabled="disabled" value="${student.id}"/>${student.name}*</td>
|
||||
</c:if>
|
||||
<c:if test="${!student.haveGroup}">
|
||||
<td class="criarGrupos" id="tdAlunoCourse${student.position}"><input id="inputAlunoCourse${student.position}" class="groups" type="checkbox" value="${student.id}"/>${student.name}</td>
|
||||
</c:if>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="criarGrupos">
|
||||
<td class="criarGrupos">
|
||||
<input type="submit" value="Concluir"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</div>
|
||||
<jsp:include page="/jsp/conf/footer.jsp" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,89 @@
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
||||
pageEncoding="ISO-8859-1"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
input.button_add {
|
||||
background-image: url(<%=request.getContextPath()%>/themes/default/imgs/icons/button_cancel-15.png); /* 16px x 16px */
|
||||
background-color: transparent;
|
||||
background-repeat: no-repeat;
|
||||
border: none;
|
||||
cursor: pointer; /* make the cursor like hovering over an <a> element */
|
||||
height: 16px;
|
||||
padding-left: 16px; /* make text start to the right of the image */
|
||||
vertical-align: middle; /* align the text vertically centered */
|
||||
}
|
||||
table.visualizarGrupo
|
||||
{
|
||||
width: 450px;
|
||||
}
|
||||
table.criarGrupos
|
||||
{
|
||||
border-collapse:collapse;
|
||||
border:1px solid grey;
|
||||
}
|
||||
th.criarGrupos
|
||||
{
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
tr.criarGrupos, td.criarGrupos
|
||||
{
|
||||
border:none;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
td.disable
|
||||
{
|
||||
border:none;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
color:grey;
|
||||
}
|
||||
input.groups
|
||||
{
|
||||
border: none;
|
||||
}
|
||||
input.groupsName
|
||||
{
|
||||
width: 129px;
|
||||
}
|
||||
input.convidarRetirar
|
||||
{
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Relatório de Atividades</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Relatório de Atividades</h2>
|
||||
<table border="1" cellpadding="5" cellspacing="0" class="visualizarGrupo">
|
||||
<tr bgcolor="#AAAAAA">
|
||||
<th>Nome do Grupo</th>
|
||||
<c:forEach var="modulo" items="${modulos}" varStatus="status">
|
||||
<th>${modulo}</th>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
<c:forEach var="relatorio" items="${relatorios}" varStatus="status">
|
||||
<tr>
|
||||
<td>${relatorio.nome}</td>
|
||||
<c:forEach var="s" items="${relatorio.status}" varStatus="status">
|
||||
<td align="center">
|
||||
<c:if test="${s}">
|
||||
<img src = "/amadeuslms/themes/default/imgs/icons/green.png" />
|
||||
</c:if>
|
||||
<c:if test="${!s}">
|
||||
<img src = "/amadeuslms/themes/default/imgs/icons/red.png" />
|
||||
</c:if>
|
||||
</td>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
<a href="#" onclick="window.print();">Imprimir</a>
|
||||
<a href="#" onclick="window.close();">Fechar</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,60 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="UTF-8"%>
|
||||
<%@page import="antlr.collections.List"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store" />
|
||||
<link href="themes/default/css/displaytag.css" rel="stylesheet" type="text/css"></link>
|
||||
<style type="text/css">
|
||||
table
|
||||
{
|
||||
width: 400px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function resize()
|
||||
{
|
||||
window.resizeTo(440,480);
|
||||
}
|
||||
function openPersonTimeline(personID)
|
||||
{
|
||||
var groupID = document.getElementById("inputHiddenIdGroup").value;
|
||||
var external = window.open("http://"+'localhost:8080/amadeuslms' + "/course.do?method=showViewPersonTimeline&groupID="+groupID+"&personID="+personID,'Grupo',
|
||||
'height=480,width=600,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no ,modal=yes');
|
||||
}
|
||||
</script>
|
||||
<title>Grupo ${nomeGrupo}</title>
|
||||
</head>
|
||||
<body onload="resize();">
|
||||
<input id="inputHiddenIdGroup" type="hidden" value="${group.id}"/>
|
||||
<div>
|
||||
<table border="1" cellpadding="5" cellspacing="0">
|
||||
<tr bgcolor="#AAAAAA">
|
||||
<th>Nome do Integrante</th>
|
||||
<th>Função</th>
|
||||
<th>Atividades</th>
|
||||
</tr>
|
||||
<c:forEach var="aluno" items="${alunos}" varStatus="status">
|
||||
<tr>
|
||||
<td><a href="#" onclick="openPersonTimeline(${aluno.id});">${aluno.name}</a></td>
|
||||
<td>
|
||||
<c:if test="${aluno.papel == 0}">Fundador/Moderador</c:if>
|
||||
<c:if test="${aluno.papel == 1}">Moderador</c:if>
|
||||
<c:if test="${aluno.papel == 2}">Membro</c:if>
|
||||
</td>
|
||||
<td align="center">
|
||||
<c:if test="${aluno.status}">
|
||||
<img src = "/amadeuslms/themes/default/imgs/icons/green.png" />
|
||||
</c:if>
|
||||
<c:if test="${!aluno.status}">
|
||||
<img src = "/amadeuslms/themes/default/imgs/icons/red.png" />
|
||||
</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
|
||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="UTF-8"%>
|
||||
<%@page import="antlr.collections.List"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<head>
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store" />
|
||||
<link href="themes/default/css/displaytag.css" rel="stylesheet" type="text/css"></link>
|
||||
<style type="text/css">
|
||||
table
|
||||
{
|
||||
width: 400px;
|
||||
}
|
||||
input
|
||||
{
|
||||
border: 1px solid grey;
|
||||
border-radius: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function resize()
|
||||
{
|
||||
window.resizeTo(450,500);
|
||||
}
|
||||
</script>
|
||||
<title>Atividades de ${nomePessoa} do Grupo ${nomeGrupo} - ${data}</title>
|
||||
</head>
|
||||
<body onload="resize();">
|
||||
<h2>Atividades de ${nomePessoa} do Grupo ${nomeGrupo} - ${data}</h2>
|
||||
<div>
|
||||
<input type="button" value="<< Voltar" onClick="history.back(-1);"/>
|
||||
<p/>
|
||||
<table border="1" cellpadding="5" cellspacing="0">
|
||||
<tr bgcolor="#AAAAAA">
|
||||
<th>Hora</th>
|
||||
<th>Atividade</th>
|
||||
</tr>
|
||||
<c:forEach var="log" items="${logs}" varStatus="status">
|
||||
<tr>
|
||||
<td><fmt:formatDate value="${log.date}" pattern="HH:mm:ss"/></td>
|
||||
<td>
|
||||
<c:if test="${log.codigo == 1}">Login</c:if>
|
||||
<c:if test="${log.codigo == 2}">Logout</c:if>
|
||||
<c:if test="${log.codigo == 3}">Nova Postagem no Fórum</c:if>
|
||||
<c:if test="${log.codigo == 4}">Visualização do Fórum</c:if>
|
||||
<c:if test="${log.codigo == 5}">Visualização de Material - ${log.materialName}</c:if>
|
||||
<c:if test="${log.codigo == 6}">Respondeu Enquete</c:if>
|
||||
<c:if test="${log.codigo == 7}">Abriu Jogo</c:if>
|
||||
<c:if test="${log.codigo == 8}">Jogou</c:if>
|
||||
<c:if test="${log.codigo == 9}">Entregou Material</c:if>
|
||||
<c:if test="${log.codigo == 10}">Visualização de Video</c:if>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</table>
|
||||
<p/>
|
||||
<input type="button" value="<< Voltar" onClick="history.back(-1);"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -15,12 +15,12 @@ Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título
|
||||
<head>
|
||||
<title>Amadeus Mobile</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=/amadeuslms/mobile/login/loginHtml.jsp">
|
||||
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=/amadeusweb/mobile/login/loginHtml.jsp">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div align="center">
|
||||
<img src="/amadeuslms/mobile/imgs/amadeus_mobile.jpg" width="120px" height="150px" alt="logo">
|
||||
<img src="/amadeusweb/mobile/imgs/amadeus_mobile.jpg" width="120px" height="150px" alt="logo">
|
||||
<h2>Você está sendo direcionado para a página do Amadeus Mobile.</h2>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Arquivo binário não exibido.
|
Depois Largura: | Altura: | Tamanho: 598 B |
Arquivo binário não exibido.
|
Depois Largura: | Altura: | Tamanho: 568 B |
@@ -1,3 +1,7 @@
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
--
|
||||
-- PostgreSQL database dump
|
||||
--
|
||||
@@ -8,7 +12,10 @@ SET check_function_bodies = false;
|
||||
SET client_min_messages = warning;
|
||||
SET escape_string_warning = off;
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
--
|
||||
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
|
||||
--
|
||||
@@ -67,6 +74,7 @@ CREATE TABLE alternativerealized (
|
||||
ALTER TABLE public.alternativerealized OWNER TO postgres;
|
||||
|
||||
--
|
||||
<<<<<<< HEAD
|
||||
-- Name: amadeus_droid_historic; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
|
||||
--
|
||||
|
||||
@@ -83,6 +91,8 @@ CREATE TABLE amadeus_droid_historic (
|
||||
ALTER TABLE public.amadeus_droid_historic OWNER TO postgres;
|
||||
|
||||
--
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
-- Name: answer; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
|
||||
--
|
||||
|
||||
@@ -388,7 +398,11 @@ ALTER TABLE public.externallink OWNER TO postgres;
|
||||
|
||||
CREATE TABLE forum (
|
||||
id integer NOT NULL,
|
||||
<<<<<<< HEAD
|
||||
description character varying(9000),
|
||||
=======
|
||||
description character varying(255),
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
creationdate timestamp without time zone,
|
||||
name character varying(255),
|
||||
module_id integer NOT NULL
|
||||
@@ -410,11 +424,19 @@ CREATE TABLE game (
|
||||
minusers integer NOT NULL,
|
||||
name character varying(255),
|
||||
url character varying(255),
|
||||
<<<<<<< HEAD
|
||||
module_id integer NOT NULL,
|
||||
linkexterno boolean DEFAULT false
|
||||
);
|
||||
|
||||
|
||||
=======
|
||||
module_id integer NOT NULL
|
||||
);
|
||||
|
||||
|
||||
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
ALTER TABLE public.game OWNER TO postgres;
|
||||
|
||||
--
|
||||
@@ -530,6 +552,7 @@ CREATE TABLE learningobject (
|
||||
ALTER TABLE public.learningobject OWNER TO postgres;
|
||||
|
||||
--
|
||||
<<<<<<< HEAD
|
||||
-- Name: log; Type: TABLE; Schema: public; Owner: amadeus; Tablespace:
|
||||
--
|
||||
|
||||
@@ -550,6 +573,8 @@ CREATE TABLE log (
|
||||
ALTER TABLE public.log OWNER TO postgres;
|
||||
|
||||
--
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
-- Name: material; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
|
||||
--
|
||||
|
||||
@@ -593,7 +618,11 @@ ALTER TABLE public.materialrequest OWNER TO postgres;
|
||||
|
||||
CREATE TABLE message (
|
||||
id integer NOT NULL,
|
||||
<<<<<<< HEAD
|
||||
body character varying(9000),
|
||||
=======
|
||||
body character varying(2000),
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
date timestamp without time zone,
|
||||
forum_id integer NOT NULL,
|
||||
author_id integer,
|
||||
@@ -651,9 +680,13 @@ CREATE TABLE person (
|
||||
state character varying(255),
|
||||
access_info_id integer,
|
||||
image_id integer,
|
||||
<<<<<<< HEAD
|
||||
resume_id integer,
|
||||
twitterlogin character varying(255),
|
||||
facebooklogin character varying(255)
|
||||
=======
|
||||
resume_id integer
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
);
|
||||
|
||||
|
||||
@@ -814,6 +847,7 @@ ALTER TABLE ONLY alternativerealized
|
||||
|
||||
|
||||
--
|
||||
<<<<<<< HEAD
|
||||
-- Name: amadeus_droid_historic_pkey; Type: CONSTRAINT; Schema: public; Owner: amadeus; Tablespace:
|
||||
--
|
||||
|
||||
@@ -822,6 +856,8 @@ ALTER TABLE ONLY amadeus_droid_historic
|
||||
|
||||
|
||||
--
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
-- Name: answer_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
|
||||
--
|
||||
|
||||
@@ -1094,6 +1130,7 @@ ALTER TABLE ONLY learningobject
|
||||
|
||||
|
||||
--
|
||||
<<<<<<< HEAD
|
||||
-- Name: log_primary_key; Type: CONSTRAINT; Schema: public; Owner: amadeus; Tablespace:
|
||||
--
|
||||
|
||||
@@ -1102,6 +1139,8 @@ ALTER TABLE ONLY log
|
||||
|
||||
|
||||
--
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
-- Name: material_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
|
||||
--
|
||||
|
||||
@@ -1718,6 +1757,7 @@ ALTER TABLE ONLY courseevaluation_criterion
|
||||
|
||||
|
||||
--
|
||||
<<<<<<< HEAD
|
||||
-- Name: log_person_foreign_key; Type: FK CONSTRAINT; Schema: public; Owner: amadeus
|
||||
--
|
||||
|
||||
@@ -1726,6 +1766,8 @@ ALTER TABLE ONLY log
|
||||
|
||||
|
||||
--
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
-- Name: public; Type: ACL; Schema: -; Owner: postgres
|
||||
--
|
||||
|
||||
@@ -1739,3 +1781,25 @@ GRANT ALL ON SCHEMA public TO PUBLIC;
|
||||
-- PostgreSQL database dump complete
|
||||
--
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
ALTER TABLE game ADD COLUMN linkexterno boolean DEFAULT false;
|
||||
|
||||
CREATE TABLE log
|
||||
(
|
||||
id integer NOT NULL,
|
||||
date timestamp without time zone,
|
||||
person_id integer,
|
||||
codigo integer,
|
||||
idobjeto integer,
|
||||
fases integer,
|
||||
tempo integer,
|
||||
pontuacao integer,
|
||||
metaalternativa integer,
|
||||
tamanhomensagem integer,
|
||||
CONSTRAINT log_primary_key PRIMARY KEY (id ),
|
||||
CONSTRAINT log_person_foreign_key FOREIGN KEY (person_id)
|
||||
REFERENCES person (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
@@ -13,15 +13,19 @@ Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t
|
||||
|
||||
package br.ufpe.cin.amadeus.amadeus_web.dao;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.AmadeusDroidHistoricDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.ArchiveDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.CourseDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.DeliveryDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.ForumDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.GameDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.GroupsDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.HistoryLearningObjectDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.HomeworkDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.KeywordDAO;
|
||||
@@ -45,7 +49,14 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.register.PersonDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.register.ResumeDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.register.TweetDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.register.UserRequestDAO;
|
||||
<<<<<<< HEAD
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Tweet;
|
||||
=======
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.evaluation.EvaluationDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.evaluation.EvaluationRealizedDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.externallink.ExternalLinkDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Groups;
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
public abstract class DAOFactory {
|
||||
|
||||
@@ -98,7 +109,11 @@ public abstract class DAOFactory {
|
||||
public abstract ExternalLinkDAO getExternalLinkDAO();
|
||||
public abstract AmadeusDroidHistoricDAO getAmadeusDroidHistoricDAO();
|
||||
public abstract LogDAO getLogDAO();
|
||||
<<<<<<< HEAD
|
||||
public abstract MessengerMessageDAO getMessengerMessageDAO(); //Added by Nailson Cunha
|
||||
public abstract TweetDAO getTweetDAO(); //Added by Nailson Cunha
|
||||
=======
|
||||
public abstract GroupsDAO getGroupsDAO();
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
|
||||
|
||||
@@ -17,9 +17,15 @@ import java.util.List;
|
||||
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Forum;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
|
||||
public interface ForumDAO extends GenericDAO <Forum, Integer> {
|
||||
|
||||
List<Forum> getListForum();
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
boolean verificarStatusPorForum(List<Person> alunos, Forum forum);
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,13 @@ import java.util.List;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Game;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
|
||||
public interface GameDAO extends GenericDAO <Game, Integer>{
|
||||
<<<<<<< HEAD
|
||||
public List<Game> getAllGameFromCourse(Course course);
|
||||
=======
|
||||
public List<Game> getAllGameFromCourse(Course course);
|
||||
boolean verificarStatusPorGame(List<Person> alunos, Game game);
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
Copyright 2008, 2009 UFPE - Universidade Federal de Pernambuco
|
||||
|
||||
Este arquivo � parte do programa Amadeus Sistema de Gest�o de Aprendizagem, ou simplesmente Amadeus LMS
|
||||
|
||||
O Amadeus LMS � um software livre; voc� pode redistribui-lo e/ou modifica-lo dentro dos termos da Licen�a P�blica Geral GNU como
|
||||
publicada pela Funda��o do Software Livre (FSF); na vers�o 2 da Licen�a.
|
||||
|
||||
Este programa � distribu�do na esperan�a que possa ser �til, mas SEM NENHUMA GARANTIA; sem uma garantia impl�cita de ADEQUA��O a qualquer MERCADO ou APLICA��O EM PARTICULAR. Veja a Licen�a P�blica Geral GNU para maiores detalhes.
|
||||
|
||||
Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t�tulo "LICENCA.txt", junto com este programa, se n�o, escreva para a Funda��o do Software Livre (FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
**/
|
||||
|
||||
package br.ufpe.cin.amadeus.amadeus_web.dao.content_managment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Groups;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Module;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.TimelineItem;
|
||||
|
||||
public interface GroupsDAO extends GenericDAO <Groups, Integer>{
|
||||
|
||||
public List<Log> getLogsByDayAndGroup(String data, int groupId);
|
||||
public List<Groups> getGroupsByCourseID(int id);
|
||||
public List<Person> getPersonByGroupsID(int id);
|
||||
public List<TimelineItem> getTimelineByGroupsID(int id);
|
||||
public boolean personHaveGroup(int courseId, int personId);
|
||||
public Module getUltimoModulo(int courseId);
|
||||
}
|
||||
@@ -21,6 +21,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.PersonRoleCours
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Role;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.StudentHaveGroup;
|
||||
|
||||
public interface PersonRoleCourseDAO extends GenericDAO<PersonRoleCourse, Integer>{
|
||||
public List<Person> searchUsersByCoursesAndRole(Course course, Role role);
|
||||
@@ -33,4 +34,8 @@ public interface PersonRoleCourseDAO extends GenericDAO<PersonRoleCourse, Intege
|
||||
public List<PersonRoleCourse> getByRoleInCourse(Person person, Course course, Role role);
|
||||
public List<PersonRoleCourse> getStudentRolesCourses(int studentId);
|
||||
public List<PersonRoleCourse> getStudentByUser(AccessInfo accessInfo);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
public List<StudentHaveGroup> getStudentHaveGroupByCourse(Course course, Person person);
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.CourseDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.DeliveryDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.ForumDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.GameDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.GroupsDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.HistoryLearningObjectDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.HomeworkDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.KeywordDAO;
|
||||
@@ -47,6 +48,7 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.CourseHib
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.DeliveryHibernateDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.ForumHibernateDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.GameHibernateDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.GroupsHibernateDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.HistoryLearningObjectHibernateDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.HomeworkHibernateDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment.KeywordHibernateDAO;
|
||||
@@ -206,6 +208,7 @@ public class HibernateDAOFactory extends DAOFactory {
|
||||
public LogDAO getLogDAO() {
|
||||
return (LogDAO) instantiateDAO(LogHibernateDAO.class);
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
/**
|
||||
* Método que retorna o MessengerMessageDAO
|
||||
@@ -221,6 +224,13 @@ public class HibernateDAOFactory extends DAOFactory {
|
||||
return (TweetDAO) instantiateDAO(TweetHibernateDAO.class);
|
||||
}
|
||||
|
||||
=======
|
||||
|
||||
@Override
|
||||
public GroupsDAO getGroupsDAO() {
|
||||
return (GroupsDAO) instantiateDAO(GroupsHibernateDAO.class);
|
||||
}
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
|
||||
|
||||
|
||||
+38
@@ -15,9 +15,16 @@ package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import org.apache.poi.hssf.record.formula.functions.Int;
|
||||
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.ForumDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Forum;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
|
||||
public class ForumHibernateDAO extends GenericHibernateDAO<Forum, Integer> implements ForumDAO {
|
||||
|
||||
@@ -32,4 +39,35 @@ public class ForumHibernateDAO extends GenericHibernateDAO<Forum, Integer> imple
|
||||
return results;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean verificarStatusPorForum(List<Person> alunos, Forum forum) {
|
||||
|
||||
String persons = " AND l.idUser.id IN (";
|
||||
|
||||
String ids = "";
|
||||
|
||||
for (int i = 0; i < alunos.size(); i++)
|
||||
{
|
||||
if(ids.length() != 0)
|
||||
{
|
||||
ids += ",";
|
||||
}
|
||||
ids += alunos.get(i).getId();
|
||||
}
|
||||
|
||||
persons += ids + ")";
|
||||
|
||||
String hql = "select distinct l.idUser.id from Log l where l.codigo = 4 AND l.idObjeto = " + forum.getId() + persons;
|
||||
List<Int> posts = getSession().createQuery(hql).list();
|
||||
|
||||
boolean retorno = alunos.size() == posts.size();
|
||||
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
|
||||
+37
@@ -15,10 +15,16 @@ package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import org.apache.poi.hssf.record.formula.functions.Int;
|
||||
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.GameDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Game;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
|
||||
public class GameHibernateDAO extends GenericHibernateDAO<Game, Integer>
|
||||
implements GameDAO {
|
||||
@@ -33,5 +39,36 @@ public class GameHibernateDAO extends GenericHibernateDAO<Game, Integer>
|
||||
|
||||
return game;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean verificarStatusPorGame(List<Person> alunos, Game game) {
|
||||
|
||||
String persons = " AND l.idUser.id IN (";
|
||||
|
||||
String ids = "";
|
||||
|
||||
for (int i = 0; i < alunos.size(); i++)
|
||||
{
|
||||
if(ids.length() != 0)
|
||||
{
|
||||
ids += ",";
|
||||
}
|
||||
ids += alunos.get(i).getId();
|
||||
}
|
||||
|
||||
persons += ids + ")";
|
||||
|
||||
String hql = "select distinct l.idUser.id from Log l where l.codigo = 7 AND l.idObjeto = " + game.getId() + persons;
|
||||
List<Int> posts = getSession().createQuery(hql).list();
|
||||
|
||||
boolean retorno = alunos.size() == posts.size();
|
||||
|
||||
|
||||
return retorno;
|
||||
}
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
}
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.GroupsDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Groups;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Module;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Person_Groups;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.TimelineItem;
|
||||
|
||||
public class GroupsHibernateDAO extends GenericHibernateDAO<Groups, Integer>
|
||||
implements GroupsDAO {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<Log> getLogsByDayAndGroup(String data, int groupId) {
|
||||
String sqlQuery = "SELECT l.* as frequency FROM Log l, Person p, Person_Groups pg, Groups g " +
|
||||
" WHERE pg.group_id = " + groupId +
|
||||
" AND pg.person_id = p.id " +
|
||||
" AND l.person_id = p.id " +
|
||||
" AND '" + data + " 00:00:00' <= l.date " +
|
||||
" AND '" + data + " 23:59:59' >= l.date " +
|
||||
" AND g.id = " + groupId +
|
||||
" AND g.date < l.date " +
|
||||
" ORDER BY l.date ASC";
|
||||
|
||||
List<Log> list = getSession().createSQLQuery(sqlQuery).addEntity("l", Log.class).list();
|
||||
return list;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<Groups> getGroupsByCourseID(int id) {
|
||||
String hqlQuery = "SELECT g FROM Groups g WHERE g.curso.id = " + id;
|
||||
List<Groups> results = (List<Groups>) getSession().createQuery(hqlQuery).list();
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<Person> getPersonByGroupsID(int id) {
|
||||
String hqlQuery = "SELECT p FROM Person_Groups pg, Person p WHERE pg.groups.id = " + id + " AND pg.pessoa.id = p.id";
|
||||
List<Person> results = getSession().createQuery(hqlQuery).list();
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<TimelineItem> getTimelineByGroupsID(int id) {
|
||||
|
||||
String hqlQuery = "SELECT g.id as idGroup, to_char(date_trunc('day', l.date),'DD/MM/YYYY') as date, count(l.*) as frequency" +
|
||||
" FROM Log l, Person p, Person_Groups pg, Groups g where pg.group_id = " + id
|
||||
+ " AND pg.person_id = p.id"
|
||||
+ " AND l.person_id = p.id"
|
||||
+ " AND g.id = pg.group_id"
|
||||
+ " AND g.date < l.date"
|
||||
+ " GROUP BY date_trunc('day', l.date), g.id ORDER BY date_trunc('day', l.date);";
|
||||
List<Object[]> results = getSession().createSQLQuery(hqlQuery).list();
|
||||
|
||||
List<TimelineItem> retorno = new ArrayList<TimelineItem>();
|
||||
|
||||
for(int i=0;i<results.size();i++){
|
||||
TimelineItem item = new TimelineItem();
|
||||
Object[] temp = results.get(i);
|
||||
item.setIdGroup((Integer)temp[0]);
|
||||
item.setDate((String)temp[1]);
|
||||
item.setFrequency(((BigInteger)temp[2]).intValue());
|
||||
|
||||
retorno.add(item);
|
||||
}
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean personHaveGroup(int courseId, int personId) {
|
||||
|
||||
String hqlQuery = "Select p from Person_Groups p where p.pessoa.id = " + personId + " and p.groups.curso.id = " + courseId;
|
||||
|
||||
List<Person_Groups> list = getSession().createQuery(hqlQuery).list();
|
||||
return list.size() == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Module getUltimoModulo(int courseId) {
|
||||
|
||||
String hqlQuery = "SELECT m FROM Module m WHERE m.id IN (SELECT MAX(m.id) FROM Module m WHERE m.course.id = " + courseId + ")";
|
||||
|
||||
Module ultimoModulo = (Module) getSession().createQuery(hqlQuery).uniqueResult();
|
||||
|
||||
return ultimoModulo;
|
||||
}
|
||||
}
|
||||
+39
@@ -13,18 +13,23 @@ Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t
|
||||
|
||||
package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.content_managment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
|
||||
import sun.security.util.BigInt;
|
||||
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.PersonRoleCourseDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.HibernateUtil;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.PersonRoleCourse;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Role;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.AccessInfo;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.StudentHaveGroup;
|
||||
|
||||
public class PersonRoleCourseHibernateDAO extends GenericHibernateDAO<PersonRoleCourse, Integer> implements PersonRoleCourseDAO {
|
||||
|
||||
@@ -170,4 +175,38 @@ public class PersonRoleCourseHibernateDAO extends GenericHibernateDAO<PersonRole
|
||||
|
||||
return roles;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<StudentHaveGroup> getStudentHaveGroupByCourse(Course course, Person person) {
|
||||
String hqlQuery = "select p.name, p.id, (pg.person_id IS NOT NULL) as haveGroup from person_role_course prc, person p " +
|
||||
" LEFT JOIN (SELECT p.person_id FROM person_groups p, groups g where p.group_id = g.id AND g.course_id = " + course.getId() + ") as pg " +
|
||||
" ON p.id = pg.person_id " +
|
||||
" where p.id = prc.person_id " +
|
||||
" and prc.course_id = " + course.getId() +
|
||||
" and prc.role_id = 1 " +
|
||||
" order by p.name asc ";
|
||||
|
||||
List<Object[][]> resultsParcial = HibernateUtil.getSessionFactory()
|
||||
.getCurrentSession()
|
||||
.createSQLQuery(hqlQuery)
|
||||
.list();
|
||||
|
||||
ArrayList<StudentHaveGroup> results = new ArrayList<StudentHaveGroup>();
|
||||
|
||||
int pos = 0;
|
||||
for(int i=0;i<resultsParcial.size();i++)
|
||||
{
|
||||
Object[] tupla = resultsParcial.get(i);
|
||||
|
||||
if(person.getId() != ((Integer) tupla[1]).intValue())
|
||||
{
|
||||
StudentHaveGroup temp = new StudentHaveGroup((String)tupla[0], ((Integer) tupla[1]).intValue(), (Boolean)tupla[2], pos);
|
||||
pos++;
|
||||
results.add(temp);
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,11 +13,16 @@ Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t
|
||||
|
||||
package br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.register;
|
||||
|
||||
<<<<<<< HEAD
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
=======
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
@@ -28,13 +33,18 @@ import org.hibernate.criterion.Restrictions;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.hibernate.GenericHibernateDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.register.PersonDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Role;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Status;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.AccessInfo;
|
||||
<<<<<<< HEAD
|
||||
|
||||
public class PersonHibernateDAO extends GenericHibernateDAO<Person, Integer>
|
||||
implements PersonDAO {
|
||||
=======
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.TimelineItem;
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
public PersonHibernateDAO() {
|
||||
super();
|
||||
@@ -76,6 +86,7 @@ public class PersonHibernateDAO extends GenericHibernateDAO<Person, Integer>
|
||||
|
||||
@Override
|
||||
public Person getPersonByLogin(String login) {
|
||||
<<<<<<< HEAD
|
||||
|
||||
StringBuilder hql = new StringBuilder();
|
||||
hql.append("select p from Person p " + "where p.accessInfo.login = '"
|
||||
@@ -83,6 +94,14 @@ public class PersonHibernateDAO extends GenericHibernateDAO<Person, Integer>
|
||||
|
||||
Person person = (Person) getSession().createQuery(hql.toString())
|
||||
.uniqueResult();
|
||||
=======
|
||||
|
||||
StringBuilder hql = new StringBuilder();
|
||||
hql.append("select p from Person p " +
|
||||
"where p.accessInfo.login = '" + login + "'");
|
||||
|
||||
Person person = (Person) getSession().createQuery(hql.toString()).uniqueResult();
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
return person;
|
||||
}
|
||||
|
||||
@@ -90,6 +109,7 @@ public class PersonHibernateDAO extends GenericHibernateDAO<Person, Integer>
|
||||
public Person getPersonByUserName(String userName) {
|
||||
StringBuilder hql = new StringBuilder();
|
||||
hql.append("select p from Person p where p.name = '" + userName + "'");
|
||||
<<<<<<< HEAD
|
||||
Person person = (Person) getSession().createQuery(hql.toString())
|
||||
.uniqueResult();
|
||||
return person;
|
||||
@@ -115,6 +135,58 @@ public class PersonHibernateDAO extends GenericHibernateDAO<Person, Integer>
|
||||
e.printStackTrace();
|
||||
}
|
||||
return 0;
|
||||
=======
|
||||
Person person = (Person) getSession().createQuery(hql.toString()).uniqueResult();
|
||||
return person;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<TimelineItem> getTimelineByPersonID(int personID, int groupID) {
|
||||
|
||||
String hqlQuery = "SELECT g.id as idGroup, to_char(date_trunc('day', l.date),'DD/MM/YYYY') as date, count(l.*) as frequency" +
|
||||
" FROM Log l, Person p, Person_Groups pg, Groups g "
|
||||
+ " WHERE pg.group_id = " + groupID
|
||||
+ " AND pg.person_id = " + personID
|
||||
+ " AND pg.person_id = p.id"
|
||||
+ " AND l.person_id = p.id"
|
||||
+ " AND g.id = pg.group_id"
|
||||
+ " AND g.date < l.date"
|
||||
+ " GROUP BY date_trunc('day', l.date), g.id ORDER BY date_trunc('day', l.date);";
|
||||
List<Object[]> results = getSession().createSQLQuery(hqlQuery).list();
|
||||
|
||||
List<TimelineItem> retorno = new ArrayList<TimelineItem>();
|
||||
|
||||
for(int i=0;i<results.size();i++){
|
||||
TimelineItem item = new TimelineItem();
|
||||
Object[] temp = results.get(i);
|
||||
item.setIdGroup((Integer)temp[0]);
|
||||
item.setDate((String)temp[1]);
|
||||
item.setFrequency(((BigInteger)temp[2]).intValue());
|
||||
|
||||
retorno.add(item);
|
||||
}
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<Log> getLogsByDayAndPerson(String data, int groupID, int personID) {
|
||||
String sqlQuery = "SELECT l.* as frequency FROM Log l, Person p, Person_Groups pg, Groups g " +
|
||||
" WHERE pg.group_id = " + groupID +
|
||||
" AND pg.person_id = " + personID +
|
||||
" AND pg.person_id = p.id " +
|
||||
" AND l.person_id = p.id " +
|
||||
" AND '" + data + " 00:00:00' <= l.date " +
|
||||
" AND '" + data + " 23:59:59' >= l.date " +
|
||||
" AND g.id = " + groupID +
|
||||
" AND g.date < l.date " +
|
||||
" ORDER BY l.date ASC";
|
||||
|
||||
List<Log> list = getSession().createSQLQuery(sqlQuery).addEntity("l", Log.class).list();
|
||||
return list;
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,9 +17,14 @@ import java.util.List;
|
||||
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.GenericDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Role;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.AccessInfo;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.TimelineItem;
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
public interface PersonDAO extends GenericDAO<Person, Integer> {
|
||||
|
||||
@@ -28,5 +33,10 @@ public interface PersonDAO extends GenericDAO<Person, Integer> {
|
||||
public List<String> getAllEmails();
|
||||
public Person getPersonByLogin(String login);
|
||||
public Person getPersonByUserName(String userName);
|
||||
<<<<<<< HEAD
|
||||
public int getPersonByTwitterLogin(String screenName);
|
||||
=======
|
||||
public List<TimelineItem> getTimelineByPersonID(int personID, int groupID);
|
||||
public List<Log> getLogsByDayAndPerson(String data, int groupID, int personID);
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
|
||||
@@ -82,6 +82,8 @@ public class Course implements Serializable {
|
||||
|
||||
private Date finalCourseDate;
|
||||
|
||||
private boolean flag_habilitar_grupo;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name="PROFESSOR_ID")
|
||||
private Person professor;
|
||||
@@ -101,7 +103,7 @@ public class Course implements Serializable {
|
||||
@OneToMany(cascade = CascadeType.ALL, fetch=FetchType.LAZY)
|
||||
@JoinColumn(name = "COURSE_ID", nullable = false)
|
||||
@org.hibernate.annotations.Cascade(
|
||||
value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN )
|
||||
value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
|
||||
private List<Module> modules = new ArrayList<Module>();
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL, fetch=FetchType.LAZY)
|
||||
@@ -294,5 +296,13 @@ public class Course implements Serializable {
|
||||
return retorno;
|
||||
}
|
||||
|
||||
public void setFlag_habilitar_grupo(boolean flag_habilitar_grupo) {
|
||||
this.flag_habilitar_grupo = flag_habilitar_grupo;
|
||||
}
|
||||
|
||||
public boolean isFlag_habilitar_grupo() {
|
||||
return flag_habilitar_grupo;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -29,12 +29,15 @@ import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
<<<<<<< HEAD
|
||||
|
||||
import org.apache.commons.collections.MultiHashMap;
|
||||
import org.apache.commons.collections.MultiMap;
|
||||
import org.hibernate.annotations.Cascade;
|
||||
|
||||
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
/**
|
||||
* Classe que encapsula os dados de um forum
|
||||
*
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
package br.ufpe.cin.amadeus.amadeus_web.domain.content_management;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
|
||||
/**
|
||||
* Classe que encapsula os dados de um grupo no sistema
|
||||
*
|
||||
* @author Jesus
|
||||
*
|
||||
*/
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Entity
|
||||
@Table(name="GROUPS")
|
||||
public class Groups implements Serializable{
|
||||
|
||||
@Id @GeneratedValue (strategy=GenerationType.AUTO)
|
||||
private int id;
|
||||
|
||||
private Date date;
|
||||
|
||||
@OneToOne(targetEntity = Person.class, fetch = FetchType.LAZY)
|
||||
@JoinColumn(name="FUNDADOR_ID")
|
||||
private Person fundador;
|
||||
|
||||
@OneToOne(targetEntity = Course.class, fetch = FetchType.LAZY)
|
||||
@JoinColumn(name="COURSE_ID")
|
||||
private Course curso;
|
||||
|
||||
private String name;
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL, fetch=FetchType.LAZY)
|
||||
@JoinColumn(name = "GROUP_ID", nullable = false)
|
||||
@org.hibernate.annotations.Cascade(
|
||||
value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN )
|
||||
private List<Person_Groups> membros = new ArrayList<Person_Groups>();
|
||||
|
||||
public Groups (){
|
||||
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public Person getFundador() {
|
||||
return fundador;
|
||||
}
|
||||
|
||||
public void setFundador(Person usuario) {
|
||||
this.fundador = usuario;
|
||||
}
|
||||
|
||||
public Course getCurso() {
|
||||
return curso;
|
||||
}
|
||||
|
||||
public void setCurso(Course curso) {
|
||||
this.curso = curso;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Metodo que cria um Groups ja com a data de criacao setada.
|
||||
* @return
|
||||
*/
|
||||
public static Groups getGroups(){
|
||||
Groups group = new Groups();
|
||||
group.setDate(new Date());
|
||||
return group;
|
||||
}
|
||||
|
||||
public void setMembros(List<Person_Groups> membros) {
|
||||
this.membros = membros;
|
||||
}
|
||||
|
||||
public List<Person_Groups> getMembros() {
|
||||
return membros;
|
||||
}
|
||||
|
||||
public List<Person> getPersons() {
|
||||
|
||||
List<Person> result = new ArrayList<Person>();
|
||||
|
||||
for(Person_Groups membro : this.membros)
|
||||
{
|
||||
result.add(membro.getPessoa());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ public class Log implements Serializable{
|
||||
@Column(name="metaalternativa")
|
||||
private Integer metaAlternativa;
|
||||
|
||||
<<<<<<< HEAD
|
||||
public static int LOG_CODIGO_LOGIN = 1; //Ok
|
||||
public static int LOG_CODIGO_LOGOUT = 2; //Ok
|
||||
public static int LOG_CODIGO_FORUM_POST = 3; //Ok - postagens em foruns
|
||||
@@ -44,6 +45,18 @@ public class Log implements Serializable{
|
||||
public static int LOG_CODIGO_JOGAR = 8; //Ok
|
||||
public static int LOG_CODIGO_ENTREGAR_MATERIAL = 9; //Ok
|
||||
public static int LOG_CODIGO_VISUALIZACAO_VIDEO = 10;
|
||||
=======
|
||||
public final static int LOG_CODIGO_LOGIN = 1; //Ok
|
||||
public final static int LOG_CODIGO_LOGOUT = 2; //Ok
|
||||
public final static int LOG_CODIGO_FORUM_POST = 3; //Ok - postagens em foruns
|
||||
public final static int LOG_CODIGO_FORUM_TOPICO = 4; //Ok - visualizacoes de topicos
|
||||
public final static int LOG_CODIGO_VISUALIZACAO_MATERIAL = 5; //Ok - abertura de materias dos modulos
|
||||
public final static int LOG_CODIGO_RESPOSTA_ENQUETE = 6; //Ok
|
||||
public final static int LOG_CODIGO_ABRIR_JOGO = 7; //Ok
|
||||
public final static int LOG_CODIGO_JOGAR = 8; //Ok
|
||||
public final static int LOG_CODIGO_ENTREGAR_MATERIAL = 9; //Ok
|
||||
public final static int LOG_CODIGO_VISUALIZACAO_VIDEO = 10;
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
public Log (){
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
package br.ufpe.cin.amadeus.amadeus_web.domain.content_management;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToOne;
|
||||
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
|
||||
/**
|
||||
* Classe que encapsula os dados da agregação PersonGroup no sistema
|
||||
*
|
||||
* @author Jesus
|
||||
*
|
||||
*/
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@Entity
|
||||
public class Person_Groups implements Serializable{
|
||||
|
||||
@Id @GeneratedValue (strategy=GenerationType.AUTO)
|
||||
private int id;
|
||||
|
||||
private Date date;
|
||||
|
||||
@OneToOne(targetEntity = Person.class, fetch = FetchType.LAZY)
|
||||
@JoinColumn(name="PERSON_ID")
|
||||
private Person pessoa;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name="GROUP_ID", nullable = false,
|
||||
updatable = false, insertable = false)
|
||||
private Groups groups;
|
||||
|
||||
private int papel;
|
||||
|
||||
public final static int PAPEL_FUNDADOR = 0;
|
||||
public final static int PAPEL_MODERADOR = 1;
|
||||
public final static int PAPEL_MEMBRO = 2;
|
||||
|
||||
public Person_Groups (){
|
||||
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public Person getPessoa() {
|
||||
return pessoa;
|
||||
}
|
||||
|
||||
public void setPessoa(Person pessoa) {
|
||||
this.pessoa = pessoa;
|
||||
}
|
||||
|
||||
/**
|
||||
* Metodo que cria um Person_Groups ja com a data de criacao setada.
|
||||
* @return
|
||||
*/
|
||||
public static Person_Groups getPersonGroups(){
|
||||
Person_Groups group = new Person_Groups();
|
||||
group.setDate(new Date());
|
||||
return group;
|
||||
}
|
||||
|
||||
public void setGroups(Groups groups) {
|
||||
this.groups = groups;
|
||||
}
|
||||
|
||||
public Groups getGroups() {
|
||||
return groups;
|
||||
}
|
||||
|
||||
public void setPapel(int papel) {
|
||||
this.papel = papel;
|
||||
}
|
||||
|
||||
public int getPapel() {
|
||||
return papel;
|
||||
}
|
||||
}
|
||||
@@ -29,10 +29,13 @@ import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
<<<<<<< HEAD
|
||||
|
||||
import org.hibernate.annotations.Cascade;
|
||||
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.PersonForum;
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
/**
|
||||
* Classe que encapsula os dados de um usuário do sistema
|
||||
|
||||
@@ -36,6 +36,7 @@ import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.ArchiveDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.CourseDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.ForumDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.GameDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.GroupsDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.HistoryLearningObjectDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.HomeworkDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.KeywordDAO;
|
||||
@@ -64,6 +65,7 @@ import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.ExternalLink;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Forum;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Game;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Groups;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.HistoryLearningObject;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Homework;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Keyword;
|
||||
@@ -105,6 +107,12 @@ import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidVideoException;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.exception.RequestException;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.struts.messages.Messages;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.Archive;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.LogVisualizacao;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.StudentHaveGroup;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.TimelineItem;
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
import br.ufpe.cin.amadeus.amadeus_web.util.Cryptography;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.util.DateConstructor;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.util.MailSender;
|
||||
@@ -670,7 +678,11 @@ public class Controller {
|
||||
try {
|
||||
|
||||
if (person.getResume().getYear() == null || yearTitulation <= yearNowadays) {
|
||||
<<<<<<< HEAD
|
||||
System.out.println("CHAMOUUUUU2");
|
||||
=======
|
||||
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
PersonDAO personDAO = factory.getPersonDAO();
|
||||
personDAO.merge(person);
|
||||
} else {
|
||||
@@ -1859,11 +1871,14 @@ public class Controller {
|
||||
return forum.findById(forumId, false);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
public Message getMessageById(int idMessage) {
|
||||
MessageDAO messageDao = factory.getMessageDAO();
|
||||
return messageDao.findById(idMessage, false);
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
public List<br.ufpe.cin.amadeus.amadeus_web.syncronize.Forum> getListForum(){
|
||||
List<br.ufpe.cin.amadeus.amadeus_web.syncronize.Forum> listForum = new ArrayList<br.ufpe.cin.amadeus.amadeus_web.syncronize.Forum>();
|
||||
ForumDAO forum = factory.getForumDAO();
|
||||
@@ -3603,7 +3618,11 @@ public class Controller {
|
||||
"WHERE " +
|
||||
"l.codigo = 7 " +
|
||||
"AND l.idobjeto = g.id " +
|
||||
<<<<<<< HEAD
|
||||
"AND l.person_id = " + 130 +" " +
|
||||
=======
|
||||
"AND l.person_id = " + idAluno +" " +
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
"AND g.module_id = " + idModule +" " +
|
||||
"AND prc.person_id = l.person_id " +
|
||||
"AND prc.role_id = 1 " +
|
||||
@@ -3631,6 +3650,7 @@ public class Controller {
|
||||
|
||||
return array;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
/**
|
||||
* Método criado para persistir as mensagens enviadas, como primeira mensagem (não resposta a outra)
|
||||
@@ -3732,4 +3752,301 @@ public class Controller {
|
||||
return factory.getTweetDAO().getTweetBetweenDates(inicio,fim);
|
||||
}
|
||||
|
||||
=======
|
||||
/*
|
||||
* TODO - Métodos para recuperar grupo
|
||||
*/
|
||||
public List<Groups> getGroups(int id) {
|
||||
List<Groups> grupo = null;
|
||||
try {
|
||||
|
||||
GroupsDAO groupsDAO = factory.getGroupsDAO();
|
||||
grupo = groupsDAO.getGroupsByCourseID(id);
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
throw e;
|
||||
}
|
||||
return grupo;
|
||||
}
|
||||
|
||||
public List<Person> getPersonByGroupsID(int id) {
|
||||
List<Person> grupo = null;
|
||||
try {
|
||||
|
||||
GroupsDAO groupsDAO = factory.getGroupsDAO();
|
||||
grupo = groupsDAO.getPersonByGroupsID(id);
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
throw e;
|
||||
}
|
||||
return grupo;
|
||||
}
|
||||
|
||||
public List<StudentHaveGroup> getStudentsHaveGroup(Course course, Person person)
|
||||
{
|
||||
PersonRoleCourseDAO personRoleCourseDAO = factory.getPersonRoleCourseDAO();
|
||||
List<StudentHaveGroup> result = personRoleCourseDAO.getStudentHaveGroupByCourse(course, person);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public Module getUltimoModulo(int courseID)
|
||||
{
|
||||
GroupsDAO groupsDAO = factory.getGroupsDAO();
|
||||
Module result = groupsDAO.getUltimoModulo(courseID);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<LogVisualizacao> getLogsByDayAndGroup(String data, int groupId)
|
||||
{
|
||||
GroupsDAO groupsDAO = factory.getGroupsDAO();
|
||||
List<Log> list = groupsDAO.getLogsByDayAndGroup(data, groupId);
|
||||
|
||||
List<LogVisualizacao> result = new ArrayList<LogVisualizacao>();
|
||||
for(Log log : list)
|
||||
{
|
||||
LogVisualizacao logVisualizacao = null;
|
||||
Facade facade = Facade.getInstance();
|
||||
|
||||
|
||||
if(log.getCodigo() == Log.LOG_CODIGO_VISUALIZACAO_MATERIAL)
|
||||
{
|
||||
Material material = facade.getMaterialByID(log.getIdObjeto());
|
||||
|
||||
String materialName = "";
|
||||
if(material !=null)
|
||||
{
|
||||
materialName = material.getArchiveName();
|
||||
}
|
||||
else
|
||||
{
|
||||
ExternalLink link = facade.getExternalLinkById(log.getIdObjeto());
|
||||
materialName = link.getName();
|
||||
}
|
||||
|
||||
logVisualizacao = new LogVisualizacao(log, materialName);
|
||||
}
|
||||
else
|
||||
{
|
||||
logVisualizacao = new LogVisualizacao(log);
|
||||
}
|
||||
|
||||
result.add(logVisualizacao);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<LogVisualizacao> getLogsByDayAndPerson(String data, int groupID, int personID)
|
||||
{
|
||||
PersonDAO personDAO = factory.getPersonDAO();
|
||||
List<Log> list = personDAO.getLogsByDayAndPerson(data, groupID, personID);
|
||||
List<LogVisualizacao> result = new ArrayList<LogVisualizacao>();
|
||||
for(Log log : list)
|
||||
{
|
||||
LogVisualizacao logVisualizacao = null;
|
||||
Facade facade = Facade.getInstance();
|
||||
|
||||
|
||||
if(log.getCodigo() == Log.LOG_CODIGO_VISUALIZACAO_MATERIAL)
|
||||
{
|
||||
String materialName = "";
|
||||
|
||||
try
|
||||
{
|
||||
Material material = facade.getMaterialByID(log.getIdObjeto());
|
||||
materialName = material.getArchiveName();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
ExternalLink link = facade.getExternalLinkById(log.getIdObjeto());
|
||||
materialName = link.getName();
|
||||
}
|
||||
logVisualizacao = new LogVisualizacao(log, materialName);
|
||||
}
|
||||
else
|
||||
{
|
||||
logVisualizacao = new LogVisualizacao(log);
|
||||
}
|
||||
|
||||
result.add(logVisualizacao);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public Groups inserGroups(Groups g) throws CourseInvalidException {
|
||||
Groups result;
|
||||
try {
|
||||
GroupsDAO groupsDAO = factory.getGroupsDAO();
|
||||
result = groupsDAO.makePersistent(g);
|
||||
} catch (RuntimeException e) {
|
||||
throw e;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<TimelineItem> listarTimelineGroup(Groups g){
|
||||
|
||||
List<TimelineItem> result = null;
|
||||
try {
|
||||
GroupsDAO groupsDAO = factory.getGroupsDAO();
|
||||
result = groupsDAO.getTimelineByGroupsID(g.getId());
|
||||
|
||||
int max = 0;
|
||||
int min = 10000000;
|
||||
|
||||
for(int i = 0; i<result.size(); i++){
|
||||
if(max < result.get(i).getFrequency()){
|
||||
max = result.get(i).getFrequency();
|
||||
}
|
||||
if(min > result.get(i).getFrequency()){
|
||||
min = result.get(i).getFrequency();
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i<result.size(); i++){
|
||||
if(max == min){
|
||||
result.get(i).setClasse("class3");
|
||||
}else
|
||||
{
|
||||
int classe = (int) (((double)(result.get(i).getFrequency()-min))/(((double)(max-min))/9));
|
||||
|
||||
switch (classe)
|
||||
{
|
||||
case 0:
|
||||
result.get(i).setClasse("class1");
|
||||
break;
|
||||
case 1:
|
||||
result.get(i).setClasse("class2");
|
||||
break;
|
||||
case 2:
|
||||
result.get(i).setClasse("class3");
|
||||
break;
|
||||
case 3:
|
||||
result.get(i).setClasse("class4");
|
||||
break;
|
||||
case 4:
|
||||
result.get(i).setClasse("class5");
|
||||
break;
|
||||
case 5:
|
||||
result.get(i).setClasse("class6");
|
||||
break;
|
||||
case 6:
|
||||
result.get(i).setClasse("class7");
|
||||
break;
|
||||
case 7:
|
||||
result.get(i).setClasse("class8");
|
||||
break;
|
||||
case 8:
|
||||
result.get(i).setClasse("class9");
|
||||
break;
|
||||
case 9:
|
||||
result.get(i).setClasse("class10");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
throw e;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<TimelineItem> listarTimelinePerson(Person p, Groups g){
|
||||
|
||||
List<TimelineItem> result = null;
|
||||
try {
|
||||
PersonDAO personDAO = factory.getPersonDAO();
|
||||
result = personDAO.getTimelineByPersonID(p.getId(), g.getId());
|
||||
|
||||
int max = 0;
|
||||
int min = 10000000;
|
||||
|
||||
for(int i = 0; i<result.size(); i++){
|
||||
if(max < result.get(i).getFrequency()){
|
||||
max = result.get(i).getFrequency();
|
||||
}
|
||||
if(min > result.get(i).getFrequency()){
|
||||
min = result.get(i).getFrequency();
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i<result.size(); i++){
|
||||
if(max == min){
|
||||
result.get(i).setClasse("class3");
|
||||
}else
|
||||
{
|
||||
int classe = (int) (((double)(result.get(i).getFrequency()-min))/(((double)(max-min))/9));
|
||||
|
||||
switch (classe)
|
||||
{
|
||||
case 0:
|
||||
result.get(i).setClasse("class1");
|
||||
break;
|
||||
case 1:
|
||||
result.get(i).setClasse("class2");
|
||||
break;
|
||||
case 2:
|
||||
result.get(i).setClasse("class3");
|
||||
break;
|
||||
case 3:
|
||||
result.get(i).setClasse("class4");
|
||||
break;
|
||||
case 4:
|
||||
result.get(i).setClasse("class5");
|
||||
break;
|
||||
case 5:
|
||||
result.get(i).setClasse("class6");
|
||||
break;
|
||||
case 6:
|
||||
result.get(i).setClasse("class7");
|
||||
break;
|
||||
case 7:
|
||||
result.get(i).setClasse("class8");
|
||||
break;
|
||||
case 8:
|
||||
result.get(i).setClasse("class9");
|
||||
break;
|
||||
case 9:
|
||||
result.get(i).setClasse("class10");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch (RuntimeException e) {
|
||||
throw e;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public Groups getGroupsById(int id)
|
||||
{
|
||||
Groups result = null;
|
||||
GroupsDAO groupsDAO = factory.getGroupsDAO();
|
||||
result = groupsDAO.findById(id, false);
|
||||
return result;
|
||||
}
|
||||
|
||||
public boolean pesronHaveGroup(int courseId, int personId)
|
||||
{
|
||||
GroupsDAO groupsDAO = factory.getGroupsDAO();
|
||||
return groupsDAO.personHaveGroup(courseId, personId);
|
||||
}
|
||||
|
||||
public boolean verificarStatusPorForum(List<Person> alunos, Forum forum)
|
||||
{
|
||||
ForumDAO forumDAO = factory.getForumDAO();
|
||||
return forumDAO.verificarStatusPorForum(alunos, forum);
|
||||
}
|
||||
|
||||
public boolean verificarStatusPorGame(List<Person> alunos, Game game)
|
||||
{
|
||||
GameDAO gameDAO = factory.getGameDAO();
|
||||
return gameDAO.verificarStatusPorGame(alunos, game);
|
||||
}
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
@@ -23,11 +23,18 @@ import javax.mail.MessagingException;
|
||||
import org.apache.struts.action.ActionMessages;
|
||||
import org.apache.struts.upload.FormFile;
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.ForumDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.GroupsDAO;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.dao.content_managment.PersonRoleCourseDAO;
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.AmadeusDroidHistoric;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Course;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.ExternalLink;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Forum;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Game;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Groups;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.HistoryLearningObject;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Homework;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Keyword;
|
||||
@@ -66,6 +73,12 @@ import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidUserException;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.exception.InvalidVideoException;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.exception.RequestException;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.Archive;
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.LogVisualizacao;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.StudentHaveGroup;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.syncronize.TimelineItem;
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
public class Facade {
|
||||
|
||||
@@ -520,10 +533,13 @@ public class Facade {
|
||||
return this.controller.getForumById(forumId);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
public Message getMessageById(int idMessage){
|
||||
return this.controller.getMessageById(idMessage);
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
public List<br.ufpe.cin.amadeus.amadeus_web.syncronize.Forum> getListForumSyncronize(){
|
||||
return this.controller.getListForum();
|
||||
}
|
||||
@@ -835,6 +851,7 @@ public class Facade {
|
||||
|
||||
public String getJSONArrayGameGridByUser(int idGame, int idUser) {
|
||||
return this.controller.getJSONArrayGameGridByUser(idGame, idUser);
|
||||
<<<<<<< HEAD
|
||||
}
|
||||
|
||||
public String getJSONArrayTagCloudForum(int idModule){
|
||||
@@ -955,6 +972,125 @@ public class Facade {
|
||||
|
||||
public List<Tweet> getTweetBetweenDates(Date inicio, Date fim) {
|
||||
return this.controller.getTweetBetweenDates(inicio,fim);
|
||||
=======
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
|
||||
public String getJSONArrayTagCloudForum(int idModule){
|
||||
return this.controller.getJSONArrayTagCloudForum(idModule);
|
||||
}
|
||||
|
||||
public String getJSONArrayPostsPerModule(int idModule){
|
||||
return this.controller.getJSONArrayPostsPerModule(idModule);
|
||||
}
|
||||
|
||||
public String getJSONArraySizeMessagePerModule(int idModule){
|
||||
return this.controller.getJSONArraySizeMessagePerModule(idModule);
|
||||
}
|
||||
|
||||
public String getJSONArrayPersonGameTimePerModule(int idPerson, int idModule){
|
||||
return this.controller.getJSONArrayPersonGameTimePerModule(idPerson, idModule);
|
||||
}
|
||||
|
||||
public String getJSONObjectTempoLevelPontuacao(int idGame)
|
||||
{
|
||||
return this.controller.getJSONObjectTempoLevelPontuacao(idGame);
|
||||
}
|
||||
|
||||
public String getJSONObjectTempoQuantidadePartidas(int idGame)
|
||||
{
|
||||
return this.controller.getJSONObjectTempoQuantidadePartidas(idGame);
|
||||
}
|
||||
|
||||
public String getJSONObjectQuantidadeTamanhoMSG(int idModule)
|
||||
{
|
||||
return this.controller.getJSONObjectQuantidadeTamanhoMSG(idModule);
|
||||
}
|
||||
|
||||
public String getJSONObjectLevelPontuacao(int idGame)
|
||||
{
|
||||
return this.controller.getJSONObjectLevelPontuacao(idGame);
|
||||
}
|
||||
|
||||
public String getJSONArrayGameMeta(int idGame){
|
||||
return this.controller.getJSONArrayGameMeta(idGame);
|
||||
}
|
||||
|
||||
public String getJSONArrayPersonTimeOnline(int idPerson){
|
||||
return this.controller.getJSONArrayPersonTimeOnline(idPerson);
|
||||
}
|
||||
|
||||
public String getJSONArrayForumVisualizacao(int idModule, int idAluno){
|
||||
return this.controller.getJSONArrayForumVisualizacao(idModule, idAluno);
|
||||
}
|
||||
public String getJSONArrayPostsPerUser(int idModule, int idUser){
|
||||
return this.controller.getJSONArrayPostsPerUser(idModule, idUser);
|
||||
}
|
||||
public String getJSONArrayMaterialView(int idUsuario, int idModule){
|
||||
return this.controller.getJSONArrayMaterialView(idUsuario, idModule);
|
||||
}
|
||||
public String getJSONArrayPollAnswered(int moduleID, int idAluno){
|
||||
return this.controller.getJSONArrayPollAnswered(moduleID, idAluno);
|
||||
}
|
||||
public String getJSONArrayGameOpen(int idModule, int idAluno){
|
||||
return this.controller.getJSONArrayGameOpen(idModule, idAluno);
|
||||
}
|
||||
|
||||
public List<Groups> getGroups(int idCourse){
|
||||
return this.controller.getGroups(idCourse);
|
||||
}
|
||||
|
||||
public List<Person> getPersonByGroupsID(int groupID){
|
||||
return this.controller.getPersonByGroupsID(groupID);
|
||||
}
|
||||
|
||||
public List<StudentHaveGroup> getStudentsHaveGroup(Course course, Person person)
|
||||
{
|
||||
return this.controller.getStudentsHaveGroup(course, person);
|
||||
}
|
||||
|
||||
public Module getUltimoModulo(int courseID){
|
||||
return this.controller.getUltimoModulo(courseID);
|
||||
}
|
||||
|
||||
public List<LogVisualizacao> getLogsByDayAndGroup(String data, int groupId)
|
||||
{
|
||||
return this.controller.getLogsByDayAndGroup(data, groupId);
|
||||
}
|
||||
|
||||
public List<LogVisualizacao> getLogsByDayAndPerson(String data, int groupID, int personID)
|
||||
{
|
||||
return this.controller.getLogsByDayAndPerson(data, groupID, personID);
|
||||
}
|
||||
|
||||
public Groups inserGroups(Groups g) throws CourseInvalidException {
|
||||
return this.controller.inserGroups(g);
|
||||
}
|
||||
|
||||
public List<TimelineItem> listarTimelineGroup(Groups g){
|
||||
return this.controller.listarTimelineGroup(g);
|
||||
}
|
||||
|
||||
public List<TimelineItem> listarTimelinePerson(Person p, Groups g){
|
||||
return this.controller.listarTimelinePerson(p, g);
|
||||
}
|
||||
|
||||
public Groups getGroupsById(int id) {
|
||||
return this.controller.getGroupsById(id);
|
||||
}
|
||||
|
||||
public boolean pesronHaveGroup(int courseId, int personId)
|
||||
{
|
||||
return this.controller.pesronHaveGroup(courseId, personId);
|
||||
}
|
||||
|
||||
public boolean verificarStatusPorForum(List<Person> alunos, Forum forum)
|
||||
{
|
||||
return this.controller.verificarStatusPorForum(alunos, forum);
|
||||
}
|
||||
|
||||
public boolean verificarStatusPorGame(List<Person> alunos, Game game)
|
||||
{
|
||||
return this.controller.verificarStatusPorGame(alunos, game);
|
||||
}
|
||||
}
|
||||
+43
@@ -131,6 +131,49 @@ public class CoursePermissions {
|
||||
|
||||
return userCanViewGraphic;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
public static boolean userCanViewGroups(HttpServletRequest request, Course course) {
|
||||
boolean userCanViewGroups = false;
|
||||
|
||||
AccessInfo user = (AccessInfo) request.getSession().getAttribute("user");
|
||||
|
||||
Role userRoleInCourse;
|
||||
|
||||
try {
|
||||
userRoleInCourse = Facade.getInstance().getRoleByPersonInCourse(user.getPerson(), course);
|
||||
if(userRoleInCourse != null) {
|
||||
userCanViewGroups = true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return userCanViewGroups;
|
||||
}
|
||||
|
||||
public static boolean userCanCreateGroups(HttpServletRequest request, Course course) {
|
||||
boolean userCanCreateGroups = true;
|
||||
|
||||
try {
|
||||
AccessInfo user = (AccessInfo) request.getSession().getAttribute("user");
|
||||
|
||||
Role userRoleInCourse = Facade.getInstance().getRoleByPersonInCourse(user.getPerson(), course);
|
||||
|
||||
if(userRoleInCourse != null) {
|
||||
if(userRoleInCourse.getRoleType() == RoleType.STUDENT)
|
||||
{
|
||||
userCanCreateGroups = Facade.getInstance().pesronHaveGroup(course.getId(), user.getPerson().getId());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
return userCanCreateGroups;
|
||||
}
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
|
||||
}
|
||||
|
||||
Diferenças do arquivo suprimidas por serem muito extensas
Carregar Diff
@@ -180,9 +180,15 @@ public class SystemActions extends LookupDispatchAction {
|
||||
boolean canViewCourseEvaluations = CoursePermissions.userCanShowViewCourseEvaluations(request, course);
|
||||
boolean canAssistanceRequest = false;
|
||||
boolean canViewCourseContent = false;
|
||||
<<<<<<< HEAD
|
||||
boolean canViewGraphic = true;
|
||||
boolean canMonitoringHashtag = false;
|
||||
boolean canSendToClassmates = false;
|
||||
=======
|
||||
boolean canViewGraphic = false;
|
||||
boolean canViewGroups = false;
|
||||
boolean canViewEnableGroups = false;
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
AccessInfo user = (AccessInfo) request.getSession().getAttribute("user");
|
||||
|
||||
@@ -194,6 +200,7 @@ public class SystemActions extends LookupDispatchAction {
|
||||
canEditCourse = true;
|
||||
canDeleteCourse = true;
|
||||
canViewCourseContent = true;
|
||||
<<<<<<< HEAD
|
||||
canMonitoringHashtag = true;
|
||||
canSendToClassmates = true;
|
||||
|
||||
@@ -202,6 +209,14 @@ public class SystemActions extends LookupDispatchAction {
|
||||
canInsertCourse = true;
|
||||
canMonitoringHashtag = true;
|
||||
canSendToClassmates = true;
|
||||
=======
|
||||
canViewEnableGroups = true;
|
||||
canViewGroups = true;
|
||||
canViewGraphic = true;
|
||||
} else if (userRoleInCourse != null) {
|
||||
if( userProfileType == ProfileType.PROFESSOR) {
|
||||
canInsertCourse = true;
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
|
||||
if( userRoleInCourse.getRoleType() == RoleType.TEACHER ||
|
||||
@@ -211,14 +226,20 @@ public class SystemActions extends LookupDispatchAction {
|
||||
|
||||
if( userRoleInCourse.getRoleType() == RoleType.TEACHER) {
|
||||
canDeleteCourse = true;
|
||||
<<<<<<< HEAD
|
||||
canMonitoringHashtag = true;
|
||||
canSendToClassmates = true;
|
||||
=======
|
||||
canViewEnableGroups = true;
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
|
||||
if( userRoleInCourse.getRoleType() == RoleType.TEACHER ||
|
||||
userRoleInCourse.getRoleType() == RoleType.ASSISTANT ||
|
||||
userRoleInCourse.getRoleType() == RoleType.STUDENT) {
|
||||
canViewCourseContent = true;
|
||||
canViewGroups = true;
|
||||
canViewGraphic = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +254,12 @@ public class SystemActions extends LookupDispatchAction {
|
||||
request.setAttribute("canViewCourseContent", canViewCourseContent);
|
||||
request.setAttribute("canAssistanceRequest", canAssistanceRequest);
|
||||
request.setAttribute("canViewGraphic", canViewGraphic);
|
||||
<<<<<<< HEAD
|
||||
request.setAttribute("canMonitoringHashtag", canMonitoringHashtag);
|
||||
request.setAttribute("canSendToClassmates", canSendToClassmates);
|
||||
=======
|
||||
request.setAttribute("canViewGroups", canViewGroups);
|
||||
request.setAttribute("canViewEnableGroups", canViewEnableGroups);
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
}
|
||||
}
|
||||
@@ -1388,7 +1388,12 @@ public class UserActions extends SystemActions {
|
||||
|
||||
DynaActionForm dynaForm = (DynaActionForm) form;
|
||||
Person person = new Person();
|
||||
<<<<<<< HEAD
|
||||
//person.setId(Integer.parseInt(request.getParameter("userId")));
|
||||
=======
|
||||
|
||||
person.setId(Integer.parseInt(request.getParameter("userId")));
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
person.setName(dynaForm.getString("name"));
|
||||
person.setCity(dynaForm.getString("city"));
|
||||
person.setState(dynaForm.getString("state"));
|
||||
@@ -1519,9 +1524,13 @@ public class UserActions extends SystemActions {
|
||||
|
||||
Person person = new Person();
|
||||
|
||||
<<<<<<< HEAD
|
||||
//person.getAccessInfo().setId(Integer.parseInt(request.getParameter("userId")));
|
||||
AccessInfo accessInfoOld = facade.searchUserById(Integer.parseInt(request.getParameter("userId")));
|
||||
person.setId(accessInfoOld.getPerson().getId());
|
||||
=======
|
||||
person.setId(Integer.parseInt(request.getParameter("userId")));
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
person.setName(dynaForm.getString("name"));
|
||||
person.setCity(dynaForm.getString("city"));
|
||||
person.setState(dynaForm.getString("state"));
|
||||
@@ -1562,8 +1571,12 @@ public class UserActions extends SystemActions {
|
||||
}
|
||||
|
||||
AccessInfo accessInfo = new AccessInfo();
|
||||
<<<<<<< HEAD
|
||||
accessInfo.setLogin(accessInfoOld.getLogin());
|
||||
accessInfo.setTypeProfile(accessInfoOld.getTypeProfile());
|
||||
=======
|
||||
accessInfo.setLogin(dynaForm.getString("login"));
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
accessInfo.setPassword(dynaForm.getString("password"));
|
||||
|
||||
String profileType = request.getParameter("userType");
|
||||
@@ -1603,10 +1616,17 @@ public class UserActions extends SystemActions {
|
||||
|
||||
person.setResume(resume);
|
||||
|
||||
<<<<<<< HEAD
|
||||
/*if (facade.existLogin(person.getAccessInfo().getLogin())) {
|
||||
messages.add("error", new ActionMessage(
|
||||
"errors.login.alreadyExists"));
|
||||
}*/
|
||||
=======
|
||||
if (facade.existLogin(person.getAccessInfo().getLogin())) {
|
||||
messages.add("error", new ActionMessage(
|
||||
"errors.login.alreadyExists"));
|
||||
}
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
/*if (facade.existEmail(person.getEmail())) {
|
||||
messages.add("error", new ActionMessage(
|
||||
"errors.email.alreadyExists"));
|
||||
|
||||
+5
@@ -89,8 +89,13 @@ public class ModuleActions extends SystemActions {
|
||||
int positionModule = facade.getNextPositionModule(course);
|
||||
|
||||
Module module = new Module();
|
||||
<<<<<<< HEAD
|
||||
module.setName("Nome do Módulo - "+(positionModule));
|
||||
module.setDescription("Descrição");
|
||||
=======
|
||||
module.setName("Nome do Módulo - "+(positionModule));
|
||||
module.setDescription("Descrição");
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
module.setVisible(true);
|
||||
module.setPosition(positionModule);
|
||||
module.setCourse(course);
|
||||
|
||||
+10
@@ -109,14 +109,24 @@ public class ForumActions extends SystemActions {
|
||||
|
||||
request.setAttribute("forum", forum);
|
||||
request.setAttribute("module", module);
|
||||
<<<<<<< HEAD
|
||||
// request.setAttribute("canAnswerForum", canAnswerForum);
|
||||
|
||||
// TODO - LOG - Visualizacao de um topico - OK
|
||||
=======
|
||||
//request.setAttribute("canAnswerForum", canAnswerForum);
|
||||
|
||||
//TODO - LOG - Visualizacao de um topico - OK
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
Log log = SystemActions.getLogUser(request);
|
||||
log.setCodigo(Log.LOG_CODIGO_FORUM_TOPICO);
|
||||
log.setIdObjeto(forum.getId());
|
||||
facade.saveLog(log);
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
return mapping.findForward(FORWARD_SHOW_VIEW_FORUM_ACTIVITY);
|
||||
}
|
||||
|
||||
|
||||
+7
@@ -666,6 +666,13 @@ public class MaterialActions extends org.apache.struts.actions.DispatchAction {
|
||||
os.flush();
|
||||
os.write(swf);
|
||||
os.close();
|
||||
|
||||
//TODO - LOG - Visualizacao de Material - OK
|
||||
Log log = SystemActions.getLogUser(request);
|
||||
log.setCodigo(Log.LOG_CODIGO_VISUALIZACAO_MATERIAL);
|
||||
log.setIdObjeto(material.getId());
|
||||
this.facade.saveLog(log);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
+16
@@ -766,8 +766,12 @@ course.showViewCourse=showViewCourse
|
||||
course.showViewCourseNotLogged=showViewCourseNotLogged
|
||||
course.showViewCourseParticipants=showViewCourseParticipants
|
||||
course.showViewEditCourse=showViewEditCourse
|
||||
<<<<<<< HEAD
|
||||
course.showViewSocialInteractionMonitoring=showViewSocialInteractionMonitoring
|
||||
course.showViewSocialInteractionMonitoringReports=showViewSocialInteractionMonitoringReports
|
||||
=======
|
||||
course.showViewCreateGroup=showViewCreateGroup
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
course.showViewShowModules=showViewShowModules
|
||||
course.showViewCourseEvaluations=showViewCourseEvaluations
|
||||
course.showViewSendMail=showViewSendMail
|
||||
@@ -775,7 +779,19 @@ course.sendMailForCourseParticipants=sendMailForCourseParticipants
|
||||
course.changeTeacher=changeTeacher
|
||||
course.viewChangeTeacher=viewChangeTeacher
|
||||
course.showViewGraphic=showViewGraphic
|
||||
<<<<<<< HEAD
|
||||
course.showPlayGame=showPlayGame
|
||||
=======
|
||||
course.showViewGroupDayTimeline=showViewGroupDayTimeline
|
||||
course.showViewPersonDayTimeline=showViewPersonDayTimeline
|
||||
course.showViewGroups=showViewGroups
|
||||
course.showViewOneGroup=showViewOneGroup
|
||||
course.habilitarDesabilitarCriarGrupos=habilitarDesabilitarCriarGrupos
|
||||
course.showViewGroupTimeline=showViewGroupTimeline
|
||||
course.showViewPersonTimeline=showViewPersonTimeline
|
||||
course.showPlayGame=showPlayGame
|
||||
course.showViewGroupsRelatorio=showViewRelatorioAtividade
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
#-- MAP Action method module --
|
||||
module.showViewEditModule=showViewEditModule
|
||||
|
||||
+16
@@ -760,8 +760,12 @@ course.showViewCourseNotLogged=showViewCourseNotLogged
|
||||
course.showViewCourseParticipants=showViewCourseParticipants
|
||||
course.unregisterStudentCourse=unregisterStudentCourse
|
||||
course.showViewEditCourse=showViewEditCourse
|
||||
<<<<<<< HEAD
|
||||
course.showViewSocialInteractionMonitoring=showViewSocialInteractionMonitoring
|
||||
course.showViewSocialInteractionMonitoringReports=showViewSocialInteractionMonitoringReports
|
||||
=======
|
||||
course.showViewCreateGroup=showViewCreateGroup
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
course.showViewShowModules=showViewShowModules
|
||||
course.showViewCourseEvaluations=showViewCourseEvaluations
|
||||
course.showViewSendMail=showViewSendMail
|
||||
@@ -769,7 +773,19 @@ course.sendMailForCourseParticipants=sendMailForCourseParticipants
|
||||
course.changeTeacher=changeTeacher
|
||||
course.viewChangeTeacher=viewChangeTeacher
|
||||
course.sendMailForCourseParticipants=sendMailForCourseParticipants
|
||||
<<<<<<< HEAD
|
||||
course.showViewGraphic=showViewGraphic
|
||||
=======
|
||||
course.showViewGraphic=showViewGraphic
|
||||
course.showViewGroupDayTimeline=showViewGroupDayTimeline
|
||||
course.showViewPersonDayTimeline=showViewPersonDayTimeline
|
||||
course.showViewGroups=showViewGroups
|
||||
course.habilitarDesabilitarCriarGrupos=habilitarDesabilitarCriarGrupos
|
||||
course.showViewGroupTimeline=showViewGroupTimeline
|
||||
course.showViewPersonTimeline=showViewPersonTimeline
|
||||
course.showViewOneGroup=showViewOneGroup
|
||||
course.showViewGroupsRelatorio=showViewRelatorioAtividade
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
#-- MAP Action method module --
|
||||
module.showViewEditModule=showViewEditModule
|
||||
|
||||
@@ -35,6 +35,11 @@ public class Course implements Serializable{
|
||||
|
||||
private Person professor;
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
private boolean flag_habilitar_grupo;
|
||||
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
private List<Material> materials = new ArrayList<Material>();
|
||||
|
||||
private List<Forum> foruns = new ArrayList<Forum>();
|
||||
@@ -151,6 +156,17 @@ public class Course implements Serializable{
|
||||
public void setForuns(List<Forum> foruns) {
|
||||
this.foruns = foruns;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
public void setFlag_habilitar_grupo(boolean flag_habilitar_grupo) {
|
||||
this.flag_habilitar_grupo = flag_habilitar_grupo;
|
||||
}
|
||||
|
||||
public boolean isFlag_habilitar_grupo() {
|
||||
return flag_habilitar_grupo;
|
||||
}
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
package br.ufpe.cin.amadeus.amadeus_web.syncronize;
|
||||
|
||||
|
||||
public class GroupPlusStatus {
|
||||
|
||||
private int id;
|
||||
private String name;
|
||||
private int qtdMembros;
|
||||
private boolean status;
|
||||
|
||||
public GroupPlusStatus(int id, String name, int qtdMembros, boolean status) {
|
||||
this.setId(id);
|
||||
this.setName(name);
|
||||
this.setQtdMembros(qtdMembros);
|
||||
this.setStatus(status);
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setQtdMembros(int qtdMembros) {
|
||||
this.qtdMembros = qtdMembros;
|
||||
}
|
||||
|
||||
public int getQtdMembros() {
|
||||
return qtdMembros;
|
||||
}
|
||||
|
||||
public void setStatus(boolean status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public boolean isStatus() {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package br.ufpe.cin.amadeus.amadeus_web.syncronize;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@XmlRootElement
|
||||
public class Groups implements Serializable{
|
||||
|
||||
|
||||
private int id;
|
||||
|
||||
private Date date;
|
||||
|
||||
private Person fundador;
|
||||
private Course curso;
|
||||
private String name;
|
||||
private List<Person_Groups> membros = new ArrayList<Person_Groups>();
|
||||
|
||||
public Groups (){
|
||||
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public Person getFundador() {
|
||||
return fundador;
|
||||
}
|
||||
|
||||
public void setFundador(Person usuario) {
|
||||
this.fundador = usuario;
|
||||
}
|
||||
|
||||
public Course getCurso() {
|
||||
return curso;
|
||||
}
|
||||
|
||||
public void setCurso(Course curso) {
|
||||
this.curso = curso;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Metodo que cria um Groups ja com a data de criacao setada.
|
||||
* @return
|
||||
*/
|
||||
public static Groups getGroups(){
|
||||
Groups group = new Groups();
|
||||
group.setDate(new Date());
|
||||
return group;
|
||||
}
|
||||
|
||||
public void setMembros(List<Person_Groups> membros) {
|
||||
this.membros = membros;
|
||||
}
|
||||
|
||||
public List<Person_Groups> getMembros() {
|
||||
return membros;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
package br.ufpe.cin.amadeus.amadeus_web.syncronize;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log;
|
||||
|
||||
public class LogVisualizacao {
|
||||
|
||||
private Date date;
|
||||
private Integer codigo;
|
||||
private String materialName;
|
||||
|
||||
public LogVisualizacao(Log log) {
|
||||
this.date = log.getDate();
|
||||
this.codigo = log.getCodigo();
|
||||
}
|
||||
|
||||
public LogVisualizacao(Log log, String materialName) {
|
||||
this.date = log.getDate();
|
||||
this.codigo = log.getCodigo();
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param date the date to set
|
||||
*/
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the date
|
||||
*/
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param codigo the codigo to set
|
||||
*/
|
||||
public void setCodigo(Integer codigo) {
|
||||
this.codigo = codigo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the codigo
|
||||
*/
|
||||
public Integer getCodigo() {
|
||||
return codigo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param materialName the materialName to set
|
||||
*/
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the materialName
|
||||
*/
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package br.ufpe.cin.amadeus.amadeus_web.syncronize;
|
||||
|
||||
|
||||
|
||||
public class PersonGroupPlusStatus {
|
||||
|
||||
private int id;
|
||||
private String name;
|
||||
private int papel;
|
||||
private boolean status;
|
||||
|
||||
public PersonGroupPlusStatus (int id, String name, int papel, boolean status){
|
||||
this.id = id;
|
||||
this.setName(name);
|
||||
this.setPapel(papel);
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setPapel(int papel) {
|
||||
this.papel = papel;
|
||||
}
|
||||
|
||||
public int getPapel() {
|
||||
return papel;
|
||||
}
|
||||
|
||||
public void setStatus(boolean status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public boolean isStatus() {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package br.ufpe.cin.amadeus.amadeus_web.syncronize;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Groups;
|
||||
import br.ufpe.cin.amadeus.amadeus_web.domain.register.Person;
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@XmlRootElement
|
||||
public class Person_Groups implements Serializable{
|
||||
|
||||
private int id;
|
||||
|
||||
private Person pessoa;
|
||||
|
||||
private Groups groups;
|
||||
|
||||
private boolean moderador;
|
||||
|
||||
public Person_Groups (){
|
||||
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Person getPessoa() {
|
||||
return pessoa;
|
||||
}
|
||||
|
||||
public void setPessoa(Person pessoa) {
|
||||
this.pessoa = pessoa;
|
||||
}
|
||||
|
||||
public void setModerador(boolean moderador) {
|
||||
this.moderador = moderador;
|
||||
}
|
||||
|
||||
public boolean isModerador() {
|
||||
return moderador;
|
||||
}
|
||||
|
||||
public Groups getGroups() {
|
||||
return groups;
|
||||
}
|
||||
|
||||
public void setGroups(Groups groups) {
|
||||
this.groups = groups;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package br.ufpe.cin.amadeus.amadeus_web.syncronize;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RelatorioGrupo {
|
||||
|
||||
private String nome;
|
||||
private List<Boolean> status;
|
||||
|
||||
public RelatorioGrupo(String nome, List<Boolean> status) {
|
||||
this.nome = nome;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the nome
|
||||
*/
|
||||
public String getNome() {
|
||||
return nome;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param nome the nome to set
|
||||
*/
|
||||
public void setNome(String nome) {
|
||||
this.nome = nome;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the status
|
||||
*/
|
||||
public List<Boolean> getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param status the status to set
|
||||
*/
|
||||
public void setStatus(List<Boolean> status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package br.ufpe.cin.amadeus.amadeus_web.syncronize;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@XmlRootElement
|
||||
public class StudentHaveGroup implements Serializable {
|
||||
|
||||
private String name;
|
||||
private int id;
|
||||
private boolean haveGroup;
|
||||
private int position;
|
||||
|
||||
public StudentHaveGroup() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public StudentHaveGroup(String name, int id, boolean b, int position) {
|
||||
this.name = name;
|
||||
this.id = id;
|
||||
this.haveGroup = b;
|
||||
this.setPosition(position);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public boolean isHaveGroup() {
|
||||
return haveGroup;
|
||||
}
|
||||
|
||||
public void setHaveGroup(boolean haveGroup) {
|
||||
this.haveGroup = haveGroup;
|
||||
}
|
||||
|
||||
public void setPosition(int position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public int getPosition() {
|
||||
return position;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package br.ufpe.cin.amadeus.amadeus_web.syncronize;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@XmlRootElement
|
||||
public class TimelineItem implements Serializable {
|
||||
|
||||
private int idGroup;
|
||||
private String date;
|
||||
private int frequency;
|
||||
private String classe;
|
||||
|
||||
public TimelineItem() {
|
||||
|
||||
}
|
||||
|
||||
public int getIdGroup() {
|
||||
return idGroup;
|
||||
}
|
||||
public void setIdGroup(int idGroup) {
|
||||
this.idGroup = idGroup;
|
||||
}
|
||||
public String getDate() {
|
||||
return date;
|
||||
}
|
||||
public void setDate(String date) {
|
||||
this.date = date;
|
||||
}
|
||||
public int getFrequency() {
|
||||
return frequency;
|
||||
}
|
||||
public void setFrequency(int frequency) {
|
||||
this.frequency = frequency;
|
||||
}
|
||||
public String getClasse() {
|
||||
return classe;
|
||||
}
|
||||
public void setClasse(String classe) {
|
||||
this.classe = classe;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,9 +11,16 @@
|
||||
<property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/amadeus_web</property>
|
||||
<property name="hibernate.connection.username">postgres</property>
|
||||
<property name="hibernate.connection.password">postgres</property>
|
||||
<<<<<<< HEAD
|
||||
<property name="hibernate.current_session_context_class">thread</property>
|
||||
|
||||
<property name="hibernate.hbm2ddl.auto">update</property>
|
||||
=======
|
||||
<property name="hibernate.current_session_context_class">thread</property>
|
||||
<!-- Senha de Paulo -->
|
||||
<!-- <property name="hibernate.connection.password">mcplparp</property> -->
|
||||
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
<property name="hibernate.c3p0.max_size">10</property>
|
||||
<property name="hibernate.c3p0.min_size">2</property>
|
||||
@@ -85,6 +92,11 @@
|
||||
|
||||
<mapping class="br.ufpe.cin.amadeus.amadeus_web.domain.content_management.ExternalLink" />
|
||||
<mapping class="br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Log" />
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<mapping class="br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Groups" />
|
||||
<mapping class="br.ufpe.cin.amadeus.amadeus_web.domain.content_management.Person_Groups" />
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
|
||||
</session-factory>
|
||||
</hibernate-configuration>
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<web>
|
||||
<<<<<<< HEAD
|
||||
<system>
|
||||
<general.version>00.96.60</general.version>
|
||||
=======
|
||||
<system>
|
||||
<general.version>00.96.30</general.version>
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
<general.language>Português-Brasil</general.language>
|
||||
<general.encoding>UTF-8</general.encoding>
|
||||
<general.themes>default</general.themes>
|
||||
@@ -9,8 +14,13 @@
|
||||
</system>
|
||||
<mailsender>
|
||||
<mail.description>Conta de e-mail padrão</mail.description>
|
||||
<<<<<<< HEAD
|
||||
<mail.from>exemploamadeus@gmail.com</mail.from>
|
||||
<mail.password>amadeus2012!</mail.password>
|
||||
=======
|
||||
<mail.from>exemplo@email.com</mail.from>
|
||||
<mail.password>senha</mail.password>
|
||||
>>>>>>> 661708b07f533da1f47ab2b8c362cb287fdf4631
|
||||
<mail.smtp.host>smtp.gmail.com</mail.smtp.host>
|
||||
<mail.smtp.auth>true</mail.smtp.auth>
|
||||
<mail.debug>false</mail.debug>
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário