Subversion Repositories bacoAlunos

Rev

Rev 1562 | Rev 1564 | 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
 
1563 jmachado 14
    <xsl:variable name="STD_COLOR_SECTION">#FFEAAE</xsl:variable>
15
    <xsl:variable name="GREEN_COLOR_SECTION">#DDFCB1</xsl:variable>
16
    <xsl:variable name="BLUE_COLOR_SECTION">#B2E6FE</xsl:variable>
1553 jmachado 17
 
1563 jmachado 18
    <xsl:variable name="STD_COLOR_SUB_SECTION">#D6D9BC</xsl:variable>
19
    <xsl:variable name="GREEN_COLOR_SUB_SECTION">#D0FCCD</xsl:variable>
20
    <xsl:variable name="BLUE_COLOR_SUB_SECTION">#CFF6FE</xsl:variable>
1553 jmachado 21
 
22
 
1563 jmachado 23
 
24
 
25
 
1549 jmachado 26
    <xsl:template match="/">
1553 jmachado 27
        <!--<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Helvetica" color="#58585A">-->
28
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="Helvetica" color="black">
1549 jmachado 29
            <fo:layout-master-set>
30
                <fo:simple-page-master master-name="A4Vertical" page-width="210mm" page-height="297mm"
31
                                       margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm"
32
                                       reference-orientation="0">
1551 jmachado 33
                    <fo:region-body region-name="body" margin-top="40mm" margin-bottom="10mm" margin-right="0"
1549 jmachado 34
                                    margin-left="0"/>
35
 
36
                    <fo:region-before region-name="header" extent="15mm"/>
37
                    <fo:region-after region-name="footer" extent="1cm"/>
38
                </fo:simple-page-master>
39
 
40
                <fo:simple-page-master master-name="A4VerticalFirstPage" page-width="210mm" page-height="297mm"
41
                                       margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm"
42
                                       reference-orientation="0">
43
                    <fo:region-body region-name="body" margin-top="90mm" margin-bottom="10mm" margin-right="0"
44
                                    margin-left="0"/>
45
 
46
                    <fo:region-before region-name="header" extent="15mm"/>
47
                    <fo:region-after region-name="footer" extent="1cm"/>
48
                </fo:simple-page-master>
49
 
50
 
51
 
52
                <fo:simple-page-master master-name="A4HorizontalRot" page-width="210mm" page-height="297mm"
53
                                       margin-top="0.5cm" margin-bottom="0.5cm" margin-left="0.5cm" margin-right="0.5cm"
54
                                       reference-orientation="90">
55
                    <fo:region-body region-name="body" margin-top="20mm" margin-bottom="10mm" margin-right="0"
56
                                    margin-left="0"/>
57
                    <fo:region-before region-name="header" extent="15mm"/>
58
                    <fo:region-after region-name="footer" extent="1cm"/>
59
                </fo:simple-page-master>
60
                <fo:simple-page-master master-name="A4Horizontal" page-width="297mm" page-height="210mm"
61
                                       margin-top="0.5cm" margin-bottom="0.5cm" margin-left="0.5cm"
62
                                       margin-right="0.5cm">
63
                    <fo:region-body region-name="body" margin-top="20mm" margin-bottom="15mm" margin-right="0"
64
                                    margin-left="0"/>
65
                    <fo:region-before region-name="header" extent="15mm"/>
66
                    <fo:region-after region-name="footer" extent="1cm"/>
67
                </fo:simple-page-master>
68
                <fo:page-sequence-master master-name="pages">
69
                    <fo:repeatable-page-master-alternatives>
70
                        <fo:conditional-page-master-reference master-reference="pages" page-position="any"/>
71
                    </fo:repeatable-page-master-alternatives>
72
                </fo:page-sequence-master>
73
            </fo:layout-master-set>
74
 
75
            <!--LAYOUT DE PAGINA ESCOLHIDO-->
76
 
77
            <fo:page-sequence master-reference="A4VerticalFirstPage" initial-page-number="1">
78
                <xsl:call-template name="firstpage"/>
79
            </fo:page-sequence>
80
            <fo:page-sequence master-reference="A4Vertical" initial-page-number="2">
1551 jmachado 81
                <xsl:call-template name="indexPage"/>
82
            </fo:page-sequence>
83
            <fo:page-sequence master-reference="A4Vertical" initial-page-number="3">
1549 jmachado 84
                <xsl:call-template name="page"/>
85
            </fo:page-sequence>
86
 
87
 
88
        </fo:root>
89
    </xsl:template>
90
 
91
 
92
    <xsl:template name="firstpage">
93
        <fo:static-content flow-name="header">
94
            <fo:block text-align="left">
95
                <fo:table width="100%" table-layout="fixed" border-bottom="1px solid black">
96
                    <fo:table-column column-width="100%"/>
97
                    <fo:table-body>
98
                        <fo:table-row>
99
                            <fo:table-cell>
100
                                <fo:block>
101
                                    <fo:external-graphic height="auto" width="auto"
102
                                                         content-height="80">
103
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1553 jmachado 104
                                        <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/layout/themes/ipp/logo.jpg')
1549 jmachado 105
                                        </xsl:attribute>
106
                                    </fo:external-graphic>
107
                                </fo:block>
108
                            </fo:table-cell>
109
 
110
                        </fo:table-row>
111
 
112
                    </fo:table-body>
113
                </fo:table>
114
 
115
            </fo:block>
116
        </fo:static-content>
117
        <fo:static-content flow-name="footer">
1551 jmachado 118
            <xsl:call-template name="footerDefault"/>
1549 jmachado 119
        </fo:static-content>
120
 
121
 
122
        <fo:flow flow-name="body">
1551 jmachado 123
            <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 124
                <fo:inline font-weight="bold"> Relatório de Avaliação Pedagógica</fo:inline>
1549 jmachado 125
            </fo:block>
126
 
127
            <fo:block  font-size="20px" padding="4px" margin-top="40px" text-align="center" >
1553 jmachado 128
                <fo:inline text-decoration="underline" font-weight="bold">Inquéritos Pedagógicos aos Alunos</fo:inline>
1549 jmachado 129
            </fo:block>
130
 
1551 jmachado 131
            <fo:block font-size="18px" padding="4px" margin-top="20px" text-align="center">
1553 jmachado 132
                <fo:inline>Relatório Docente</fo:inline>
1549 jmachado 133
            </fo:block>
134
 
1551 jmachado 135
            <fo:block font-size="14px" padding="4px" margin-top="5px" text-align="center" background-color="#fff9ea">
1549 jmachado 136
                <xsl:value-of select="$nomeDocente"/>
137
            </fo:block>
138
            <fo:block font-size="12px" padding="4px" margin-top="2px" text-align="center">
1553 jmachado 139
                <fo:inline>Docente Número: <xsl:value-of select="$numeroDocente"/></fo:inline>
1549 jmachado 140
            </fo:block>
141
            <fo:block font-size="12px" padding="4px" margin-top="20px" text-align="center" >
1551 jmachado 142
                <fo:inline><fo:wrapper white-space-treatment="preserve" font-weight="bold">Ano letivo: </fo:wrapper> <xsl:value-of select="$anoLectivo"/></fo:inline>
1549 jmachado 143
            </fo:block>
1562 jmachado 144
            <fo:block font-size="12px" padding="4px" margin-top="20px" text-align="center" >
145
                <fo:inline><fo:wrapper white-space-treatment="preserve" font-weight="bold">Periodos Considerados: </fo:wrapper> <xsl:for-each select="//semestres/string"><xsl:value-of select="."/>; </xsl:for-each></fo:inline>
146
            </fo:block>
147
            <fo:block font-size="12px" padding="4px" margin-top="20px" text-align="center" >
148
                <fo:inline><fo:wrapper white-space-treatment="preserve" font-weight="bold">Oferta Formativa Considerada: </fo:wrapper> <xsl:for-each select="//degrees/string"><xsl:value-of select="."/>; </xsl:for-each></fo:inline>
149
            </fo:block>
1549 jmachado 150
        </fo:flow>
151
    </xsl:template>
152
 
1551 jmachado 153
    <xsl:template name="indexPage">
154
        <fo:static-content flow-name="header">
155
            <xsl:call-template name="headerTeacher"/>
156
        </fo:static-content>
157
        <fo:static-content flow-name="footer">
158
            <xsl:call-template name="footerDefault"/>
159
        </fo:static-content>
160
 
161
        <fo:flow flow-name="body">
162
 
163
            <fo:block  font-size="20px" padding="4px" margin-top="40px" text-align="center" >
164
                <fo:inline text-decoration="underline" font-weight="bold">Indice</fo:inline>
165
            </fo:block>
166
 
167
 
168
            <fo:block text-align-last="justify" font-weight="bold" margin-bottom="5px">
169
                    <xsl:text> </xsl:text>
170
                    <fo:leader/>
171
                    Pag.
172
            </fo:block>
173
 
174
            <fo:block font-size="14px" text-align-last="justify">
1553 jmachado 175
                <fo:basic-link internal-destination="capParticipacao">
1551 jmachado 176
                    <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>
177
                    <xsl:text> </xsl:text>
1554 jmachado 178
                    Participação nos questionários do docente
1551 jmachado 179
                    <fo:leader leader-pattern="dots" />
1553 jmachado 180
                    <fo:page-number-citation ref-id="capParticipacao" />
1551 jmachado 181
                </fo:basic-link>
182
            </fo:block>
183
            <fo:block font-size="14px" text-align-last="justify" margin-top="5px">
1553 jmachado 184
                <fo:basic-link internal-destination="capCaracterizacao">
1551 jmachado 185
                    <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>
186
                    <xsl:text> </xsl:text>
1554 jmachado 187
                    Caracterização da qmostra
1551 jmachado 188
                    <fo:leader leader-pattern="dots" />
1553 jmachado 189
                    <fo:page-number-citation ref-id="capCaracterizacao" />
1551 jmachado 190
                </fo:basic-link>
191
            </fo:block>
1553 jmachado 192
            <fo:block font-size="14px" text-align-last="justify" margin-top="5px">
193
                <fo:basic-link internal-destination="capQuestoes">
1554 jmachado 194
                    <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 195
                    <xsl:text> </xsl:text>
1563 jmachado 196
                    Análise das questões sobre o Docente
1553 jmachado 197
                    <fo:leader leader-pattern="dots" />
198
                    <fo:page-number-citation ref-id="capQuestoes" />
199
                </fo:basic-link>
200
            </fo:block>
1554 jmachado 201
            <fo:block font-size="14px" text-align-last="justify" margin-top="5px">
202
                <fo:basic-link internal-destination="capQuestoesUnidades">
203
                    <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>
204
                    <xsl:text> </xsl:text>
1563 jmachado 205
                    Análise das questões sobre as Unidades do docente
1554 jmachado 206
                    <fo:leader leader-pattern="dots" />
207
                    <fo:page-number-citation ref-id="capQuestoesUnidades" />
208
                </fo:basic-link>
209
            </fo:block>
1551 jmachado 210
 
1562 jmachado 211
            <fo:block font-size="14px" text-align-last="justify" margin-top="5px">
212
                <fo:basic-link internal-destination="capUnidades">
213
                    <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">5</fo:inline>
214
                    <xsl:text> </xsl:text>
1563 jmachado 215
                    Análise das questões em cada Unidade do Docente
1562 jmachado 216
                    <fo:leader leader-pattern="dots" />
217
                    <fo:page-number-citation ref-id="capUnidades" />
218
                </fo:basic-link>
219
            </fo:block>
1551 jmachado 220
 
1554 jmachado 221
 
1562 jmachado 222
 
1551 jmachado 223
        </fo:flow>
224
    </xsl:template>
225
 
1557 jmachado 226
 
227
 
228
 
229
 
1553 jmachado 230
    <xsl:template name="seccao">
231
        <xsl:param name="text"/>
1557 jmachado 232
        <xsl:param name="marginTop">0</xsl:param>
233
        <xsl:param name="icon"></xsl:param>
234
        <xsl:call-template name="seccaoGen">
235
            <xsl:with-param name="text" select="$text"/>
236
            <xsl:with-param name="marginTop" select="$marginTop"/>
237
            <xsl:with-param name="icon" select="$icon"/>
1563 jmachado 238
            <xsl:with-param name="backcolor"><xsl:value-of select="$STD_COLOR_SECTION"/></xsl:with-param>
1557 jmachado 239
        </xsl:call-template>
240
    </xsl:template>
241
 
242
    <xsl:template name="seccaoGreen">
243
        <xsl:param name="text"/>
244
        <xsl:param name="marginTop">0</xsl:param>
245
        <xsl:param name="icon"></xsl:param>
246
        <xsl:call-template name="seccaoGen">
247
            <xsl:with-param name="text" select="$text"/>
248
            <xsl:with-param name="marginTop" select="$marginTop"/>
249
            <xsl:with-param name="icon" select="$icon"/>
1563 jmachado 250
            <xsl:with-param name="backcolor"><xsl:value-of select="$GREEN_COLOR_SECTION"/></xsl:with-param>
1557 jmachado 251
        </xsl:call-template>
252
    </xsl:template>
253
 
254
    <xsl:template name="seccaoBlue">
255
        <xsl:param name="text"/>
256
        <xsl:param name="marginTop">0</xsl:param>
257
        <xsl:param name="icon"></xsl:param>
258
        <xsl:call-template name="seccaoGen">
259
            <xsl:with-param name="text" select="$text"/>
260
            <xsl:with-param name="marginTop" select="$marginTop"/>
261
            <xsl:with-param name="icon" select="$icon"/>
1563 jmachado 262
            <xsl:with-param name="backcolor"><xsl:value-of select="$BLUE_COLOR_SECTION"/></xsl:with-param>
1557 jmachado 263
        </xsl:call-template>
264
    </xsl:template>
265
 
266
 
267
 
268
    <!-- GENERIC SECCION -->
269
    <xsl:template name="seccaoGen">
270
        <xsl:param name="text"/>
271
        <xsl:param name="marginTop">0</xsl:param>
272
        <xsl:param name="icon"></xsl:param>
1563 jmachado 273
        <xsl:param name="backcolor"><xsl:value-of select="$STD_COLOR_SECTION"/></xsl:param>
274
        <fo:block padding="0" padding-left="0" margin="0" margin-top="{$marginTop}">
1557 jmachado 275
            <fo:table width="100%" table-layout="fixed" border="0" margin="0" padding="0">
276
                <fo:table-column column-width="90%"/>
277
                <fo:table-column column-width="10%"/>
278
                <fo:table-body>
279
                    <fo:table-row >
1563 jmachado 280
                        <fo:table-cell margin="0"
1557 jmachado 281
                                       padding="2px"
282
                                       background-color="{$backcolor}"
283
                                       display-align="center">
284
                            <fo:block
285
                                    font-size="12px"
286
                                    font-weight="bold"
287
                                    text-align="left"
1563 jmachado 288
                                    margin="0"
289
                                    padding="0">
1557 jmachado 290
                                <xsl:value-of select="$text"/>
291
                            </fo:block>
292
                        </fo:table-cell>
1563 jmachado 293
                        <fo:table-cell  margin="0" padding="0"  display-align="center" text-align="right" padding-right="5px">
294
                            <fo:block margin="0" padding="0">
1557 jmachado 295
                            <xsl:if test="$icon">
296
 
1563 jmachado 297
                                <fo:external-graphic height="auto" width="auto" margin="0" padding="0"
1557 jmachado 298
                                                     content-height="20">
299
                                    <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
300
                                    <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/<xsl:value-of select="$icon"/>')
301
                                    </xsl:attribute>
302
                                </fo:external-graphic>
303
 
304
                            </xsl:if>
305
                            </fo:block>
306
                        </fo:table-cell>
307
                    </fo:table-row>
308
                </fo:table-body>
309
            </fo:table>
1553 jmachado 310
        </fo:block>
311
    </xsl:template>
1551 jmachado 312
 
1557 jmachado 313
 
314
 
315
 
1553 jmachado 316
    <xsl:template name="subSeccao">
317
        <xsl:param name="text"/>
1557 jmachado 318
        <xsl:param name="marginTop">8px</xsl:param>
1563 jmachado 319
        <xsl:param name="marginBottom">20px</xsl:param>
1557 jmachado 320
        <xsl:call-template name="subSeccaoGen">
321
            <xsl:with-param name="text" select="$text"/>
322
            <xsl:with-param name="marginTop" select="$marginTop"/>
1563 jmachado 323
            <xsl:with-param name="backcolor"><xsl:value-of select="$STD_COLOR_SUB_SECTION"/></xsl:with-param>
324
            <xsl:with-param name="marginBottom" select="$marginBottom"/>
1557 jmachado 325
        </xsl:call-template>
326
    </xsl:template>
327
 
328
    <xsl:template name="subSeccaoGreen">
329
        <xsl:param name="text"/>
330
        <xsl:param name="marginTop">8px</xsl:param>
1563 jmachado 331
        <xsl:param name="marginBottom">20px</xsl:param>
1557 jmachado 332
        <xsl:call-template name="subSeccaoGen">
333
            <xsl:with-param name="text" select="$text"/>
334
            <xsl:with-param name="marginTop" select="$marginTop"/>
1563 jmachado 335
            <xsl:with-param name="backcolor"><xsl:value-of select="$GREEN_COLOR_SUB_SECTION"/></xsl:with-param>
336
            <xsl:with-param name="marginBottom" select="$marginBottom"/>
1557 jmachado 337
        </xsl:call-template>
338
    </xsl:template>
339
    <xsl:template name="subSeccaoBlue">
340
        <xsl:param name="text"/>
341
        <xsl:param name="marginTop">8px</xsl:param>
1563 jmachado 342
        <xsl:param name="marginBottom">20px</xsl:param>
1557 jmachado 343
        <xsl:call-template name="subSeccaoGen">
344
            <xsl:with-param name="text" select="$text"/>
345
            <xsl:with-param name="marginTop" select="$marginTop"/>
1563 jmachado 346
            <xsl:with-param name="backcolor"><xsl:value-of select="$BLUE_COLOR_SUB_SECTION"/></xsl:with-param>
347
            <xsl:with-param name="marginBottom" select="$marginBottom"/>
1557 jmachado 348
        </xsl:call-template>
349
    </xsl:template>
350
 
351
    <xsl:template name="subSeccaoGen">
352
        <xsl:param name="text"/>
353
        <xsl:param name="marginTop">8px</xsl:param>
1563 jmachado 354
        <xsl:param name="marginBottom">20px</xsl:param>
1557 jmachado 355
        <xsl:param name="backcolor"></xsl:param>
356
        <fo:block font-size="10px"
1553 jmachado 357
                  padding-top="3px"
358
                  padding-bottom="3px"
359
                  padding-left="5px"
1557 jmachado 360
                  margin-left="10px"
1554 jmachado 361
                  margin-top="{$marginTop}"
1563 jmachado 362
                  margin-bottom="{$marginBottom}"
1553 jmachado 363
                  text-align="left"
1557 jmachado 364
                  background-color="{$backcolor}">
1553 jmachado 365
            <xsl:value-of select="$text"/>
366
        </fo:block>
367
    </xsl:template>
368
 
1554 jmachado 369
    <xsl:template name="subSubSeccao">
370
        <xsl:param name="text"/>
1563 jmachado 371
        <xsl:param name="marginTop">2px</xsl:param>
372
        <xsl:param name="fontSize">8pt</xsl:param>
373
        <xsl:param name="fontWeight">normal</xsl:param>
374
        <xsl:call-template name="subSubSeccaoGen">
375
            <xsl:with-param name="text" select="$text"/>
376
            <xsl:with-param name="marginTop" select="$marginTop"/>
377
            <xsl:with-param name="backcolor"><xsl:value-of select="$STD_COLOR_SUB_SECTION"/></xsl:with-param>
378
            <xsl:with-param name="fontSize" select="$fontSize"/>
379
            <xsl:with-param name="fontWeight" select="$fontWeight"/>
380
        </xsl:call-template>
381
    </xsl:template>
382
    <xsl:template name="subSubSeccaoBlue">
383
        <xsl:param name="text"/>
384
        <xsl:param name="marginTop">2px</xsl:param>
385
        <xsl:param name="fontSize">8pt</xsl:param>
386
        <xsl:param name="fontWeight">normal</xsl:param>
387
        <xsl:call-template name="subSubSeccaoGen">
388
            <xsl:with-param name="text" select="$text"/>
389
            <xsl:with-param name="marginTop" select="$marginTop"/>
390
            <xsl:with-param name="backcolor">#CFF6FE</xsl:with-param>
391
            <xsl:with-param name="fontSize" select="$fontSize"/>
392
            <xsl:with-param name="fontWeight" select="$fontWeight"/>
393
        </xsl:call-template>
394
    </xsl:template>
395
    <xsl:template name="subSubSeccaoGreen">
396
        <xsl:param name="text"/>
397
        <xsl:param name="marginTop">2px</xsl:param>
398
        <xsl:param name="fontSize">8pt</xsl:param>
399
        <xsl:param name="fontWeight">normal</xsl:param>
400
        <xsl:call-template name="subSubSeccaoGen">
401
            <xsl:with-param name="text" select="$text"/>
402
            <xsl:with-param name="marginTop" select="$marginTop"/>
403
            <xsl:with-param name="backcolor">#D0FCCD</xsl:with-param>
404
            <xsl:with-param name="fontSize" select="$fontSize"/>
405
            <xsl:with-param name="fontWeight" select="$fontWeight"/>
406
        </xsl:call-template>
407
    </xsl:template>
408
 
409
    <xsl:template name="subSubSeccaoGen">
410
        <xsl:param name="text"/>
411
        <xsl:param name="marginTop">2px</xsl:param>
412
        <xsl:param name="backcolor"></xsl:param>
413
        <xsl:param name="fontSize">8pt</xsl:param>
414
        <xsl:param name="fontWeight">normal</xsl:param>
415
        <fo:block font-size="{$fontSize}"
416
                  font-weight="{$fontWeight}"
417
                  padding-top="0px"
418
                  padding-bottom="0px"
419
                  padding-left="5px"
420
                  margin-left="20px"
421
                  margin-top="{$marginTop}"
1554 jmachado 422
                  margin-bottom="5px"
423
                  text-align="left"
1563 jmachado 424
                  background-color="{$backcolor}">
1554 jmachado 425
            <xsl:value-of select="$text"/>
426
        </fo:block>
427
    </xsl:template>
428
 
1563 jmachado 429
 
430
 
431
    <xsl:template name="subSubSubSeccao">
432
        <xsl:param name="text"/>
433
        <xsl:param name="marginTop">2px</xsl:param>
434
        <xsl:param name="icon"></xsl:param>
435
        <xsl:call-template name="subSubSubSeccaoGen">
436
            <xsl:with-param name="text" select="$text"/>
437
            <xsl:with-param name="marginTop" select="$marginTop"/>
438
            <xsl:with-param name="backcolor"><xsl:value-of select="$STD_COLOR_SUB_SECTION"/></xsl:with-param>
439
            <xsl:with-param name="icon" select="$icon"/>
440
 
441
        </xsl:call-template>
442
    </xsl:template>
443
    <xsl:template name="subSubSubSeccaoBlue">
444
        <xsl:param name="text"/>
445
        <xsl:param name="marginTop">2px</xsl:param>
446
        <xsl:param name="icon"></xsl:param>
447
        <xsl:call-template name="subSubSubSeccaoGen">
448
            <xsl:with-param name="text" select="$text"/>
449
            <xsl:with-param name="marginTop" select="$marginTop"/>
450
            <xsl:with-param name="backcolor">#CFF6FE</xsl:with-param>
451
            <xsl:with-param name="icon" select="$icon"/>
452
        </xsl:call-template>
453
    </xsl:template>
454
    <xsl:template name="subSubSubSeccaoGreen">
455
        <xsl:param name="text"/>
456
        <xsl:param name="marginTop">2px</xsl:param>
457
        <xsl:param name="icon"></xsl:param>
458
        <xsl:call-template name="subSubSubSeccaoGen">
459
            <xsl:with-param name="text" select="$text"/>
460
            <xsl:with-param name="marginTop" select="$marginTop"/>
461
            <xsl:with-param name="backcolor">#D0FCCD</xsl:with-param>
462
            <xsl:with-param name="icon" select="$icon"/>
463
        </xsl:call-template>
464
    </xsl:template>
465
 
466
    <xsl:template name="subSubSubSeccaoGen">
467
        <xsl:param name="text"/>
468
        <xsl:param name="marginTop">2px</xsl:param>
469
        <xsl:param name="backcolor"></xsl:param>
470
        <xsl:param name="icon"></xsl:param>
471
 
472
 
473
        <fo:block margin-left="30px" margin-top="{$marginTop}" padding="0" padding-left="0" margin="0" margin-bottom="5px" padding-right="30px">
474
            <fo:table width="100%" table-layout="fixed" border="0" margin="0" padding="0">
475
                <fo:table-column column-width="95%"/>
476
                <fo:table-column column-width="5%"/>
477
                <fo:table-body>
478
                    <fo:table-row >
479
                        <fo:table-cell
480
                                padding="0"
481
                                background-color="{$backcolor}"
482
                                display-align="center"
483
                                margin="0">
484
                            <fo:block
485
                                    font-size="8px"
486
                                    font-weight="bold"
487
                                    text-align="left"
488
                                    margin="0" padding="0"
489
                                    >
490
                                <xsl:value-of select="$text"/>
491
                            </fo:block>
492
                        </fo:table-cell>
493
                        <fo:table-cell margin="0" padding="0" display-align="center" text-align="right" padding-right="5px">
494
                            <fo:block margin="0" padding="0">
495
                                <xsl:if test="$icon">
496
 
497
                                    <fo:external-graphic height="auto" width="auto"
498
                                                         content-height="8" margin="0" padding="0">
499
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
500
                                        <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/<xsl:value-of select="$icon"/>')
501
                                        </xsl:attribute>
502
                                    </fo:external-graphic>
503
 
504
                                </xsl:if>
505
                            </fo:block>
506
                        </fo:table-cell>
507
                    </fo:table-row>
508
                </fo:table-body>
509
            </fo:table>
510
        </fo:block>
511
    </xsl:template>
512
 
1549 jmachado 513
    <xsl:template name="page">
514
        <fo:static-content flow-name="header">
1551 jmachado 515
            <xsl:call-template name="headerTeacher"/>
516
        </fo:static-content>
517
        <fo:static-content flow-name="footer">
518
            <xsl:call-template name="footerDefault"/>
519
        </fo:static-content>
1549 jmachado 520
 
1551 jmachado 521
        <fo:flow flow-name="body">
1557 jmachado 522
            <fo:block-container padding="0" margin="0" border="0" id="capParticipacao" page-break-before="always">
1553 jmachado 523
                <xsl:call-template name="seccao">
524
                    <xsl:with-param name="text">1 - Participação</xsl:with-param>
1554 jmachado 525
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1553 jmachado 526
                </xsl:call-template>
527
            </fo:block-container>
528
 
1557 jmachado 529
 
1553 jmachado 530
            <xsl:call-template name="subSeccao">
531
                <xsl:with-param name="text">Taxa Global de Participação aos Questionários do Docente</xsl:with-param>
532
            </xsl:call-template>
533
 
1557 jmachado 534
 
1553 jmachado 535
            <fo:block-container font-size="18" text-align="center" font-weight="bold">
536
                <xsl:call-template name="barraPercentil">
537
                    <xsl:with-param name="valor" select="//questionariosReqRespondidosPercentagem"/>
538
                    <xsl:with-param name="colors">true</xsl:with-param>
539
                </xsl:call-template>
540
            </fo:block-container>
541
 
542
 
543
 
544
            <fo:block  margin-left="10px">
545
 
546
 
547
                <fo:table width="100%" table-layout="fixed">
548
                    <fo:table-column column-width="50%"/>
549
                    <fo:table-column column-width="50%"/>
550
                    <fo:table-body>
551
                        <fo:table-row>
1563 jmachado 552
                            <fo:table-cell margin="0" padding="0">
1553 jmachado 553
 
554
 
555
                                <xsl:call-template name="subSeccao">
556
                                    <xsl:with-param name="text">
557
                                        Taxa de Participação
558
                                    </xsl:with-param>
559
                                </xsl:call-template>
1563 jmachado 560
                                <fo:block display-align="center" text-align="center" margin-left="10px">
1553 jmachado 561
                                    <fo:external-graphic width="auto" height="auto" content-height="140">
562
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
563
                                        <xsl:attribute name="src"><xsl:value-of select="//pathGraficoTaxaRespostaAlunos"/>
564
                                        </xsl:attribute>
565
                                    </fo:external-graphic>
566
                                </fo:block>
567
 
568
                            </fo:table-cell>
1563 jmachado 569
                            <fo:table-cell margin="0" padding="0">
1553 jmachado 570
 
571
                                <xsl:call-template name="subSeccao">
572
                                    <xsl:with-param name="text">
573
                                        Taxa de Resposta a Questionarios
574
                                    </xsl:with-param>
575
                                </xsl:call-template>
1563 jmachado 576
                                <fo:block display-align="center" text-align="center" margin-left="10px">
1553 jmachado 577
                                    <fo:external-graphic width="auto" height="auto" content-height="140">
578
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
579
                                        <xsl:attribute name="src"><xsl:value-of select="//pathGraficoTaxaRespostaQuestionarios"/></xsl:attribute>
580
                                    </fo:external-graphic>
581
                                </fo:block>
582
 
583
                            </fo:table-cell>
584
                        </fo:table-row>
585
                        <fo:table-row>
1563 jmachado 586
                            <fo:table-cell margin="0" padding="0">
1553 jmachado 587
                                <xsl:call-template name="subSeccao">
588
                                    <xsl:with-param name="text">
589
                                        Taxa de Participação por Unidade Curricular
590
                                    </xsl:with-param>
591
                                </xsl:call-template>
592
                                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
1554 jmachado 593
                                    <xsl:apply-templates select="//tabelaTaxaRespostaUnidade" mode="DataTable">
594
                                        <xsl:with-param name="firstColPercentSize">60%</xsl:with-param>
595
                                    </xsl:apply-templates>
1553 jmachado 596
                                </fo:block>
597
                            </fo:table-cell>
1563 jmachado 598
 
599
                            <fo:table-cell margin="0" padding="0">
600
                                <xsl:call-template name="subSeccao">
601
                                    <xsl:with-param name="text">
602
                                        Contribuição de cada Unidade Curricular
603
                                    </xsl:with-param>
604
                                </xsl:call-template>
605
                                <fo:block margin="0" margin-left="10px" padding="0" display-align="center" text-align="center">
606
                                    <fo:external-graphic width="auto" margin="0" padding="0" height="auto" content-height="140">
607
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
608
                                        <xsl:attribute name="src"><xsl:value-of select="//pathGraficoContribuicaoUnidades"/></xsl:attribute>
609
                                    </fo:external-graphic>
610
                                </fo:block>
611
                            </fo:table-cell>
1553 jmachado 612
                        </fo:table-row>
613
                    </fo:table-body>
614
                </fo:table>
1551 jmachado 615
            </fo:block>
616
 
1553 jmachado 617
 
618
            <fo:block-container page-break-before="always" padding="0" margin="0" id="capCaracterizacao">
619
                <xsl:call-template name="seccao">
1554 jmachado 620
                    <xsl:with-param name="text">2 - Caracterização da Amostra Recolhida</xsl:with-param>
621
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1553 jmachado 622
                </xsl:call-template>
623
            </fo:block-container>
624
 
625
 
626
 
627
 
628
 
629
 
1551 jmachado 630
            <fo:block text-align="center" margin-left="10px">
631
                <fo:table width="100%" table-layout="fixed">
1549 jmachado 632
                    <fo:table-column column-width="50%"/>
633
                    <fo:table-column column-width="50%"/>
634
                    <fo:table-body>
635
                        <fo:table-row>
636
                            <fo:table-cell>
637
 
1553 jmachado 638
                                <xsl:call-template name="subSeccao">
639
                                    <xsl:with-param name="text">
640
                                        Género
641
                                    </xsl:with-param>
642
                                </xsl:call-template>
1551 jmachado 643
 
1553 jmachado 644
                                <fo:block>
645
                                    <fo:table width="90%" table-layout="fixed" >
1551 jmachado 646
                                        <fo:table-column column-width="50%"/>
647
                                        <fo:table-column column-width="50%"/>
648
                                        <fo:table-body>
649
                                            <fo:table-row>
650
                                                <fo:table-cell>
651
                                                    <fo:block>
1553 jmachado 652
                                                        <xsl:value-of select="//masculinoComResposta"/>
1551 jmachado 653
                                                    </fo:block>
654
                                                    <fo:block>
655
                                                        <fo:external-graphic height="auto" width="auto"
1553 jmachado 656
                                                                             content-height="120">
1551 jmachado 657
                                                            <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
658
                                                            <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/studentMale.png')
659
                                                            </xsl:attribute>
660
                                                        </fo:external-graphic>
661
                                                    </fo:block>
662
                                                    <fo:block>
1553 jmachado 663
                                                        <xsl:value-of select="//masculinoComRespostaPercent"/>%
1551 jmachado 664
                                                    </fo:block>
665
                                                </fo:table-cell>
666
                                                <fo:table-cell>
667
                                                    <fo:block>
1553 jmachado 668
                                                        <xsl:value-of select="//femininoComResposta"/>
1551 jmachado 669
                                                    </fo:block>
670
                                                    <fo:block>
671
                                                        <fo:external-graphic height="auto" width="auto"
1553 jmachado 672
                                                                             content-height="120">
1551 jmachado 673
                                                            <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
674
                                                            <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/studentFemale.png')
675
                                                            </xsl:attribute>
676
                                                        </fo:external-graphic>
677
                                                    </fo:block>
678
                                                    <fo:block>
1553 jmachado 679
                                                        <xsl:value-of select="//femininoComRespostaPercent"/>%
1551 jmachado 680
                                                    </fo:block>
681
                                                </fo:table-cell>
682
                                            </fo:table-row>
683
                                        </fo:table-body>
684
                                    </fo:table>
1553 jmachado 685
                                </fo:block>
1551 jmachado 686
 
687
 
688
 
1549 jmachado 689
                            </fo:table-cell>
690
                            <fo:table-cell>
1553 jmachado 691
 
692
 
693
 
694
 
695
                                <xsl:call-template name="subSeccao">
696
                                    <xsl:with-param name="text">
697
                                        Tipos de Alunos
698
                                    </xsl:with-param>
699
                                </xsl:call-template>
700
 
701
                                <fo:block margin-top="5px">
702
                                    <fo:external-graphic width="auto" height="auto" content-width="250" content-height="150">
1551 jmachado 703
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1553 jmachado 704
                                        <xsl:attribute name="src"><xsl:value-of select="//pathGraficoTiposAlunosComResposta"/>
705
                                        </xsl:attribute>
1551 jmachado 706
                                    </fo:external-graphic>
1549 jmachado 707
                                </fo:block>
1553 jmachado 708
 
709
 
710
 
1549 jmachado 711
                            </fo:table-cell>
712
 
713
                        </fo:table-row>
1553 jmachado 714
                        <fo:table-row>
715
                            <fo:table-cell>
1549 jmachado 716
 
1553 jmachado 717
                                <xsl:call-template name="subSeccao">
718
                                    <xsl:with-param name="text">
719
                                        Idades
720
                                    </xsl:with-param>
721
                                </xsl:call-template>
722
 
723
                                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
724
                                    <xsl:apply-templates select="//tabelaIdades" mode="DataTable"/>
725
                                </fo:block>
726
 
727
                            </fo:table-cell>
728
                            <fo:table-cell>
729
 
730
                                <xsl:call-template name="subSeccao">
731
                                    <xsl:with-param name="text">
732
                                        Distritos
733
                                    </xsl:with-param>
734
                                </xsl:call-template>
735
 
736
 
737
                                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
1554 jmachado 738
                                    <xsl:apply-templates select="//tabelaDistritos" mode="DataTable">
739
                                        <xsl:with-param name="firstColPercentSize">30%</xsl:with-param>
740
                                    </xsl:apply-templates>
1553 jmachado 741
                                </fo:block>
742
 
743
                            </fo:table-cell>
744
 
745
                        </fo:table-row>
746
 
1549 jmachado 747
                    </fo:table-body>
748
                </fo:table>
1553 jmachado 749
            </fo:block>
1549 jmachado 750
 
1553 jmachado 751
 
752
 
753
            <fo:block-container padding="0" margin="0" id="capQuestoes" page-break-before="always">
1557 jmachado 754
                <xsl:call-template name="seccaoBlue">
1553 jmachado 755
                    <xsl:with-param name="text">3 - Análise das Questões sobre o Docente</xsl:with-param>
1554 jmachado 756
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1557 jmachado 757
                    <xsl:with-param name="icon">teacherIcon.png</xsl:with-param>
1553 jmachado 758
                </xsl:call-template>
759
            </fo:block-container>
760
 
1557 jmachado 761
            <fo:block-container padding="0" margin="0">
762
            <xsl:call-template name="subSeccaoBlue">
1554 jmachado 763
                <xsl:with-param name="text">3.1 - Gráficos de respostas agregadas de todas as unidades do docente</xsl:with-param>
1557 jmachado 764
                <xsl:with-param name="marginTop">2px</xsl:with-param>
1554 jmachado 765
            </xsl:call-template>
1557 jmachado 766
            </fo:block-container>
1553 jmachado 767
 
1563 jmachado 768
            <xsl:apply-templates select="//respostasAgregadasGrupoDocente/respostasAgregadasChartTable/respostasAgregadasCharts/chartsRow" mode="graficosPerguntas"/>
1553 jmachado 769
 
1557 jmachado 770
            <fo:block-container padding="0" margin="0"  page-break-before="always">
771
                <xsl:call-template name="seccaoBlue">
772
                    <xsl:with-param name="text">3 - Análise das Questões sobre o Docente</xsl:with-param>
1554 jmachado 773
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1557 jmachado 774
                    <xsl:with-param name="icon">teacherIcon.png</xsl:with-param>
1554 jmachado 775
                </xsl:call-template>
776
            </fo:block-container>
1557 jmachado 777
 
778
            <xsl:call-template name="subSeccaoBlue">
779
                <xsl:with-param name="text">3.2 - Tabela de respostas agregadas de todas as unidades do docente</xsl:with-param>
780
                <xsl:with-param name="marginTop">2px</xsl:with-param>
781
            </xsl:call-template>
782
 
1554 jmachado 783
            <fo:block text-align="center" margin="0" font-size="10" font-weight="normal" >
1563 jmachado 784
                <xsl:apply-templates select="//respostasAgregadasGrupoDocente/respostasAgregadasChartTable/respostasTable" mode="DataTable">
1554 jmachado 785
                    <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
786
                </xsl:apply-templates>
787
            </fo:block>
788
            <fo:block text-align="right" margin-top="10px" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
789
                Docentes avaliados nos cursos onde o docente leciona: <xsl:value-of select="//docentesNosCursos"/>
790
            </fo:block>
791
            <fo:block text-align="right" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
792
                Docentes avaliados nas escolas onde o docente leciona: <xsl:value-of select="//docentesNasEscolas"/>
793
            </fo:block>
1553 jmachado 794
 
1557 jmachado 795
            <fo:block-container margin-top="20px" margin-bottom="5px">
1563 jmachado 796
                <xsl:apply-templates select="//respostasAgregadasGrupoDocente/mediasGrupo" mode="mediasGrupo">
1554 jmachado 797
                    <xsl:with-param name="objetoAvaliacao">do docente</xsl:with-param>
798
                </xsl:apply-templates>
799
            </fo:block-container>
1553 jmachado 800
 
1554 jmachado 801
            <!--Considerando Respostas Superiores a 2 segindos-->
1557 jmachado 802
            <fo:block-container background-color="#aaaaaa" padding="5px" margin="0" margin-top="20px">
1554 jmachado 803
                <fo:block-container padding="0" margin="0">
804
                    <xsl:call-template name="subSubSeccao">
805
                        <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>
806
                    </xsl:call-template>
807
                </fo:block-container>
808
 
809
                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
1563 jmachado 810
                    <xsl:apply-templates select="//respostasAgregadasGrupoDocente/respostasAgregadasChartTable2Secs/respostasTable" mode="DataTable">
1554 jmachado 811
                        <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
812
                    </xsl:apply-templates>
813
                </fo:block>
814
            </fo:block-container>
815
 
816
 
817
 
818
 
819
 
820
            <!--#######################################-->
821
            <!-- RESPOSTAS AGREGADAS DAS UNIDADES CURRICULARES -->
822
 
823
            <fo:block-container padding="0" margin="0" id="capQuestoesUnidades" page-break-before="always">
1557 jmachado 824
                <xsl:call-template name="seccaoGreen">
1563 jmachado 825
                    <xsl:with-param name="text">4 - Análise das questões sobre as Unidades do docente</xsl:with-param>
1554 jmachado 826
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1557 jmachado 827
                    <xsl:with-param name="icon">cadeiraConteudos.png</xsl:with-param>
1554 jmachado 828
                </xsl:call-template>
829
            </fo:block-container>
830
 
1557 jmachado 831
            <xsl:call-template name="subSeccaoGreen">
1554 jmachado 832
                <xsl:with-param name="text">4.1 - Gráficos de respostas agregadas de todas as unidades</xsl:with-param>
1557 jmachado 833
                <xsl:with-param name="marginTop">2px</xsl:with-param>
1554 jmachado 834
            </xsl:call-template>
835
 
1563 jmachado 836
            <xsl:apply-templates select="//respostasAgregadasGrupoUnidade/respostasAgregadasChartTable/respostasAgregadasCharts/chartsRow" mode="graficosPerguntas"/>
1554 jmachado 837
 
838
 
839
            <fo:block-container padding="0" margin="0" page-break-before="always">
1557 jmachado 840
                <xsl:call-template name="seccaoGreen">
841
                    <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 842
                    <xsl:with-param name="marginTop">0</xsl:with-param>
1557 jmachado 843
                    <xsl:with-param name="icon">cadeiraConteudos.png</xsl:with-param>
1554 jmachado 844
                </xsl:call-template>
845
            </fo:block-container>
846
 
1557 jmachado 847
            <xsl:call-template name="subSeccaoGreen">
848
                <xsl:with-param name="text">4.2 - Tabela de respostas agregadas de todas as unidades do docente</xsl:with-param>
849
                <xsl:with-param name="marginTop">2px</xsl:with-param>
850
            </xsl:call-template>
851
 
852
 
1554 jmachado 853
            <fo:block text-align="center" margin="0" font-size="10" font-weight="normal" >
1563 jmachado 854
                <xsl:apply-templates select="//respostasAgregadasGrupoUnidade/respostasAgregadasChartTable/respostasTable" mode="DataTable">
1554 jmachado 855
                    <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
856
                </xsl:apply-templates>
857
            </fo:block>
858
 
859
            <fo:block text-align="right" margin-top="10px" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
860
                Unidades avaliadas nos cursos onde o docente leciona: <xsl:value-of select="//unidadesNosCursos"/>
861
            </fo:block>
862
            <fo:block text-align="right" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
863
                Unidades avaliadas nas escolas onde o docente leciona: <xsl:value-of select="//unidadesNasEscolas"/>
864
            </fo:block>
865
 
1557 jmachado 866
            <fo:block-container margin-top="20px" margin-bottom="5px">
1563 jmachado 867
                <xsl:apply-templates select="//respostasAgregadasGrupoUnidade/mediasGrupo" mode="mediasGrupo">
1554 jmachado 868
                    <xsl:with-param name="objetoAvaliacao">das unidades</xsl:with-param>
869
                </xsl:apply-templates>
870
            </fo:block-container>
871
 
1557 jmachado 872
            <!--Considerando Respostas Superiores a 2 segindos-->
873
            <fo:block-container background-color="#aaaaaa" padding="5px" margin="0" margin-top="20px">
874
                <fo:block-container padding="0" margin="0">
875
                    <xsl:call-template name="subSubSeccao">
876
                        <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>
877
                    </xsl:call-template>
878
                </fo:block-container>
879
 
880
                <fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
1563 jmachado 881
 
882
                    <xsl:apply-templates select="//respostasAgregadasGrupoUnidade/respostasAgregadasChartTable2Secs/respostasTable" mode="DataTable">
1557 jmachado 883
                        <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
884
                    </xsl:apply-templates>
885
                </fo:block>
886
            </fo:block-container>
887
 
1562 jmachado 888
 
889
            <!--#######################################-->
890
            <!-- UNIDADES CURRICULARES INDIVIDUALMENTE-->
891
 
892
 
893
 
894
 
895
 
1563 jmachado 896
 
897
                <xsl:for-each select="//unidadesStats/unidadeStats[not(nomeCurso/text() = preceding-sibling::unidadeStats/nomeCurso/text())]">
898
                    <xsl:sort select="text()" data-type="text" />
899
 
900
 
901
                        <xsl:variable name="nomeCurso" select="nomeCurso/text()"/>
902
                        <xsl:variable name="cursoPos" select="position()"/>
903
                        <xsl:for-each select="//unidadesStats/unidadeStats[nomeCurso/text() = $nomeCurso]">
904
                            <xsl:sort select="nomeUnidade/text()" data-type="text" />
905
 
906
                            <fo:block-container padding="0" margin="0" page-break-before="always">
907
                                <xsl:if test="$cursoPos = 1 and position()=1"><xsl:attribute name="id">capUnidades</xsl:attribute></xsl:if>
908
                                <xsl:call-template name="seccaoGreen">
909
                                    <xsl:with-param name="text">5 - Análise das questões em cada unidade do docente</xsl:with-param>
910
                                    <xsl:with-param name="marginTop">0</xsl:with-param>
911
                                    <xsl:with-param name="icon">class.png</xsl:with-param>
912
                                </xsl:call-template>
913
                            </fo:block-container>
914
 
915
 
916
                            <xsl:call-template name="subSeccao">
917
                                <xsl:with-param name="text">5.<xsl:value-of select="$cursoPos"/> - <xsl:value-of select="nomeCurso/text()"/> (<xsl:value-of select="//unidadesStats/unidadeStats[nomeCurso=nomeCurso/text()]/codigoCurso[1]/text()"/>) </xsl:with-param>
918
                                <xsl:with-param name="marginTop">2px</xsl:with-param>
919
                                <xsl:with-param name="marginBottom">2px</xsl:with-param>
920
                            </xsl:call-template>
921
 
922
 
923
                            <xsl:call-template name="subSubSeccao">
924
                                <xsl:with-param name="text">5.<xsl:value-of select="$cursoPos"/>.<xsl:value-of select="position()"/> - <xsl:value-of select="nomeUnidade/text()"/> (<xsl:value-of select="codigoUnidade/text()"/>) </xsl:with-param>
925
                                <xsl:with-param name="marginTop">2px</xsl:with-param>
926
                                <xsl:with-param name="fontSize">12pt</xsl:with-param>
927
                                <xsl:with-param name="fontWeight">bold</xsl:with-param>
928
                            </xsl:call-template>
929
 
930
                            <xsl:call-template name="subSubSubSeccaoBlue">
931
                                <xsl:with-param name="text">Respostas ao grupo de questões sobre o Docente</xsl:with-param>
932
                                <xsl:with-param name="marginTop">2px</xsl:with-param>
933
                                <xsl:with-param name="icon">teacherIcon.png</xsl:with-param>
934
                            </xsl:call-template>
935
 
936
                            <fo:block-container padding="0" margin-left="15px" margin="0" margin-bottom="5px">
937
                                <fo:block text-align="center" margin="0" font-size="10" font-weight="normal" >
938
                                    <xsl:apply-templates select="docenteGroup/respostasTable" mode="DataTable">
939
                                        <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
940
                                        <xsl:with-param name="backgroundHeader" select="$BLUE_COLOR_SUB_SECTION"/>
941
                                    </xsl:apply-templates>
942
                                </fo:block>
943
 
944
                                <fo:block padding="0" margin="0" margin-top="5px">
945
                                    <xsl:apply-templates select="docenteGroup/mediasGrupo" mode="mediasGrupo">
946
                                        <xsl:with-param name="objetoAvaliacao">do docente</xsl:with-param>
947
                                        <xsl:with-param name="backgroundHeader" select="$BLUE_COLOR_SUB_SECTION"/>
948
                                        <xsl:with-param name="smileHeight">15</xsl:with-param>
949
                                        <xsl:with-param name="fontSize">6pt</xsl:with-param>
950
                                        <xsl:with-param name="fontSizeMedias">7pt</xsl:with-param>
951
                                    </xsl:apply-templates>
952
                                </fo:block>
953
                            </fo:block-container>
954
 
955
 
956
                            <xsl:call-template name="subSubSubSeccaoGreen">
957
                                <xsl:with-param name="text">Respostas ao grupo de questões sobre a Unidade</xsl:with-param>
958
                                <xsl:with-param name="marginTop">20px</xsl:with-param>
959
                                <xsl:with-param name="icon">cadeiraConteudos.png</xsl:with-param>
960
                            </xsl:call-template>
961
 
962
                            <fo:block-container padding="0" margin-left="15px" margin="0" margin-bottom="5px">
963
                                <fo:block text-align="center" margin="0" font-size="10" font-weight="normal" >
964
                                    <xsl:apply-templates select="unidadeGroup/respostasTable" mode="DataTable">
965
                                        <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
966
                                        <xsl:with-param name="backgroundHeader" select="$GREEN_COLOR_SUB_SECTION"/>
967
                                    </xsl:apply-templates>
968
                                </fo:block>
969
 
970
                                <fo:block padding="0" margin="0" margin-top="5px">
971
                                    <xsl:apply-templates select="unidadeGroup/mediasGrupo" mode="mediasGrupo">
972
                                        <xsl:with-param name="objetoAvaliacao">do docente</xsl:with-param>
973
                                        <xsl:with-param name="backgroundHeader" select="$GREEN_COLOR_SUB_SECTION"/>
974
                                        <xsl:with-param name="smileHeight">15</xsl:with-param>
975
                                        <xsl:with-param name="fontSize">6pt</xsl:with-param>
976
                                        <xsl:with-param name="fontSizeMedias">7pt</xsl:with-param>
977
                                    </xsl:apply-templates>
978
                                </fo:block>
979
                            </fo:block-container>
980
 
981
 
982
 
983
 
984
 
985
                        </xsl:for-each>
986
 
987
 
988
                </xsl:for-each>
989
 
990
                <!--<xsl:with-param name="text">5.<xsl:value-of select="position()"/> - <xsl:value-of select="nomeUnidade"/> (<xsl:value-of select="codigoUnidade"/>) </xsl:with-param>-->
991
 
992
 
993
 
994
 
995
 
1551 jmachado 996
        </fo:flow>
997
    </xsl:template>
1549 jmachado 998
 
1554 jmachado 999
    <xsl:template match="*" mode="graficosPerguntas">
1000
        <fo:block text-align="center" margin-left="10px">
1001
            <fo:table width="100%" table-layout="fixed">
1563 jmachado 1002
                <xsl:for-each select="./chartsRow[1]/perguntaStats/perguntaStats">
1554 jmachado 1003
                    <fo:table-column/>
1004
                </xsl:for-each>
1005
                <fo:table-body>
1563 jmachado 1006
                    <xsl:for-each select="./chartsRow">
1554 jmachado 1007
                        <fo:table-row>
1563 jmachado 1008
                            <xsl:for-each select="./perguntaStats/perguntaStats">
1554 jmachado 1009
                                <fo:table-cell>
1010
                                    <fo:block>
1011
                                        <fo:external-graphic
1012
                                                width="100%"
1013
                                                content-height="100%"
1014
                                                content-width="scale-to-fit"
1015
                                                scaling="uniform"
1016
                                                >
1017
                                            <xsl:attribute name="src">url('<xsl:value-of select="./tempFile"/>')
1018
                                            </xsl:attribute>
1019
                                        </fo:external-graphic>
1020
                                    </fo:block>
1021
                                </fo:table-cell>
1022
                            </xsl:for-each>
1023
                        </fo:table-row>
1024
                    </xsl:for-each>
1549 jmachado 1025
 
1554 jmachado 1026
                </fo:table-body>
1027
            </fo:table>
1028
        </fo:block>
1553 jmachado 1029
 
1554 jmachado 1030
        <fo:block-container margin-top="20px">
1031
            <xsl:call-template name="legendaCoresPerguntas"/>
1032
        </fo:block-container>
1033
    </xsl:template>
1553 jmachado 1034
 
1554 jmachado 1035
    <xsl:template match="*" mode="mediasGrupo">
1563 jmachado 1036
        <xsl:param name="backgroundHeader"><xsl:value-of select="$backgroundHeader"/></xsl:param>
1037
        <xsl:param name="backgroundFooter"><xsl:value-of select="$backgroundFooter"/></xsl:param>
1038
        <xsl:param name="showSmile">true</xsl:param>
1554 jmachado 1039
        <xsl:param name="objetoAvaliacao"/>
1563 jmachado 1040
        <xsl:param name="smileHeight">30</xsl:param>
1041
        <xsl:param name="fontSize">7pt</xsl:param>
1042
        <xsl:param name="fontSizeMedias">10pt</xsl:param>
1043
        <fo:block margin="0" padding="0">
1554 jmachado 1044
 
1563 jmachado 1045
            <fo:table width="100%" table-layout="fixed" font-size="{$fontSize}" font-weight="normal" margin="0" padding="0">
1554 jmachado 1046
                <fo:table-column column-width="60%"/>
1047
                <fo:table-column column-width="40%"/>
1048
                <fo:table-body>
1563 jmachado 1049
 
1554 jmachado 1050
                    <fo:table-row>
1563 jmachado 1051
                        <fo:table-cell margin="0" padding-left="0px" padding-right="5px" display-align="center">
1052
                            <fo:block padding-left="0" padding="0" margin="0">
1053
                                <xsl:apply-templates select="." mode="globalSmile">
1054
                                    <xsl:with-param name="objetoAvaliacao" select="$objetoAvaliacao"/>
1055
                                    <xsl:with-param name="backgroundHeader"><xsl:value-of select="$backgroundHeader"/></xsl:with-param>
1056
                                    <xsl:with-param name="backgroundFooter"><xsl:value-of select="$backgroundFooter"/></xsl:with-param>
1057
                                    <xsl:with-param name="showSmile" select="$showSmile"/>
1058
                                    <xsl:with-param name="fontSize" select="$fontSize"/>
1059
                                    <xsl:with-param name="fontSizeMedias" select="$fontSizeMedias"/>
1060
                                    <xsl:with-param name="smileHeight" select="$smileHeight"/>
1061
                                </xsl:apply-templates>
1062
                            </fo:block>
1554 jmachado 1063
                        </fo:table-cell>
1563 jmachado 1064
                        <fo:table-cell display-align="after" text-align="center" padding-left="5px" padding-right="0">
1554 jmachado 1065
                            <fo:block>
1563 jmachado 1066
                                <xsl:apply-templates select="./mediasGlobaisTable" mode="DataTable">
1067
                                    <xsl:with-param name="backgroundHeader"><xsl:value-of select="$backgroundHeader"/></xsl:with-param>
1068
                                    <xsl:with-param name="backgroundFooter"><xsl:value-of select="$backgroundFooter"/></xsl:with-param>
1069
                                    <xsl:with-param name="fontSize" select="$fontSize"/>
1070
                                </xsl:apply-templates>
1554 jmachado 1071
                            </fo:block>
1072
                        </fo:table-cell>
1073
                    </fo:table-row>
1074
                </fo:table-body>
1075
            </fo:table>
1076
 
1077
        </fo:block>
1078
    </xsl:template>
1079
 
1080
 
1081
 
1082
    <xsl:template match="*" mode="globalSmile">
1563 jmachado 1083
        <xsl:param name="backgroundHeader"><xsl:value-of select="$backgroundHeader"/></xsl:param>
1084
        <xsl:param name="backgroundFooter"><xsl:value-of select="$backgroundFooter"/></xsl:param>
1554 jmachado 1085
        <xsl:param name="objetoAvaliacao"></xsl:param>
1563 jmachado 1086
        <xsl:param name="smileHeight">30</xsl:param>
1087
        <xsl:param name="fontSize">7pt</xsl:param>
1088
        <xsl:param name="fontSizeMedias">10pt</xsl:param>
1089
        <xsl:param name="showSmile">true</xsl:param>
1090
 
1091
            <fo:table width="100%" table-layout="auto" font-size="{$fontSize}" font-weight="normal">
1554 jmachado 1092
                <fo:table-column column-width="30%"/>
1093
                <fo:table-column/>
1094
                <fo:table-column/>
1095
                <fo:table-column/>
1096
                <fo:table-column/>
1097
                <fo:table-column/>
1098
                <fo:table-body>
1563 jmachado 1099
                    <xsl:if test="$showSmile = 'true'">
1100
                        <fo:table-row>
1101
                            <fo:table-cell text-align="center" >
1102
                                <fo:block>
1554 jmachado 1103
 
1563 jmachado 1104
                                </fo:block>
1105
                            </fo:table-cell>
1106
                            <fo:table-cell text-align="center" >
1107
                                <fo:block>
1108
                                    <fo:external-graphic height="auto" width="auto"
1109
                                                         content-height="{$smileHeight}">
1110
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1111
                                        <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/sad.png')</xsl:attribute>
1112
                                    </fo:external-graphic>
1113
                                </fo:block>
1114
                            </fo:table-cell>
1115
                            <fo:table-cell>
1116
                                <fo:block></fo:block>
1117
                            </fo:table-cell>
1118
                            <fo:table-cell text-align="center" >
1119
                                <fo:block>
1120
                                    <fo:external-graphic height="auto" width="auto"
1121
                                                         content-height="{$smileHeight}">
1122
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1123
                                        <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/indiferent.png')</xsl:attribute>
1124
                                    </fo:external-graphic>
1125
                                </fo:block>
1126
                            </fo:table-cell>
1127
                            <fo:table-cell>
1128
                                <fo:block></fo:block>
1129
                            </fo:table-cell>
1130
                            <fo:table-cell text-align="center" >
1131
                                <fo:block>
1132
                                    <fo:external-graphic height="auto" width="auto"
1133
                                                         content-height="{$smileHeight}">
1134
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1135
                                        <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/smile.png')</xsl:attribute>
1136
                                    </fo:external-graphic>
1137
                                </fo:block>
1138
                            </fo:table-cell>
1139
                        </fo:table-row>
1140
                    </xsl:if>
1141
                    <fo:table-row border="2px solid black" font-size="{$fontSizeMedias}">
1142
                        <fo:table-cell display-align="center" background-color="{$backgroundHeader}" text-align="center" padding="2px" border="2px solid black" font-size="{$fontSize}">
1554 jmachado 1143
                            <fo:block>Avaliação média <xsl:value-of select="$objetoAvaliacao"/> em todas as questões</fo:block>
1144
                        </fo:table-cell>
1145
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
1146
                            <xsl:if test="./avaliacaoMediaArredondada=1">
1147
                                <xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
1148
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
1149
                            </xsl:if>
1150
                            <fo:block>1</fo:block>
1151
                        </fo:table-cell>
1152
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
1563 jmachado 1153
                            <xsl:if test="./avaliacaoMediaArredondada=2">
1154
                                <xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
1554 jmachado 1155
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
1156
                            </xsl:if>
1157
                            <fo:block>2</fo:block>
1158
                        </fo:table-cell>
1159
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
1563 jmachado 1160
                            <xsl:if test="./avaliacaoMediaArredondada=3">
1161
                                <xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
1554 jmachado 1162
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
1163
                            </xsl:if>
1164
                            <fo:block>3</fo:block>
1165
                        </fo:table-cell>
1166
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
1563 jmachado 1167
                            <xsl:if test="./avaliacaoMediaArredondada=4">
1168
                                <xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
1554 jmachado 1169
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
1170
                            </xsl:if>
1171
                            <fo:block>4</fo:block>
1172
                        </fo:table-cell>
1173
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
1563 jmachado 1174
                            <xsl:if test="./avaliacaoMediaArredondada=5">
1175
                                <xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
1554 jmachado 1176
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
1177
                            </xsl:if>
1178
                            <fo:block>5</fo:block>
1179
                        </fo:table-cell>
1180
                    </fo:table-row>
1181
                </fo:table-body>
1182
            </fo:table>
1183
    </xsl:template>
1184
 
1185
    <xsl:template name="legendaCoresPerguntas">
1186
        <fo:block>
1187
            <fo:table width="100%" table-layout="fixed" font-size="6.5pt" font-weight="normal">
1188
                <fo:table-column column-width="50"/>
1189
                <fo:table-column/>
1190
 
1191
                <fo:table-body>
1192
                    <fo:table-row>
1193
                        <fo:table-cell padding="2pt" number-columns-spanned="2">
1194
                            <fo:block text-align="left" font-weight="bold">Legenda de Cores:</fo:block>
1195
                        </fo:table-cell>
1196
                    </fo:table-row>
1197
                    <fo:table-row>
1198
                        <fo:table-cell background-color="rgb(253, 11, 0)" padding="2pt">
1199
                            <fo:block text-align="center">1</fo:block>
1200
                        </fo:table-cell>
1201
                        <fo:table-cell padding="2pt" ><fo:block>O estudante avaliou a questão como Nada Satisfeito</fo:block></fo:table-cell>
1202
                    </fo:table-row>
1203
                    <fo:table-row>
1204
                        <fo:table-cell background-color="rgb(255, 190, 0)" padding="2pt">
1205
                            <fo:block text-align="center">2</fo:block>
1206
                        </fo:table-cell>
1207
                        <fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão como Pouco Satisfeito</fo:block></fo:table-cell>
1208
                    </fo:table-row>
1209
                    <fo:table-row>
1210
                        <fo:table-cell background-color="rgb(255, 254, 0)" padding="2pt">
1211
                            <fo:block text-align="center">3</fo:block>
1212
                        </fo:table-cell>
1213
                        <fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão Satisfeito</fo:block></fo:table-cell>
1214
                    </fo:table-row>
1215
                    <fo:table-row>
1216
                        <fo:table-cell background-color="rgb(188, 255, 0)" padding="2pt">
1217
                            <fo:block text-align="center">4</fo:block>
1218
                        </fo:table-cell>
1219
                        <fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão bastante Satisfeito que corresponde a Bom</fo:block></fo:table-cell>
1220
                    </fo:table-row>
1221
                    <fo:table-row>
1222
                        <fo:table-cell background-color="rgb(32, 255, 5)" padding="2pt">
1223
                            <fo:block text-align="center">5</fo:block>
1224
                        </fo:table-cell>
1225
                        <fo:table-cell padding="2pt"><fo:block>O Estudante avaliou o docente com nota máxima de Muito Satisfeito</fo:block></fo:table-cell>
1226
                    </fo:table-row>
1227
                </fo:table-body>
1228
            </fo:table>
1229
        </fo:block>
1230
    </xsl:template>
1231
 
1232
 
1233
 
1553 jmachado 1234
    <xsl:template name="barraPercentil">
1235
        <xsl:param name="valor"/>
1236
        <xsl:param name="colors">false</xsl:param>
1554 jmachado 1237
        <fo:block-container margin="1px" border="1px solid #C6C6CA" padding="0">
1553 jmachado 1238
            <xsl:choose>
1239
                <xsl:when test="$colors = 'false'">
1240
                    <xsl:attribute name="border">1px solid #C6C6CA</xsl:attribute>
1241
                </xsl:when>
1242
                <xsl:otherwise>
1563 jmachado 1243
                    <xsl:attribute name="border">1px solid <xsl:value-of select="$STD_COLOR_SECTION"/></xsl:attribute>
1553 jmachado 1244
                </xsl:otherwise>
1245
            </xsl:choose>
1554 jmachado 1246
            <fo:block-container border="1px solid #C6C6CA" margin="0" padding-top="1px" padding-bottom="0">
1553 jmachado 1247
                <xsl:choose>
1248
                    <xsl:when test="$colors = 'false'">
1249
                        <xsl:attribute name="background-color">#B9F1B1</xsl:attribute>
1250
                    </xsl:when>
1251
                    <xsl:otherwise>
1252
 
1253
                        <xsl:choose>
1563 jmachado 1254
                            <xsl:when test="$valor &lt; 21">
1255
                                <xsl:attribute name="background-color"><xsl:value-of select="//color1Hex"/></xsl:attribute>
1553 jmachado 1256
                            </xsl:when>
1563 jmachado 1257
                            <xsl:when test="$valor &lt; 41"><xsl:attribute name="background-color"><xsl:value-of select="//color2Hex"/></xsl:attribute></xsl:when>
1258
                            <xsl:when test="$valor &lt; 61"><xsl:attribute name="background-color"><xsl:value-of select="//color3Hex"/></xsl:attribute></xsl:when>
1259
                            <xsl:when test="$valor &lt; 81"><xsl:attribute name="background-color"><xsl:value-of select="//color4Hex"/></xsl:attribute></xsl:when>
1553 jmachado 1260
                            <xsl:otherwise>
1563 jmachado 1261
                                <xsl:attribute name="background-color"><xsl:value-of select="//color5Hex"/></xsl:attribute>
1553 jmachado 1262
                            </xsl:otherwise>
1263
                        </xsl:choose>
1264
                    </xsl:otherwise>
1265
                </xsl:choose>
1266
                <xsl:attribute name="width"><xsl:value-of select="$valor"/>%</xsl:attribute>
1267
                <fo:block><xsl:value-of select="$valor"/>%</fo:block>
1268
            </fo:block-container>
1269
        </fo:block-container>
1270
    </xsl:template>
1271
 
1554 jmachado 1272
    <xsl:template name="barraPercentilDefined">
1273
        <xsl:param name="valor"/>
1274
        <xsl:param name="percentDefined"/>
1275
        <xsl:param name="colors">false</xsl:param>
1553 jmachado 1276
 
1554 jmachado 1277
        <fo:block-container margin="1px" border="1px solid #C6C6CA" padding="0">
1278
 
1279
            <fo:block-container border="1px solid #C6C6CA" margin="0" padding-top="1px" padding-bottom="0">
1280
                <xsl:choose>
1281
                    <xsl:when test="$colors = 'false'">
1282
                        <xsl:attribute name="border">1px solid #8D7F5C</xsl:attribute>
1283
                        <xsl:attribute name="background-color">#B9F1B1</xsl:attribute>
1284
 
1285
                    </xsl:when>
1286
                    <xsl:otherwise>
1287
 
1288
                        <xsl:choose>
1563 jmachado 1289
                            <xsl:when test="$percentDefined &lt; 21">
1554 jmachado 1290
                                <xsl:attribute name="border">1px solid #B10000</xsl:attribute>
1563 jmachado 1291
                                <xsl:attribute name="background-color"><xsl:value-of select="//color1Hex"/></xsl:attribute>
1554 jmachado 1292
                            </xsl:when>
1563 jmachado 1293
                            <xsl:when test="$percentDefined &lt; 41">
1554 jmachado 1294
                                <xsl:attribute name="border">1px solid #B85C00</xsl:attribute>
1563 jmachado 1295
                                <xsl:attribute name="background-color"><xsl:value-of select="//color2Hex"/>
1296
                            </xsl:attribute></xsl:when>
1297
                            <xsl:when test="$percentDefined &lt; 61">
1298
                                <xsl:attribute name="background-color"><xsl:value-of select="//color3Hex"/></xsl:attribute>
1554 jmachado 1299
                                <xsl:attribute name="border">1px solid #868600</xsl:attribute>
1300
                            </xsl:when>
1563 jmachado 1301
                            <xsl:when test="$percentDefined &lt; 81">
1302
                                <xsl:attribute name="background-color"><xsl:value-of select="//color4Hex"/></xsl:attribute>
1303
                                <xsl:attribute name="border">1px solid #157C00</xsl:attribute>
1304
                            </xsl:when>
1554 jmachado 1305
                            <xsl:otherwise>
1563 jmachado 1306
                                <xsl:attribute name="background-color"><xsl:value-of select="//color5Hex"/></xsl:attribute>
1554 jmachado 1307
                                <xsl:attribute name="border">1px solid #157C00</xsl:attribute>
1308
                            </xsl:otherwise>
1309
                        </xsl:choose>
1310
                    </xsl:otherwise>
1311
                </xsl:choose>
1312
                <xsl:attribute name="width"><xsl:value-of select="$percentDefined"/>%</xsl:attribute>
1313
                <fo:block><xsl:value-of select="$valor"/></fo:block>
1314
            </fo:block-container>
1315
        </fo:block-container>
1316
    </xsl:template>
1317
 
1318
 
1551 jmachado 1319
    <xsl:template name="footerDefault">
1320
        <fo:table width="100%" table-layout="fixed" border-top="1px solid black" font-size="6.5pt">
1321
            <fo:table-column column-width="20%"/>
1322
            <fo:table-column column-width="80%"/>
1549 jmachado 1323
 
1324
 
1551 jmachado 1325
            <fo:table-body>
1326
                <fo:table-row>
1327
                    <fo:table-cell padding-top="3pt">
1328
                        <fo:block>
1329
                            Atualizado a
1553 jmachado 1330
                            <xsl:value-of select="$updateDate"/> / Página
1551 jmachado 1331
                            <fo:page-number/>
1332
                        </fo:block>
1333
                        <fo:block font-size="5pt">
1334
                            IPP.AC.xxxx.1
1335
                        </fo:block>
1336
 
1337
                    </fo:table-cell>
1338
                    <fo:table-cell padding-top="3pt">
1339
                        <fo:block font-size="6pt" text-align="right">
1553 jmachado 1340
                            http://pae.ipportalegre.pt | gerado pela plataforma ipp-pae® 2016
1551 jmachado 1341
                        </fo:block>
1342
                    </fo:table-cell>
1343
                </fo:table-row>
1344
            </fo:table-body>
1345
        </fo:table>
1346
    </xsl:template>
1347
    <xsl:template name="headerTeacher">
1348
        <fo:block text-align="left" border-bottom="1px solid #58585A">
1349
            <fo:table width="100%" table-layout="fixed" >
1549 jmachado 1350
                <fo:table-column column-width="80%"/>
1551 jmachado 1351
                <fo:table-column column-width="20%"/>
1549 jmachado 1352
 
1353
 
1354
                <fo:table-body>
1355
                    <fo:table-row>
1551 jmachado 1356
                        <fo:table-cell>
1549 jmachado 1357
                            <fo:block>
1551 jmachado 1358
                                <fo:external-graphic height="auto" width="auto"
1359
                                                     content-height="40">
1360
                                    <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1553 jmachado 1361
                                    <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/layout/themes/ipp/logo.jpg')
1551 jmachado 1362
                                    </xsl:attribute>
1363
                                </fo:external-graphic>
1549 jmachado 1364
                            </fo:block>
1551 jmachado 1365
                            <fo:block font-size="10px" padding="0px" text-align="left">
1553 jmachado 1366
                                <fo:inline font-weight="bold"> Relatório de Avaliação Pedagógica</fo:inline>
1549 jmachado 1367
                            </fo:block>
1551 jmachado 1368
                            <fo:block  font-size="10px" padding="0px" margin-top="0px" text-align="left" >
1553 jmachado 1369
                                <fo:inline>Avaliação pelos alunos do docente:</fo:inline>
1551 jmachado 1370
                            </fo:block>
1371
                        </fo:table-cell>
1372
                        <fo:table-cell>
1373
                            <fo:block font-size="10px" text-align="right" >
1553 jmachado 1374
                                Resultados dos Inquéritos Pedagógicos
1551 jmachado 1375
                            </fo:block>
1376
                            <fo:block font-size="10px" padding="0px" margin-top="0px" text-align="right" >
1377
                                <fo:inline font-weight="bold">Ano letivo:</fo:inline> <xsl:value-of select="$anoLectivo"/>
1378
                            </fo:block>
1562 jmachado 1379
 
1551 jmachado 1380
                        </fo:table-cell>
1549 jmachado 1381
 
1551 jmachado 1382
                    </fo:table-row>
1383
                    <fo:table-row background-color="#fff9ea">
1384
                        <fo:table-cell>
1385
                            <fo:block font-size="12px" padding="2px" margin-top="0px" >
1553 jmachado 1386
                                <fo:inline text-align="left"><xsl:value-of select="$nomeDocente"/> / Número: <xsl:value-of select="$numeroDocente"/></fo:inline>
1551 jmachado 1387
                            </fo:block>
1549 jmachado 1388
                        </fo:table-cell>
1551 jmachado 1389
                        <fo:table-cell>
1390
                            <fo:block font-size="12px" padding="2px" margin-top="0px" text-align="right" >
1391
                                <fo:inline>Pagina: <fo:page-number/></fo:inline>
1549 jmachado 1392
                            </fo:block>
1393
                        </fo:table-cell>
1551 jmachado 1394
 
1549 jmachado 1395
                    </fo:table-row>
1551 jmachado 1396
 
1549 jmachado 1397
                </fo:table-body>
1398
            </fo:table>
1399
 
1400
 
1401
 
1402
 
1551 jmachado 1403
        </fo:block>
1549 jmachado 1404
    </xsl:template>
1405
 
1406
 
1563 jmachado 1407
    <xsl:variable name="backgroundHeader"><xsl:value-of select="$STD_COLOR_SECTION"/></xsl:variable>
1554 jmachado 1408
    <xsl:variable name="backgroundNormal">#FFFFFF</xsl:variable>
1563 jmachado 1409
    <xsl:variable name="backgroundFooter"><xsl:value-of select="$STD_COLOR_SECTION"/></xsl:variable>
1554 jmachado 1410
    <xsl:variable name="borderInHeader">2px solid black</xsl:variable>
1411
    <xsl:variable name="borderInCell">1px dashed black</xsl:variable>
1412
    <xsl:variable name="borderInFooter">2px solid black</xsl:variable>
1413
    <xsl:variable name="borderInCellVertical">1px solid black</xsl:variable>
1414
    <xsl:variable name="borderTable">2px solid black</xsl:variable>
1415
 
1553 jmachado 1416
    <xsl:template match="*" mode="DataTable">
1563 jmachado 1417
 
1554 jmachado 1418
        <xsl:param name="firstColPercentSize"></xsl:param>
1563 jmachado 1419
        <xsl:param name="backgroundHeader"><xsl:value-of select="$backgroundHeader"/></xsl:param>
1420
        <xsl:param name="backgroundFooter"><xsl:value-of select="$backgroundFooter"/></xsl:param>
1421
        <xsl:param name="fontSize">7pt</xsl:param>
1554 jmachado 1422
 
1423
 
1563 jmachado 1424
        <fo:table width="100%" table-layout="auto" font-size="{$fontSize}">
1553 jmachado 1425
            <xsl:attribute name="border"><xsl:value-of select="$borderTable"/></xsl:attribute>
1554 jmachado 1426
            <xsl:for-each select="./rows/row[1]/cols/col">
1427
                <xsl:choose>
1428
                    <xsl:when test="$firstColPercentSize != '' and position() = 1">
1429
                        <fo:table-column column-width="{$firstColPercentSize}"/>
1430
                    </xsl:when>
1431
                    <xsl:otherwise><fo:table-column/></xsl:otherwise>
1432
                </xsl:choose>
1433
 
1553 jmachado 1434
            </xsl:for-each>
1435
            <fo:table-body>
1436
                <xsl:for-each select="./rows/row">
1437
                    <xsl:variable name="rowPosition"><xsl:value-of select="position()"/></xsl:variable>
1438
                    <xsl:variable name="lastRowPosition"><xsl:value-of select="last()"/></xsl:variable>
1439
                    <fo:table-row background-color="{$backgroundHeader}">
1440
                        <xsl:choose>
1441
                            <xsl:when test="./type='header'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundHeader"/></xsl:attribute></xsl:when>
1442
                            <xsl:when test="./type='normal'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundNormal"/></xsl:attribute></xsl:when>
1443
                            <xsl:when test="./type='footer'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundFooter"/></xsl:attribute></xsl:when>
1444
                        </xsl:choose>
1445
                        <xsl:for-each select="./cols/col">
1554 jmachado 1446
                            <fo:table-cell padding="0" display-align="center">
1447
                                <xsl:if test="./backgroundColor != ''">
1448
                                    <xsl:attribute name="background-color"><xsl:value-of select="./backgroundColor"/></xsl:attribute>
1449
                                </xsl:if>
1553 jmachado 1450
                                <xsl:choose>
1451
                                    <xsl:when test="../../type='header'"><xsl:attribute name="border"><xsl:value-of select="$borderInHeader"/></xsl:attribute></xsl:when>
1452
                                    <xsl:when test="../../type='normal'"><xsl:attribute name="border"><xsl:value-of select="$borderInCell"/></xsl:attribute></xsl:when>
1453
                                    <xsl:when test="../../type='footer'"><xsl:attribute name="border"><xsl:value-of select="$borderInFooter"/></xsl:attribute></xsl:when>
1454
                                </xsl:choose>
1455
 
1456
 
1457
 
1458
 
1459
                                <xsl:choose>
1460
                                    <xsl:when test="./align='left'"><xsl:attribute name="text-align">start</xsl:attribute></xsl:when>
1461
                                    <xsl:when test="./align='right'"><xsl:attribute name="text-align">end</xsl:attribute></xsl:when>
1462
                                </xsl:choose>
1463
                                <xsl:if test="../../cols/col/type = 'percentage' and ./type != 'percentage'">
1554 jmachado 1464
                                    <xsl:attribute name="padding-top">2px</xsl:attribute>
1553 jmachado 1465
                                </xsl:if>
1466
 
1467
 
1468
                                <xsl:if test="../../type='normal'">
1469
                                    <xsl:if test="./type='label' and position()=1">
1470
                                        <xsl:attribute name="border-right"><xsl:value-of select="$borderInHeader"/></xsl:attribute>
1471
                                    </xsl:if>
1472
                                    <xsl:if test="./type='label' and position()=last()">
1473
                                        <xsl:attribute name="border-left"><xsl:value-of select="$borderInHeader"/></xsl:attribute>
1474
                                    </xsl:if>
1475
                                    <xsl:if test="../../../row[$rowPosition+1]/type='normal'">
1476
                                        <xsl:attribute name="border-bottom"><xsl:value-of select="$borderInCell"/></xsl:attribute>
1477
                                    </xsl:if>
1478
                                </xsl:if>
1479
 
1480
                                <xsl:if test="../../../row[$rowPosition - 1]/type='header'">
1481
                                    <xsl:attribute name="border-top"><xsl:value-of select="$borderInHeader"/></xsl:attribute>
1482
                                </xsl:if>
1483
                                <xsl:if test="../../../row[$rowPosition +1]/type='footer'">
1484
                                    <xsl:attribute name="border-bottom"><xsl:value-of select="$borderInFooter"/></xsl:attribute>
1485
                                </xsl:if>
1486
 
1487
 
1488
                                <xsl:if test="../col[position() + 1 != last()]">
1489
                                    <xsl:attribute name="border-right"><xsl:value-of select="$borderInCellVertical"/></xsl:attribute>
1490
                                </xsl:if>
1491
 
1492
 
1493
 
1494
 
1495
                                <fo:block-container margin="0" padding="0">
1496
                                <xsl:choose>
1554 jmachado 1497
                                    <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 1498
                                    <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 1499
                                    <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 1500
                                    <xsl:when test="./type='percentage'">
1501
                                        <xsl:attribute name="text-align">left</xsl:attribute>
1502
                                        <xsl:attribute name="padding">0</xsl:attribute>
1503
                                        <xsl:call-template name="barraPercentil">
1504
                                            <xsl:with-param name="valor" select="./value"/>
1554 jmachado 1505
                                            <xsl:with-param name="colors" select="./usePercentageColor"/>
1553 jmachado 1506
                                        </xsl:call-template>
1507
                                    </xsl:when>
1554 jmachado 1508
                                    <xsl:when test="./type='percentageDefined'">
1509
                                        <xsl:attribute name="text-align">left</xsl:attribute>
1510
                                        <xsl:attribute name="padding">0</xsl:attribute>
1511
                                        <xsl:call-template name="barraPercentilDefined">
1512
                                            <xsl:with-param name="valor" select="./value"/>
1513
                                            <xsl:with-param name="percentDefined" select="./percentDefined"/>
1514
                                            <xsl:with-param name="colors" select="./usePercentageColor"/>
1515
                                        </xsl:call-template>
1516
                                    </xsl:when>
1553 jmachado 1517
                                </xsl:choose>
1518
 
1519
                            </fo:block-container>
1520
 
1521
 
1522
                            </fo:table-cell>
1523
                        </xsl:for-each>
1524
                    </fo:table-row>
1525
                </xsl:for-each>
1526
            </fo:table-body>
1527
        </fo:table>
1528
    </xsl:template>
1529
 
1530
 
1531
 
1549 jmachado 1532
</xsl:stylesheet>