Commit 44a1040f authored by didonet's avatar didonet

Added a new field to state that students' registration are on status of

thesis writing in progress.
parent 728aab83
......@@ -78,6 +78,23 @@ public class Configuration {
" NOT reg_status = 'Desligada') as temp, registration r where temp.identidade = r.id and r.reg_status = 'Ativa'", Registration.class).getResultList();
}
//- show students that are not subscribed into any course and that are not writing the thesis neither ("unregistered")
public static Object findUnregisteredStudents(){
return entityManager().createNativeQuery(
"select * " +
" from " +
"registration a, person b " +
"where " +
"a.student = b.id and a.is_writing_thesis is not true and reg_status = '"+RegistrationStatus.Ativa+"' and " +
" not exists (select id " +
"from " +
"transcript c " +
"where " +
"c.student = a.id and (c.situation is null or c.situation = 'Nulo') ) " +
" order by b.name "
, Registration.class).getResultList();
}
//- mostrar data de defesa maior que x meses
public static Object findExpiredDefenseRegistration(){
......
......@@ -49,7 +49,7 @@ public class Registration {
private Student student;
@Enumerated(EnumType.STRING)
private RegistrationKind regKind;
private RegistrationKind regKind;
@ManyToOne
private Professor advisor;
......@@ -57,6 +57,8 @@ public class Registration {
@Enumerated(EnumType.STRING)
private RegistrationStatus regStatus;
Boolean isWritingThesis;
@Enumerated(EnumType.STRING)
private LanguageKind language;
......@@ -84,6 +86,7 @@ public class Registration {
@Temporal(TemporalType.DATE)
@DateTimeFormat(style = "S-")
private Date desistanceDate;
@Temporal(TemporalType.DATE)
@DateTimeFormat(style = "S-")
......@@ -98,7 +101,7 @@ public class Registration {
@Temporal(TemporalType.DATE)
@DateTimeFormat(style = "S-")
private Date admissionDate;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "student")
private Set<Committee> committees = new HashSet<Committee>();
......@@ -144,7 +147,7 @@ public class Registration {
" and reg_status = "+"'" + regStatus + "'"+
" and reg_kind =" + "'" + courseKind + "'", Registration.class).getResultList();
}
public static Object findRegistrationsPerAdvisor(String advisor, String regStatus) {
return entityManager().createNativeQuery(
"SELECT * FROM registration r where "+
......@@ -176,13 +179,13 @@ public class Registration {
public static Collection<Registration> findAllActiveRegistrations() {
return entityManager().createNativeQuery(
"SELECT * FROM registration r, person p where "+
" reg_status = 'Ativa' and r.student = p.id "+
" reg_status = '"+RegistrationStatus.Ativa+"' and r.student = p.id "+
" order by p.name" , Registration.class).getResultList();
}
public static Object findAllCandidatesToGrant() {
return entityManager().createNativeQuery(
"select * from registration r, person p where grant_candidate = 't' and reg_status='Ativa' and"+
"select * from registration r, person p where grant_candidate = 't' and reg_status='"+RegistrationStatus.Ativa+"' and"+
" not exists ( select * from student_grant sg where sg.registration = r.id and end_date is null )"+
" and r.student = p.id order by p.name", Registration.class).getResultList();
}
......@@ -200,6 +203,13 @@ public class Registration {
"r.student = p.id ORDER BY p.name" , Registration.class).getResultList();
}
public static Collection<Registration> findThesisWritingInProgress() {
return entityManager().createNativeQuery(
"SELECT * FROM registration r, person p where "+
" reg_status = '"+RegistrationStatus.Ativa+"' and r.student = p.id and is_writing_thesis is true "+
" order by reg_kind, p.name" , Registration.class).getResultList();
}
public static Object findRegistrationsOpenProposalDate(String regKind, String year) {
String sql = "";
if (!year.isEmpty())
......@@ -232,7 +242,7 @@ public class Registration {
public static long countTotalActivesRegKind(String regKind) {
BigInteger count = (BigInteger) entityManager().createNativeQuery("select count(*) from registration where reg_kind = '"+regKind+"' and " +
"reg_status='Ativa'").getSingleResult();
"reg_status='"+RegistrationStatus.Ativa+"'").getSingleResult();
return count.longValue();
}
......
......@@ -188,6 +188,15 @@ privileged aspect Registration_Roo_JavaBean {
this.studentGrants = studentGrants;
}
public Boolean Registration.getIsWritingThesis() {
return this.isWritingThesis;
}
public void Registration.setIsWritingThesis(Boolean isWritingThesis) {
this.isWritingThesis = isWritingThesis;
}
public Boolean Registration.getGrantCandidate() {
return this.grantCandidate;
}
......@@ -260,7 +269,7 @@ privileged aspect Registration_Roo_JavaBean {
this.jobArea = jobArea;
}
public Boolean Registration.getSameResearchArea() {
public Boolean Registration.getSameResearchArea() {
return this.sameResearchArea;
}
......
......@@ -36,6 +36,7 @@ public class ConfigurationController {
model.addAttribute("irregularGrants", Configuration.findActiveStudentIrregularGrants());
model.addAttribute("irregularRegistrations", Configuration.findIrregularRegistration());
model.addAttribute("expiredDefense", Configuration.findExpiredDefenseRegistration());
model.addAttribute("unregisteredStudents", Configuration.findUnregisteredStudents());
model.addAttribute("endGrant", Configuration.findNearEndGrants());
model.addAttribute("gradeEmpty", Configuration.findLastPeriodBlankConcepts());
model.addAttribute("travelrequisition", Configuration.findAllOpenTravelRequisitions());
......
......@@ -83,6 +83,13 @@ public class RegistrationController {
return "registrations/list";
}
@RequestMapping(value = "thesiswritinginprogress", method = RequestMethod.GET)
public String thesisWritingInProgress(Model model) {
model.addAttribute("registrations", Registration.findThesisWritingInProgress());
return "registrations/list";
}
@RequestMapping(value="registrationsstatementpdf",method = RequestMethod.GET)
public void transcriptsStatementPdf(@RequestParam(value = "registration", required = true) String id,
Model model, HttpServletResponse response) {
......
......@@ -307,6 +307,7 @@ label_br_ufpr_c3sl_sapos_models_scholar_registration_enddate=End Date
label_br_ufpr_c3sl_sapos_models_scholar_registration_endholding=End Holding
label_br_ufpr_c3sl_sapos_models_scholar_registration_endinterruption=End Interruption
label_br_ufpr_c3sl_sapos_models_scholar_registration_grantcandidate=Grant Candidate
label_br_ufpr_c3sl_sapos_models_scholar_registration_iswritingthesis=Writing thesis in progress
label_br_ufpr_c3sl_sapos_models_scholar_registration_grants=Grants
label_br_ufpr_c3sl_sapos_models_scholar_registration_id=Id
label_br_ufpr_c3sl_sapos_models_scholar_registration_job=Job
......
......@@ -285,7 +285,7 @@ label_br_ufpr_c3sl_sapos_models_scholar_grantkind_kind=Tipo
label_br_ufpr_c3sl_sapos_models_scholar_grantkind_name=Nome
label_br_ufpr_c3sl_sapos_models_scholar_grantkind_plural=Tipos de Bolsas
label_br_ufpr_c3sl_sapos_models_scholar_grantkind_version=Version
label_br_ufpr_c3sl_sapos_models_scholar_registration=Ingresso
label_br_ufpr_c3sl_sapos_models_scholar_registration=Ingresso
label_br_ufpr_c3sl_sapos_models_scholar_registration_admissiondate=Data da admisso
label_br_ufpr_c3sl_sapos_models_scholar_registration_advisor=Orientador
label_br_ufpr_c3sl_sapos_models_scholar_registration_advisors=Orientadores
......@@ -318,6 +318,7 @@ label_br_ufpr_c3sl_sapos_models_scholar_registration_transcripts=Avalia
label_br_ufpr_c3sl_sapos_models_scholar_registration_version=Version
label_br_ufpr_c3sl_sapos_models_scholar_registration_grantcandidate=Candidato a Bolsa
label_br_ufpr_c3sl_sapos_models_scholar_registration_iswritingthesis=Elaborao de tese/dissertao
label_br_ufpr_c3sl_sapos_models_scholar_registration_librarypubdate=Publicao na biblioteca
label_br_ufpr_c3sl_sapos_models_scholar_registration_thesistitle=Titulo da Tese
label_br_ufpr_c3sl_sapos_models_scholar_registration_keywords=Palavras Chaves
......
......@@ -10,6 +10,7 @@ global_menu_statement_student_grant=Student grant statement
global_menu_statement_acceptance=Acceptance statement
global_menu_statement_courses=Ministered Courses statement
global_menu_candidates_to_grant=Candidates to grant
global_menu_thesis_writing_in_progress=Thesis writing in progress
global_menu_blank_proposal=Open Proposal
global_menu_entrants_data=Entrants Data
global_menu_concluded_by_period=Concluded Logins
......
......@@ -19,6 +19,7 @@ global_menu_statement_student_grant=Declara
global_menu_statement_acceptance=Declarao de aceitao
global_menu_statement_courses=Declarao de ministradas
global_menu_candidates_to_grant=Candidatos a bolsa
global_menu_thesis_writing_in_progress=Elaborao de dissertao/tese
global_menu_blank_proposal=Proposta em Aberto
global_menu_entrants_data=Dados Ingressantes
global_menu_concluded_by_period=Login dos concluidos
......
......@@ -49,6 +49,19 @@
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regStatus" property="regStatus" z="ZylPJo9HTwXXaEuXJAnOaZPfxQw="/>
</table:table>
</page:list>
<br/><br/>
<b>Alunos sem matrícula e ativos</b>
<page:list id="pl_br_ufpr_c3sl_sapos_models_scholar_Course" items="${unregisteredStudents}" emptyLabels="true" z="user-managed">
<table:table data="${unregisteredStudents}" id="l_br_ufpr_c3sl_sapos_models_scholar_Registration" path="/registrations" create="false" z="user-managed">
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_student" navigation="true" property="student" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regKind" property="regKind" z="user-managed"/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_advisors" navigation="true" property="advisor" z="/kn8I2wpm4baHtJNGOecElHBrW0="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_startDate" property="startDate" z="rCFH2a7Quc5QG9LXDm4qm2Akz6k="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_proposalDate" property="proposalDate" z="OzadopRNBpgDF6fS6fKmBx3EPhA="/>
<table:column id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regStatus" property="regStatus" z="ZylPJo9HTwXXaEuXJAnOaZPfxQw="/>
</table:table>
</page:list>
<br/><br/>
<b>Data de defesa maior que o estipulado (mestrado e doutorado)</b>
......
......@@ -36,6 +36,7 @@
<menu:item id="i_registration_list" messageCode="global_menu_statement" url="/registrations/registrationsstatement" z="user-managed"/>
<menu:item id="i_registration_list" messageCode="global_menu_statement_acceptance" url="/registrations/acceptancestatement" z="user-managed"/>
<menu:item id="i_registration_list" messageCode="global_menu_candidates_to_grant" url="/registrations/candidatestogrant" z="user-managed"/>
<menu:item id="i_registration_list" messageCode="global_menu_thesis_writing_in_progress" url="/registrations/thesiswritinginprogress" z="user-managed"/>
<menu:item id="i_registration_list" messageCode="global_menu_blank_proposal" url="/registrations/openproposaldate" z="user-managed"/>
<menu:item id="i_registration_list" messageCode="global_menu_entrants_data" url="/registrations/entrantsdata" z="user-managed"/>
<menu:item id="i_registration_list" messageCode="global_menu_concluded_by_period" url="/registrations/concludedbyperiod" z="user-managed"/>
......
......@@ -7,7 +7,9 @@
<field:select disableFormBinding="true" field="student" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_student" itemValue="id" items="${students}" path="/students" z="user-managed"/>
<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="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:select field="regStatus" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regStatus" items="${registrationstatuses}" path="registrationstatuses" z="P9eI83EY6Adc/hMCVIP3kIeWY2k="/>
<field:checkbox field="isWritingThesis" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_isWritingThesis" z="QM6rdx8vJ3AGL4L+YTs0+JqvyS0="/>
<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="/>
......
......@@ -8,6 +8,8 @@
<field:display field="regKind" id="s_br_ufpr_c3sl_sapos_models_scholar_Registration_regKind" object="${registration}" z="fUJ3J42pzhvbqPQiBccVN0MzKL4="/>
<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="isWritingThesis" id="s_br_ufpr_c3sl_sapos_models_scholar_Registration_isWritingThesis" object="${registration}" z="98NIsZw44n9Zc2o0RRhve5O4MRg="/>
<field:display field="transferCredit" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_transferCredit" object="${registration}" z="QM6rdx8vJ3AGL4L+YTs0+JqvyS0="/>
<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"/>
......
......@@ -8,6 +8,7 @@
<field:select field="regKind" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_regKind" items="${registrationkinds}" path="registrationkinds" z="QHL6MLE5411WNUa/F8UyTxE9H6w="/>
<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:checkbox field="isWritingThesis" id="c_br_ufpr_c3sl_sapos_models_scholar_Registration_isWritingThesis" z="QM6rdx8vJ3AGL4L+YTs0+JqvyS0="/>
<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="/>
......
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