Subversion Repositories bacoAlunos

Rev

Rev 1554 | Rev 1562 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1553 jmachado 1
<?xml version="1.0" encoding="UTF-8"?>
1549 jmachado 2
<xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"
3
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
1553 jmachado 4
 
1549 jmachado 5
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6
                xsi:schemaLocation="http://www.w3.org/1999/XSL/Format http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/fop/src/foschema/fop.xsd">
7
    <xsl:param name="site">http://localhost/bacoTESTE</xsl:param>
1553 jmachado 8
    <xsl:param name="updateDate">EM FALTA</xsl:param>
9
    <xsl:param name="anoLectivo"><xsl:value-of select="//anoLectivo"/></xsl:param>
10
    <xsl:param name="nomeDocente"><xsl:value-of select="//nomeDocente"/></xsl:param>
11
    <xsl:param name="numeroDocente"><xsl:value-of select="//numeroDocente"/></xsl:param>
1549 jmachado 12
 
13
 
1553 jmachado 14
 
15
 
16
 
1549 jmachado 17
    <xsl:template match="/">
1553 jmachado 18
        <!--<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Helvetica" color="#58585A">-->
19
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Helvetica" color="black">
1549 jmachado 20
            <fo:layout-master-set>
21
                <fo:simple-page-master master-name="A4Vertical" page-width="210mm" page-height="297mm"
22
                                       margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm"
23
                                       reference-orientation="0">
1551 jmachado 24
                    <fo:region-body region-name="body" margin-top="40mm" margin-bottom="10mm" margin-right="0"
1549 jmachado 25
                                    margin-left="0"/>
26
 
27
                    <fo:region-before region-name="header" extent="15mm"/>
28
                    <fo:region-after region-name="footer" extent="1cm"/>
29
                </fo:simple-page-master>
30
 
31
                <fo:simple-page-master master-name="A4VerticalFirstPage" page-width="210mm" page-height="297mm"
32
                                       margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm"
33
                                       reference-orientation="0">
34
                    <fo:region-body region-name="body" margin-top="90mm" margin-bottom="10mm" margin-right="0"
35
                                    margin-left="0"/>
36
 
37
                    <fo:region-before region-name="header" extent="15mm"/>
38
                    <fo:region-after region-name="footer" extent="1cm"/>
39
                </fo:simple-page-master>
40
 
41
 
42
 
43
                <fo:simple-page-master master-name="A4HorizontalRot" page-width="210mm" page-height="297mm"
44
                                       margin-top="0.5cm" margin-bottom="0.5cm" margin-left="0.5cm" margin-right="0.5cm"
45
                                       reference-orientation="90">
46
                    <fo:region-body region-name="body" margin-top="20mm" margin-bottom="10mm" margin-right="0"
47
                                    margin-left="0"/>
48
                    <fo:region-before region-name="header" extent="15mm"/>
49
                    <fo:region-after region-name="footer" extent="1cm"/>
50
                </fo:simple-page-master>
51
                <fo:simple-page-master master-name="A4Horizontal" page-width="297mm" page-height="210mm"
52
                                       margin-top="0.5cm" margin-bottom="0.5cm" margin-left="0.5cm"
53
                                       margin-right="0.5cm">
54
                    <fo:region-body region-name="body" margin-top="20mm" margin-bottom="15mm" margin-right="0"
55
                                    margin-left="0"/>
56
                    <fo:region-before region-name="header" extent="15mm"/>
57
                    <fo:region-after region-name="footer" extent="1cm"/>
58
                </fo:simple-page-master>
59
                <fo:page-sequence-master master-name="pages">
60
                    <fo:repeatable-page-master-alternatives>
61
                        <fo:conditional-page-master-reference master-reference="pages" page-position="any"/>
62
                    </fo:repeatable-page-master-alternatives>
63
                </fo:page-sequence-master>
64
            </fo:layout-master-set>
65
 
66
            <!--LAYOUT DE PAGINA ESCOLHIDO-->
67
 
68
            <fo:page-sequence master-reference="A4VerticalFirstPage" initial-page-number="1">
69
                <xsl:call-template name="firstpage"/>
70
            </fo:page-sequence>
71
            <fo:page-sequence master-reference="A4Vertical" initial-page-number="2">
1551 jmachado 72
                <xsl:call-template name="indexPage"/>
73
            </fo:page-sequence>
74
            <fo:page-sequence master-reference="A4Vertical" initial-page-number="3">
1549 jmachado 75
                <xsl:call-template name="page"/>
76
            </fo:page-sequence>
77
 
78
 
79
        </fo:root>
80
    </xsl:template>
81
 
82
 
83
    <xsl:template name="firstpage">
84
        <fo:static-content flow-name="header">
85
            <fo:block text-align="left">
86
                <fo:table width="100%" table-layout="fixed" border-bottom="1px solid black">
87
                    <fo:table-column column-width="100%"/>
88
                    <fo:table-body>
89
                        <fo:table-row>
90
                            <fo:table-cell>
91
                                <fo:block>
92
                                    <fo:external-graphic height="auto" width="auto"
93
                                                         content-height="80">
94
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1553 jmachado 95
                                        <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/layout/themes/ipp/logo.jpg')
1549 jmachado 96
                                        </xsl:attribute>
97
                                    </fo:external-graphic>
98
                                </fo:block>
99
                            </fo:table-cell>
100
 
101
                        </fo:table-row>
102
 
103
                    </fo:table-body>
104
                </fo:table>
105
 
106
            </fo:block>
107
        </fo:static-content>
108
        <fo:static-content flow-name="footer">
1551 jmachado 109
            <xsl:call-template name="footerDefault"/>
1549 jmachado 110
        </fo:static-content>
111
 
112
 
113
        <fo:flow flow-name="body">
1551 jmachado 114
            <fo:block border-bottom="8px solid #58585A" border-top="4px solid #58585A" font-size="26px" padding="6px" text-align="center" color="white" background-color="#FFCA44">
1553 jmachado 115
                <fo:inline font-weight="bold"> Relatório de Avaliação Pedagógica</fo:inline>
1549 jmachado 116
            </fo:block>
117
 
118
            <fo:block  font-size="20px" padding="4px" margin-top="40px" text-align="center" >
1553 jmachado 119
                <fo:inline text-decoration="underline" font-weight="bold">Inquéritos Pedagógicos aos Alunos</fo:inline>
1549 jmachado 120
            </fo:block>
121
 
1551 jmachado 122
            <fo:block font-size="18px" padding="4px" margin-top="20px" text-align="center">
1553 jmachado 123
                <fo:inline>Relatório Docente</fo:inline>
1549 jmachado 124
            </fo:block>
125
 
1551 jmachado 126
            <fo:block font-size="14px" padding="4px" margin-top="5px" text-align="center" background-color="#fff9ea">
1549 jmachado 127
                <xsl:value-of select="$nomeDocente"/>
128
            </fo:block>
129
            <fo:block font-size="12px" padding="4px" margin-top="2px" text-align="center">
1553 jmachado 130
                <fo:inline>Docente Número: <xsl:value-of select="$numeroDocente"/></fo:inline>
1549 jmachado 131
            </fo:block>
132
            <fo:block font-size="12px" padding="4px" margin-top="20px" text-align="center" >
1551 jmachado 133
                <fo:inline><fo:wrapper white-space-treatment="preserve" font-weight="bold">Ano letivo: </fo:wrapper> <xsl:value-of select="$anoLectivo"/></fo:inline>
1549 jmachado 134
            </fo:block>
135
        </fo:flow>
136
    </xsl:template>
137
 
1551 jmachado 138
    <xsl:template name="indexPage">
139
        <fo:static-content flow-name="header">
140
            <xsl:call-template name="headerTeacher"/>
141
        </fo:static-content>
142
        <fo:static-content flow-name="footer">
143
            <xsl:call-template name="footerDefault"/>
144
        </fo:static-content>
145
 
146
        <fo:flow flow-name="body">
147
 
148
            <fo:block  font-size="20px" padding="4px" margin-top="40px" text-align="center" >
149
                <fo:inline text-decoration="underline" font-weight="bold">Indice</fo:inline>
150
            </fo:block>
151
 
152
 
153
            <fo:block text-align-last="justify" font-weight="bold" margin-bottom="5px">
154
                    <xsl:text> </xsl:text>
155
                    <fo:leader/>
156
                    Pag.
157
            </fo:block>
158
 
159
            <fo:block font-size="14px" text-align-last="justify">
1553 jmachado 160
                <fo:basic-link internal-destination="capParticipacao">
1551 jmachado 161
                    <fo:inline font-weight="bold" padding-top="3px" padding-bottom="2px" padding-left="3px" padding-right="3px" margin-right="10px" border-bottom="1px solid #58585A" font-size="16px" color="white" background-color="#FFCA44">1</fo:inline>
162
                    <xsl:text> </xsl:text>
1554 jmachado 163
                    Participação nos questionários do docente
1551 jmachado 164
                    <fo:leader leader-pattern="dots" />
1553 jmachado 165
                    <fo:page-number-citation ref-id="capParticipacao" />
1551 jmachado 166
                </fo:basic-link>
167
            </fo:block>
168
            <fo:block font-size="14px" text-align-last="justify" margin-top="5px">
1553 jmachado 169
                <fo:basic-link internal-destination="capCaracterizacao">
1551 jmachado 170
                    <fo:inline font-weight="bold" padding-top="3px" padding-bottom="2px" padding-left="3px" padding-right="3px" margin-right="10px" border-bottom="1px solid #58585A" font-size="16px" color="white" background-color="#FFCA44">2</fo:inline>
171
                    <xsl:text> </xsl:text>
1554 jmachado 172
                    Caracterização da qmostra
1551 jmachado 173
                    <fo:leader leader-pattern="dots" />
1553 jmachado 174
                    <fo:page-number-citation ref-id="capCaracterizacao" />
1551 jmachado 175
                </fo:basic-link>
176
            </fo:block>
1553 jmachado 177
            <fo:block font-size="14px" text-align-last="justify" margin-top="5px">
178
                <fo:basic-link internal-destination="capQuestoes">
1554 jmachado 179
                    <fo:inline font-weight="bold" padding-top="3px" padding-bottom="2px" padding-left="3px" padding-right="3px" margin-right="10px" border-bottom="1px solid #58585A" font-size="16px" color="white" background-color="#FFCA44">3</fo:inline>
1553 jmachado 180
                    <xsl:text> </xsl:text>
1554 jmachado 181
                    Análise das questões sobre o docente
1553 jmachado 182
                    <fo:leader leader-pattern="dots" />
183
                    <fo:page-number-citation ref-id="capQuestoes" />
184
                </fo:basic-link>
185
            </fo:block>
1554 jmachado 186
            <fo:block font-size="14px" text-align-last="justify" margin-top="5px">
187
                <fo:basic-link internal-destination="capQuestoesUnidades">
188
                    <fo:inline font-weight="bold" padding-top="3px" padding-bottom="2px" padding-left="3px" padding-right="3px" margin-right="10px" border-bottom="1px solid #58585A" font-size="16px" color="white" background-color="#FFCA44">4</fo:inline>
189
                    <xsl:text> </xsl:text>
190
                    Análise das questões relativas ao grupo unidade para as unidades do docente
191
                    <fo:leader leader-pattern="dots" />
192
                    <fo:page-number-citation ref-id="capQuestoesUnidades" />
193
                </fo:basic-link>
194
            </fo:block>
1551 jmachado 195
 
196
 
1554 jmachado 197
 
1551 jmachado 198
        </fo:flow>
199
    </xsl:template>
200
 
1557 jmachado 201
 
202
 
203
 
204
 
1553 jmachado 205
    <xsl:template name="seccao">
206
        <xsl:param name="text"/>
1557 jmachado 207
        <xsl:param name="marginTop">0</xsl:param>
208
        <xsl:param name="icon"></xsl:param>
209
        <xsl:call-template name="seccaoGen">
210
            <xsl:with-param name="text" select="$text"/>
211
            <xsl:with-param name="marginTop" select="$marginTop"/>
212
            <xsl:with-param name="icon" select="$icon"/>
213
            <xsl:with-param name="backcolor">#FFEAAE</xsl:with-param>
214
        </xsl:call-template>
215
    </xsl:template>
216
 
217
    <xsl:template name="seccaoGreen">
218
        <xsl:param name="text"/>
219
        <xsl:param name="marginTop">0</xsl:param>
220
        <xsl:param name="icon"></xsl:param>
221
        <xsl:call-template name="seccaoGen">
222
            <xsl:with-param name="text" select="$text"/>
223
            <xsl:with-param name="marginTop" select="$marginTop"/>
224
            <xsl:with-param name="icon" select="$icon"/>
225
            <xsl:with-param name="backcolor">#DDFCB1</xsl:with-param>
226
        </xsl:call-template>
227
    </xsl:template>
228
 
229
    <xsl:template name="seccaoBlue">
230
        <xsl:param name="text"/>
231
        <xsl:param name="marginTop">0</xsl:param>
232
        <xsl:param name="icon"></xsl:param>
233
        <xsl:call-template name="seccaoGen">
234
            <xsl:with-param name="text" select="$text"/>
235
            <xsl:with-param name="marginTop" select="$marginTop"/>
236
            <xsl:with-param name="icon" select="$icon"/>
237
            <xsl:with-param name="backcolor">#B2E6FE</xsl:with-param>
238
        </xsl:call-template>
239
    </xsl:template>
240
 
241
 
242
 
243
    <!-- GENERIC SECCION -->
244
    <xsl:template name="seccaoGen">
245
        <xsl:param name="text"/>
246
        <xsl:param name="marginTop">0</xsl:param>
247
        <xsl:param name="icon"></xsl:param>
248
        <xsl:param name="backcolor">#B2E6FE</xsl:param>
249
        <fo:block padding="0" padding-left="0" margin="0">
250
            <fo:table width="100%" table-layout="fixed" border="0" margin="0" padding="0">
251
                <fo:table-column column-width="90%"/>
252
                <fo:table-column column-width="10%"/>
253
                <fo:table-body>
254
                    <fo:table-row >
255
                        <fo:table-cell
256
                                       padding="2px"
257
                                       background-color="{$backcolor}"
258
                                       display-align="center">
259
                            <fo:block
260
                                    font-size="12px"
261
                                    font-weight="bold"
262
                                    margin-top="{$marginTop}"
263
                                    text-align="left"
264
                                    >
265
                                <xsl:value-of select="$text"/>
266
                            </fo:block>
267
                        </fo:table-cell>
268
                        <fo:table-cell   display-align="center" text-align="right" padding-right="5px">
269
                            <fo:block>
270
                            <xsl:if test="$icon">
271
 
272
                                <fo:external-graphic height="auto" width="auto"
273
                                                     content-height="20">
274
                                    <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
275
                                    <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/<xsl:value-of select="$icon"/>')
276
                                    </xsl:attribute>
277
                                </fo:external-graphic>
278
 
279
                            </xsl:if>
280
                            </fo:block>
281
                        </fo:table-cell>
282
                    </fo:table-row>
283
                </fo:table-body>
284
            </fo:table>
1553 jmachado 285
        </fo:block>
286
    </xsl:template>
1551 jmachado 287
 
1557 jmachado 288
 
289
 
290
 
1553 jmachado 291
    <xsl:template name="subSeccao">
292
        <xsl:param name="text"/>
1557 jmachado 293
        <xsl:param name="marginTop">8px</xsl:param>
294
        <xsl:call-template name="subSeccaoGen">
295
            <xsl:with-param name="text" select="$text"/>
296
            <xsl:with-param name="marginTop" select="$marginTop"/>
297
            <xsl:with-param name="backcolor">#D6D9BC</xsl:with-param>
298
        </xsl:call-template>
299
    </xsl:template>
300
 
301
    <xsl:template name="subSeccaoGreen">
302
        <xsl:param name="text"/>
303
        <xsl:param name="marginTop">8px</xsl:param>
304
        <xsl:call-template name="subSeccaoGen">
305
            <xsl:with-param name="text" select="$text"/>
306
            <xsl:with-param name="marginTop" select="$marginTop"/>
307
            <xsl:with-param name="backcolor">#D0FCCD</xsl:with-param>
308
        </xsl:call-template>
309
    </xsl:template>
310
    <xsl:template name="subSeccaoBlue">
311
        <xsl:param name="text"/>
312
        <xsl:param name="marginTop">8px</xsl:param>
313
        <xsl:call-template name="subSeccaoGen">
314
            <xsl:with-param name="text" select="$text"/>
315
            <xsl:with-param name="marginTop" select="$marginTop"/>
316
            <xsl:with-param name="backcolor">#CFF6FE</xsl:with-param>
317
        </xsl:call-template>
318
    </xsl:template>
319
 
320
    <xsl:template name="subSeccaoGen">
321
        <xsl:param name="text"/>
322
        <xsl:param name="marginTop">8px</xsl:param>
323
        <xsl:param name="backcolor"></xsl:param>
324
        <fo:block font-size="10px"
1553 jmachado 325
                  padding-top="3px"
326
                  padding-bottom="3px"
327
                  padding-left="5px"
1557 jmachado 328
                  margin-left="10px"
1554 jmachado 329
                  margin-top="{$marginTop}"
1553 jmachado 330
                  margin-bottom="20px"
331
                  text-align="left"
1557 jmachado 332
                  background-color="{$backcolor}">
1553 jmachado 333
            <xsl:value-of select="$text"/>
334
        </fo:block>
335
    </xsl:template>
336
 
1554 jmachado 337
    <xsl:template name="subSubSeccao">
338
        <xsl:param name="text"/>
339
        <fo:block font-size="8px"
340
                  padding-top="0"
341
                  padding-bottom="0"
342
                  padding-left="25px"
343
                  margin-top="0"
344
                  margin-bottom="5px"
345
                  text-align="left"
346
                  font-weight="bold">
347
            <xsl:value-of select="$text"/>
348
        </fo:block>
349
    </xsl:template>
350
 
1549 jmachado 351
    <xsl:template name="page">
352
        <fo:static-content flow-name="header">
1551 jmachado 353
            <xsl:call-template name="headerTeacher"/>
354
        </fo:static-content>
355
        <fo:static-content flow-name="footer">
356
            <xsl:call-template name="footerDefault"/>
357
        </fo:static-content>
1549 jmachado 358
 
1551 jmachado 359
        <fo:flow flow-name="body">
1557 jmachado 360
            <fo:block-container padding="0" margin="0" border="0" id="capParticipacao" page-break-before="always">
1553 jmachado 361
                <xsl:call-template name="seccao">
362
                    <xsl:with-param name="text">1 - Participação</xsl:with-param>
1554 jmachado 363
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1553 jmachado 364
                </xsl:call-template>
365
            </fo:block-container>
366
 
1557 jmachado 367
 
1553 jmachado 368
            <xsl:call-template name="subSeccao">
369
                <xsl:with-param name="text">Taxa Global de Participação aos Questionários do Docente</xsl:with-param>
370
            </xsl:call-template>
371
 
1557 jmachado 372
 
1553 jmachado 373
            <fo:block-container font-size="18" text-align="center" font-weight="bold">
374
                <xsl:call-template name="barraPercentil">
375
                    <xsl:with-param name="valor" select="//questionariosReqRespondidosPercentagem"/>
376
                    <xsl:with-param name="colors">true</xsl:with-param>
377
                </xsl:call-template>
378
            </fo:block-container>
379
 
380
 
381
 
382
            <fo:block  margin-left="10px">
383
 
384
 
385
                <fo:table width="100%" table-layout="fixed">
386
                    <fo:table-column column-width="50%"/>
387
                    <fo:table-column column-width="50%"/>
388
                    <fo:table-body>
389
                        <fo:table-row>
390
                            <fo:table-cell>
391
 
392
 
393
                                <xsl:call-template name="subSeccao">
394
                                    <xsl:with-param name="text">
395
                                        Taxa de Participação
396
                                    </xsl:with-param>
397
                                </xsl:call-template>
398
                                <fo:block>
399
                                    <fo:external-graphic width="auto" height="auto" content-height="140">
400
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
401
                                        <xsl:attribute name="src"><xsl:value-of select="//pathGraficoTaxaRespostaAlunos"/>
402
                                        </xsl:attribute>
403
                                    </fo:external-graphic>
404
                                </fo:block>
405
 
406
                            </fo:table-cell>
407
                            <fo:table-cell>
408
 
409
                                <xsl:call-template name="subSeccao">
410
                                    <xsl:with-param name="text">
411
                                        Taxa de Resposta a Questionarios
412
                                    </xsl:with-param>
413
                                </xsl:call-template>
414
                                <fo:block>
415
                                    <fo:external-graphic width="auto" height="auto" content-height="140">
416
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
417
                                        <xsl:attribute name="src"><xsl:value-of select="//pathGraficoTaxaRespostaQuestionarios"/></xsl:attribute>
418
                                    </fo:external-graphic>
419
                                </fo:block>
420
 
421
                            </fo:table-cell>
422
                        </fo:table-row>
423
                        <fo:table-row>
424
                            <fo:table-cell number-columns-spanned="2">
425
 
426
                                <xsl:call-template name="subSeccao">
427
                                    <xsl:with-param name="text">
428
                                        Taxa de Participação por Unidade Curricular
429
                                    </xsl:with-param>
430
                                </xsl:call-template>
431
                                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
1554 jmachado 432
                                    <xsl:apply-templates select="//tabelaTaxaRespostaUnidade" mode="DataTable">
433
                                        <xsl:with-param name="firstColPercentSize">60%</xsl:with-param>
434
                                    </xsl:apply-templates>
1553 jmachado 435
                                </fo:block>
436
                            </fo:table-cell>
437
                        </fo:table-row>
438
                    </fo:table-body>
439
                </fo:table>
1551 jmachado 440
            </fo:block>
441
 
1553 jmachado 442
 
443
            <fo:block-container page-break-before="always" padding="0" margin="0" id="capCaracterizacao">
444
                <xsl:call-template name="seccao">
1554 jmachado 445
                    <xsl:with-param name="text">2 - Caracterização da Amostra Recolhida</xsl:with-param>
446
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1553 jmachado 447
                </xsl:call-template>
448
            </fo:block-container>
449
 
450
 
451
 
452
 
453
 
454
 
1551 jmachado 455
            <fo:block text-align="center" margin-left="10px">
456
                <fo:table width="100%" table-layout="fixed">
1549 jmachado 457
                    <fo:table-column column-width="50%"/>
458
                    <fo:table-column column-width="50%"/>
459
                    <fo:table-body>
460
                        <fo:table-row>
461
                            <fo:table-cell>
462
 
1553 jmachado 463
                                <xsl:call-template name="subSeccao">
464
                                    <xsl:with-param name="text">
465
                                        Género
466
                                    </xsl:with-param>
467
                                </xsl:call-template>
1551 jmachado 468
 
1553 jmachado 469
                                <fo:block>
470
                                    <fo:table width="90%" table-layout="fixed" >
1551 jmachado 471
                                        <fo:table-column column-width="50%"/>
472
                                        <fo:table-column column-width="50%"/>
473
                                        <fo:table-body>
474
                                            <fo:table-row>
475
                                                <fo:table-cell>
476
                                                    <fo:block>
1553 jmachado 477
                                                        <xsl:value-of select="//masculinoComResposta"/>
1551 jmachado 478
                                                    </fo:block>
479
                                                    <fo:block>
480
                                                        <fo:external-graphic height="auto" width="auto"
1553 jmachado 481
                                                                             content-height="120">
1551 jmachado 482
                                                            <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
483
                                                            <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/studentMale.png')
484
                                                            </xsl:attribute>
485
                                                        </fo:external-graphic>
486
                                                    </fo:block>
487
                                                    <fo:block>
1553 jmachado 488
                                                        <xsl:value-of select="//masculinoComRespostaPercent"/>%
1551 jmachado 489
                                                    </fo:block>
490
                                                </fo:table-cell>
491
                                                <fo:table-cell>
492
                                                    <fo:block>
1553 jmachado 493
                                                        <xsl:value-of select="//femininoComResposta"/>
1551 jmachado 494
                                                    </fo:block>
495
                                                    <fo:block>
496
                                                        <fo:external-graphic height="auto" width="auto"
1553 jmachado 497
                                                                             content-height="120">
1551 jmachado 498
                                                            <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
499
                                                            <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/studentFemale.png')
500
                                                            </xsl:attribute>
501
                                                        </fo:external-graphic>
502
                                                    </fo:block>
503
                                                    <fo:block>
1553 jmachado 504
                                                        <xsl:value-of select="//femininoComRespostaPercent"/>%
1551 jmachado 505
                                                    </fo:block>
506
                                                </fo:table-cell>
507
                                            </fo:table-row>
508
                                        </fo:table-body>
509
                                    </fo:table>
1553 jmachado 510
                                </fo:block>
1551 jmachado 511
 
512
 
513
 
1549 jmachado 514
                            </fo:table-cell>
515
                            <fo:table-cell>
1553 jmachado 516
 
517
 
518
 
519
 
520
                                <xsl:call-template name="subSeccao">
521
                                    <xsl:with-param name="text">
522
                                        Tipos de Alunos
523
                                    </xsl:with-param>
524
                                </xsl:call-template>
525
 
526
                                <fo:block margin-top="5px">
527
                                    <fo:external-graphic width="auto" height="auto" content-width="250" content-height="150">
1551 jmachado 528
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1553 jmachado 529
                                        <xsl:attribute name="src"><xsl:value-of select="//pathGraficoTiposAlunosComResposta"/>
530
                                        </xsl:attribute>
1551 jmachado 531
                                    </fo:external-graphic>
1549 jmachado 532
                                </fo:block>
1553 jmachado 533
 
534
 
535
 
1549 jmachado 536
                            </fo:table-cell>
537
 
538
                        </fo:table-row>
1553 jmachado 539
                        <fo:table-row>
540
                            <fo:table-cell>
1549 jmachado 541
 
1553 jmachado 542
                                <xsl:call-template name="subSeccao">
543
                                    <xsl:with-param name="text">
544
                                        Idades
545
                                    </xsl:with-param>
546
                                </xsl:call-template>
547
 
548
                                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
549
                                    <xsl:apply-templates select="//tabelaIdades" mode="DataTable"/>
550
                                </fo:block>
551
 
552
                            </fo:table-cell>
553
                            <fo:table-cell>
554
 
555
                                <xsl:call-template name="subSeccao">
556
                                    <xsl:with-param name="text">
557
                                        Distritos
558
                                    </xsl:with-param>
559
                                </xsl:call-template>
560
 
561
 
562
                                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
1554 jmachado 563
                                    <xsl:apply-templates select="//tabelaDistritos" mode="DataTable">
564
                                        <xsl:with-param name="firstColPercentSize">30%</xsl:with-param>
565
                                    </xsl:apply-templates>
1553 jmachado 566
                                </fo:block>
567
 
568
                            </fo:table-cell>
569
 
570
                        </fo:table-row>
571
 
1549 jmachado 572
                    </fo:table-body>
573
                </fo:table>
1553 jmachado 574
            </fo:block>
1549 jmachado 575
 
1553 jmachado 576
 
577
 
578
            <fo:block-container padding="0" margin="0" id="capQuestoes" page-break-before="always">
1557 jmachado 579
                <xsl:call-template name="seccaoBlue">
1553 jmachado 580
                    <xsl:with-param name="text">3 - Análise das Questões sobre o Docente</xsl:with-param>
1554 jmachado 581
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1557 jmachado 582
                    <xsl:with-param name="icon">teacherIcon.png</xsl:with-param>
1553 jmachado 583
                </xsl:call-template>
584
            </fo:block-container>
585
 
1557 jmachado 586
            <fo:block-container padding="0" margin="0">
587
            <xsl:call-template name="subSeccaoBlue">
1554 jmachado 588
                <xsl:with-param name="text">3.1 - Gráficos de respostas agregadas de todas as unidades do docente</xsl:with-param>
1557 jmachado 589
                <xsl:with-param name="marginTop">2px</xsl:with-param>
1554 jmachado 590
            </xsl:call-template>
1557 jmachado 591
            </fo:block-container>
1553 jmachado 592
 
1554 jmachado 593
            <xsl:apply-templates select="//respostasAgregadasCharts/respostasChartsRow" mode="graficosPerguntas"/>
1553 jmachado 594
 
1557 jmachado 595
            <fo:block-container padding="0" margin="0"  page-break-before="always">
596
                <xsl:call-template name="seccaoBlue">
597
                    <xsl:with-param name="text">3 - Análise das Questões sobre o Docente</xsl:with-param>
1554 jmachado 598
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1557 jmachado 599
                    <xsl:with-param name="icon">teacherIcon.png</xsl:with-param>
1554 jmachado 600
                </xsl:call-template>
601
            </fo:block-container>
1557 jmachado 602
 
603
            <xsl:call-template name="subSeccaoBlue">
604
                <xsl:with-param name="text">3.2 - Tabela de respostas agregadas de todas as unidades do docente</xsl:with-param>
605
                <xsl:with-param name="marginTop">2px</xsl:with-param>
606
            </xsl:call-template>
607
 
1554 jmachado 608
            <fo:block text-align="center" margin="0" font-size="10" font-weight="normal" >
609
                <xsl:apply-templates select="//respostasTable" mode="DataTable">
610
                    <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
611
                </xsl:apply-templates>
612
            </fo:block>
613
            <fo:block text-align="right" margin-top="10px" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
614
                Docentes avaliados nos cursos onde o docente leciona: <xsl:value-of select="//docentesNosCursos"/>
615
            </fo:block>
616
            <fo:block text-align="right" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
617
                Docentes avaliados nas escolas onde o docente leciona: <xsl:value-of select="//docentesNasEscolas"/>
618
            </fo:block>
1553 jmachado 619
 
1557 jmachado 620
            <fo:block-container margin-top="20px" margin-bottom="5px">
1554 jmachado 621
                <xsl:apply-templates select="//mediasGrupoDocente" mode="mediasGrupo">
622
                    <xsl:with-param name="objetoAvaliacao">do docente</xsl:with-param>
623
                </xsl:apply-templates>
624
            </fo:block-container>
1553 jmachado 625
 
1554 jmachado 626
            <!--Considerando Respostas Superiores a 2 segindos-->
1557 jmachado 627
            <fo:block-container background-color="#aaaaaa" padding="5px" margin="0" margin-top="20px">
1554 jmachado 628
                <fo:block-container padding="0" margin="0">
629
                    <xsl:call-template name="subSubSeccao">
630
                        <xsl:with-param name="text">Considerando apenas respostas de tempo superior a 2 segundos (Estes dados são apenas para efeitos de comparação)</xsl:with-param>
631
                    </xsl:call-template>
632
                </fo:block-container>
633
 
634
                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
635
                    <xsl:apply-templates select="//respostasTableGt2Secs" mode="DataTable">
636
                        <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
637
                    </xsl:apply-templates>
638
                </fo:block>
639
            </fo:block-container>
640
 
641
 
642
 
643
 
644
 
645
            <!--#######################################-->
646
            <!-- RESPOSTAS AGREGADAS DAS UNIDADES CURRICULARES -->
647
 
648
            <fo:block-container padding="0" margin="0" id="capQuestoesUnidades" page-break-before="always">
1557 jmachado 649
                <xsl:call-template name="seccaoGreen">
1554 jmachado 650
                    <xsl:with-param name="text">4 - Análise das questões relativas ao grupo unidade para as unidades do docente</xsl:with-param>
651
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1557 jmachado 652
                    <xsl:with-param name="icon">cadeiraConteudos.png</xsl:with-param>
1554 jmachado 653
                </xsl:call-template>
654
            </fo:block-container>
655
 
1557 jmachado 656
            <xsl:call-template name="subSeccaoGreen">
1554 jmachado 657
                <xsl:with-param name="text">4.1 - Gráficos de respostas agregadas de todas as unidades</xsl:with-param>
1557 jmachado 658
                <xsl:with-param name="marginTop">2px</xsl:with-param>
1554 jmachado 659
            </xsl:call-template>
660
 
661
            <xsl:apply-templates select="//respostasAgregadasUnidadesCharts/respostasChartsRow" mode="graficosPerguntas"/>
662
 
663
 
664
            <fo:block-container padding="0" margin="0" page-break-before="always">
1557 jmachado 665
                <xsl:call-template name="seccaoGreen">
666
                    <xsl:with-param name="text">4 - Análise das questões relativas ao grupo unidade para as unidades do docente</xsl:with-param>
1554 jmachado 667
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1557 jmachado 668
                    <xsl:with-param name="icon">cadeiraConteudos.png</xsl:with-param>
1554 jmachado 669
                </xsl:call-template>
670
            </fo:block-container>
671
 
1557 jmachado 672
            <xsl:call-template name="subSeccaoGreen">
673
                <xsl:with-param name="text">4.2 - Tabela de respostas agregadas de todas as unidades do docente</xsl:with-param>
674
                <xsl:with-param name="marginTop">2px</xsl:with-param>
675
            </xsl:call-template>
676
 
677
 
1554 jmachado 678
            <fo:block text-align="center" margin="0" font-size="10" font-weight="normal" >
679
                <xsl:apply-templates select="//respostasUnidadesTable" mode="DataTable">
680
                    <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
681
                </xsl:apply-templates>
682
            </fo:block>
683
 
684
            <fo:block text-align="right" margin-top="10px" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
685
                Unidades avaliadas nos cursos onde o docente leciona: <xsl:value-of select="//unidadesNosCursos"/>
686
            </fo:block>
687
            <fo:block text-align="right" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
688
                Unidades avaliadas nas escolas onde o docente leciona: <xsl:value-of select="//unidadesNasEscolas"/>
689
            </fo:block>
690
 
1557 jmachado 691
            <fo:block-container margin-top="20px" margin-bottom="5px">
1554 jmachado 692
                <xsl:apply-templates select="//mediasGrupoUnidades" mode="mediasGrupo">
693
                    <xsl:with-param name="objetoAvaliacao">das unidades</xsl:with-param>
694
                </xsl:apply-templates>
695
            </fo:block-container>
696
 
1557 jmachado 697
            <!--Considerando Respostas Superiores a 2 segindos-->
698
            <fo:block-container background-color="#aaaaaa" padding="5px" margin="0" margin-top="20px">
699
                <fo:block-container padding="0" margin="0">
700
                    <xsl:call-template name="subSubSeccao">
701
                        <xsl:with-param name="text">Considerando apenas respostas de tempo superior a 2 segundos (Estes dados são apenas para efeitos de comparação)</xsl:with-param>
702
                    </xsl:call-template>
703
                </fo:block-container>
704
 
705
                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
706
                    <xsl:apply-templates select="//respostasUnidadesTableGt2Secs" mode="DataTable">
707
                        <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
708
                    </xsl:apply-templates>
709
                </fo:block>
710
            </fo:block-container>
711
 
1551 jmachado 712
        </fo:flow>
713
    </xsl:template>
1549 jmachado 714
 
1554 jmachado 715
    <xsl:template match="*" mode="graficosPerguntas">
716
        <fo:block text-align="center" margin-left="10px">
717
            <fo:table width="100%" table-layout="fixed">
718
                <xsl:for-each select="./respostasChartsRow[1]/respostasChart/respostasChart">
719
                    <fo:table-column/>
720
                </xsl:for-each>
721
                <fo:table-body>
722
                    <xsl:for-each select="./respostasChartsRow">
723
                        <fo:table-row>
724
                            <xsl:for-each select="./respostasChart/respostasChart">
725
                                <fo:table-cell>
726
                                    <fo:block>
727
                                        <fo:external-graphic
728
                                                width="100%"
729
                                                content-height="100%"
730
                                                content-width="scale-to-fit"
731
                                                scaling="uniform"
732
                                                >
733
                                            <xsl:attribute name="src">url('<xsl:value-of select="./tempFile"/>')
734
                                            </xsl:attribute>
735
                                        </fo:external-graphic>
736
                                    </fo:block>
737
                                </fo:table-cell>
738
                            </xsl:for-each>
739
                        </fo:table-row>
740
                    </xsl:for-each>
1549 jmachado 741
 
1554 jmachado 742
                </fo:table-body>
743
            </fo:table>
744
        </fo:block>
1553 jmachado 745
 
1554 jmachado 746
        <fo:block-container margin-top="20px">
747
            <xsl:call-template name="legendaCoresPerguntas"/>
748
        </fo:block-container>
749
    </xsl:template>
1553 jmachado 750
 
1554 jmachado 751
    <xsl:template match="*" mode="mediasGrupo">
752
        <xsl:param name="objetoAvaliacao"/>
753
        <fo:block>
754
 
755
            <fo:table width="100%" table-layout="fixed" font-size="10pt" font-weight="normal">
756
                <fo:table-column column-width="60%"/>
757
                <fo:table-column column-width="40%"/>
758
                <fo:table-body>
759
                    <fo:table-row>
760
                        <fo:table-cell display-align="center" text-align="center" padding-right="10px" >
761
                            <xsl:apply-templates select="." mode="globalSmile">
762
                                <xsl:with-param name="objetoAvaliacao" select="$objetoAvaliacao"/>
763
                            </xsl:apply-templates>
764
                        </fo:table-cell>
765
                        <fo:table-cell display-align="center" text-align="center" padding-left="10px">
766
                            <fo:block>
767
                                <xsl:apply-templates select="./mediasGlobaisTable" mode="DataTable"/>
768
                            </fo:block>
769
                        </fo:table-cell>
770
                    </fo:table-row>
771
                </fo:table-body>
772
            </fo:table>
773
 
774
        </fo:block>
775
    </xsl:template>
776
 
777
 
778
 
779
    <xsl:template match="*" mode="globalSmile">
780
        <xsl:param name="objetoAvaliacao"></xsl:param>
781
        <fo:block>
782
            <fo:table width="100%" table-layout="fixed" font-size="10pt" font-weight="normal">
783
                <fo:table-column column-width="30%"/>
784
                <fo:table-column/>
785
                <fo:table-column/>
786
                <fo:table-column/>
787
                <fo:table-column/>
788
                <fo:table-column/>
789
                <fo:table-body>
790
                    <fo:table-row>
791
                        <fo:table-cell text-align="center" >
792
                            <fo:block>
793
 
794
                            </fo:block>
795
                        </fo:table-cell>
796
                        <fo:table-cell text-align="center" >
797
                            <fo:block>
798
                                <fo:external-graphic height="auto" width="auto"
799
                                                     content-height="30">
800
                                    <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
801
                                    <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/sad.png')
802
                                    </xsl:attribute>
803
                                </fo:external-graphic>
804
                            </fo:block>
805
                        </fo:table-cell>
806
                        <fo:table-cell>
807
                            <fo:block></fo:block>
808
                        </fo:table-cell>
809
                        <fo:table-cell text-align="center" >
810
                            <fo:block>
811
                                <fo:external-graphic height="auto" width="auto"
812
                                                     content-height="30">
813
                                    <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
814
                                    <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/indiferent.png')
815
                                    </xsl:attribute>
816
                                </fo:external-graphic>
817
                            </fo:block>
818
                        </fo:table-cell>
819
                        <fo:table-cell>
820
                            <fo:block></fo:block>
821
                        </fo:table-cell>
822
                        <fo:table-cell text-align="center" >
823
                            <fo:block>
824
                                <fo:external-graphic height="auto" width="auto"
825
                                                     content-height="30">
826
                                    <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
827
                                    <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/smile.png')
828
                                    </xsl:attribute>
829
                                </fo:external-graphic>
830
                            </fo:block>
831
                        </fo:table-cell>
832
                    </fo:table-row>
833
                    <fo:table-row border="2px solid black">
834
                        <fo:table-cell display-align="center" background-color="{$backgroundHeader}" text-align="center" padding="2px" border="2px solid black" font-size="7pt">
835
                            <fo:block>Avaliação média <xsl:value-of select="$objetoAvaliacao"/> em todas as questões</fo:block>
836
                        </fo:table-cell>
837
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
838
                            <xsl:if test="./avaliacaoMediaArredondada=1">
839
                                <xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
840
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
841
                            </xsl:if>
842
                            <fo:block>1</fo:block>
843
                        </fo:table-cell>
844
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
845
                            <xsl:if test="//avaliacaoMediaArredondada=2">
846
                                <xsl:attribute name="background-color"><xsl:value-of select="//colorMedia"/></xsl:attribute>
847
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
848
                            </xsl:if>
849
                            <fo:block>2</fo:block>
850
                        </fo:table-cell>
851
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
852
                            <xsl:if test="//avaliacaoMediaArredondada=3">
853
                                <xsl:attribute name="background-color"><xsl:value-of select="//colorMedia"/></xsl:attribute>
854
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
855
                            </xsl:if>
856
                            <fo:block>3</fo:block>
857
                        </fo:table-cell>
858
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
859
                            <xsl:if test="//avaliacaoMediaArredondada=4">
860
                                <xsl:attribute name="background-color"><xsl:value-of select="//colorMedia"/></xsl:attribute>
861
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
862
                            </xsl:if>
863
                            <fo:block>4</fo:block>
864
                        </fo:table-cell>
865
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
866
                            <xsl:if test="//avaliacaoMediaArredondada=5">
867
                                <xsl:attribute name="background-color"><xsl:value-of select="//colorMedia"/></xsl:attribute>
868
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
869
                            </xsl:if>
870
                            <fo:block>5</fo:block>
871
                        </fo:table-cell>
872
                    </fo:table-row>
873
                </fo:table-body>
874
            </fo:table>
875
        </fo:block>
876
    </xsl:template>
877
 
878
    <xsl:template name="legendaCoresPerguntas">
879
        <fo:block>
880
            <fo:table width="100%" table-layout="fixed" font-size="6.5pt" font-weight="normal">
881
                <fo:table-column column-width="50"/>
882
                <fo:table-column/>
883
 
884
                <fo:table-body>
885
                    <fo:table-row>
886
                        <fo:table-cell padding="2pt" number-columns-spanned="2">
887
                            <fo:block text-align="left" font-weight="bold">Legenda de Cores:</fo:block>
888
                        </fo:table-cell>
889
                    </fo:table-row>
890
                    <fo:table-row>
891
                        <fo:table-cell background-color="rgb(253, 11, 0)" padding="2pt">
892
                            <fo:block text-align="center">1</fo:block>
893
                        </fo:table-cell>
894
                        <fo:table-cell padding="2pt" ><fo:block>O estudante avaliou a questão como Nada Satisfeito</fo:block></fo:table-cell>
895
                    </fo:table-row>
896
                    <fo:table-row>
897
                        <fo:table-cell background-color="rgb(255, 190, 0)" padding="2pt">
898
                            <fo:block text-align="center">2</fo:block>
899
                        </fo:table-cell>
900
                        <fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão como Pouco Satisfeito</fo:block></fo:table-cell>
901
                    </fo:table-row>
902
                    <fo:table-row>
903
                        <fo:table-cell background-color="rgb(255, 254, 0)" padding="2pt">
904
                            <fo:block text-align="center">3</fo:block>
905
                        </fo:table-cell>
906
                        <fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão Satisfeito</fo:block></fo:table-cell>
907
                    </fo:table-row>
908
                    <fo:table-row>
909
                        <fo:table-cell background-color="rgb(188, 255, 0)" padding="2pt">
910
                            <fo:block text-align="center">4</fo:block>
911
                        </fo:table-cell>
912
                        <fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão bastante Satisfeito que corresponde a Bom</fo:block></fo:table-cell>
913
                    </fo:table-row>
914
                    <fo:table-row>
915
                        <fo:table-cell background-color="rgb(32, 255, 5)" padding="2pt">
916
                            <fo:block text-align="center">5</fo:block>
917
                        </fo:table-cell>
918
                        <fo:table-cell padding="2pt"><fo:block>O Estudante avaliou o docente com nota máxima de Muito Satisfeito</fo:block></fo:table-cell>
919
                    </fo:table-row>
920
                </fo:table-body>
921
            </fo:table>
922
        </fo:block>
923
    </xsl:template>
924
 
925
 
926
 
1553 jmachado 927
    <xsl:template name="barraPercentil">
928
        <xsl:param name="valor"/>
929
        <xsl:param name="colors">false</xsl:param>
1554 jmachado 930
        <fo:block-container margin="1px" border="1px solid #C6C6CA" padding="0">
1553 jmachado 931
            <xsl:choose>
932
                <xsl:when test="$colors = 'false'">
933
                    <xsl:attribute name="border">1px solid #C6C6CA</xsl:attribute>
934
                </xsl:when>
935
                <xsl:otherwise>
1554 jmachado 936
                    <xsl:attribute name="border">1px solid #FFEAAE</xsl:attribute>
1553 jmachado 937
                </xsl:otherwise>
938
            </xsl:choose>
1554 jmachado 939
            <fo:block-container border="1px solid #C6C6CA" margin="0" padding-top="1px" padding-bottom="0">
1553 jmachado 940
                <xsl:choose>
941
                    <xsl:when test="$colors = 'false'">
942
                        <xsl:attribute name="background-color">#B9F1B1</xsl:attribute>
943
 
944
                    </xsl:when>
945
                    <xsl:otherwise>
946
 
947
                        <xsl:choose>
948
                            <xsl:when test="$valor &lt; 25">
949
                                <xsl:attribute name="background-color">red</xsl:attribute>
950
                            </xsl:when>
951
                            <xsl:when test="$valor &lt; 40"><xsl:attribute name="background-color">orange</xsl:attribute></xsl:when>
952
                            <xsl:when test="$valor &lt; 55"><xsl:attribute name="background-color">yellow</xsl:attribute></xsl:when>
953
                            <xsl:otherwise>
954
                                <xsl:attribute name="background-color">#B9F1B1</xsl:attribute>
955
                            </xsl:otherwise>
956
                        </xsl:choose>
957
                    </xsl:otherwise>
958
                </xsl:choose>
959
                <xsl:attribute name="width"><xsl:value-of select="$valor"/>%</xsl:attribute>
960
                <fo:block><xsl:value-of select="$valor"/>%</fo:block>
961
            </fo:block-container>
962
        </fo:block-container>
963
    </xsl:template>
964
 
1554 jmachado 965
    <xsl:template name="barraPercentilDefined">
966
        <xsl:param name="valor"/>
967
        <xsl:param name="percentDefined"/>
968
        <xsl:param name="colors">false</xsl:param>
1553 jmachado 969
 
1554 jmachado 970
        <fo:block-container margin="1px" border="1px solid #C6C6CA" padding="0">
971
 
972
            <fo:block-container border="1px solid #C6C6CA" margin="0" padding-top="1px" padding-bottom="0">
973
                <xsl:choose>
974
                    <xsl:when test="$colors = 'false'">
975
                        <xsl:attribute name="border">1px solid #8D7F5C</xsl:attribute>
976
                        <xsl:attribute name="background-color">#B9F1B1</xsl:attribute>
977
 
978
                    </xsl:when>
979
                    <xsl:otherwise>
980
 
981
                        <xsl:choose>
982
                            <xsl:when test="percentDefined &lt; 25">
983
                                <xsl:attribute name="border">1px solid #B10000</xsl:attribute>
984
                                <xsl:attribute name="background-color">red</xsl:attribute>
985
                            </xsl:when>
986
                            <xsl:when test="percentDefined &lt; 40">
987
                                <xsl:attribute name="border">1px solid #B85C00</xsl:attribute>
988
                                <xsl:attribute name="background-color">orange</xsl:attribute>
989
                            </xsl:when>
990
                            <xsl:when test="percentDefined &lt; 55">
991
                                <xsl:attribute name="border">1px solid #868600</xsl:attribute>
992
                                <xsl:attribute name="background-color">yellow</xsl:attribute>
993
                            </xsl:when>
994
                            <xsl:otherwise>
995
                                <xsl:attribute name="border">1px solid #157C00</xsl:attribute>
996
                                <xsl:attribute name="background-color">#24DD01</xsl:attribute>
997
                            </xsl:otherwise>
998
                        </xsl:choose>
999
                    </xsl:otherwise>
1000
                </xsl:choose>
1001
                <xsl:attribute name="width"><xsl:value-of select="$percentDefined"/>%</xsl:attribute>
1002
                <fo:block><xsl:value-of select="$valor"/></fo:block>
1003
            </fo:block-container>
1004
        </fo:block-container>
1005
    </xsl:template>
1006
 
1007
 
1551 jmachado 1008
    <xsl:template name="footerDefault">
1009
        <fo:table width="100%" table-layout="fixed" border-top="1px solid black" font-size="6.5pt">
1010
            <fo:table-column column-width="20%"/>
1011
            <fo:table-column column-width="80%"/>
1549 jmachado 1012
 
1013
 
1551 jmachado 1014
            <fo:table-body>
1015
                <fo:table-row>
1016
                    <fo:table-cell padding-top="3pt">
1017
                        <fo:block>
1018
                            Atualizado a
1553 jmachado 1019
                            <xsl:value-of select="$updateDate"/> / Página
1551 jmachado 1020
                            <fo:page-number/>
1021
                        </fo:block>
1022
                        <fo:block font-size="5pt">
1023
                            IPP.AC.xxxx.1
1024
                        </fo:block>
1025
 
1026
                    </fo:table-cell>
1027
                    <fo:table-cell padding-top="3pt">
1028
                        <fo:block font-size="6pt" text-align="right">
1553 jmachado 1029
                            http://pae.ipportalegre.pt | gerado pela plataforma ipp-pae® 2016
1551 jmachado 1030
                        </fo:block>
1031
                    </fo:table-cell>
1032
                </fo:table-row>
1033
            </fo:table-body>
1034
        </fo:table>
1035
    </xsl:template>
1036
    <xsl:template name="headerTeacher">
1037
        <fo:block text-align="left" border-bottom="1px solid #58585A">
1038
            <fo:table width="100%" table-layout="fixed" >
1549 jmachado 1039
                <fo:table-column column-width="80%"/>
1551 jmachado 1040
                <fo:table-column column-width="20%"/>
1549 jmachado 1041
 
1042
 
1043
                <fo:table-body>
1044
                    <fo:table-row>
1551 jmachado 1045
                        <fo:table-cell>
1549 jmachado 1046
                            <fo:block>
1551 jmachado 1047
                                <fo:external-graphic height="auto" width="auto"
1048
                                                     content-height="40">
1049
                                    <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1553 jmachado 1050
                                    <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/layout/themes/ipp/logo.jpg')
1551 jmachado 1051
                                    </xsl:attribute>
1052
                                </fo:external-graphic>
1549 jmachado 1053
                            </fo:block>
1551 jmachado 1054
                            <fo:block font-size="10px" padding="0px" text-align="left">
1553 jmachado 1055
                                <fo:inline font-weight="bold"> Relatório de Avaliação Pedagógica</fo:inline>
1549 jmachado 1056
                            </fo:block>
1551 jmachado 1057
                            <fo:block  font-size="10px" padding="0px" margin-top="0px" text-align="left" >
1553 jmachado 1058
                                <fo:inline>Avaliação pelos alunos do docente:</fo:inline>
1551 jmachado 1059
                            </fo:block>
1060
                        </fo:table-cell>
1061
                        <fo:table-cell>
1062
                            <fo:block font-size="10px" text-align="right" >
1553 jmachado 1063
                                Resultados dos Inquéritos Pedagógicos
1551 jmachado 1064
                            </fo:block>
1065
                            <fo:block font-size="10px" padding="0px" margin-top="0px" text-align="right" >
1066
                                <fo:inline font-weight="bold">Ano letivo:</fo:inline> <xsl:value-of select="$anoLectivo"/>
1067
                            </fo:block>
1068
                        </fo:table-cell>
1549 jmachado 1069
 
1551 jmachado 1070
                    </fo:table-row>
1071
                    <fo:table-row background-color="#fff9ea">
1072
                        <fo:table-cell>
1073
                            <fo:block font-size="12px" padding="2px" margin-top="0px" >
1553 jmachado 1074
                                <fo:inline text-align="left"><xsl:value-of select="$nomeDocente"/> / Número: <xsl:value-of select="$numeroDocente"/></fo:inline>
1551 jmachado 1075
                            </fo:block>
1549 jmachado 1076
                        </fo:table-cell>
1551 jmachado 1077
                        <fo:table-cell>
1078
                            <fo:block font-size="12px" padding="2px" margin-top="0px" text-align="right" >
1079
                                <fo:inline>Pagina: <fo:page-number/></fo:inline>
1549 jmachado 1080
                            </fo:block>
1081
                        </fo:table-cell>
1551 jmachado 1082
 
1549 jmachado 1083
                    </fo:table-row>
1551 jmachado 1084
 
1549 jmachado 1085
                </fo:table-body>
1086
            </fo:table>
1087
 
1088
 
1089
 
1090
 
1551 jmachado 1091
        </fo:block>
1549 jmachado 1092
    </xsl:template>
1093
 
1094
 
1554 jmachado 1095
    <xsl:variable name="backgroundHeader">#FFEAAE</xsl:variable>
1096
    <xsl:variable name="backgroundNormal">#FFFFFF</xsl:variable>
1097
    <xsl:variable name="backgroundFooter">#FFEAAE</xsl:variable>
1098
    <xsl:variable name="borderInHeader">2px solid black</xsl:variable>
1099
    <xsl:variable name="borderInCell">1px dashed black</xsl:variable>
1100
    <xsl:variable name="borderInFooter">2px solid black</xsl:variable>
1101
    <xsl:variable name="borderInCellVertical">1px solid black</xsl:variable>
1102
    <xsl:variable name="borderTable">2px solid black</xsl:variable>
1103
 
1553 jmachado 1104
    <xsl:template match="*" mode="DataTable">
1554 jmachado 1105
        <xsl:param name="firstColPercentSize"></xsl:param>
1106
 
1107
 
1108
        <fo:table width="100%" table-layout="auto" font-size="7pt">
1553 jmachado 1109
            <xsl:attribute name="border"><xsl:value-of select="$borderTable"/></xsl:attribute>
1554 jmachado 1110
            <xsl:for-each select="./rows/row[1]/cols/col">
1111
                <xsl:choose>
1112
                    <xsl:when test="$firstColPercentSize != '' and position() = 1">
1113
                        <fo:table-column column-width="{$firstColPercentSize}"/>
1114
                    </xsl:when>
1115
                    <xsl:otherwise><fo:table-column/></xsl:otherwise>
1116
                </xsl:choose>
1117
 
1553 jmachado 1118
            </xsl:for-each>
1119
            <fo:table-body>
1120
                <xsl:for-each select="./rows/row">
1121
                    <xsl:variable name="rowPosition"><xsl:value-of select="position()"/></xsl:variable>
1122
                    <xsl:variable name="lastRowPosition"><xsl:value-of select="last()"/></xsl:variable>
1123
                    <fo:table-row background-color="{$backgroundHeader}">
1124
                        <xsl:choose>
1125
                            <xsl:when test="./type='header'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundHeader"/></xsl:attribute></xsl:when>
1126
                            <xsl:when test="./type='normal'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundNormal"/></xsl:attribute></xsl:when>
1127
                            <xsl:when test="./type='footer'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundFooter"/></xsl:attribute></xsl:when>
1128
                        </xsl:choose>
1129
                        <xsl:for-each select="./cols/col">
1554 jmachado 1130
                            <fo:table-cell padding="0" display-align="center">
1131
                                <xsl:if test="./backgroundColor != ''">
1132
                                    <xsl:attribute name="background-color"><xsl:value-of select="./backgroundColor"/></xsl:attribute>
1133
                                </xsl:if>
1553 jmachado 1134
                                <xsl:choose>
1135
                                    <xsl:when test="../../type='header'"><xsl:attribute name="border"><xsl:value-of select="$borderInHeader"/></xsl:attribute></xsl:when>
1136
                                    <xsl:when test="../../type='normal'"><xsl:attribute name="border"><xsl:value-of select="$borderInCell"/></xsl:attribute></xsl:when>
1137
                                    <xsl:when test="../../type='footer'"><xsl:attribute name="border"><xsl:value-of select="$borderInFooter"/></xsl:attribute></xsl:when>
1138
                                </xsl:choose>
1139
 
1140
 
1141
 
1142
 
1143
                                <xsl:choose>
1144
                                    <xsl:when test="./align='left'"><xsl:attribute name="text-align">start</xsl:attribute></xsl:when>
1145
                                    <xsl:when test="./align='right'"><xsl:attribute name="text-align">end</xsl:attribute></xsl:when>
1146
                                </xsl:choose>
1147
                                <xsl:if test="../../cols/col/type = 'percentage' and ./type != 'percentage'">
1554 jmachado 1148
                                    <xsl:attribute name="padding-top">2px</xsl:attribute>
1553 jmachado 1149
                                </xsl:if>
1150
 
1151
 
1152
                                <xsl:if test="../../type='normal'">
1153
                                    <xsl:if test="./type='label' and position()=1">
1154
                                        <xsl:attribute name="border-right"><xsl:value-of select="$borderInHeader"/></xsl:attribute>
1155
                                    </xsl:if>
1156
                                    <xsl:if test="./type='label' and position()=last()">
1157
                                        <xsl:attribute name="border-left"><xsl:value-of select="$borderInHeader"/></xsl:attribute>
1158
                                    </xsl:if>
1159
                                    <xsl:if test="../../../row[$rowPosition+1]/type='normal'">
1160
                                        <xsl:attribute name="border-bottom"><xsl:value-of select="$borderInCell"/></xsl:attribute>
1161
                                    </xsl:if>
1162
                                </xsl:if>
1163
 
1164
                                <xsl:if test="../../../row[$rowPosition - 1]/type='header'">
1165
                                    <xsl:attribute name="border-top"><xsl:value-of select="$borderInHeader"/></xsl:attribute>
1166
                                </xsl:if>
1167
                                <xsl:if test="../../../row[$rowPosition +1]/type='footer'">
1168
                                    <xsl:attribute name="border-bottom"><xsl:value-of select="$borderInFooter"/></xsl:attribute>
1169
                                </xsl:if>
1170
 
1171
 
1172
                                <xsl:if test="../col[position() + 1 != last()]">
1173
                                    <xsl:attribute name="border-right"><xsl:value-of select="$borderInCellVertical"/></xsl:attribute>
1174
                                </xsl:if>
1175
 
1176
 
1177
 
1178
 
1179
                                <fo:block-container margin="0" padding="0">
1180
                                <xsl:choose>
1554 jmachado 1181
                                    <xsl:when test="./type='text'"><fo:block margin="0"  padding-left="2px" padding-right="2px"><xsl:value-of select="./value"/></fo:block></xsl:when>
1553 jmachado 1182
                                    <xsl:when test="./type='number'"><fo:block margin="0"  padding-left="2px" padding-right="2px"><xsl:value-of select="./value"/></fo:block></xsl:when>
1554 jmachado 1183
                                    <xsl:when test="./type='label'"><fo:block margin="0"  padding-left="2px" padding-right="2px"><xsl:value-of select="./value"/></fo:block></xsl:when>
1553 jmachado 1184
                                    <xsl:when test="./type='percentage'">
1185
                                        <xsl:attribute name="text-align">left</xsl:attribute>
1186
                                        <xsl:attribute name="padding">0</xsl:attribute>
1187
                                        <xsl:call-template name="barraPercentil">
1188
                                            <xsl:with-param name="valor" select="./value"/>
1554 jmachado 1189
                                            <xsl:with-param name="colors" select="./usePercentageColor"/>
1553 jmachado 1190
                                        </xsl:call-template>
1191
                                    </xsl:when>
1554 jmachado 1192
                                    <xsl:when test="./type='percentageDefined'">
1193
                                        <xsl:attribute name="text-align">left</xsl:attribute>
1194
                                        <xsl:attribute name="padding">0</xsl:attribute>
1195
                                        <xsl:call-template name="barraPercentilDefined">
1196
                                            <xsl:with-param name="valor" select="./value"/>
1197
                                            <xsl:with-param name="percentDefined" select="./percentDefined"/>
1198
                                            <xsl:with-param name="colors" select="./usePercentageColor"/>
1199
                                        </xsl:call-template>
1200
                                    </xsl:when>
1553 jmachado 1201
                                </xsl:choose>
1202
 
1203
                            </fo:block-container>
1204
 
1205
 
1206
                            </fo:table-cell>
1207
                        </xsl:for-each>
1208
                    </fo:table-row>
1209
                </xsl:for-each>
1210
            </fo:table-body>
1211
        </fo:table>
1212
    </xsl:template>
1213
 
1214
 
1215
 
1549 jmachado 1216
</xsl:stylesheet>