Commit 5eddd333 authored by didonet's avatar didonet

Added an AND clause into the professorcourses query, to avoid listing

section pos without students.
parent 86e40148
......@@ -51,6 +51,8 @@ public class RegistrationRequest {
private String PosComp;
private String advisor;
private String observations;
@ManyToOne
......@@ -196,7 +198,13 @@ public class RegistrationRequest {
document.add(Chunk.NEWLINE);
document.add(Chunk.NEWLINE);
document.add( new Phrase(" Assinatura do aluno Nome e assinatura do orientador ", ReportUtil.getNormalTextFont()));
document.add( new Phrase("Assinaturas", ReportUtil.getTitleTextFont()));
document.add(Chunk.NEWLINE);
document.add(Chunk.NEWLINE);
document.add( new Phrase(rr.getName()+": ", ReportUtil.getNormalTextFont()));
document.add(Chunk.NEWLINE);
document.add(Chunk.NEWLINE);
document.add( new Phrase(rr.getAdvisor()+": ", ReportUtil.getNormalTextFont()));
document.add(Chunk.NEWLINE);
document.add(Chunk.NEWLINE);
......
......@@ -33,7 +33,16 @@ privileged aspect RegistrationRequest_Roo_JavaBean {
public void RegistrationRequest.setName(String name) {
this.name = name;
}
}
public String RegistrationRequest.getAdvisor() {
return this.advisor;
}
public void RegistrationRequest.setAdvisor(String advisor) {
this.advisor = advisor;
}
public String RegistrationRequest.getCPF() {
return this.CPF;
......
......@@ -68,9 +68,10 @@ public class SectionPos {
periodPart = "and section_year >= "+year;
else if (!(period.isEmpty()) && (year.isEmpty()))
periodPart = "and period >= "+period;
String transcripts = " and id in (select transcript_section from transcript) ";
return entityManager().createNativeQuery("select * from Section_Pos " +
" where professor = "+prof+" "+periodPart+
" where professor = "+prof+" "+periodPart+transcripts+
" order by section_year, period", SectionPos.class).getResultList();
}
......
......@@ -102,7 +102,6 @@ public class RegistrationRequestController {
addDateTimeFormatPatterns(uiModel);
RegistrationRequest rr =
// uiModel.addAttribute("registrationrequest",
RegistrationRequest.findRegistrationRequestByCPF(id, cpf,
new Integer(Configuration.findConfigValueByName(Configuration.CURRENT_YEAR)),
new Integer(Configuration.findConfigValueByName(Configuration.CURRENT_PERIOD))).get(0);
......
......@@ -7,6 +7,7 @@ label_br_ufpr_c3sl_sapos_models_scholar_sectionpos_year=Year
label_br_ufpr_c3sl_sapos_models_scholar_recommendation=Recommendation
label_br_ufpr_c3sl_sapos_models_scholar_recommendation_name=Name
label_br_ufpr_c3sl_sapos_models_scholar_registrationrequest_advisor=Advisor
label_br_ufpr_c3sl_sapos_models_scholar_recommendation_phone=Phone
label_br_ufpr_c3sl_sapos_models_scholar_recommendation_institution=Institution
label_br_ufpr_c3sl_sapos_models_scholar_recommendation_mailaddress=Mail Address
......
......@@ -326,6 +326,7 @@ label_br_ufpr_c3sl_sapos_models_scholar_registrationrequest=Requisi
label_br_ufpr_c3sl_sapos_models_scholar_registrationrequest_id=Id
label_br_ufpr_c3sl_sapos_models_scholar_registrationrequest_version=Verso
label_br_ufpr_c3sl_sapos_models_scholar_registrationrequest_name=Nome do aluno
label_br_ufpr_c3sl_sapos_models_scholar_registrationrequest_advisor=Orientador
label_br_ufpr_c3sl_sapos_models_scholar_registrationrequest_cpf=CPF
label_br_ufpr_c3sl_sapos_models_scholar_registrationrequest_phone=Telefone
label_br_ufpr_c3sl_sapos_models_scholar_registrationrequest_email=Email
......
......@@ -37,6 +37,8 @@
<p/>
<field:select field="requestKind" required="true" id="c_br_ufpr_c3sl_sapos_models_scholar_RegistrationRequest_requestKind" items="${registrationkinds}" path="registrationkinds" z="QHL6MLE5411WNUa/F8UyTxE9H6w="/>
<field:input field="advisor" required="true" id="c_br_ufpr_c3sl_sapos_models_scholar_RegistrationRequest_advisor" z="user-managed"/>
<p/>
<b>${one_field_select}</b> <br/>
......
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