Commit 16320461 authored by didonet's avatar didonet

Added information about language proficiency. Updated forms and

corresponding reports.
parent 441ed0ea
......@@ -24,6 +24,7 @@ import org.springframework.roo.addon.tostring.RooToString;
import br.ufpr.c3sl.sapos.models.people.Professor;
import br.ufpr.c3sl.sapos.models.people.Student;
import br.ufpr.c3sl.sapos.models.report.ReportUtil;
import br.ufpr.c3sl.sapos.models.scholar.enums.LanguageKind;
import br.ufpr.c3sl.sapos.models.scholar.enums.RegistrationKind;
import br.ufpr.c3sl.sapos.models.scholar.enums.RegistrationStatus;
......@@ -36,7 +37,6 @@ import com.itextpdf.text.FontFactory;
import com.itextpdf.text.Image;
import com.itextpdf.text.PageSize;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
@RooJavaBean
......@@ -50,14 +50,22 @@ public class Registration {
private Student student;
@Enumerated(EnumType.STRING)
private RegistrationKind regKind;
private RegistrationKind regKind;
@ManyToOne
private Professor advisor;
@Enumerated(EnumType.STRING)
private RegistrationStatus regStatus;
@Enumerated(EnumType.STRING)
private LanguageKind language;
@Temporal(TemporalType.DATE)
@DateTimeFormat(style = "S-")
private Date proficiencyDate;
@Temporal(TemporalType.DATE)
@DateTimeFormat(style = "S-")
private Date startDate;
......
......@@ -3,16 +3,14 @@
package br.ufpr.c3sl.sapos.models.scholar;
import java.util.Date;
import java.util.Set;
import br.ufpr.c3sl.sapos.models.people.Professor;
import br.ufpr.c3sl.sapos.models.people.Student;
import br.ufpr.c3sl.sapos.models.scholar.Committee;
import br.ufpr.c3sl.sapos.models.scholar.StudentGrant;
import br.ufpr.c3sl.sapos.models.scholar.Transcript;
import br.ufpr.c3sl.sapos.models.scholar.enums.LanguageKind;
import br.ufpr.c3sl.sapos.models.scholar.enums.RegistrationKind;
import br.ufpr.c3sl.sapos.models.scholar.enums.RegistrationStatus;
import java.lang.String;
import java.util.Date;
import java.util.Set;
privileged aspect Registration_Roo_JavaBean {
......@@ -240,4 +238,21 @@ privileged aspect Registration_Roo_JavaBean {
this.transferCredit = transferCredit;
}
public LanguageKind Registration.getLanguage() {
return this.language;
}
public void Registration.setLanguage(LanguageKind language) {
this.language = language;
}
public Date Registration.getProficiencyDate() {
return this.proficiencyDate;
}
public void Registration.setProficiencyDate(Date proficiencyDate) {
this.proficiencyDate = proficiencyDate;
}
}
......@@ -23,6 +23,7 @@ import br.ufpr.c3sl.sapos.models.people.Professor;
import br.ufpr.c3sl.sapos.models.people.Student;
import br.ufpr.c3sl.sapos.models.report.ReportUtil;
import br.ufpr.c3sl.sapos.models.scholar.enums.ConceptTranscript;
import br.ufpr.c3sl.sapos.models.scholar.enums.LanguageKind;
import br.ufpr.c3sl.sapos.models.scholar.enums.SituationTranscript;
import com.itextpdf.text.BaseColor;
......@@ -185,6 +186,7 @@ public class Transcript {
document.add(new Paragraph("conceitos: 9,0 a 10,0 = A; 8,0 a 8,9 = B; 7,0 a 7,9 = C; " +
"Zero a 6,9 = D = Reprovado",FontFactory.getFont(FontFactory.TIMES_BOLD, 8, Font.BOLD, BaseColor.BLACK)));
document.add(Chunk.NEWLINE);
getLanguage(reg.getProficiencyDate(), reg.getLanguage(), document);
p = new Paragraph("Pós-Graduação em Informática da Universidade Federal do Paraná." +
" Portaria Ministerial Homologado pelo CNE (Portaria n° 2.878, 24/08/2005), Conceito 4 " +
"na CAPES.",FontFactory.getFont(FontFactory.TIMES, 10, Font.ROMAN_BASELINE, BaseColor.BLACK));
......@@ -225,6 +227,33 @@ public class Transcript {
e.printStackTrace();
}
}
private static String convertDate (Date date){
return date.toString().substring(8)+"/"+date.toString().substring(5, 7)+"/"+date.toString().substring(0, 4);
}
private static String convertLanguagePT(LanguageKind language) {
switch (language) {
case Alemao:
return "Alemão";
case Ingles:
return "Inglês";
case Frances:
return "Francês";
default:
return language.toString();
}
}
private static void getLanguage(Date proficiencyDate, LanguageKind language, Document document ) throws DocumentException{
if (language != null)
if ( language != LanguageKind.Nulo) {
document.add ( new Phrase("Aprovação em Exame de Língua Estrangeira ("+ convertLanguagePT(language)+"): ",FontFactory.getFont(FontFactory.TIMES_BOLD, 10, Font.BOLD, BaseColor.BLACK)));
document.add( new Phrase( convertDate(proficiencyDate),FontFactory.getFont(FontFactory.TIMES, 10, Font.ROMAN_BASELINE, BaseColor.BLACK)));
document.add(Chunk.NEWLINE);
}
}
public static void historyPdf(Registration reg, HttpServletResponse response) throws DocumentException, IOException {
response.setContentType("application/pdf");
......@@ -392,7 +421,11 @@ public class Transcript {
document.add(new Paragraph("conceitos: 9,0 a 10,0 = A; 8,0 a 8,9 = B; 7,0 a 7,9 = C; " +
"Zero a 6,9 = D = Reprovado",FontFactory.getFont(FontFactory.TIMES_BOLD, 8, Font.BOLD, BaseColor.BLACK)));
document.add(Chunk.NEWLINE);
document.add(Chunk.NEWLINE);
getLanguage(reg.getProficiencyDate(), reg.getLanguage(), document);
if (reg.getDefenseDate() != null) {
phr = new Phrase("Dissertação aprovada em: ",FontFactory.getFont(FontFactory.TIMES_BOLD, 10, Font.BOLD, BaseColor.BLACK));
......
package br.ufpr.c3sl.sapos.models.scholar.enums;
public enum LanguageKind {
Nulo, Ingles, Frances, Alemao, Espanhol, Italiano
}
......@@ -3,22 +3,13 @@
package br.ufpr.c3sl.sapos.web;
import br.ufpr.c3sl.sapos.models.people.Professor;
import br.ufpr.c3sl.sapos.models.people.Student;
import br.ufpr.c3sl.sapos.models.scholar.Committee;
import br.ufpr.c3sl.sapos.models.scholar.Registration;
import br.ufpr.c3sl.sapos.models.scholar.StudentGrant;
import br.ufpr.c3sl.sapos.models.scholar.Transcript;
import br.ufpr.c3sl.sapos.models.scholar.enums.RegistrationKind;
import br.ufpr.c3sl.sapos.models.scholar.enums.RegistrationStatus;
import java.io.UnsupportedEncodingException;
import java.lang.Integer;
import java.lang.Long;
import java.lang.String;
import java.util.Arrays;
import java.util.Collection;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import org.joda.time.format.DateTimeFormat;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.ui.Model;
......@@ -31,6 +22,16 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.util.UriUtils;
import org.springframework.web.util.WebUtils;
import br.ufpr.c3sl.sapos.models.people.Professor;
import br.ufpr.c3sl.sapos.models.people.Student;
import br.ufpr.c3sl.sapos.models.scholar.Committee;
import br.ufpr.c3sl.sapos.models.scholar.Registration;
import br.ufpr.c3sl.sapos.models.scholar.StudentGrant;
import br.ufpr.c3sl.sapos.models.scholar.Transcript;
import br.ufpr.c3sl.sapos.models.scholar.enums.LanguageKind;
import br.ufpr.c3sl.sapos.models.scholar.enums.RegistrationKind;
import br.ufpr.c3sl.sapos.models.scholar.enums.RegistrationStatus;
privileged aspect RegistrationController_Roo_Controller {
@RequestMapping(method = RequestMethod.POST)
......@@ -136,6 +137,11 @@ privileged aspect RegistrationController_Roo_Controller {
public java.util.Collection<RegistrationKind> RegistrationController.populateRegistrationKinds() {
return Arrays.asList(RegistrationKind.class.getEnumConstants());
}
@ModelAttribute("languagekinds")
public java.util.Collection<LanguageKind> RegistrationController.populateLanguageKinds() {
return Arrays.asList(LanguageKind.class.getEnumConstants());
}
@ModelAttribute("registrationstatuses")
public java.util.Collection<RegistrationStatus> RegistrationController.populateRegistrationStatuses() {
......
......@@ -218,6 +218,8 @@ label_br_ufpr_c3sl_sapos_models_scholar_registration_plural=Registrations
label_br_ufpr_c3sl_sapos_models_scholar_registration_proposaldate=Proposal Date
label_br_ufpr_c3sl_sapos_models_scholar_registration_registrationnumber=Registration Number
label_br_ufpr_c3sl_sapos_models_scholar_registration_regkind=Reg Kind
label_br_ufpr_c3sl_sapos_models_scholar_registration_language=Proficiency language
label_br_ufpr_c3sl_sapos_models_scholar_registration_proficiencydate=Proficiency date
label_br_ufpr_c3sl_sapos_models_scholar_registration_regstatus=Reg Status
label_br_ufpr_c3sl_sapos_models_scholar_registration_salary=Salary
label_br_ufpr_c3sl_sapos_models_scholar_registration_startdate=Start Date
......
......@@ -218,6 +218,8 @@ label_br_ufpr_c3sl_sapos_models_scholar_registration_plural=Ingressos
label_br_ufpr_c3sl_sapos_models_scholar_registration_proposaldate=Data da Proposta
label_br_ufpr_c3sl_sapos_models_scholar_registration_registrationnumber=Matrcula
label_br_ufpr_c3sl_sapos_models_scholar_registration_regkind=Tipo
label_br_ufpr_c3sl_sapos_models_scholar_registration_proficiencydate=Data exame de proficincia
label_br_ufpr_c3sl_sapos_models_scholar_registration_language=Lngua
label_br_ufpr_c3sl_sapos_models_scholar_registration_regstatus=Status
label_br_ufpr_c3sl_sapos_models_scholar_registration_salary=Salrio
label_br_ufpr_c3sl_sapos_models_scholar_registration_startdate=Data de Incio
......
lobal_menu_new=Criar {0}
global_menu_new=Criar {0}
global_menu_list=Listar {0}
global_menu_list_status=Listar por status
global_menu_find=Encontrado por {0}
......
......@@ -9,6 +9,8 @@
<field:select field="regKind" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regKind" items="${registrationkinds}" path="registrationkinds" z="QHL6MLE5411WNUa/F8UyTxE9H6w="/>
<field:select field="regStatus" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regStatus" items="${registrationstatuses}" path="registrationstatuses" z="P9eI83EY6Adc/hMCVIP3kIeWY2k="/>
<field:input field="transferCredit" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_transferCredit" validationMessageCode="field_invalid_integer" z="QM6rdx8vJ3AGL4L+YTs0+JqvyS0="/>
<field:select field="language" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_language" items="${languagekinds}" path="languagekinds" z="user-managed"/>
<field:datetime dateTimePattern="${registration_startdate_date_format}" field="proficiencyDate" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_proficiencyDate" z="YpGgwbyaevarNbfaz5kJNfzlcw8="/>
<p/>
<hr/>
<b>Datas</b>
......
......@@ -9,8 +9,11 @@
<field:display field="advisor" id="s_br_ufpr_c3sl_sapos_models_scholar_Registration_advisor" object="${registration}" z="H95sx2mbD46ISBTIsi8EWW1hDjU="/>
<field:display field="regStatus" id="s_br_ufpr_c3sl_sapos_models_scholar_Registration_regStatus" object="${registration}" z="OAcJeXbc6D9iOMkMLF+2F0ONvuo="/>
<field:display field="transferCredit" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_transferCredit" object="${registration}" z="QM6rdx8vJ3AGL4L+YTs0+JqvyS0="/>
<p/>
<field:display field="language" id="s_br_ufpr_c3sl_sapos_models_scholar_Registration_language" object="${registration}" z="user-managed"/>
<field:display date="true" dateTimePattern="${registration_startdate_date_format}" field="proficiencyDate" id="s_br_ufpr_c3sl_sapos_models_scholar_Registration_proficiencyDate" object="${registration}" z="user-managed"/>
<br/>
<hr/>
<p/>
<b>Datas</b>
<p/>
......@@ -23,8 +26,10 @@
<field:display date="true" dateTimePattern="${registration_libraryPubDate_date_format}" field="libraryPubDate" id="s_br_ufpr_c3sl_sapos_models_scholar_Registration_libraryPubDate" object="${registration}" z="5EyyieByXABgbcuhrdZuTQs0W/U="/>
<p/>
<br/>
<hr/>
<p/>
<b>Dados trabalhistas</b>
<p/>
......@@ -36,8 +41,9 @@
<field:display field="jobKind" id="s_br_ufpr_c3sl_sapos_models_scholar_Registration_jobKind" object="${registration}" z="2RGUMrd8U/v3MLeV19Ep3XcCgjo="/>
<field:display field="jobArea" id="s_br_ufpr_c3sl_sapos_models_scholar_Registration_jobArea" object="${registration}" z="2RGUMrd8U/v3MLeV19Ep3XcCgjo="/>
<p/>
<br/>
<hr/>
<p/>
<b>Dados da Dissertação</b>
<p/>
<field:display field="thesisTitle" id="s_br_ufpr_c3sl_sapos_models_scholar_Registration_thesisTitle" object="${registration}" z="2RGUMrd8U/v3MLeV19Ep3XcCgjo="/>
......
......@@ -9,6 +9,9 @@
<field:select field="advisor" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_advisor" itemValue="id" items="${professors}" path="/professors" z="9xJvlqzs+c1TV8F/nDMDoKnvoB4="/>
<field:select field="regStatus" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regStatus" items="${registrationstatuses}" path="registrationstatuses" z="P9eI83EY6Adc/hMCVIP3kIeWY2k="/>
<field:input field="transferCredit" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_transferCredit" validationMessageCode="field_invalid_integer" z="QM6rdx8vJ3AGL4L+YTs0+JqvyS0="/>
<field:select field="language" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_language" items="${languagekinds}" path="languagekinds" z="user-managed"/>
<field:datetime dateTimePattern="${registration_startdate_date_format}" field="proficiencyDate" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_proficiencyDate" z="YpGgwbyaevarNbfaz5kJNfzlcw8="/>
<p/>
<hr/>
<b>Datas</b>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment