Subversion Repositories bacoAlunos

Rev

Rev 1564 | Rev 1567 | 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">
1565 jmachado 841
                    <xsl:with-param name="text">4 - Análise das questões sobre 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" >
1564 jmachado 938
                                    <xsl:apply-templates select="unidadeStatsGrupoDocente/respostasTable" mode="DataTable">
1563 jmachado 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>
1565 jmachado 943
                                <fo:block text-align="right" margin-top="10px" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
944
                                    Unidades consideradas no curso de <xsl:value-of select="nomeCurso"/>: <xsl:value-of select="unidadeStatsGrupoDocente/unidadesNoCurso"/>
945
                                </fo:block>
946
                                <fo:block text-align="right" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
947
                                    Unidades consideradas na media da <xsl:value-of select="nomeEscola"/>: <xsl:value-of select="unidadeStatsGrupoDocente/unidadesNaEscola"/>
948
                                </fo:block>
1563 jmachado 949
 
950
                                <fo:block padding="0" margin="0" margin-top="5px">
1564 jmachado 951
                                    <xsl:apply-templates select="unidadeStatsGrupoDocente/mediasGrupo" mode="mediasGrupo">
1563 jmachado 952
                                        <xsl:with-param name="objetoAvaliacao">do docente</xsl:with-param>
953
                                        <xsl:with-param name="backgroundHeader" select="$BLUE_COLOR_SUB_SECTION"/>
954
                                        <xsl:with-param name="smileHeight">15</xsl:with-param>
955
                                        <xsl:with-param name="fontSize">6pt</xsl:with-param>
956
                                        <xsl:with-param name="fontSizeMedias">7pt</xsl:with-param>
957
                                    </xsl:apply-templates>
958
                                </fo:block>
959
                            </fo:block-container>
960
 
961
 
962
                            <xsl:call-template name="subSubSubSeccaoGreen">
963
                                <xsl:with-param name="text">Respostas ao grupo de questões sobre a Unidade</xsl:with-param>
964
                                <xsl:with-param name="marginTop">20px</xsl:with-param>
965
                                <xsl:with-param name="icon">cadeiraConteudos.png</xsl:with-param>
966
                            </xsl:call-template>
967
 
968
                            <fo:block-container padding="0" margin-left="15px" margin="0" margin-bottom="5px">
969
                                <fo:block text-align="center" margin="0" font-size="10" font-weight="normal" >
1564 jmachado 970
                                    <xsl:apply-templates select="unidadeStatsGrupoUnidade/respostasTable" mode="DataTable">
1563 jmachado 971
                                        <xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
972
                                        <xsl:with-param name="backgroundHeader" select="$GREEN_COLOR_SUB_SECTION"/>
973
                                    </xsl:apply-templates>
974
                                </fo:block>
975
 
1565 jmachado 976
                                <fo:block text-align="right" margin-top="10px" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
977
                                    Unidades consideradas no curso de <xsl:value-of select="nomeCurso"/>: <xsl:value-of select="unidadeStatsGrupoUnidade/unidadesNoCurso"/>
978
                                </fo:block>
979
                                <fo:block text-align="right" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
980
                                    Unidades consideradas na <xsl:value-of select="nomeEscola"/>: <xsl:value-of select="unidadeStatsGrupoUnidade/unidadesNaEscola"/>
981
                                </fo:block>
982
 
1563 jmachado 983
                                <fo:block padding="0" margin="0" margin-top="5px">
1564 jmachado 984
                                    <xsl:apply-templates select="unidadeStatsGrupoUnidade/mediasGrupo" mode="mediasGrupo">
1563 jmachado 985
                                        <xsl:with-param name="objetoAvaliacao">do docente</xsl:with-param>
986
                                        <xsl:with-param name="backgroundHeader" select="$GREEN_COLOR_SUB_SECTION"/>
987
                                        <xsl:with-param name="smileHeight">15</xsl:with-param>
988
                                        <xsl:with-param name="fontSize">6pt</xsl:with-param>
989
                                        <xsl:with-param name="fontSizeMedias">7pt</xsl:with-param>
990
                                    </xsl:apply-templates>
991
                                </fo:block>
992
                            </fo:block-container>
993
 
994
 
995
 
996
 
997
 
998
                        </xsl:for-each>
999
 
1000
 
1001
                </xsl:for-each>
1002
 
1003
                <!--<xsl:with-param name="text">5.<xsl:value-of select="position()"/> - <xsl:value-of select="nomeUnidade"/> (<xsl:value-of select="codigoUnidade"/>) </xsl:with-param>-->
1004
 
1005
 
1006
 
1007
 
1008
 
1551 jmachado 1009
        </fo:flow>
1010
    </xsl:template>
1549 jmachado 1011
 
1554 jmachado 1012
    <xsl:template match="*" mode="graficosPerguntas">
1013
        <fo:block text-align="center" margin-left="10px">
1014
            <fo:table width="100%" table-layout="fixed">
1563 jmachado 1015
                <xsl:for-each select="./chartsRow[1]/perguntaStats/perguntaStats">
1554 jmachado 1016
                    <fo:table-column/>
1017
                </xsl:for-each>
1018
                <fo:table-body>
1563 jmachado 1019
                    <xsl:for-each select="./chartsRow">
1554 jmachado 1020
                        <fo:table-row>
1563 jmachado 1021
                            <xsl:for-each select="./perguntaStats/perguntaStats">
1554 jmachado 1022
                                <fo:table-cell>
1023
                                    <fo:block>
1024
                                        <fo:external-graphic
1025
                                                width="100%"
1026
                                                content-height="100%"
1027
                                                content-width="scale-to-fit"
1028
                                                scaling="uniform"
1029
                                                >
1030
                                            <xsl:attribute name="src">url('<xsl:value-of select="./tempFile"/>')
1031
                                            </xsl:attribute>
1032
                                        </fo:external-graphic>
1033
                                    </fo:block>
1034
                                </fo:table-cell>
1035
                            </xsl:for-each>
1036
                        </fo:table-row>
1037
                    </xsl:for-each>
1549 jmachado 1038
 
1554 jmachado 1039
                </fo:table-body>
1040
            </fo:table>
1041
        </fo:block>
1553 jmachado 1042
 
1554 jmachado 1043
        <fo:block-container margin-top="20px">
1044
            <xsl:call-template name="legendaCoresPerguntas"/>
1045
        </fo:block-container>
1046
    </xsl:template>
1553 jmachado 1047
 
1554 jmachado 1048
    <xsl:template match="*" mode="mediasGrupo">
1563 jmachado 1049
        <xsl:param name="backgroundHeader"><xsl:value-of select="$backgroundHeader"/></xsl:param>
1050
        <xsl:param name="backgroundFooter"><xsl:value-of select="$backgroundFooter"/></xsl:param>
1051
        <xsl:param name="showSmile">true</xsl:param>
1554 jmachado 1052
        <xsl:param name="objetoAvaliacao"/>
1563 jmachado 1053
        <xsl:param name="smileHeight">30</xsl:param>
1054
        <xsl:param name="fontSize">7pt</xsl:param>
1055
        <xsl:param name="fontSizeMedias">10pt</xsl:param>
1056
        <fo:block margin="0" padding="0">
1554 jmachado 1057
 
1563 jmachado 1058
            <fo:table width="100%" table-layout="fixed" font-size="{$fontSize}" font-weight="normal" margin="0" padding="0">
1554 jmachado 1059
                <fo:table-column column-width="60%"/>
1060
                <fo:table-column column-width="40%"/>
1061
                <fo:table-body>
1563 jmachado 1062
 
1554 jmachado 1063
                    <fo:table-row>
1563 jmachado 1064
                        <fo:table-cell margin="0" padding-left="0px" padding-right="5px" display-align="center">
1065
                            <fo:block padding-left="0" padding="0" margin="0">
1066
                                <xsl:apply-templates select="." mode="globalSmile">
1067
                                    <xsl:with-param name="objetoAvaliacao" select="$objetoAvaliacao"/>
1068
                                    <xsl:with-param name="backgroundHeader"><xsl:value-of select="$backgroundHeader"/></xsl:with-param>
1069
                                    <xsl:with-param name="backgroundFooter"><xsl:value-of select="$backgroundFooter"/></xsl:with-param>
1070
                                    <xsl:with-param name="showSmile" select="$showSmile"/>
1071
                                    <xsl:with-param name="fontSize" select="$fontSize"/>
1072
                                    <xsl:with-param name="fontSizeMedias" select="$fontSizeMedias"/>
1073
                                    <xsl:with-param name="smileHeight" select="$smileHeight"/>
1074
                                </xsl:apply-templates>
1075
                            </fo:block>
1554 jmachado 1076
                        </fo:table-cell>
1563 jmachado 1077
                        <fo:table-cell display-align="after" text-align="center" padding-left="5px" padding-right="0">
1554 jmachado 1078
                            <fo:block>
1563 jmachado 1079
                                <xsl:apply-templates select="./mediasGlobaisTable" mode="DataTable">
1080
                                    <xsl:with-param name="backgroundHeader"><xsl:value-of select="$backgroundHeader"/></xsl:with-param>
1081
                                    <xsl:with-param name="backgroundFooter"><xsl:value-of select="$backgroundFooter"/></xsl:with-param>
1082
                                    <xsl:with-param name="fontSize" select="$fontSize"/>
1083
                                </xsl:apply-templates>
1554 jmachado 1084
                            </fo:block>
1085
                        </fo:table-cell>
1086
                    </fo:table-row>
1087
                </fo:table-body>
1088
            </fo:table>
1089
 
1090
        </fo:block>
1091
    </xsl:template>
1092
 
1093
 
1094
 
1095
    <xsl:template match="*" mode="globalSmile">
1563 jmachado 1096
        <xsl:param name="backgroundHeader"><xsl:value-of select="$backgroundHeader"/></xsl:param>
1097
        <xsl:param name="backgroundFooter"><xsl:value-of select="$backgroundFooter"/></xsl:param>
1554 jmachado 1098
        <xsl:param name="objetoAvaliacao"></xsl:param>
1563 jmachado 1099
        <xsl:param name="smileHeight">30</xsl:param>
1100
        <xsl:param name="fontSize">7pt</xsl:param>
1101
        <xsl:param name="fontSizeMedias">10pt</xsl:param>
1102
        <xsl:param name="showSmile">true</xsl:param>
1103
 
1104
            <fo:table width="100%" table-layout="auto" font-size="{$fontSize}" font-weight="normal">
1554 jmachado 1105
                <fo:table-column column-width="30%"/>
1106
                <fo:table-column/>
1107
                <fo:table-column/>
1108
                <fo:table-column/>
1109
                <fo:table-column/>
1110
                <fo:table-column/>
1111
                <fo:table-body>
1563 jmachado 1112
                    <xsl:if test="$showSmile = 'true'">
1113
                        <fo:table-row>
1114
                            <fo:table-cell text-align="center" >
1115
                                <fo:block>
1554 jmachado 1116
 
1563 jmachado 1117
                                </fo:block>
1118
                            </fo:table-cell>
1119
                            <fo:table-cell text-align="center" >
1120
                                <fo:block>
1121
                                    <fo:external-graphic height="auto" width="auto"
1122
                                                         content-height="{$smileHeight}">
1123
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1124
                                        <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/sad.png')</xsl:attribute>
1125
                                    </fo:external-graphic>
1126
                                </fo:block>
1127
                            </fo:table-cell>
1128
                            <fo:table-cell>
1129
                                <fo:block></fo:block>
1130
                            </fo:table-cell>
1131
                            <fo:table-cell text-align="center" >
1132
                                <fo:block>
1133
                                    <fo:external-graphic height="auto" width="auto"
1134
                                                         content-height="{$smileHeight}">
1135
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1136
                                        <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/indiferent.png')</xsl:attribute>
1137
                                    </fo:external-graphic>
1138
                                </fo:block>
1139
                            </fo:table-cell>
1140
                            <fo:table-cell>
1141
                                <fo:block></fo:block>
1142
                            </fo:table-cell>
1143
                            <fo:table-cell text-align="center" >
1144
                                <fo:block>
1145
                                    <fo:external-graphic height="auto" width="auto"
1146
                                                         content-height="{$smileHeight}">
1147
                                        <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1148
                                        <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/smile.png')</xsl:attribute>
1149
                                    </fo:external-graphic>
1150
                                </fo:block>
1151
                            </fo:table-cell>
1152
                        </fo:table-row>
1153
                    </xsl:if>
1154
                    <fo:table-row border="2px solid black" font-size="{$fontSizeMedias}">
1155
                        <fo:table-cell display-align="center" background-color="{$backgroundHeader}" text-align="center" padding="2px" border="2px solid black" font-size="{$fontSize}">
1554 jmachado 1156
                            <fo:block>Avaliação média <xsl:value-of select="$objetoAvaliacao"/> em todas as questões</fo:block>
1157
                        </fo:table-cell>
1158
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
1159
                            <xsl:if test="./avaliacaoMediaArredondada=1">
1160
                                <xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
1161
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
1162
                            </xsl:if>
1163
                            <fo:block>1</fo:block>
1164
                        </fo:table-cell>
1165
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
1563 jmachado 1166
                            <xsl:if test="./avaliacaoMediaArredondada=2">
1167
                                <xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
1554 jmachado 1168
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
1169
                            </xsl:if>
1170
                            <fo:block>2</fo:block>
1171
                        </fo:table-cell>
1172
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
1563 jmachado 1173
                            <xsl:if test="./avaliacaoMediaArredondada=3">
1174
                                <xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
1554 jmachado 1175
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
1176
                            </xsl:if>
1177
                            <fo:block>3</fo:block>
1178
                        </fo:table-cell>
1179
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
1563 jmachado 1180
                            <xsl:if test="./avaliacaoMediaArredondada=4">
1181
                                <xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
1554 jmachado 1182
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
1183
                            </xsl:if>
1184
                            <fo:block>4</fo:block>
1185
                        </fo:table-cell>
1186
                        <fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
1563 jmachado 1187
                            <xsl:if test="./avaliacaoMediaArredondada=5">
1188
                                <xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
1554 jmachado 1189
                                <xsl:attribute name="font-weight">bold</xsl:attribute>
1190
                            </xsl:if>
1191
                            <fo:block>5</fo:block>
1192
                        </fo:table-cell>
1193
                    </fo:table-row>
1194
                </fo:table-body>
1195
            </fo:table>
1196
    </xsl:template>
1197
 
1198
    <xsl:template name="legendaCoresPerguntas">
1199
        <fo:block>
1200
            <fo:table width="100%" table-layout="fixed" font-size="6.5pt" font-weight="normal">
1201
                <fo:table-column column-width="50"/>
1202
                <fo:table-column/>
1203
 
1204
                <fo:table-body>
1205
                    <fo:table-row>
1206
                        <fo:table-cell padding="2pt" number-columns-spanned="2">
1207
                            <fo:block text-align="left" font-weight="bold">Legenda de Cores:</fo:block>
1208
                        </fo:table-cell>
1209
                    </fo:table-row>
1210
                    <fo:table-row>
1211
                        <fo:table-cell background-color="rgb(253, 11, 0)" padding="2pt">
1212
                            <fo:block text-align="center">1</fo:block>
1213
                        </fo:table-cell>
1214
                        <fo:table-cell padding="2pt" ><fo:block>O estudante avaliou a questão como Nada Satisfeito</fo:block></fo:table-cell>
1215
                    </fo:table-row>
1216
                    <fo:table-row>
1217
                        <fo:table-cell background-color="rgb(255, 190, 0)" padding="2pt">
1218
                            <fo:block text-align="center">2</fo:block>
1219
                        </fo:table-cell>
1220
                        <fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão como Pouco Satisfeito</fo:block></fo:table-cell>
1221
                    </fo:table-row>
1222
                    <fo:table-row>
1223
                        <fo:table-cell background-color="rgb(255, 254, 0)" padding="2pt">
1224
                            <fo:block text-align="center">3</fo:block>
1225
                        </fo:table-cell>
1226
                        <fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão Satisfeito</fo:block></fo:table-cell>
1227
                    </fo:table-row>
1228
                    <fo:table-row>
1229
                        <fo:table-cell background-color="rgb(188, 255, 0)" padding="2pt">
1230
                            <fo:block text-align="center">4</fo:block>
1231
                        </fo:table-cell>
1232
                        <fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão bastante Satisfeito que corresponde a Bom</fo:block></fo:table-cell>
1233
                    </fo:table-row>
1234
                    <fo:table-row>
1235
                        <fo:table-cell background-color="rgb(32, 255, 5)" padding="2pt">
1236
                            <fo:block text-align="center">5</fo:block>
1237
                        </fo:table-cell>
1238
                        <fo:table-cell padding="2pt"><fo:block>O Estudante avaliou o docente com nota máxima de Muito Satisfeito</fo:block></fo:table-cell>
1239
                    </fo:table-row>
1240
                </fo:table-body>
1241
            </fo:table>
1242
        </fo:block>
1243
    </xsl:template>
1244
 
1245
 
1246
 
1553 jmachado 1247
    <xsl:template name="barraPercentil">
1248
        <xsl:param name="valor"/>
1249
        <xsl:param name="colors">false</xsl:param>
1565 jmachado 1250
        <xsl:param name="backgroundColorPercentage"/>
1251
        <xsl:call-template name="barraPercentilDefined">
1252
            <xsl:with-param name="colors" select="$colors"/>
1253
            <xsl:with-param name="backgroundColorPercentage" select="$backgroundColorPercentage"/>
1254
            <xsl:with-param name="valor" select="$valor"/>
1255
            <xsl:with-param name="percentDefined" select="$valor"/>
1256
        </xsl:call-template>
1553 jmachado 1257
    </xsl:template>
1258
 
1554 jmachado 1259
    <xsl:template name="barraPercentilDefined">
1260
        <xsl:param name="valor"/>
1261
        <xsl:param name="percentDefined"/>
1262
        <xsl:param name="colors">false</xsl:param>
1565 jmachado 1263
        <xsl:param name="backgroundColorPercentage"/>
1553 jmachado 1264
 
1554 jmachado 1265
        <fo:block-container margin="1px" border="1px solid #C6C6CA" padding="0">
1266
 
1267
            <fo:block-container border="1px solid #C6C6CA" margin="0" padding-top="1px" padding-bottom="0">
1268
                <xsl:choose>
1269
                    <xsl:when test="$colors = 'false'">
1270
                        <xsl:attribute name="border">1px solid #8D7F5C</xsl:attribute>
1271
                        <xsl:attribute name="background-color">#B9F1B1</xsl:attribute>
1272
                    </xsl:when>
1565 jmachado 1273
                    <xsl:when test="$backgroundColorPercentage != ''">
1274
                        <xsl:attribute name="background-color"><xsl:value-of select="$backgroundColorPercentage"/></xsl:attribute>
1275
                        <xsl:choose>
1276
                            <xsl:when test="$percentDefined &lt; 21">
1277
                                <xsl:attribute name="border">1px solid #B10000</xsl:attribute>
1278
                            </xsl:when>
1279
                            <xsl:when test="$percentDefined &lt; 41">
1280
                                <xsl:attribute name="border">1px solid #B85C00</xsl:attribute>
1281
                            </xsl:when>
1282
                            <xsl:when test="$percentDefined &lt; 61">
1283
                                <xsl:attribute name="border">1px solid #868600</xsl:attribute>
1284
                            </xsl:when>
1285
                            <xsl:when test="$percentDefined &lt; 81">
1286
                                <xsl:attribute name="border">1px solid #157C00</xsl:attribute>
1287
                            </xsl:when>
1288
                            <xsl:otherwise>
1289
                                <xsl:attribute name="border">1px solid #157C00</xsl:attribute>
1290
                            </xsl:otherwise>
1291
                        </xsl:choose>
1292
                    </xsl:when>
1554 jmachado 1293
                    <xsl:otherwise>
1294
                        <xsl:choose>
1563 jmachado 1295
                            <xsl:when test="$percentDefined &lt; 21">
1554 jmachado 1296
                                <xsl:attribute name="border">1px solid #B10000</xsl:attribute>
1563 jmachado 1297
                                <xsl:attribute name="background-color"><xsl:value-of select="//color1Hex"/></xsl:attribute>
1554 jmachado 1298
                            </xsl:when>
1563 jmachado 1299
                            <xsl:when test="$percentDefined &lt; 41">
1554 jmachado 1300
                                <xsl:attribute name="border">1px solid #B85C00</xsl:attribute>
1563 jmachado 1301
                                <xsl:attribute name="background-color"><xsl:value-of select="//color2Hex"/>
1302
                            </xsl:attribute></xsl:when>
1303
                            <xsl:when test="$percentDefined &lt; 61">
1304
                                <xsl:attribute name="background-color"><xsl:value-of select="//color3Hex"/></xsl:attribute>
1554 jmachado 1305
                                <xsl:attribute name="border">1px solid #868600</xsl:attribute>
1306
                            </xsl:when>
1563 jmachado 1307
                            <xsl:when test="$percentDefined &lt; 81">
1308
                                <xsl:attribute name="background-color"><xsl:value-of select="//color4Hex"/></xsl:attribute>
1309
                                <xsl:attribute name="border">1px solid #157C00</xsl:attribute>
1310
                            </xsl:when>
1554 jmachado 1311
                            <xsl:otherwise>
1563 jmachado 1312
                                <xsl:attribute name="background-color"><xsl:value-of select="//color5Hex"/></xsl:attribute>
1554 jmachado 1313
                                <xsl:attribute name="border">1px solid #157C00</xsl:attribute>
1314
                            </xsl:otherwise>
1315
                        </xsl:choose>
1316
                    </xsl:otherwise>
1317
                </xsl:choose>
1318
                <xsl:attribute name="width"><xsl:value-of select="$percentDefined"/>%</xsl:attribute>
1319
                <fo:block><xsl:value-of select="$valor"/></fo:block>
1320
            </fo:block-container>
1321
        </fo:block-container>
1322
    </xsl:template>
1323
 
1324
 
1551 jmachado 1325
    <xsl:template name="footerDefault">
1326
        <fo:table width="100%" table-layout="fixed" border-top="1px solid black" font-size="6.5pt">
1327
            <fo:table-column column-width="20%"/>
1328
            <fo:table-column column-width="80%"/>
1549 jmachado 1329
 
1330
 
1551 jmachado 1331
            <fo:table-body>
1332
                <fo:table-row>
1333
                    <fo:table-cell padding-top="3pt">
1334
                        <fo:block>
1335
                            Atualizado a
1553 jmachado 1336
                            <xsl:value-of select="$updateDate"/> / Página
1551 jmachado 1337
                            <fo:page-number/>
1338
                        </fo:block>
1339
                        <fo:block font-size="5pt">
1340
                            IPP.AC.xxxx.1
1341
                        </fo:block>
1342
 
1343
                    </fo:table-cell>
1344
                    <fo:table-cell padding-top="3pt">
1345
                        <fo:block font-size="6pt" text-align="right">
1553 jmachado 1346
                            http://pae.ipportalegre.pt | gerado pela plataforma ipp-pae® 2016
1551 jmachado 1347
                        </fo:block>
1348
                    </fo:table-cell>
1349
                </fo:table-row>
1350
            </fo:table-body>
1351
        </fo:table>
1352
    </xsl:template>
1353
    <xsl:template name="headerTeacher">
1354
        <fo:block text-align="left" border-bottom="1px solid #58585A">
1355
            <fo:table width="100%" table-layout="fixed" >
1549 jmachado 1356
                <fo:table-column column-width="80%"/>
1551 jmachado 1357
                <fo:table-column column-width="20%"/>
1549 jmachado 1358
 
1359
 
1360
                <fo:table-body>
1361
                    <fo:table-row>
1551 jmachado 1362
                        <fo:table-cell>
1549 jmachado 1363
                            <fo:block>
1551 jmachado 1364
                                <fo:external-graphic height="auto" width="auto"
1365
                                                     content-height="40">
1366
                                    <!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
1553 jmachado 1367
                                    <xsl:attribute name="src">url('<xsl:value-of select="$site"/>/layout/themes/ipp/logo.jpg')
1551 jmachado 1368
                                    </xsl:attribute>
1369
                                </fo:external-graphic>
1549 jmachado 1370
                            </fo:block>
1551 jmachado 1371
                            <fo:block font-size="10px" padding="0px" text-align="left">
1553 jmachado 1372
                                <fo:inline font-weight="bold"> Relatório de Avaliação Pedagógica</fo:inline>
1549 jmachado 1373
                            </fo:block>
1551 jmachado 1374
                            <fo:block  font-size="10px" padding="0px" margin-top="0px" text-align="left" >
1553 jmachado 1375
                                <fo:inline>Avaliação pelos alunos do docente:</fo:inline>
1551 jmachado 1376
                            </fo:block>
1377
                        </fo:table-cell>
1378
                        <fo:table-cell>
1379
                            <fo:block font-size="10px" text-align="right" >
1553 jmachado 1380
                                Resultados dos Inquéritos Pedagógicos
1551 jmachado 1381
                            </fo:block>
1382
                            <fo:block font-size="10px" padding="0px" margin-top="0px" text-align="right" >
1383
                                <fo:inline font-weight="bold">Ano letivo:</fo:inline> <xsl:value-of select="$anoLectivo"/>
1384
                            </fo:block>
1562 jmachado 1385
 
1551 jmachado 1386
                        </fo:table-cell>
1549 jmachado 1387
 
1551 jmachado 1388
                    </fo:table-row>
1389
                    <fo:table-row background-color="#fff9ea">
1390
                        <fo:table-cell>
1391
                            <fo:block font-size="12px" padding="2px" margin-top="0px" >
1553 jmachado 1392
                                <fo:inline text-align="left"><xsl:value-of select="$nomeDocente"/> / Número: <xsl:value-of select="$numeroDocente"/></fo:inline>
1551 jmachado 1393
                            </fo:block>
1549 jmachado 1394
                        </fo:table-cell>
1551 jmachado 1395
                        <fo:table-cell>
1396
                            <fo:block font-size="12px" padding="2px" margin-top="0px" text-align="right" >
1397
                                <fo:inline>Pagina: <fo:page-number/></fo:inline>
1549 jmachado 1398
                            </fo:block>
1399
                        </fo:table-cell>
1551 jmachado 1400
 
1549 jmachado 1401
                    </fo:table-row>
1551 jmachado 1402
 
1549 jmachado 1403
                </fo:table-body>
1404
            </fo:table>
1405
 
1406
 
1407
 
1408
 
1551 jmachado 1409
        </fo:block>
1549 jmachado 1410
    </xsl:template>
1411
 
1412
 
1563 jmachado 1413
    <xsl:variable name="backgroundHeader"><xsl:value-of select="$STD_COLOR_SECTION"/></xsl:variable>
1554 jmachado 1414
    <xsl:variable name="backgroundNormal">#FFFFFF</xsl:variable>
1563 jmachado 1415
    <xsl:variable name="backgroundFooter"><xsl:value-of select="$STD_COLOR_SECTION"/></xsl:variable>
1554 jmachado 1416
    <xsl:variable name="borderInHeader">2px solid black</xsl:variable>
1417
    <xsl:variable name="borderInCell">1px dashed black</xsl:variable>
1418
    <xsl:variable name="borderInFooter">2px solid black</xsl:variable>
1419
    <xsl:variable name="borderInCellVertical">1px solid black</xsl:variable>
1420
    <xsl:variable name="borderTable">2px solid black</xsl:variable>
1421
 
1553 jmachado 1422
    <xsl:template match="*" mode="DataTable">
1563 jmachado 1423
 
1554 jmachado 1424
        <xsl:param name="firstColPercentSize"></xsl:param>
1563 jmachado 1425
        <xsl:param name="backgroundHeader"><xsl:value-of select="$backgroundHeader"/></xsl:param>
1426
        <xsl:param name="backgroundFooter"><xsl:value-of select="$backgroundFooter"/></xsl:param>
1427
        <xsl:param name="fontSize">7pt</xsl:param>
1554 jmachado 1428
 
1429
 
1563 jmachado 1430
        <fo:table width="100%" table-layout="auto" font-size="{$fontSize}">
1553 jmachado 1431
            <xsl:attribute name="border"><xsl:value-of select="$borderTable"/></xsl:attribute>
1554 jmachado 1432
            <xsl:for-each select="./rows/row[1]/cols/col">
1433
                <xsl:choose>
1434
                    <xsl:when test="$firstColPercentSize != '' and position() = 1">
1435
                        <fo:table-column column-width="{$firstColPercentSize}"/>
1436
                    </xsl:when>
1437
                    <xsl:otherwise><fo:table-column/></xsl:otherwise>
1438
                </xsl:choose>
1439
 
1553 jmachado 1440
            </xsl:for-each>
1441
            <fo:table-body>
1442
                <xsl:for-each select="./rows/row">
1443
                    <xsl:variable name="rowPosition"><xsl:value-of select="position()"/></xsl:variable>
1444
                    <xsl:variable name="lastRowPosition"><xsl:value-of select="last()"/></xsl:variable>
1445
                    <fo:table-row background-color="{$backgroundHeader}">
1446
                        <xsl:choose>
1447
                            <xsl:when test="./type='header'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundHeader"/></xsl:attribute></xsl:when>
1448
                            <xsl:when test="./type='normal'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundNormal"/></xsl:attribute></xsl:when>
1449
                            <xsl:when test="./type='footer'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundFooter"/></xsl:attribute></xsl:when>
1450
                        </xsl:choose>
1451
                        <xsl:for-each select="./cols/col">
1554 jmachado 1452
                            <fo:table-cell padding="0" display-align="center">
1453
                                <xsl:if test="./backgroundColor != ''">
1454
                                    <xsl:attribute name="background-color"><xsl:value-of select="./backgroundColor"/></xsl:attribute>
1455
                                </xsl:if>
1553 jmachado 1456
                                <xsl:choose>
1457
                                    <xsl:when test="../../type='header'"><xsl:attribute name="border"><xsl:value-of select="$borderInHeader"/></xsl:attribute></xsl:when>
1458
                                    <xsl:when test="../../type='normal'"><xsl:attribute name="border"><xsl:value-of select="$borderInCell"/></xsl:attribute></xsl:when>
1459
                                    <xsl:when test="../../type='footer'"><xsl:attribute name="border"><xsl:value-of select="$borderInFooter"/></xsl:attribute></xsl:when>
1460
                                </xsl:choose>
1461
 
1462
 
1463
 
1464
 
1465
                                <xsl:choose>
1466
                                    <xsl:when test="./align='left'"><xsl:attribute name="text-align">start</xsl:attribute></xsl:when>
1467
                                    <xsl:when test="./align='right'"><xsl:attribute name="text-align">end</xsl:attribute></xsl:when>
1468
                                </xsl:choose>
1469
                                <xsl:if test="../../cols/col/type = 'percentage' and ./type != 'percentage'">
1554 jmachado 1470
                                    <xsl:attribute name="padding-top">2px</xsl:attribute>
1553 jmachado 1471
                                </xsl:if>
1472
 
1473
 
1474
                                <xsl:if test="../../type='normal'">
1475
                                    <xsl:if test="./type='label' and position()=1">
1476
                                        <xsl:attribute name="border-right"><xsl:value-of select="$borderInHeader"/></xsl:attribute>
1477
                                    </xsl:if>
1478
                                    <xsl:if test="./type='label' and position()=last()">
1479
                                        <xsl:attribute name="border-left"><xsl:value-of select="$borderInHeader"/></xsl:attribute>
1480
                                    </xsl:if>
1481
                                    <xsl:if test="../../../row[$rowPosition+1]/type='normal'">
1482
                                        <xsl:attribute name="border-bottom"><xsl:value-of select="$borderInCell"/></xsl:attribute>
1483
                                    </xsl:if>
1484
                                </xsl:if>
1485
 
1486
                                <xsl:if test="../../../row[$rowPosition - 1]/type='header'">
1487
                                    <xsl:attribute name="border-top"><xsl:value-of select="$borderInHeader"/></xsl:attribute>
1488
                                </xsl:if>
1489
                                <xsl:if test="../../../row[$rowPosition +1]/type='footer'">
1490
                                    <xsl:attribute name="border-bottom"><xsl:value-of select="$borderInFooter"/></xsl:attribute>
1491
                                </xsl:if>
1492
 
1493
 
1494
                                <xsl:if test="../col[position() + 1 != last()]">
1495
                                    <xsl:attribute name="border-right"><xsl:value-of select="$borderInCellVertical"/></xsl:attribute>
1496
                                </xsl:if>
1497
 
1498
 
1499
 
1500
 
1501
                                <fo:block-container margin="0" padding="0">
1502
                                <xsl:choose>
1554 jmachado 1503
                                    <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 1504
                                    <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 1505
                                    <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 1506
                                    <xsl:when test="./type='percentage'">
1507
                                        <xsl:attribute name="text-align">left</xsl:attribute>
1508
                                        <xsl:attribute name="padding">0</xsl:attribute>
1509
                                        <xsl:call-template name="barraPercentil">
1510
                                            <xsl:with-param name="valor" select="./value"/>
1554 jmachado 1511
                                            <xsl:with-param name="colors" select="./usePercentageColor"/>
1553 jmachado 1512
                                        </xsl:call-template>
1513
                                    </xsl:when>
1554 jmachado 1514
                                    <xsl:when test="./type='percentageDefined'">
1515
                                        <xsl:attribute name="text-align">left</xsl:attribute>
1516
                                        <xsl:attribute name="padding">0</xsl:attribute>
1517
                                        <xsl:call-template name="barraPercentilDefined">
1518
                                            <xsl:with-param name="valor" select="./value"/>
1519
                                            <xsl:with-param name="percentDefined" select="./percentDefined"/>
1520
                                            <xsl:with-param name="colors" select="./usePercentageColor"/>
1565 jmachado 1521
                                            <xsl:with-param name="backgroundColorPercentage" select="./backgroundColorPercentage"/>
1554 jmachado 1522
                                        </xsl:call-template>
1523
                                    </xsl:when>
1553 jmachado 1524
                                </xsl:choose>
1525
 
1526
                            </fo:block-container>
1527
 
1528
 
1529
                            </fo:table-cell>
1530
                        </xsl:for-each>
1531
                    </fo:table-row>
1532
                </xsl:for-each>
1533
            </fo:table-body>
1534
        </fo:table>
1535
    </xsl:template>
1536
 
1537
 
1538
 
1549 jmachado 1539
</xsl:stylesheet>