Rev 1393 | Rev 1404 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1328 | jmachado | 1 | <%@ page import="pt.estgp.estgweb.utils.DatesUtils" %> |
2 | <%@ page import="java.util.List" %> |
||
3 | <%@ page import="pt.estgp.estgweb.web.form.questionarios.QuestionarioForm" %> |
||
1330 | jmachado | 4 | <%@ page import="pt.estgp.estgweb.domain.QuestionarioImpl" %> |
1328 | jmachado | 5 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
6 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
7 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
8 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
9 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
10 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
11 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
12 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
13 | <jsp:useBean id="Questionario" type="pt.estgp.estgweb.domain.QuestionarioImpl" scope="request"/> |
||
14 | |||
1387 | jmachado | 15 | |
1393 | jmachado | 16 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_SEE_ADMIN"> |
1378 | jmachado | 17 | |
1330 | jmachado | 18 | <div class="row"> |
19 | <logic:empty name="Questionario" property="year"> |
||
20 | <script> |
||
21 | $(document).ready( |
||
22 | function(){ |
||
23 | $("#yearSemestreForm").show(); |
||
24 | } |
||
25 | ); |
||
26 | </script> |
||
27 | </logic:empty> |
||
28 | <logic:notEmpty name="Questionario" property="year"> |
||
29 | <div class="col-md-3 col-sm-3" id="yearSemestreInfo"> |
||
30 | <div class="list-group"> |
||
31 | <div class="list-group-item"> |
||
32 | <bean:message key="survey.list.form.year"/>: ${Questionario.year} |
||
33 | </div> |
||
34 | <div class="list-group-item"> |
||
35 | Semestre: ${Questionario.semestre} |
||
36 | </div> |
||
37 | </div> |
||
38 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_SET_ANO_SEMESTRE"> |
||
39 | <button class="btn btn-default" type="button" onclick="$('#yearSemestreForm').show();$('#yearSemestreInfo').hide()">Modificar</button> |
||
40 | </baco:clearOperation> |
||
1328 | jmachado | 41 | </div> |
1330 | jmachado | 42 | </logic:notEmpty> |
43 | |||
44 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_SET_ANO_SEMESTRE"> |
||
45 | <div class="col-md-6" style="display: none" id="yearSemestreForm"> |
||
46 | <div class="panel panel-default"> |
||
47 | <div class="panel-body"> |
||
48 | |||
1346 | jmachado | 49 | <html:form styleClass="form-horizontal" action="/user/questionariosPaeYearSemestre"> |
1330 | jmachado | 50 | <% |
51 | QuestionarioForm qFr = (QuestionarioForm) request.getAttribute("QuestionarioForm"); |
||
52 | if(qFr.getQuestionario().getId() <= 0) |
||
53 | qFr.setQuestionario(Questionario); |
||
54 | %> |
||
55 | <input type="hidden" name="dispatch" value="setYearSemestre"/> |
||
56 | <html:hidden property="questionario.id"/> |
||
57 | <div class="form-group"> |
||
58 | <label class="control-label col-sm-2" for="year"><bean:message key="survey.list.form.year"/></label> |
||
59 | <div class="col-sm-10"> |
||
60 | <% |
||
61 | List<String> years = DatesUtils.getImportYears(10); |
||
62 | %> |
||
63 | <html:select styleClass="form-control" styleId="year" property="questionario.year"> |
||
64 | <html:option value="">Escolha Ano</html:option> |
||
65 | <% |
||
66 | for(String year:years) |
||
67 | { |
||
68 | request.setAttribute("year",year); |
||
69 | %> |
||
70 | <html:option value="${year}">${year}</html:option> |
||
71 | <% |
||
72 | } |
||
73 | %> |
||
74 | </html:select> |
||
75 | </div> |
||
76 | </div> |
||
77 | <div class="form-group"> |
||
78 | <label class="control-label col-sm-2" for="semestre">Semestre:</label> |
||
79 | <div class="col-sm-10"> |
||
80 | <html:select styleClass="form-control" styleId="semestre" property="questionario.semestre"> |
||
81 | <html:option value="">Escolha semestre</html:option> |
||
82 | <html:option value="A">Anual</html:option> |
||
83 | <html:option value="S1">Semestre 1</html:option> |
||
84 | <html:option value="S2">Semestre 2</html:option> |
||
85 | <html:option value="T1">Trimestre 1</html:option> |
||
86 | <html:option value="T2">Trimestre 2</html:option> |
||
87 | <html:option value="T3">Trimestre 3</html:option> |
||
88 | <html:option value="T4">Trimestre 4</html:option> |
||
89 | </html:select> |
||
90 | </div> |
||
91 | </div> |
||
92 | <button class="btn btn-default" type="button" onclick="this.form.action = this.form.action + '#NOWTASK';this.form.submit();"><bean:message key="confirm"/></button> |
||
93 | </html:form> |
||
94 | </div> |
||
95 | </div> |
||
1328 | jmachado | 96 | </div> |
97 | </baco:clearOperation> |
||
1330 | jmachado | 98 | <hr class="visible-xs"/> |
1393 | jmachado | 99 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_SEE_ADMIN,QUESTIONARIO_SCHEDULLE_SEE_SELECT_COURSES"> |
1330 | jmachado | 100 | <div class="col-md-3 col-sm-3"> |
101 | <div class="list-group"> |
||
1328 | jmachado | 102 | |
1330 | jmachado | 103 | <% |
104 | if(Questionario.getSubStatePedagodigoEnum().getPosition() >= QuestionarioImpl.SubStatePedagogico.COURSES_ASSIGNED.getPosition()) |
||
105 | request.setAttribute("classAssignCourses","btn-success"); |
||
106 | else |
||
107 | request.setAttribute("classAssignCourses","btn-warning"); |
||
108 | %> |
||
109 | <div class="list-group-item"> |
||
1346 | jmachado | 110 | <html:link styleClass="btn ${classAssignCourses}" action="/user/questionarioPedagogicoStartChooseCourses?questionarioId=${Questionario.id}"> |
1330 | jmachado | 111 | Selecção de Cursos |
112 | </html:link> |
||
113 | </div> |
||
1328 | jmachado | 114 | |
1330 | jmachado | 115 | <logic:equal value="ASSIGNING_COURSES" name="Questionario" property="substate"> |
116 | <div class="list-group-item"> |
||
117 | <div class="alert alert-warning alert-small"> |
||
118 | Os cursos estão em atribuição |
||
119 | </div> |
||
120 | </div> |
||
121 | </logic:equal> |
||
1328 | jmachado | 122 | <% |
1330 | jmachado | 123 | if(Questionario.getSubStatePedagodigoEnum().getPosition() >= QuestionarioImpl.SubStatePedagogico.COURSES_ASSIGNED.getPosition()) |
124 | { |
||
1328 | jmachado | 125 | %> |
1330 | jmachado | 126 | <div class="list-group-item"> |
1346 | jmachado | 127 | <a href="#" class="btn btn-info btn-sm" data-href="<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/cursosJobInfo.jsp?jobId=${Questionario.courseSelectionTaskId}" data-title="Listagem de Cursos da Tarefa de Atribuição" data-toggle="modal" data-target="#modalAjaxRequest"> |
1332 | jmachado | 128 | Cursos Atribuidos <span class="glyphicon glyphicon-list-alt"> </span> |
129 | </a> |
||
1328 | jmachado | 130 | </div> |
1330 | jmachado | 131 | <% |
132 | } |
||
133 | %> |
||
134 | |||
135 | </div> |
||
136 | |||
137 | </div> |
||
138 | </baco:clearOperation> |
||
139 | <hr class="visible-xs"/> |
||
1393 | jmachado | 140 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_SEE_ADMIN,QUESTIONARIO_CHANGE_ASSIGNEMENTS_CHECK_TEACHERS,QUESTIONARIO_CHANGE_TIPOLOGIES,QUESTIONARIO_CHANGE_ASSIGNEMENTS"> |
1330 | jmachado | 141 | <div class="col-md-3 col-sm-3"> |
142 | <div class="list-group"> |
||
143 | <div class="list-group-item"> |
||
1346 | jmachado | 144 | <html:link styleClass="btn btn-warning" action="/user/questionarioPedagogicoStartCheckCourses?questionarioId=${Questionario.id}"> |
1330 | jmachado | 145 | Verificar Atribuições |
146 | </html:link> |
||
1328 | jmachado | 147 | </div> |
1330 | jmachado | 148 | </div> |
1328 | jmachado | 149 | </div> |
1330 | jmachado | 150 | </baco:clearOperation> |
151 | <hr class="visible-xs"/> |
||
1379 | jmachado | 152 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_SEE_START_ASSIGN_ANSWERS"> |
1328 | jmachado | 153 | <div class="col-md-3 col-sm-3"> |
1330 | jmachado | 154 | <div class="list-group"> |
155 | <div class="list-group-item"> |
||
1379 | jmachado | 156 | <html:link styleClass="btn btn-warning" action="/user/questionarioPedagogicoStartAssignAnswers?questionarioId=${Questionario.id}"> |
1387 | jmachado | 157 | Atribuição de Respostas |
1330 | jmachado | 158 | </html:link> |
159 | </div> |
||
160 | </div> |
||
1328 | jmachado | 161 | </div> |
1329 | jmachado | 162 | </baco:clearOperation> |
1330 | jmachado | 163 | </div> |
164 | <hr/> |
||
165 | <div class="row"> |
||
166 | <div class="col-md-12 col-sm-12"> |
||
1337 | jmachado | 167 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_REVERT_ALL_ASSIGNEMENTS"> |
1346 | jmachado | 168 | <button class="btn btn-danger" type="button" data-toggle="modal" data-target="#confirm-ModalGeneric" data-message="Esta operação irá anular os cursos e unidades atribuidos anteriormente!! Tem a certeza que deseja prosseguir?" data-href="<%=request.getContextPath()%>/user/questionariosPaeSelectCourses.do?dispatch=revertAssignements&questionario.id=${Questionario.id}#NOWTASK">Anular Atribuições</button> |
1337 | jmachado | 169 | </baco:clearOperation> |
1379 | jmachado | 170 | |
171 | <baco:clearOperation name="Questionario" op="QUESTIONARIO_FINNISH_ASSIGNEMENTS"> |
||
1403 | jmachado | 172 | <a class="btn btn-success pull-right" type="button" href="">Terminar Atribuições / INICIAR PROCESSAMENTO DO QUESTIONÁRIO</a> |
1379 | jmachado | 173 | </baco:clearOperation> |
1328 | jmachado | 174 | </div> |
1330 | jmachado | 175 | </div> |
1329 | jmachado | 176 | </baco:clearOperation> |
177 | <baco:notClearOperation name="Questionario" op="QUESTIONARIO_ASSIGNATION_OPERATIONS"> |
||
178 | Não pode aceder a esta area, não está autorizado a efetuar operações de atribuição. |
||
179 | </baco:notClearOperation> |