Subversion Repositories bacoAlunos

Compare Revisions

Ignore whitespace Rev 1553 → Rev 1554

/branches/v3/impl/src/java/pt/estgp/estgweb/services/questionarios/utils/ChartBuilderUtil.java
21,6 → 21,7
import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.data.general.DefaultPieDataset;
import org.jfree.data.general.DefaultValueDataset;
import org.jfree.ui.HorizontalAlignment;
import org.jfree.ui.TextAnchor;
import pt.estgp.estgweb.Globals;
import pt.estgp.estgweb.services.questionarios.QuestionariosReport;
44,12 → 45,18
static Color RED_NOT_OK = new Color(255,200, 164);
static Color NEUTRAL_TOTAL = new Color(83,83,84);
 
static Color COLOR_1 = new Color(253, 11, 0);
static Color COLOR_2 = new Color(255, 190, 0);
static Color COLOR_3 = new Color(255, 254, 0);
static Color COLOR_4 = new Color(188, 255, 0);
static Color COLOR_5 = new Color(32, 255, 5);
public static Color COLOR_1 = new Color(253, 11, 0);
public static Color COLOR_2 = new Color(255, 190, 0);
public static Color COLOR_3 = new Color(255, 254, 0);
public static Color COLOR_4 = new Color(188, 255, 0);
public static Color COLOR_5 = new Color(32, 255, 5);
 
public static String COLOR_1_HEX = String.format("#%02x%02x%02x", 253, 11, 0);
public static String COLOR_2_HEX = String.format("#%02x%02x%02x", 255, 190, 0);
public static String COLOR_3_HEX = String.format("#%02x%02x%02x", 255, 254, 0);
public static String COLOR_4_HEX = String.format("#%02x%02x%02x", 188, 255, 0);
public static String COLOR_5_HEX = String.format("#%02x%02x%02x", 32, 255, 5);
 
/**
* Util to create Bar Charts
*
59,24 → 66,32
* @return
* @throws java.io.IOException
*/
public static QuestionariosReport.RespostasChart createChartRespostasPergunta(String pergunta,java.util.List<String> subtitles, int[] respostas, String pathTmp) throws IOException {
public static QuestionariosReport.RespostasChart createChartRespostasPergunta(String pergunta,java.util.List<String> subtitles, int[] respostas, String pathTmp,int maxValue) throws IOException {
//TESTE BARRAS LATERAIS
 
DefaultCategoryDataset categoryDataset = new DefaultCategoryDataset();
 
 
categoryDataset.addValue(respostas[0],"1 ",pergunta);
categoryDataset.addValue(respostas[1],"2 ",pergunta);
categoryDataset.addValue(respostas[2],"3 ",pergunta);
categoryDataset.addValue(respostas[3],"4 ",pergunta);
categoryDataset.addValue(respostas[4],"5 ",pergunta);
categoryDataset.addValue(respostas[0]," 1 ",pergunta);
categoryDataset.addValue(respostas[1]," 2 ",pergunta);
categoryDataset.addValue(respostas[2]," 3 ",pergunta);
categoryDataset.addValue(respostas[3]," 4 ",pergunta);
categoryDataset.addValue(respostas[4]," 5 ",pergunta);
 
 
 
JFreeChart chart = ChartFactory.createBarChart(pergunta, "", "Respostas", categoryDataset, PlotOrientation.VERTICAL, true, false, false);
chart.setBorderVisible(false);
 
 
java.util.List<Title> subTitles = new ArrayList<Title>();
for(String subtitle: subtitles)
chart.addSubtitle(new TextTitle(subtitle));
{
TextTitle t = new TextTitle(subtitle,new Font(
"Helvetica", Font.PLAIN, 20));
t.setHorizontalAlignment(HorizontalAlignment.LEFT);
chart.addSubtitle(t);
}
 
 
 
133,9 → 148,10
(((CategoryPlot) chart.getPlot()).getDomainAxis()).setTickLabelFont(new Font(
"Helvetica", Font.PLAIN, 20));
((BarRenderer)((CategoryPlot) chart.getPlot()).getRenderer()).setBaseLegendTextFont(new Font(
"Helvetica", Font.BOLD, 20));
"Helvetica", Font.PLAIN, 20));
((CategoryPlot) chart.getPlot()).getRenderer().setBaseItemLabelFont(new Font(
"Helvetica", Font.BOLD, 15));
"Helvetica", Font.PLAIN, 23));
 
//barChartPlot.getRenderer().setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());
 
 
158,6 → 174,7
 
NumberAxis rangeAxis = (NumberAxis) barChartPlot.getRangeAxis();
rangeAxis.setUpperMargin(0.15);
rangeAxis.setRange(0,maxValue);
org.jfree.chart.axis.CategoryAxis categoryAxis = barChartPlot.getDomainAxis();
categoryAxis.setVisible(false);
//categoryAxis.setTickLabelsVisible(true);
176,6 → 193,32
return respostasChart;
}
 
public static void createRespostasDispersao()
{
 
/*****
*
*
*
*/
/*
BufferedImage image = null;
try {
 
image = ImageIO.read(Thread.currentThread().getContextClassLoader().getResource("pt/estgp/estgweb/services/questionarios/utils/fundoDispersao.png"));
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
barChartPlot.setBackgroundImage(image);*/
/****
*
*/
}
 
/**
*
* @param questionariosReport
266,7 → 309,7
((BarRenderer)((CategoryPlot) chart.getPlot()).getRenderer()).setBaseLegendTextFont(new Font(
"Helvetica", Font.BOLD, 20));
((CategoryPlot) chart.getPlot()).getRenderer().setBaseItemLabelFont(new Font(
"Helvetica", Font.BOLD, 30));
"Helvetica", Font.BOLD, 35));
barChartPlot.getRenderer().setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());
//barChartPlot.getRendererForDataset(barChartPlot.getDataset(0)).setSeriesPaint(0,Color.red);
//barChartPlot.getRendererForDataset(barChartPlot.getDataset(0)).setSeriesPaint(1,Color.blue);
/branches/v3/impl/src/java/pt/estgp/estgweb/services/questionarios/utils/fundoDispersao.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/branches/v3/impl/src/java/pt/estgp/estgweb/services/questionarios/QuestionariosReport.java
11,6 → 11,9
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
 
/**
* Created by jorgemachado on 07/11/16.
72,8 → 75,105
public DataTable tabelaTaxaRespostaUnidade;
 
 
public RespostasAgregadasCharts respostasAgregadasCharts = new RespostasAgregadasCharts();
public DataTable respostasTable;
 
public RespostasAgregadasCharts respostasAgregadasChartsGt2Secs = new RespostasAgregadasCharts();
public DataTable respostasTableGt2Secs;
 
public RespostasAgregadasCharts respostasAgregadasUnidadesCharts = new RespostasAgregadasCharts();
public DataTable respostasUnidadesTable;
 
public int docentesNosCursos;
public int docentesNasEscolas;
 
public int unidadesNosCursos;
public int unidadesNasEscolas;
 
 
 
public int getUnidadesNosCursos() {
return unidadesNosCursos;
}
 
public void setUnidadesNosCursos(int unidadesNosCursos) {
this.unidadesNosCursos = unidadesNosCursos;
}
 
public int getUnidadesNasEscolas() {
return unidadesNasEscolas;
}
 
public void setUnidadesNasEscolas(int unidadesNasEscolas) {
this.unidadesNasEscolas = unidadesNasEscolas;
}
 
public RespostasAgregadasCharts getRespostasAgregadasUnidadesCharts() {
return respostasAgregadasUnidadesCharts;
}
 
public void setRespostasAgregadasUnidadesCharts(RespostasAgregadasCharts respostasAgregadasUnidadesCharts) {
this.respostasAgregadasUnidadesCharts = respostasAgregadasUnidadesCharts;
}
 
public DataTable getRespostasUnidadesTable() {
return respostasUnidadesTable;
}
 
public void setRespostasUnidadesTable(DataTable respostasUnidadesTable) {
this.respostasUnidadesTable = respostasUnidadesTable;
}
 
 
 
public int getDocentesNosCursos() {
return docentesNosCursos;
}
 
public void setDocentesNosCursos(int docentesNosCursos) {
this.docentesNosCursos = docentesNosCursos;
}
 
public int getDocentesNasEscolas() {
return docentesNasEscolas;
}
 
public void setDocentesNasEscolas(int docentesNasEscolas) {
this.docentesNasEscolas = docentesNasEscolas;
}
 
public DataTable getRespostasTable() {
return respostasTable;
}
 
public void setRespostasTable(DataTable respostasTable) {
this.respostasTable = respostasTable;
}
 
public RespostasAgregadasCharts getRespostasAgregadasCharts() {
return respostasAgregadasCharts;
}
 
public void setRespostasAgregadasCharts(RespostasAgregadasCharts respostasAgregadasCharts) {
this.respostasAgregadasCharts = respostasAgregadasCharts;
}
 
public RespostasAgregadasCharts getRespostasAgregadasChartsGt2Secs() {
return respostasAgregadasChartsGt2Secs;
}
 
public void setRespostasAgregadasChartsGt2Secs(RespostasAgregadasCharts respostasAgregadasChartsGt2Secs) {
this.respostasAgregadasChartsGt2Secs = respostasAgregadasChartsGt2Secs;
}
 
public DataTable getRespostasTableGt2Secs() {
return respostasTableGt2Secs;
}
 
public void setRespostasTableGt2Secs(DataTable respostasTableGt2Secs) {
this.respostasTableGt2Secs = respostasTableGt2Secs;
}
 
public DataTable getTabelaTaxaRespostaUnidade() {
return tabelaTaxaRespostaUnidade;
}
364,12 → 464,129
}
 
 
/********************************************
* CACHE DE MEDIAS PARA OUTROS GRAFICOS
* PRIVADO
********************************************/
 
private HashMap<String,RespostasChart> numeroPerguntaRespostasChart = new HashMap<String, RespostasChart>();
 
public RespostasChart getRespostasChart(String numero)
{
return numeroPerguntaRespostasChart.get(numero);
}
 
public String getRespostasChartMediaCursos(String numero)
{
RespostasChart r = numeroPerguntaRespostasChart.get(numero);
return r == null ? "0" : r.getMediaCursos();
}
 
public String getRespostasChartMediaEscolas(String numero)
{
RespostasChart r = numeroPerguntaRespostasChart.get(numero);
return r == null ? "0" : r.getMediaEscolas();
}
 
public String getRespostasChartMediaEntidadeEmAvaliacao(String numero)
{
RespostasChart r = numeroPerguntaRespostasChart.get(numero);
return r == null ? "0" : r.getMediaEntidadeEmAvaliacao();
}
 
public String getRespostasChartMediaCursosPercent(String numero)
{
RespostasChart r = numeroPerguntaRespostasChart.get(numero);
return r == null ? "0" : r.getPercentMediaCursos();
}
 
public String getRespostasChartMediaEscolasPercent(String numero)
{
RespostasChart r = numeroPerguntaRespostasChart.get(numero);
return r == null ? "0" : r.getPercentMediaEscolas();
}
 
public String getRespostasChartMediaEntidadeEmAvaliacaoPercent(String numero)
{
RespostasChart r = numeroPerguntaRespostasChart.get(numero);
return r == null ? "0" : r.getPercentMediaEntidadeEmAvaliacao();
}
 
public static int NUMBER_CHARTS_ROW = 3;
 
public void addRespostasAgregadasChart(RespostasChart chart)
{
respostasAgregadasCharts.addChart(chart);
numeroPerguntaRespostasChart.put(chart.getNumero(),chart);
}
 
public void addRespostasAgregadasChartGt2Secs(RespostasChart chart)
{
respostasAgregadasChartsGt2Secs.addChart(chart);
}
 
public void addRespostasAgregadasUnidadesChart(RespostasChart chart)
{
respostasAgregadasUnidadesCharts.addChart(chart);
}
 
 
/**********************************************
* @Class: RespostasAgregadasCharts
*
* Graficos de Respostas Agregadas
********************************************/
 
 
public static class RespostasAgregadasCharts implements Serializable
{
List<RespostasChartsRow> respostasChartsRow = new ArrayList<RespostasChartsRow>();
 
private void addChart(RespostasChart chart)
{
if(respostasChartsRow.size() == 0 || respostasChartsRow.get(respostasChartsRow.size() - 1).getRespostasChart().size() >= NUMBER_CHARTS_ROW)
{
respostasChartsRow.add(new RespostasChartsRow());
}
respostasChartsRow.get(respostasChartsRow.size() - 1).getRespostasChart().add(chart);
}
 
public List<RespostasChartsRow> getRespostasChartsRow() {
return respostasChartsRow;
}
 
public void setRespostasChartsRow(List<RespostasChartsRow> respostasChartsRow) {
this.respostasChartsRow = respostasChartsRow;
}
}
 
public static class RespostasChartsRow implements Serializable
{
List<RespostasChart> respostasChart = new ArrayList<RespostasChart>();
 
public List<RespostasChart> getRespostasChart() {
return respostasChart;
}
 
public void setRespostasChart(List<RespostasChart> respostasChart) {
this.respostasChart = respostasChart;
}
}
 
public static class RespostasChart implements Serializable
{
String tempFile;
String pergunta;
String numero;
 
String mediaEntidadeEmAvaliacao;
String mediaCursos;
String mediaEscolas;
 
String percentMediaEntidadeEmAvaliacao;
String percentMediaCursos;
String percentMediaEscolas;
 
public String getTempFile() {
return tempFile;
}
385,7 → 602,65
public void setPergunta(String pergunta) {
this.pergunta = pergunta;
}
 
public String getMediaCursos() {
return mediaCursos;
}
 
public void setMediaCursos(String mediaCursos) {
this.mediaCursos = mediaCursos;
}
 
public String getMediaEscolas() {
return mediaEscolas;
}
 
public void setMediaEscolas(String mediaEscolas) {
this.mediaEscolas = mediaEscolas;
}
 
public String getPercentMediaCursos() {
return percentMediaCursos;
}
 
public void setPercentMediaCursos(String percentMediaCursos) {
this.percentMediaCursos = percentMediaCursos;
}
 
public String getPercentMediaEscolas() {
return percentMediaEscolas;
}
 
public String getMediaEntidadeEmAvaliacao() {
return mediaEntidadeEmAvaliacao;
}
 
public void setMediaEntidadeEmAvaliacao(String mediaEntidadeEmAvaliacao) {
this.mediaEntidadeEmAvaliacao = mediaEntidadeEmAvaliacao;
}
 
public String getPercentMediaEntidadeEmAvaliacao() {
return percentMediaEntidadeEmAvaliacao;
}
 
public void setPercentMediaEntidadeEmAvaliacao(String percentMediaEntidadeEmAvaliacao) {
this.percentMediaEntidadeEmAvaliacao = percentMediaEntidadeEmAvaliacao;
}
 
public void setPercentMediaEscolas(String percentMediaEscolas) {
this.percentMediaEscolas = percentMediaEscolas;
}
 
public String getNumero() {
return numero;
}
 
public void setNumero(String numero) {
this.numero = numero;
}
}
 
 
 
 
}
/branches/v3/impl/src/java/pt/estgp/estgweb/services/questionarios/pedagogico/DataTable.java
150,6 → 150,62
cols.add(col);
return col;
}
 
public Col addColPercentageLeft(String value,boolean usePercentageColors)
{ Col col = new Col(value);
col.setTypePercentage();
col.setAlignLeft();
col.setUsePercentageColor(usePercentageColors);
cols.add(col);
return col;
}
public Col addColPercentageRight(String value,boolean usePercentageColors)
{ Col col = new Col(value);
col.setTypePercentage();
col.setAlignRight();
col.setUsePercentageColor(usePercentageColors);
cols.add(col);
return col;
}
public Col addColPercentageCenter(String value,boolean usePercentageColors)
{ Col col = new Col(value);
col.setTypePercentage();
col.setAlignCenter();
col.setUsePercentageColor(usePercentageColors);
cols.add(col);
return col;
}
 
 
public Col addColPercentageDefinedLeft(String value,String percent,boolean usePercentageColors)
{ Col col = new Col(value);
col.setPercentDefined(percent);
col.setTypePercentageDefined();
col.setAlignLeft();
col.setUsePercentageColor(usePercentageColors);
cols.add(col);
return col;
}
public Col addColPercentageDefinedRight(String value,String percent,boolean usePercentageColors)
{ Col col = new Col(value);
col.setPercentDefined(percent);
col.setTypePercentageDefined();
col.setAlignRight();
col.setUsePercentageColor(usePercentageColors);
cols.add(col);
return col;
}
public Col addColPercentageDefinedCenter(String value,String percent,boolean usePercentageColors)
{ Col col = new Col(value);
col.setPercentDefined(percent);
col.setTypePercentageDefined();
col.setAlignCenter();
col.setUsePercentageColor(usePercentageColors);
cols.add(col);
return col;
}
 
 
public Col addColLabelLeft(String value)
{ Col col = new Col(value);
col.setTypeLabel();
191,19 → 247,48
//center, left, right
String align = null;
String value = null;
//number, percentage, text, label
String percentDefined = null;
//number, percentage, percentageDefined, text, label
String type = null;
boolean usePercentageColor = false;
String backgroundColor = "";
 
 
public String getBackgroundColor() {
return backgroundColor;
}
 
public void setBackgroundColor(String backgroundColor) {
this.backgroundColor = backgroundColor;
}
 
public void setAlignLeft() { align = "left"; }
public void setAlignRight() { align = "right"; }
public void setAlignCenter() { align = "center"; }
public void setTypeNumber() { type = "number"; }
public void setTypeText() { type = "text"; }
public void setTypePercentage() { type = "percentage"; }
public void setTypePercentageDefined() { type = "percentageDefined"; }
public void setTypeLabel() { type = "label"; }
 
public boolean isUsePercentageColor() {
return usePercentageColor;
}
 
public void setUsePercentageColor(boolean usePercentageColor) {
this.usePercentageColor = usePercentageColor;
}
 
public String getValue() { return value; }
public void setValue(String value) { this.value = value; }
 
public String getPercentDefined() {
return percentDefined;
}
 
public void setPercentDefined(String percentDefined) {
this.percentDefined = percentDefined;
}
}
}
 
/branches/v3/impl/src/java/pt/estgp/estgweb/services/questionarios/pedagogico/docenteReport.fo.xsl
160,7 → 160,7
<fo:basic-link internal-destination="capParticipacao">
<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>
<xsl:text> </xsl:text>
Participação nos Questionários do Docente
Participação nos questionários do docente
<fo:leader leader-pattern="dots" />
<fo:page-number-citation ref-id="capParticipacao" />
</fo:basic-link>
169,32 → 169,43
<fo:basic-link internal-destination="capCaracterizacao">
<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>
<xsl:text> </xsl:text>
Caracterização da Amostra
Caracterização da qmostra
<fo:leader leader-pattern="dots" />
<fo:page-number-citation ref-id="capCaracterizacao" />
</fo:basic-link>
</fo:block>
<fo:block font-size="14px" text-align-last="justify" margin-top="5px">
<fo:basic-link internal-destination="capQuestoes">
<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>
<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>
<xsl:text> </xsl:text>
Análise das Questões sobre o Docente
Análise das questões sobre o docente
<fo:leader leader-pattern="dots" />
<fo:page-number-citation ref-id="capQuestoes" />
</fo:basic-link>
</fo:block>
<fo:block font-size="14px" text-align-last="justify" margin-top="5px">
<fo:basic-link internal-destination="capQuestoesUnidades">
<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>
<xsl:text> </xsl:text>
Análise das questões relativas ao grupo unidade para as unidades do docente
<fo:leader leader-pattern="dots" />
<fo:page-number-citation ref-id="capQuestoesUnidades" />
</fo:basic-link>
</fo:block>
 
 
 
</fo:flow>
</xsl:template>
 
<xsl:template name="seccao">
<xsl:param name="text"/>
<xsl:param name="marginTop">5px</xsl:param>
<fo:block
font-size="16px"
font-weight="bold"
padding="4px"
margin-top="5px"
margin-top="{$marginTop}"
text-align="left"
background-color="#FFEAAE">
<xsl:value-of select="$text"/>
203,11 → 214,12
 
<xsl:template name="subSeccao">
<xsl:param name="text"/>
<xsl:param name="marginTop">15px</xsl:param>
<fo:block font-size="13px"
padding-top="3px"
padding-bottom="3px"
padding-left="5px"
margin-top="30px"
margin-top="{$marginTop}"
margin-bottom="20px"
text-align="left"
background-color="#D6D9BC">
215,6 → 227,20
</fo:block>
</xsl:template>
 
<xsl:template name="subSubSeccao">
<xsl:param name="text"/>
<fo:block font-size="8px"
padding-top="0"
padding-bottom="0"
padding-left="25px"
margin-top="0"
margin-bottom="5px"
text-align="left"
font-weight="bold">
<xsl:value-of select="$text"/>
</fo:block>
</xsl:template>
 
<xsl:template name="page">
<fo:static-content flow-name="header">
<xsl:call-template name="headerTeacher"/>
227,11 → 253,10
<fo:block-container padding="0" margin="0" id="capParticipacao" page-break-before="always">
<xsl:call-template name="seccao">
<xsl:with-param name="text">1 - Participação</xsl:with-param>
<xsl:with-param name="marginTop">0</xsl:with-param>
</xsl:call-template>
</fo:block-container>
 
 
 
<xsl:call-template name="subSeccao">
<xsl:with-param name="text">Taxa Global de Participação aos Questionários do Docente</xsl:with-param>
</xsl:call-template>
295,7 → 320,9
</xsl:with-param>
</xsl:call-template>
<fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
<xsl:apply-templates select="//tabelaTaxaRespostaUnidade" mode="DataTable"/>
<xsl:apply-templates select="//tabelaTaxaRespostaUnidade" mode="DataTable">
<xsl:with-param name="firstColPercentSize">60%</xsl:with-param>
</xsl:apply-templates>
</fo:block>
</fo:table-cell>
</fo:table-row>
306,9 → 333,8
 
<fo:block-container page-break-before="always" padding="0" margin="0" id="capCaracterizacao">
<xsl:call-template name="seccao">
<xsl:with-param name="text">
2 - Caracterização da Amostra Recolhida
</xsl:with-param>
<xsl:with-param name="text">2 - Caracterização da Amostra Recolhida</xsl:with-param>
<xsl:with-param name="marginTop">0</xsl:with-param>
</xsl:call-template>
</fo:block-container>
 
425,7 → 451,9
 
 
<fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
<xsl:apply-templates select="//tabelaDistritos" mode="DataTable"/>
<xsl:apply-templates select="//tabelaDistritos" mode="DataTable">
<xsl:with-param name="firstColPercentSize">30%</xsl:with-param>
</xsl:apply-templates>
</fo:block>
 
</fo:table-cell>
441,32 → 469,330
<fo:block-container padding="0" margin="0" id="capQuestoes" page-break-before="always">
<xsl:call-template name="seccao">
<xsl:with-param name="text">3 - Análise das Questões sobre o Docente</xsl:with-param>
<xsl:with-param name="marginTop">0</xsl:with-param>
</xsl:call-template>
</fo:block-container>
 
<xsl:call-template name="subSeccao">
<xsl:with-param name="text">3.1 - Gráficos de respostas agregadas de todas as unidades do docente</xsl:with-param>
</xsl:call-template>
 
<xsl:apply-templates select="//respostasAgregadasCharts/respostasChartsRow" mode="graficosPerguntas"/>
 
<fo:block-container padding="0" margin="0" page-break-before="always">
<xsl:call-template name="subSeccao">
<xsl:with-param name="text">3.2 - Tabela de respostas agregadas de todas as unidades do docente</xsl:with-param>
<xsl:with-param name="marginTop">0</xsl:with-param>
</xsl:call-template>
</fo:block-container>
<fo:block text-align="center" margin="0" font-size="10" font-weight="normal" >
<xsl:apply-templates select="//respostasTable" mode="DataTable">
<xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
</xsl:apply-templates>
</fo:block>
<fo:block text-align="right" margin-top="10px" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
Docentes avaliados nos cursos onde o docente leciona: <xsl:value-of select="//docentesNosCursos"/>
</fo:block>
<fo:block text-align="right" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
Docentes avaliados nas escolas onde o docente leciona: <xsl:value-of select="//docentesNasEscolas"/>
</fo:block>
 
<fo:block-container margin-top="5px" margin-bottom="5px">
<xsl:apply-templates select="//mediasGrupoDocente" mode="mediasGrupo">
<xsl:with-param name="objetoAvaliacao">do docente</xsl:with-param>
</xsl:apply-templates>
</fo:block-container>
 
<!--Considerando Respostas Superiores a 2 segindos-->
<fo:block-container background-color="#aaaaaa" padding="5px" margin="0" margin-top="10px">
<fo:block-container padding="0" margin="0">
<xsl:call-template name="subSubSeccao">
<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>
</xsl:call-template>
</fo:block-container>
 
<fo:block text-align="center" margin-left="10px" font-size="10" font-weight="normal" margin-right="10px">
<xsl:apply-templates select="//respostasTableGt2Secs" mode="DataTable">
<xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
</xsl:apply-templates>
</fo:block>
</fo:block-container>
 
 
 
 
 
<!--#######################################-->
<!-- RESPOSTAS AGREGADAS DAS UNIDADES CURRICULARES -->
 
<fo:block-container padding="0" margin="0" id="capQuestoesUnidades" page-break-before="always">
<xsl:call-template name="seccao">
<xsl:with-param name="text">4 - Análise das questões relativas ao grupo unidade para as unidades do docente</xsl:with-param>
<xsl:with-param name="marginTop">0</xsl:with-param>
</xsl:call-template>
</fo:block-container>
 
<xsl:call-template name="subSeccao">
<xsl:with-param name="text">4.1 - Gráficos de respostas agregadas de todas as unidades</xsl:with-param>
</xsl:call-template>
 
<xsl:apply-templates select="//respostasAgregadasUnidadesCharts/respostasChartsRow" mode="graficosPerguntas"/>
 
 
<fo:block-container padding="0" margin="0" page-break-before="always">
<xsl:call-template name="subSeccao">
<xsl:with-param name="text">4.2 - Tabela de respostas agregadas de todas as unidades do docente</xsl:with-param>
<xsl:with-param name="marginTop">0</xsl:with-param>
</xsl:call-template>
</fo:block-container>
 
<fo:block text-align="center" margin="0" font-size="10" font-weight="normal" >
<xsl:apply-templates select="//respostasUnidadesTable" mode="DataTable">
<xsl:with-param name="firstColPercentSize">40%</xsl:with-param>
</xsl:apply-templates>
</fo:block>
 
<fo:block text-align="right" margin-top="10px" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
Unidades avaliadas nos cursos onde o docente leciona: <xsl:value-of select="//unidadesNosCursos"/>
</fo:block>
<fo:block text-align="right" margin-left="10px" font-size="6.5pt" font-weight="normal" margin-right="10px">
Unidades avaliadas nas escolas onde o docente leciona: <xsl:value-of select="//unidadesNasEscolas"/>
</fo:block>
 
<fo:block-container margin-top="5px" margin-bottom="5px">
<xsl:apply-templates select="//mediasGrupoUnidades" mode="mediasGrupo">
<xsl:with-param name="objetoAvaliacao">das unidades</xsl:with-param>
</xsl:apply-templates>
</fo:block-container>
 
</fo:flow>
</xsl:template>
 
<xsl:template match="*" mode="graficosPerguntas">
<fo:block text-align="center" margin-left="10px">
<fo:table width="100%" table-layout="fixed">
<xsl:for-each select="./respostasChartsRow[1]/respostasChart/respostasChart">
<fo:table-column/>
</xsl:for-each>
<fo:table-body>
<xsl:for-each select="./respostasChartsRow">
<fo:table-row>
<xsl:for-each select="./respostasChart/respostasChart">
<fo:table-cell>
<fo:block>
<fo:external-graphic
width="100%"
content-height="100%"
content-width="scale-to-fit"
scaling="uniform"
>
<xsl:attribute name="src">url('<xsl:value-of select="./tempFile"/>')
</xsl:attribute>
</fo:external-graphic>
</fo:block>
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:for-each>
 
</fo:table-body>
</fo:table>
</fo:block>
 
<fo:block-container margin-top="20px">
<xsl:call-template name="legendaCoresPerguntas"/>
</fo:block-container>
</xsl:template>
 
<xsl:template match="*" mode="mediasGrupo">
<xsl:param name="objetoAvaliacao"/>
<fo:block>
 
<fo:table width="100%" table-layout="fixed" font-size="10pt" font-weight="normal">
<fo:table-column column-width="60%"/>
<fo:table-column column-width="40%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell display-align="center" text-align="center" padding-right="10px" >
<xsl:apply-templates select="." mode="globalSmile">
<xsl:with-param name="objetoAvaliacao" select="$objetoAvaliacao"/>
</xsl:apply-templates>
</fo:table-cell>
<fo:table-cell display-align="center" text-align="center" padding-left="10px">
<fo:block>
<xsl:apply-templates select="./mediasGlobaisTable" mode="DataTable"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
 
</fo:block>
</xsl:template>
 
 
 
<xsl:template match="*" mode="globalSmile">
<xsl:param name="objetoAvaliacao"></xsl:param>
<fo:block>
<fo:table width="100%" table-layout="fixed" font-size="10pt" font-weight="normal">
<fo:table-column column-width="30%"/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-column/>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="center" >
<fo:block>
 
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" >
<fo:block>
<fo:external-graphic height="auto" width="auto"
content-height="30">
<!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
<xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/sad.png')
</xsl:attribute>
</fo:external-graphic>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block></fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" >
<fo:block>
<fo:external-graphic height="auto" width="auto"
content-height="30">
<!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
<xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/indiferent.png')
</xsl:attribute>
</fo:external-graphic>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block></fo:block>
</fo:table-cell>
<fo:table-cell text-align="center" >
<fo:block>
<fo:external-graphic height="auto" width="auto"
content-height="30">
<!--<xsl:attribute name="src">url('http://www.ipportalegre.pt/imagens/Logos/ESTG/Logotipo%20ESTG.jpg')</xsl:attribute>-->
<xsl:attribute name="src">url('<xsl:value-of select="$site"/>/imgs/questionarios/smile.png')
</xsl:attribute>
</fo:external-graphic>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row border="2px solid black">
<fo:table-cell display-align="center" background-color="{$backgroundHeader}" text-align="center" padding="2px" border="2px solid black" font-size="7pt">
<fo:block>Avaliação média <xsl:value-of select="$objetoAvaliacao"/> em todas as questões</fo:block>
</fo:table-cell>
<fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
<xsl:if test="./avaliacaoMediaArredondada=1">
<xsl:attribute name="background-color"><xsl:value-of select="./colorMedia"/></xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:if>
<fo:block>1</fo:block>
</fo:table-cell>
<fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
<xsl:if test="//avaliacaoMediaArredondada=2">
<xsl:attribute name="background-color"><xsl:value-of select="//colorMedia"/></xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:if>
<fo:block>2</fo:block>
</fo:table-cell>
<fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
<xsl:if test="//avaliacaoMediaArredondada=3">
<xsl:attribute name="background-color"><xsl:value-of select="//colorMedia"/></xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:if>
<fo:block>3</fo:block>
</fo:table-cell>
<fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
<xsl:if test="//avaliacaoMediaArredondada=4">
<xsl:attribute name="background-color"><xsl:value-of select="//colorMedia"/></xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:if>
<fo:block>4</fo:block>
</fo:table-cell>
<fo:table-cell display-align="center" text-align="center" padding="4px" border="2px solid black">
<xsl:if test="//avaliacaoMediaArredondada=5">
<xsl:attribute name="background-color"><xsl:value-of select="//colorMedia"/></xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:if>
<fo:block>5</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</xsl:template>
 
<xsl:template name="legendaCoresPerguntas">
<fo:block>
<fo:table width="100%" table-layout="fixed" font-size="6.5pt" font-weight="normal">
<fo:table-column column-width="50"/>
<fo:table-column/>
 
<fo:table-body>
<fo:table-row>
<fo:table-cell padding="2pt" number-columns-spanned="2">
<fo:block text-align="left" font-weight="bold">Legenda de Cores:</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell background-color="rgb(253, 11, 0)" padding="2pt">
<fo:block text-align="center">1</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" ><fo:block>O estudante avaliou a questão como Nada Satisfeito</fo:block></fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell background-color="rgb(255, 190, 0)" padding="2pt">
<fo:block text-align="center">2</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão como Pouco Satisfeito</fo:block></fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell background-color="rgb(255, 254, 0)" padding="2pt">
<fo:block text-align="center">3</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão Satisfeito</fo:block></fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell background-color="rgb(188, 255, 0)" padding="2pt">
<fo:block text-align="center">4</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt"><fo:block>O estudante avaliou a questão bastante Satisfeito que corresponde a Bom</fo:block></fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell background-color="rgb(32, 255, 5)" padding="2pt">
<fo:block text-align="center">5</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt"><fo:block>O Estudante avaliou o docente com nota máxima de Muito Satisfeito</fo:block></fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</xsl:template>
 
 
 
<xsl:template name="barraPercentil">
<xsl:param name="valor"/>
<xsl:param name="colors">false</xsl:param>
<fo:block-container margin="2px" border="1px solid #C6C6CA" padding="0">
<fo:block-container margin="1px" border="1px solid #C6C6CA" padding="0">
<xsl:choose>
<xsl:when test="$colors = 'false'">
<xsl:attribute name="border">1px solid #C6C6CA</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="border">2px solid #FFEAAE</xsl:attribute>
<xsl:attribute name="border">1px solid #FFEAAE</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<fo:block-container border="1px solid #C6C6CA" margin="0" padding-top="2px" padding-bottom="0">
<fo:block-container border="1px solid #C6C6CA" margin="0" padding-top="1px" padding-bottom="0">
<xsl:choose>
<xsl:when test="$colors = 'false'">
<xsl:attribute name="background-color">#B9F1B1</xsl:attribute>
477,7 → 803,6
<xsl:choose>
<xsl:when test="$valor &lt; 25">
<xsl:attribute name="background-color">red</xsl:attribute>
<xsl:attribute name="color">white</xsl:attribute>
</xsl:when>
<xsl:when test="$valor &lt; 40"><xsl:attribute name="background-color">orange</xsl:attribute></xsl:when>
<xsl:when test="$valor &lt; 55"><xsl:attribute name="background-color">yellow</xsl:attribute></xsl:when>
493,7 → 818,49
</fo:block-container>
</xsl:template>
 
<xsl:template name="barraPercentilDefined">
<xsl:param name="valor"/>
<xsl:param name="percentDefined"/>
<xsl:param name="colors">false</xsl:param>
 
<fo:block-container margin="1px" border="1px solid #C6C6CA" padding="0">
 
<fo:block-container border="1px solid #C6C6CA" margin="0" padding-top="1px" padding-bottom="0">
<xsl:choose>
<xsl:when test="$colors = 'false'">
<xsl:attribute name="border">1px solid #8D7F5C</xsl:attribute>
<xsl:attribute name="background-color">#B9F1B1</xsl:attribute>
 
</xsl:when>
<xsl:otherwise>
 
<xsl:choose>
<xsl:when test="percentDefined &lt; 25">
<xsl:attribute name="border">1px solid #B10000</xsl:attribute>
<xsl:attribute name="background-color">red</xsl:attribute>
</xsl:when>
<xsl:when test="percentDefined &lt; 40">
<xsl:attribute name="border">1px solid #B85C00</xsl:attribute>
<xsl:attribute name="background-color">orange</xsl:attribute>
</xsl:when>
<xsl:when test="percentDefined &lt; 55">
<xsl:attribute name="border">1px solid #868600</xsl:attribute>
<xsl:attribute name="background-color">yellow</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="border">1px solid #157C00</xsl:attribute>
<xsl:attribute name="background-color">#24DD01</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:attribute name="width"><xsl:value-of select="$percentDefined"/>%</xsl:attribute>
<fo:block><xsl:value-of select="$valor"/></fo:block>
</fo:block-container>
</fo:block-container>
</xsl:template>
 
 
<xsl:template name="footerDefault">
<fo:table width="100%" table-layout="fixed" border-top="1px solid black" font-size="6.5pt">
<fo:table-column column-width="20%"/>
581,19 → 948,29
</xsl:template>
 
 
<xsl:variable name="backgroundHeader">#FFEAAE</xsl:variable>
<xsl:variable name="backgroundNormal">#FFFFFF</xsl:variable>
<xsl:variable name="backgroundFooter">#FFEAAE</xsl:variable>
<xsl:variable name="borderInHeader">2px solid black</xsl:variable>
<xsl:variable name="borderInCell">1px dashed black</xsl:variable>
<xsl:variable name="borderInFooter">2px solid black</xsl:variable>
<xsl:variable name="borderInCellVertical">1px solid black</xsl:variable>
<xsl:variable name="borderTable">2px solid black</xsl:variable>
 
<xsl:template match="*" mode="DataTable">
<xsl:variable name="backgroundHeader">#FFEAAE</xsl:variable>
<xsl:variable name="backgroundNormal">#FFFFFF</xsl:variable>
<xsl:variable name="backgroundFooter">#FFEAAE</xsl:variable>
<xsl:variable name="borderInHeader">4px solid black</xsl:variable>
<xsl:variable name="borderInCell">2px dashed black</xsl:variable>
<xsl:variable name="borderInFooter">4px solid black</xsl:variable>
<xsl:variable name="borderInCellVertical">2px solid black</xsl:variable>
<xsl:variable name="borderTable">4px solid black</xsl:variable>
<fo:table width="100%" table-layout="fixed">
<xsl:param name="firstColPercentSize"></xsl:param>
 
 
<fo:table width="100%" table-layout="auto" font-size="7pt">
<xsl:attribute name="border"><xsl:value-of select="$borderTable"/></xsl:attribute>
<xsl:for-each select="./rows/row[0]/cols/col">
<fo:table-column/>
<xsl:for-each select="./rows/row[1]/cols/col">
<xsl:choose>
<xsl:when test="$firstColPercentSize != '' and position() = 1">
<fo:table-column column-width="{$firstColPercentSize}"/>
</xsl:when>
<xsl:otherwise><fo:table-column/></xsl:otherwise>
</xsl:choose>
 
</xsl:for-each>
<fo:table-body>
<xsl:for-each select="./rows/row">
606,8 → 983,10
<xsl:when test="./type='footer'"><xsl:attribute name="background-color"><xsl:value-of select="$backgroundFooter"/></xsl:attribute></xsl:when>
</xsl:choose>
<xsl:for-each select="./cols/col">
<fo:table-cell padding="0">
 
<fo:table-cell padding="0" display-align="center">
<xsl:if test="./backgroundColor != ''">
<xsl:attribute name="background-color"><xsl:value-of select="./backgroundColor"/></xsl:attribute>
</xsl:if>
<xsl:choose>
<xsl:when test="../../type='header'"><xsl:attribute name="border"><xsl:value-of select="$borderInHeader"/></xsl:attribute></xsl:when>
<xsl:when test="../../type='normal'"><xsl:attribute name="border"><xsl:value-of select="$borderInCell"/></xsl:attribute></xsl:when>
622,7 → 1001,7
<xsl:when test="./align='right'"><xsl:attribute name="text-align">end</xsl:attribute></xsl:when>
</xsl:choose>
<xsl:if test="../../cols/col/type = 'percentage' and ./type != 'percentage'">
<xsl:attribute name="padding-top">4px</xsl:attribute>
<xsl:attribute name="padding-top">2px</xsl:attribute>
</xsl:if>
 
 
655,16 → 1034,26
 
<fo:block-container margin="0" padding="0">
<xsl:choose>
<xsl:when test="./type='text'"><fo:block margin="0" padding-left="2px" padding-right="2px"><xsl:value-of select="./value"/></fo:block></xsl:when>
<xsl:when test="./type='text'"><fo:block margin="0" padding-left="2px" padding-right="2px"><xsl:value-of select="./value"/></fo:block></xsl:when>
<xsl:when test="./type='number'"><fo:block margin="0" padding-left="2px" padding-right="2px"><xsl:value-of select="./value"/></fo:block></xsl:when>
<xsl:when test="./type='label'"><fo:block margin="0" padding-left="2px" padding-right="2px"><xsl:value-of select="./value"/></fo:block></xsl:when>
<xsl:when test="./type='label'"><fo:block margin="0" padding-left="2px" padding-right="2px"><xsl:value-of select="./value"/></fo:block></xsl:when>
<xsl:when test="./type='percentage'">
<xsl:attribute name="text-align">left</xsl:attribute>
<xsl:attribute name="padding">0</xsl:attribute>
<xsl:call-template name="barraPercentil">
<xsl:with-param name="valor" select="./value"/>
<xsl:with-param name="colors" select="./usePercentageColor"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="./type='percentageDefined'">
<xsl:attribute name="text-align">left</xsl:attribute>
<xsl:attribute name="padding">0</xsl:attribute>
<xsl:call-template name="barraPercentilDefined">
<xsl:with-param name="valor" select="./value"/>
<xsl:with-param name="percentDefined" select="./percentDefined"/>
<xsl:with-param name="colors" select="./usePercentageColor"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
 
</fo:block-container>
/branches/v3/impl/src/java/pt/estgp/estgweb/services/questionarios/pedagogico/DocenteReport.java
3,8 → 3,6
import pt.estgp.estgweb.services.questionarios.QuestionariosReport;
 
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
 
/**
* Created by jorgemachado on 07/11/16.
18,17 → 16,28
 
 
 
public List<RespostasChart> respostasCharts = new ArrayList<RespostasChart>();
 
public List<RespostasChart> getRespostasCharts() {
return respostasCharts;
 
MediasGrupo mediasGrupoDocente = new MediasGrupo();
 
MediasGrupo mediasGrupoUnidades = new MediasGrupo();
 
public MediasGrupo getMediasGrupoDocente() {
return mediasGrupoDocente;
}
 
public void setRespostasCharts(List<RespostasChart> respostasCharts) {
this.respostasCharts = respostasCharts;
public void setMediasGrupoDocente(MediasGrupo mediasGrupoDocente) {
this.mediasGrupoDocente = mediasGrupoDocente;
}
 
public MediasGrupo getMediasGrupoUnidades() {
return mediasGrupoUnidades;
}
 
public void setMediasGrupoUnidades(MediasGrupo mediasGrupoUnidades) {
this.mediasGrupoUnidades = mediasGrupoUnidades;
}
 
public String getNomeDocente() {
return nomeDocente;
}
54,6 → 63,73
}
 
 
public static class MediasGrupo implements Serializable
{
double avaliacaoMedia;
int avaliacaoMediaArredondada;
double desvioPadrao;
public double mediaGlobalNosCursos;
public double mediaGlobalNasEscolas;
String colorMedia;
 
DataTable mediasGlobaisTable;
 
public DataTable getMediasGlobaisTable() {
return mediasGlobaisTable;
}
 
public void setMediasGlobaisTable(DataTable mediasGlobaisTable) {
this.mediasGlobaisTable = mediasGlobaisTable;
}
 
public double getAvaliacaoMedia() {
return avaliacaoMedia;
}
 
public void setAvaliacaoMedia(double avaliacaoMedia) {
this.avaliacaoMedia = avaliacaoMedia;
}
 
public int getAvaliacaoMediaArredondada() {
return avaliacaoMediaArredondada;
}
 
public void setAvaliacaoMediaArredondada(int avaliacaoMediaArredondada) {
this.avaliacaoMediaArredondada = avaliacaoMediaArredondada;
}
 
public double getDesvioPadrao() {
return desvioPadrao;
}
 
public void setDesvioPadrao(double desvioPadrao) {
this.desvioPadrao = desvioPadrao;
}
 
public double getMediaGlobalNosCursos() {
return mediaGlobalNosCursos;
}
 
public void setMediaGlobalNosCursos(double mediaGlobalNosCursos) {
this.mediaGlobalNosCursos = mediaGlobalNosCursos;
}
 
public double getMediaGlobalNasEscolas() {
return mediaGlobalNasEscolas;
}
 
public void setMediaGlobalNasEscolas(double mediaGlobalNasEscolas) {
this.mediaGlobalNasEscolas = mediaGlobalNasEscolas;
}
 
public String getColorMedia() {
return colorMedia;
}
 
public void setColorMedia(String colorMedia) {
this.colorMedia = colorMedia;
}
}
 
 
}
/branches/v3/impl/src/java/pt/estgp/estgweb/services/authenticate/AuthenticateService.java
128,6 → 128,12
if(u.getRoles() == null || u.getRoles().trim().length() == 0)
u.setRoles(Globals.ROLE_INVITED);
 
/**CHECK BASIC SYSTEM ROLES**/
if(u instanceof Teacher && !u.hasRole(Globals.TEACHER_ROLE))
u.addRole(Globals.TEACHER_ROLE);
if(u instanceof Student && !u.hasRole(Globals.STUDENT_ROLE))
u.addRole(Globals.STUDENT_ROLE);
 
DaoFactory.getUserSessionDaoImpl().reattach(userSession);
return userSession;
}
/branches/v3/impl/src/java/pt/estgp/estgweb/domain/CourseUnitImpl.java
356,8 → 356,7
}
 
 
if(usession.getUser() != null && usession.getUser().isSuperuserOrAdmin()
|| usession.getUser().hasRole(Globals.SERVICES_PROGRAMS_ROLE))
if(usession.getUser() != null && (usession.getUser().isSuperuserOrAdmin() || usession.getUser().hasRole(Globals.SERVICES_PROGRAMS_ROLE)))
{
s.addClearance(CourseUnitClearancesOperation.STATISTICS_CAN_VIEW.name(),usession);
s.addClearance(CourseUnitClearancesOperation.EVALUATION_ALL.name(),usession);
/branches/v3/impl/src/java/pt/estgp/estgweb/web/tags/HasRoleTag.java
1,17 → 1,13
package pt.estgp.estgweb.web.tags;
 
import org.apache.log4j.Logger;
import org.apache.struts.util.RequestUtils;
import pt.estgp.estgweb.Globals;
import pt.estgp.estgweb.domain.UserSessionImpl;
 
import javax.servlet.jsp.tagext.BodyTagSupport;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.BodyTagSupport;
 
import jomm.web.tags.EqualBeansTag;
import pt.estgp.estgweb.Globals;
import pt.estgp.estgweb.domain.UserSessionImpl;
import pt.estgp.estgweb.domain.UserImpl;
 
public class HasRoleTag extends BodyTagSupport
{
 
/branches/v3/impl/src/hbm/pt/estgp/estgweb/domain/Course.hbm.xml
124,6 → 124,7
<property name="nameEn" type="string"/>
<property name="nameEs" type="string"/>
<property name="nameFr" type="string"/>
<!--Todo colocar aqui o director e vice director de departamento Remover do Curso ou no proprio curso afeta aqui-->
<subclass name="pt.estgp.estgweb.domain.CourseDepartmentImpl" discriminator-value="CourseDepartmentImpl"/>
</class>
 
/branches/v3/impl/src/hbm/pt/estgp/estgweb/domain/Questionarios.hbm.xml
602,6 → 602,8
<discriminator column="discriminator"/>
<timestamp source="db" name="updateDate" unsaved-value="null"/>
<property name="saveDate" type="timestamp"/>
<!--<property name="repositoryStreamZipFile" type="string" index="repositoryIndexZipFile"/>-->
<!--<property name="repositoryStreamCsvFile" type="string" index="repositoryIndexCsvFile"/>-->
<subclass name="pt.estgp.estgweb.domain.QuestionarioReportFileGroupImpl">
<meta attribute="scope-class">public abstract</meta>
<subclass name="pt.estgp.estgweb.domain.QuestionarioReportFileGroupAno">
/branches/v3/impl/src/web/imgs/questionarios/indiferent.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/branches/v3/impl/src/web/imgs/questionarios/sad.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream
/branches/v3/impl/src/web/imgs/questionarios/smile.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+ application/octet-stream