Subversion Repositories bacoAlunos

Rev

Rev 1434 | Rev 1472 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1434 Rev 1471
Line 83... Line 83...
83
            <th>Cursos Selecionados</th>
83
            <th>Cursos Selecionados</th>
84
            <th>Total de Unidades</th>
84
            <th>Total de Unidades</th>
85
            <th>Unidades Não Selecionadas</th>
85
            <th>Unidades Não Selecionadas</th>
86
            <th>Unidades Selecionadas</th>
86
            <th>Unidades Selecionadas</th>
87
            <th>Turmas Selecionadas</th>
87
            <th>Turmas Selecionadas</th>
-
 
88
            <th>Alunos com Resposta %</th>
-
 
89
            <th>Alunos com Resposta</th>
88
            <th>Alunos Selecionados</th>
90
            <th>Alunos Selecionados</th>
89
            <th>Professores Selecionados</th>
91
            <th>Professores Selecionados</th>
90
            <th>Tipologias Selecionadas</th>
92
            <th>Tipologias Selecionadas</th>
-
 
93
            <th>Respostas %</th>
91
            <th>Respostas</th>
94
            <th>Respostas</th>
92
            <th>Por Responder</th>
-
 
93
            <th>Respostas Requisitadas</th>
95
            <th>Respostas Requisitadas</th>
94
 
96
 
95
            </thead>
97
            </thead>
96
            <tbody>
98
            <tbody>
97
            <td><%=questionarioStatsVars.cursos%></td>
99
            <td><%=questionarioStatsVars.cursos%></td>
98
            <td><%=questionarioStatsVars.unidades%></td>
100
            <td><%=questionarioStatsVars.unidades%></td>
99
            <td><%=questionarioStatsVars.unidades - questionarioStatsVars.unidadesUsadas%></td>
101
            <td><%=questionarioStatsVars.unidades - questionarioStatsVars.unidadesUsadas%></td>
100
            <td><%=questionarioStatsVars.unidadesUsadas%></td>
102
            <td><%=questionarioStatsVars.unidadesUsadas%></td>
101
            <td><%=questionarioStatsVars.turmas%></td>
103
            <td><%=questionarioStatsVars.turmas%></td>
-
 
104
            <td>
-
 
105
                <%
-
 
106
                    int percentage = (int) (questionarioStatsVars.alunosQueResponderam/questionarioStatsVars.alunosDeUsadas);
-
 
107
 
-
 
108
                    String percentageColor = "danger";
-
 
109
                    if(percentage < 20)
-
 
110
                        percentageColor = "danger";
-
 
111
                    else if(percentage < 40)
-
 
112
                        percentageColor = "warning";
-
 
113
                    else if(percentage < 60)
-
 
114
                        percentageColor = "info";
-
 
115
                    else
-
 
116
                        percentageColor = "success";
-
 
117
                %>
-
 
118
                <div class="progress">
-
 
119
                    <div class="progress-bar progress-bar-<%=percentageColor%>" role="progressbar" aria-valuenow="<%=percentage%>"
-
 
120
                         aria-valuemin="0" aria-valuemax="100" style="width:<%=percentage%>%">
-
 
121
                        <%=percentage%>%
-
 
122
                    </div>
-
 
123
                </div>
-
 
124
            </td>
-
 
125
            <td><label class="label label-<%=percentageColor%>" style="font-size: 1em"><%=questionarioStatsVars.alunosQueResponderam%></label></td>
102
            <td><%=questionarioStatsVars.alunosDeUsadas%></td>
126
            <td><%=questionarioStatsVars.alunosDeUsadas%></td>
103
            <td><%=questionarioStatsVars.profsDeUsadas%></td>
127
            <td><%=questionarioStatsVars.profsDeUsadas%></td>
104
            <td><%=questionarioStatsVars.tipologiasUsadas%></td>
128
            <td><%=questionarioStatsVars.tipologiasUsadas%></td>
-
 
129
            <td>
-
 
130
                <%
105
            <td><label class="label label-success" style="font-size: 1em"><%=questionarioStatsVars.respostasObtidas%></label></td>
131
                     percentage = (int) (questionarioStatsVars.respostasObtidas/questionarioStatsVars.respostasRequisitadas);
-
 
132
 
-
 
133
                     percentageColor = "danger";
-
 
134
                    if(percentage < 20)
-
 
135
                        percentageColor = "danger";
-
 
136
                    else if(percentage < 40)
-
 
137
                        percentageColor = "warning";
-
 
138
                    else if(percentage < 60)
-
 
139
                        percentageColor = "info";
-
 
140
                    else
-
 
141
                        percentageColor = "success";
-
 
142
                %>
-
 
143
                <div class="progress">
-
 
144
                    <div class="progress-bar progress-bar-<%=percentageColor%>" role="progressbar" aria-valuenow="<%=percentage%>"
-
 
145
                         aria-valuemin="0" aria-valuemax="100" style="width:<%=percentage%>%">
-
 
146
                        <%=percentage%>%
-
 
147
                    </div>
-
 
148
                </div>
-
 
149
            </td>
106
            <td><label class="label label-danger" style="font-size: 1em"><%=(questionarioStatsVars.respostasRequisitadas-questionarioStatsVars.respostasObtidas)%></label></td>
150
            <td><label class="label label-<%=percentageColor%>" style="font-size: 1em"><%=questionarioStatsVars.respostasObtidas%></label></td>
107
            <td><label class="label label-info" style="font-size: 1em"><%=questionarioStatsVars.respostasRequisitadas%></label></td>
151
            <td><label class="label label-info" style="font-size: 1em"><%=questionarioStatsVars.respostasRequisitadas%></label></td>
108
 
152
 
109
            </tbody>
153
            </tbody>
110
        </table>
154
        </table>
111
</div>
155
</div>
Line 114... Line 158...
114
        <thead>
158
        <thead>
115
            <th class="filter-name filter-select">Instituição</th>
159
            <th class="filter-name filter-select">Instituição</th>
116
            <th>Código</th>
160
            <th>Código</th>
117
            <th>Curso</th>
161
            <th>Curso</th>
118
            <th>Unidades</th>
162
            <th>Unidades</th>
-
 
163
            <th>% Alunos</th>
-
 
164
            <th>Alunos com resposta</th>
119
            <th>Alunos</th>
165
            <th>Alunos</th>
-
 
166
            <th>% Respostas</th>
120
            <th>Respostas</th>
167
            <th>Respostas</th>
121
            <th>Por Responder</th>
-
 
122
            <th>Total</th>
168
            <th>Total</th>
123
            <th></th>
169
            <th></th>
124
        </thead>
170
        </thead>
125
        <tbody>
171
        <tbody>
126
    <%
172
    <%
Line 128... Line 174...
128
        for(Long cursoId: cursos)
174
        for(Long cursoId: cursos)
129
        {
175
        {
130
            QuestionarioPedagogicoCursoAfeto cursoAfeto = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().load(cursoId);
176
            QuestionarioPedagogicoCursoAfeto cursoAfeto = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().load(cursoId);
131
            long respostasCurso = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().countRespostas(cursoId);
177
            long respostasCurso = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().countRespostas(cursoId);
132
            long alunosComRespostasCurso = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().countAlunosComRespostas(cursoId);
178
            long alunosComRespostasCurso = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().countAlunosComRespostas(cursoId);
-
 
179
            long alunosTotalCurso = DaoFactory.getQuestionarioPedagogicoCursoAfetoDaoImpl().countAlunos(cursoId);
-
 
180
            if(alunosTotalCurso == 0)
-
 
181
                alunosTotalCurso = 1;
-
 
182
            if(alunosTotalCurso == 0)
-
 
183
                alunosTotalCurso = 1;
-
 
184
 
133
            request.setAttribute("cursoAfeto",cursoAfeto);
185
            request.setAttribute("cursoAfeto",cursoAfeto);
-
 
186
            if(cursoAfeto.getStatRespostasRequisitadas() > 0)
-
 
187
            {
134
    %>
188
    %>
135
        <tr>
189
        <tr>
136
            <td><%=cursoAfeto.getNomeInstituicao()%></td>
190
            <td><%=cursoAfeto.getNomeInstituicao()%></td>
137
            <td><%=cursoAfeto.getCodigoCurso()%></td>
191
            <td><%=cursoAfeto.getCodigoCurso()%></td>
138
            <td><%=cursoAfeto.getNome()%></td>
192
            <td><%=cursoAfeto.getNome()%></td>
Line 140... Line 194...
140
                <a href="#" data-href="<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/questionarioCourseDashBoard.jsp?cursoAfetoId=${cursoAfeto.id}" data-title="Acompanhamento de questionários do curso (${cursoAfeto.codigoCurso}) ${cursoAfeto.nome} da ${cursoAfeto.nomeInstituicao})" data-toggle="modal" data-target="#modalAjaxRequest">
194
                <a href="#" data-href="<%=request.getContextPath()%>/user/questionarios/pedagogicoEstudante/questionarioCourseDashBoard.jsp?cursoAfetoId=${cursoAfeto.id}" data-title="Acompanhamento de questionários do curso (${cursoAfeto.codigoCurso}) ${cursoAfeto.nome} da ${cursoAfeto.nomeInstituicao})" data-toggle="modal" data-target="#modalAjaxRequest">
141
                    <%=cursoAfeto.getUnidadesAfetas().size()%>
195
                    <%=cursoAfeto.getUnidadesAfetas().size()%>
142
                </a>
196
                </a>
143
 
197
 
144
            </td>
198
            </td>
-
 
199
            <td>
-
 
200
                <%
-
 
201
                    percentage = (int) (alunosComRespostasCurso/alunosTotalCurso);
-
 
202
 
-
 
203
                    percentageColor = "danger";
-
 
204
                    if(percentage < 20)
-
 
205
                        percentageColor = "danger";
-
 
206
                    else if(percentage < 40)
-
 
207
                        percentageColor = "warning";
-
 
208
                    else if(percentage < 60)
-
 
209
                        percentageColor = "info";
-
 
210
                    else
-
 
211
                        percentageColor = "success";
-
 
212
                %>
-
 
213
                <div class="progress">
-
 
214
                    <div class="progress-bar progress-bar-<%=percentageColor%>" role="progressbar" aria-valuenow="<%=percentage%>"
-
 
215
                         aria-valuemin="0" aria-valuemax="100" style="width:<%=percentage%>%">
-
 
216
                        <%=percentage%>%
-
 
217
                    </div>
-
 
218
                </div>
-
 
219
 
-
 
220
            </td>
145
            <td><label class="label <%=alunosComRespostasCurso > 0 ? "label-success":"label-warning"%>" style="font-size: 1em"><%=alunosComRespostasCurso%></label></td>
221
            <td><label class="label label-<%=percentageColor%>" style="font-size: 1em"><%=alunosComRespostasCurso%></label></td>
146
            <td><label class="label <%=respostasCurso > 0 ? "label-success":"label-warning"%>" style="font-size: 1em"><%=respostasCurso%></label></td>
222
            <td><label class="label label-info" style="font-size: 1em"><%=alunosTotalCurso%></label></td>
-
 
223
            <td>
-
 
224
                <%
-
 
225
                    percentage = (int) (respostasCurso/cursoAfeto.getStatRespostasRequisitadas());
-
 
226
 
-
 
227
                    percentageColor = "danger";
-
 
228
                    if(percentage < 20)
-
 
229
                        percentageColor = "danger";
-
 
230
                    else if(percentage < 40)
-
 
231
                        percentageColor = "warning";
-
 
232
                    else if(percentage < 60)
-
 
233
                        percentageColor = "info";
-
 
234
                    else
-
 
235
                        percentageColor = "success";
-
 
236
                %>
-
 
237
                <div class="progress">
-
 
238
                    <div class="progress-bar progress-bar-<%=percentageColor%>" role="progressbar" aria-valuenow="<%=percentage%>"
-
 
239
                         aria-valuemin="0" aria-valuemax="100" style="width:<%=percentage%>%">
-
 
240
                        <%=percentage%>%
-
 
241
                    </div>
-
 
242
                </div>
-
 
243
            </td>
147
            <td><label class="label label-danger" style="font-size: 1em"><%=cursoAfeto.getStatRespostasRequisitadas() - respostasCurso%></label></td>
244
            <td><label class="label label-<%=percentageColor%>" style="font-size: 1em"><%=respostasCurso%></label></td>
148
            <td><label class="label label-info" style="font-size: 1em"><%=cursoAfeto.getStatRespostasRequisitadas()%></label></td>
245
            <td><label class="label label-info" style="font-size: 1em"><%=cursoAfeto.getStatRespostasRequisitadas()%></label></td>
149
            <td>
246
            <td>
150
                <%
247
                <%
151
                    String nomeCursoEncoded = URLEncoder.encode(cursoAfeto.getNome(),"ISO-8859-1");
248
                    String nomeCursoEncoded = URLEncoder.encode(cursoAfeto.getNome(),"ISO-8859-1");
152
                    request.setAttribute("nomeCursoEncoded",nomeCursoEncoded);
249
                    request.setAttribute("nomeCursoEncoded",nomeCursoEncoded);
Line 155... Line 252...
155
                    <span class="glyphicon glyphicon-envelope"> </span>
252
                    <span class="glyphicon glyphicon-envelope"> </span>
156
                </html:link>
253
                </html:link>
157
            </td>
254
            </td>
158
        </tr>
255
        </tr>
159
    <%
256
    <%
-
 
257
            }
160
        }
258
        }
161
        AbstractDao.getCurrentSession().getTransaction().commit();
259
        AbstractDao.getCurrentSession().getTransaction().commit();
162
    %>
260
    %>
163
        </tbody>
261
        </tbody>
164
    </table>
262
    </table>