Skip to content

Commit 8dbf957

Browse files
igorgoncalvesTI GUSTAVOGusta-SantosevellynreisAnotherOne07
authored
release/3.95.214 (#924)
* Criando esqueleto da tela de cadastro de agricultor * Criando verificações * Criando verificação de relação de produtos * Feat/button alphabetic order (#631) * feat(classroom): Adicionando o botão de ordem alfabética na aba de ordem de diário no formulário de turmas * Modificando a versão do changelog e fazendo o merge com a dev * Corrigindo issues * Corrigindo issues * Corrigindo issues * Corrigindo irregularidade * Corrigindo irregularidade --------- Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * fix/add input no (#633) * fix/add input no * fix/config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [Versão 3.71.112] Fix/class plan abilities view (#628) * first commit * modal created * events added to buttons * js changes * manipulating form and events related to it * form and route is already working but still missing update select and actionCreate * modal finished and select already is been updated * minor changes * almost there, still missing to fill type field in form * form is already working but still need to fix the style * funcionality is already working, but still needs to fix the layout yet * removing unnecessary comments * remove comment * fix remove resource from list * 💄feat/badge style updated * 💄feat/fix icon style and padding in button * 🗃️raw/upload sql changes and CHANGELOG update * 🗃️raw/upload sql changes and remove comments * small change on placeholder in modal * 🏷️fix/removing var declared variables * 🏷️fix/removing sonarlint issues --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * main.css * Feat calendar surpassing year (#619) * primeiro commit da branch * feito parcialmente calendário * retirado função de disponibilizar calendário * update do calendar_fk das turmas * adequado vigencia das unidades * calendario supostamente finalizado * quadro de horário com add/change/remove schedule pendentes * refatorado quadro de horário com ano passando * reinserido schedule * corrigido bug no carregamento dos hardunavailabledays e na geração do quadro de horário * o alerta de alteração de data do calendario nunca aparecia * Adequado selects em aulas ministradas e frequencia * Adição dos calendarios no cadastro das turmas * alterado sql * Merge * fix sonarcloud --------- Co-authored-by: paulones <Ppcc8986> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Criando a action de save no controller de farmer register * fix merge * Criando a tabela de visualização de agricultores * Criado as telas de relacionadas a agricultor * fix/variable declared incorrectly in function scope * Adicionando a school_fk e o status em food_request * conectando com o firebase * Realizando integração com o firebase * Corrigindo erros do sonarlint * Corrigindo errors sonarlint * Corrigindo erros do sonarlint * Corrigindo issues alertados pelo sonarlint * Corrigindo issues * Feat/change food measurement (#635) * create migration * adicionando input de quantidade * mudando componente de cardápio * alterado food_measurement * change reports * mudado componente de cardápio * alterado food_measurement * alterado food_measurement * alterado food_measurement * alterado food_measurement * sonarlint issues * resolve conflicts * sonarlint issues * main.css * mudado componente de cardápio --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> * [TCDA-240] Fix/load schedules by discipline (#637) * 🐛fix/minor fundamental conditional fixed * :docs:docs/CHANGELOG updated * fix/function parameter fixed --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat: case added for class 22 and multi alias (#638) * Feat: case added for class 22 and multi alias * Feat: added changelog * Feat: added version in config * Feat: added case 2 for class --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix: gestor not edit calendar (#640) * Fix: gestor not edit calendar * Feat: added version in changelog e config * Feat: added menu for calendário para professor * Feat: added acess for admin --------- Co-authored-by: AnotherOne07 <93009549+AnotherOne07@users.noreply.github.com> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * fix/poco_dantas (#643) * fix/ add cep formated * fix/ add changelog --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * rename food folders * fix: rename foodrequest folder * fix file rename * consertado redirecionamento em Foodmenu * fix: rename folder * fix: delete file * Feat/warning missing content (#639) * Apresentação de duas listas na pagina inicial * Apresentação dos primeiros warns e estrutura contada * Mais warnings avaliados * Alertando todos os problemas pedidos * Limite de quantidade de warns e ajustes * inserido painel de cadastros pendentes 100% * inserindo validação pra gestor escolar * updating name branch * ajeitado painel de cadastros pendentes * bug phps * bug phps * renomeado pra maiusculos novamente * renomeado pra maiusculos novamente * renomeado pra maiusculos novamente * corrigido incongruências de case sensitive * corrigido incongruências de case sensitive * retirado conflito de foodmenu.php * config e changelog --------- Co-authored-by: paulones <Ppcc8986> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/frequency_75 (#644) * fix/ add property frequency in use case * fix/add function get and set * fix/modify controller * fix/add changelog --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/scholarity sql column removed (#645) * Fix/scholarity sql column removed * Feat: added new version in changelog and config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/merenda escolar (#648) * first commit * first commit * Ajustes visuais na tela de cadastro de cardápio * Ajustes visuais na tela de cadastro de cardápio * change foodmenu --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fixing tag version number * Fixing changelog * Feat/food notice (#650) * finalizado crud de edital * adicionado botão para editais na tela de listagem de merenda * update migration * github issues * sonnar issues * atualizado versão do sistema * ignore case * corrigindo viewlunch * rename file * rename file * fix: creating notice button and fixing delete notice redirection * consertado o redirecionamento na actionDelete * fix folders * fix some sonarcloud issues * sonarlint issues * sonarlint issues * sonarlint issues --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/no_notes (#651) * fix/sets status to one * fix/ add changelog --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/corrections and improvements (#655) * Feat: added limit for not accessing future month * Fix: correction in attribute id_school * Fix: added inepId for inconsistencys * Fix: removed integer $inep_id * Fix: added filter for auth assignment * Feat: added new version in changelog and config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix: added food Enabled (#654) * Fix: added food Enabled * Feat: added migration * Feat/boquim integration (#652) * sqls para rodar nos bancos velhos de boquim * testado import de vanda 100% * ORGANIZADO SQLS * minor fix * Adaptado educacenso para importar dados quando não há professor; Melhorado tela de turma para não remover o teaching data quando não tem teaching_matrix; organizado melhor os arquivos SQL * aprimorado o readme * Integração dos bancos de boquim do TAG. Como foi reformulado o arquivo de importação. essa branch precisa ser merjada * update logs * fix: alterando condição de isStudent para importação do arquivo original do censo --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat/instructor frequency (#657) * sqls para rodar nos bancos velhos de boquim * testado import de vanda 100% * ORGANIZADO SQLS * minor fix * Adaptado educacenso para importar dados quando não há professor; Melhorado tela de turma para não remover o teaching data quando não tem teaching_matrix; organizado melhor os arquivos SQL * aprimorado o readme * Integração dos bancos de boquim do TAG. Como foi reformulado o arquivo de importação. essa branch precisa ser merjada * update logs * Frequência do professor * fix update log --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat/added professional for different schools (#659) * Feat: added professional for different schools * Fix: remove unique for cpf_professional * Feat: added new version in changelog and config * Feat: added new version in changelog and config * ci: add release sql * fix: added msg for inconsistency sagres (#626) * Feat: added msg for inconsistency sagres * Fix: modified code with only the first letter of "description" and "action" capitalized * Fix: corretion in uninitialized value * Fix/manager not authorized for school pdf (#661) * Fix: manager authorized for school pdf * Fix: set id student inconsistency sagres * Feat: added new version in changelog and config * Fix de teste da falta de curricular matrix e notas * logs * Icon font version update * Feat: added new version in changelog and config * Feat/added professional for different schools (#665) * Feat: added professional for different schools * Fix: remove unique for cpf_professional * Feat: added new version in changelog and config * Feat: added new version in changelog and config * Fix: correction in find professional * Fix: correction in inep_id (#664) * Fix: correction in inep_id * Feat: added new version in changelog and config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix: correction in description class (#668) * Fix: correction in description class * Feat: added new version for changelog and config * Fix: Define a constant instead of duplicating this literal "<strong>SÉRIE<strong>" 4 times. * Feat/food notice (#647) * finalizado crud de edital * adicionado botão para editais na tela de listagem de merenda * update migration * github issues * sonnar issues * atualizado versão do sistema * ignore case * corrigindo viewlunch * rename file * rename file * fix: creating notice button and fixing delete notice redirection * consertado o redirecionamento na actionDelete * fix folders * fix some sonarcloud issues * sonarlint issues * sonarlint issues * sonarlint issues --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> Co-authored-by: Gustavo Santos <gustavo.santos23703@gmail.com> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat/create farmer register (#653) * Pegando as informações do firebase * realizando o merge com a dev e modificando o changelog * Corrigindo o controller farmerregister * Pegando o cadastro do agricultor de acordo com o seu cpf * Conectando o update do agricultor com o firebase * Finalizada conexão para alteração do agricultor no firebase * Permitindo a atualização e a exclusão no firebase e adicionando verificações de cpf * Corrigindo issues * corrigindo code smells --------- Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * corrigido bug produzido em 15/03/2024 * Fix/add lunch unities [Versão 3.77.132] (#677) * add lunch unities * mudado versão do sistema * Feat/school management signature (#675) * Feat: added school management signature * Feat: added new version for changelog and config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/date corrections (#673) * Fix: correction in the student date field * Fix: correction in the school initial_date field * Fix: correction in the Instructor birthday_date field * Feat: added validation for duplicate cpfs * Feat: added function for validate cpf * Feat: added new version form changelog e config * Feat: only takes active schools * Fix: corrections for dates * Fix: correction in js validation for initial_date * Feat: added limit for date initial_date --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/instructor frequency [Versão 3.77.131] (#676) * alterado _initialization_instructor * fix instructor frequency * fix instructor frequency * mudado versão do sistema * refatorado _initialization_instructor.js --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix: Reordered parameters in getSchedulesFromMajorStage method (#667) * Fix: Reordered parameters in getSchedulesFromMajorStage method * Feat: added new version in changelog and config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * fix: remove jquery * Fix/sagres componentes curriculares (#691) * Fix? added new inconsistencys for empty components curriculares * Feat: added new version for changelog and config * Icon font version update * add bytecodes * Fix/class turn (#683) * Fix: correction in class id * Feat: added new version for changelog and config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-214] Feat/class plan validate (#694) * first commit * models adjustment and module configs * create view finished * create action finished/ update function already working * pendingPlans added * ref/module adjusted * table finished, just missing the action to validate * new inputs added * function adjusted * minor adjustment * request added * feat/forms finished, just missing to create a new type of access * feat/create button to enable edition * feat/add readonly property to fields that shouldn't be change * feat/observation field added to form * fix/date fixed and hiding buttons depending on auth item * docs/CHANGELOG e config.php updated * fix/update description in select itens * fix/sanitize html appends and sonarlint issues * fix/sonarlint and change description * feat/icons inserted * fix/icon styles --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/datepicker pt br (#693) * Feat: added class DatePickerWidget * Fix: added new renderDatePicker * Fix: added new renderDatePicker for school * Fix: added new renderDatePicker for student * Feat: added new version for changelog and config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/inconsistency lunch (#679) * fix: added new id for lunch inconsistencys * Feat: added property for class model * Feat: added min caractres for restrictions lunch * Feat: added msg for error * Feat: added new version for changelog and config * Feat: added migration --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/food module (#672) * fix merenda * alterando menuCOmponent * mudado componente de menu * mudando componente de cardápio * mudado componente de cardápio * mudando FoodMenuReport * mudando componente de cardápio * change componente de menu * corrigido componente de cardápio * change menuComponent.js * alterada versão do tag * fix inventory * alterado _initialization.js --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-232] Fix/lunch meal portion (#669) * fix/select now shows food values * fix:modal updated and necessary API routes created * fix/lunch meal controller adjusted * fix/model updated, database adjusted but still missing controller fixes * fix/change in render partial params * fix/some forms are already working * fix/form and action finished * fix/remove unnecessary comments * CHANGELOG updated * fix/sonarlint fixes * fix(lunch): Corrigindo comando sql da migration --------- Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> Co-authored-by: Gustavo Santos <gustavo.santos23703@gmail.com> * Fix/stock [Versão 3.77.135] (#686) * fix/stock * atualizado versão do tag * refatorada a função de concatName --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/instructor frequency (#689) * alterado _initialization_instructor * fix instructor frequency * fix instructor frequency * mudado versão do sistema * refatorado _initialization_instructor.js * fix/intructor_frequency * fix/intructor_frequency * corrigindo frequency_instructor --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * add 2024-29-04_remove_duplicate_lunch_unity * Fix/food inventory (#707) * fix food inventory * sonarlint issues * atualizando versão --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> * [TCDA-318] Feat/insert-disorder (#701) * feat/create table student_disorder * feat/modify StudentFileForm disorder * feat/add field disorder in form student * feat/add model student disorder * feat/add echo model StudentDisorder in form student * feat/migration * feat/modify controller student action update and create * feat/add margin * feat/add column of nationality * feat/add constraint * feat/save studentDisorder * feat/modify label others * feat/modify field deficiency * feat/add margin * feat/modify label * Fix/counting faults (#674) * Fix: added filter for schedule year * Fix: correction in sql for get number faults * Fix: remove selection for s.year * Feat: added new version in changelog and config * Fix: added filter for edcenso_stage_vs_modality_fk to get faults * Fix: added set 0 for null days * Fix: count falts --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * fix: delete user * fix/courseplan start date field fixed * [TCDA-380] Fix/ Add Nationality Origin To StudentFile (#700) * fix/add nation to report * fix/report file and studentfile view updated * fix/adjust in report view * CHANGELOG updated * raw/studentfile view updated --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA - 392] Fix/Scrollbar Visualization (#705) * fix/hide property removed from table * CHANGELOG & config.php updated * fix/sticky property added to student name column * minor changes * fix/add sticky property to empty cells --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * fix/reports-correction (#708) * [TCDA-394] fix/do-not-fill-grade (#711) * fix/add option select... * fix/add assignment of option outside of condition * fix/add changelog --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-422] Fix/layout problem (#712) * Refactor: Enhanced UI and adjusted student data iteration * Refactor: Optimized updateStudentAnottations function for better data handling * Refactor: Enhanced updateStudentAnottations function for better data organization * Feat: added new verson in changelog and config --------- Co-authored-by: Nathan Santos <nathanaelsantos15@gmail.com> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-380] Fix/ Report Style (#713) * fix/row colspan fixed and new sql view added to migrations * fix/string format converter removed * docs/CHANGELOG and version file updated * fix/view sql file fixed * Fix: correction of the modality options --------- Co-authored-by: Nathan Santos <ti.natan@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-436] Feat: students-class-report (#714) * Feat: added migration * Feat: added new version for changelog and config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-157] Fix/erro-message-educacenso (#715) * fix/correction rule instructor educacenso * fix/ add changelog --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix: correction in id student identification (#716) * Fix: correction in id student identification * Feat: added new version for changelog and config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-446] Feat/date-final (#717) * feat/ add date final form school * feat/identation html * feat/add click reset js * feat/update reset js * feat/add changelog --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-437] Feat/validator-register-civil (#720) * feat/update model * feat/update function validateCivilRegister, and message added error * add changelog --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-426] Fix/empty_users_fk_istructor_identification (#721) * Refactor user creation and school assignment logic * Feat: added new version for changlog and config * Feat: added visibility should be explicitly declared --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat/timesheet overwrite past days (#704) * permitido que adicione/remova schedule quando houve frequencia ou aula ministrada em data mais recente * feito com que, na remoção do primeiro schedule do dia, nao detone a aula ministrada do dia (salvo se todas as schedules do dia forem deletadas) * changelog * feito a regra de removeSchedule também abarcando fundamental maior, pois a regra de cadastro de aula ministrada é a mesma (só guarda no primeiro schedule da disciplina) --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * change power bi module * [TCDA-475] Fix/erro-educacenso-stage (#719) * fix/create migration update modality classroom * fix/update form, and added option education professional * fix/update form * fix/correction function isValidProfessionalEducation * revert instance * Fix/error-pdf-studentfileform (#724) * fix/ refatoring html * fix/correction form * fix/add margin css print * correction merge * fix/correction sonarlint css and add div head * fix/correction table th, and modify indice 21 * fix/add changelog --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat/edcenso 2024 (#730) * Adaptação para o educacenso 2024 * Inserido situação de matrícula AVANÇADO * changelog * Update config.php --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-464] fix/delete-enrollmet (#731) * fix/edit name link, of delete enrollment * add changelog --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/error-educacenso-duplicated (#734) * fix/refactoring actionvalidate in class censo controller * fix/implementing processed instructor * fix/add changelog --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/correction-datepicker-last (#739) * fix/correction option max date, function renderDatePickerFinal * fix/add changelog * correction render date picker final --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-523] fix/error-classContents (#735) * fix/correction error class contents, array of schedules null * fix/add changelog --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Adicionando o código do professor na listagem da tabela (#746) Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> * Adicionando o código na exibição da tabela de turmas (#747) Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Adicionando o código na exibição da tabela de alunos (#748) Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * retirado regra velha de registros com numeros defasados * enviando apenas matriculas de alunos cujo status esteja 1 (matriculado) * permitido que se exporte matrículas com status NULL * resolvido bug de inep_id de instructor_documents_and_address vazio SOBRESCREVENDO o inep_id preenchido (ou não) de instructor_identification. * Feat/teacher classrons list (#754) * first commit * criada aba para visualisação das turmas dos professores * remove links * add sanitize * adicionando link * Corrigindo o instance --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> * Feat: new inconsistency for Management Unit (#749) * Feat: new inconsistency for Management Unit * Feat: add new version for changelog and config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat/timesheet turn (#738) * Corrigido o turno que é exibido no quadro de horário * refresh versão * corrigido bug produzido em 15/03/2024 --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-533] Fix/transfered student frequency (#741) * issue fixed * CHANGELOG and config updated --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat/add sem recovery (#742) * first commit * change grade structe * change form * change grades-structure * adicionado validações no formulário de estrutura de unidades e avaliação * change grades structure * change grades-structure * created updateGradePartialRecoveryUseCase * recuperação parcial salva * change grade-structure * mudado grades-structure.js * mudado grades-structure.js * mudado grades-structure.js * mudado grades-structure.js * adicionado filtro na tela de notas * mudado grades-structure.js * mudado grades-structure.js * change functions.js * change functions.js * mudado módulo de grades * mudado módulo de grades * salvando recuperações * mudado módulo de grades * salvando recuperações * reuperações salves em grades results * mudado módulo de notas * reuperações salves em grades results * adicionado peso nas recuperações parciais * reuperações salves em grades results * adicionado peso nas recuperações parciais * atualizado UpdateGradePartialRecoveryUseCase.php * adicionadas recuperações parciais * change version * adicionada validação no formulário de grades-structure.js * alterado recuperações parciais * fix bugs * fix some bugs * add new column on grade table --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-380] Fix/enrollment report nationality (#745) * migration added and report updated * CHANGELOG and config updated --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/stage edcenso field to name (#755) * fix(stages): Adicionando o código na exibição da tabela de alunos * Modificando a visualização da etapa relacionada ao educacenso no formulário de etapas * Inicializando o select2 no select de etapa --------- Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-463] Fix/class specification report (#718) * Feat: added classroom * Feat: get name classroom * Feat: added filter by type EJA and Mult * Feat: added new version for changlog and config * Fix: implemented getEjaClassroomName function for report generation * Fix: correction in get classrom by multi * Fix: correction in get name student classroom --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/head school required (#757) * fix(school): Retirando a obrigatóriedade do código da escola sede no formulário de escola * fix(school): Retirando a obrigatóriedade do código da escola sede no formulário de escola * corrigindo changelog * fazendo o merge com a dev e modificando o changelog * Fix/food adjustments (#770) * first commit * add school saturday * add unit inputs * change menuComponent.js * change food reports * some fixes * adicionado validação para os diferentes tipos de usuário * change version * change stock * Adicionando filtro de status na tela de estoque * change menuComponent --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: Gusta-Santos01~ <gustavo.santos23703@gmail.com> * fix/index-food-menu * fix/index-food-menu * fix food action Index * [TCDA-526] Fix/Instructor Imported Without User (#751) * first commit, usecase created * fix/update user now create a new user if cpf is added and user doesn´t exist * docs updated --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix: dynamic width for lesson plans (#758) * Feat/csv exports (#760) * Criando arquivo CSV bruto e tela de exportações * Ajustado delimitador das colunas e testes * COlocando o resultado de uma query em um csv * Impressão de todos os CSV's * Ajuste pra exportar o CSV igual ao JSON * corrigido campo solto na tela * Ajuste na geração do arquivo para criar as pastas * criado exportadores de alunos, notas e faltas * inserido changelog * alterado nome de colunas de recuperação semestrais para ficar em conformidade com o migration de mudança de nomes de colunas * alterado nomes novamente * ajeitado erro na exportação de grades * aprimorado exportação de notas pra sempre trazer todas as disciplinas, com apenas as notas vazias * ajeitado exportação de faltas dos alunos --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/frequency multi classes (#763) * fix/frequency-multi-classes * change _initialization.js * fix/frequency-multi-class * Alterado o _initialization_instructor.js * finalizadas correções para turmas multiseriadas * change version * change changelog.md --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat: classroom_qtd_students (#772) * Feat: added migration * Feat: added new changelog and config --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-634] Fix: Inconsistency for students born in the current year (#787) * Fix: date of birth * Feat: added new version for changlog and config * Define a constant instead of duplicating this literal "Data da matrícula no formato inválido: <strong>" 3 times. * Define a constant instead of duplicating this literal "d/m/Y" 10 times. --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat/add created at and update at (#779) * add behaviors * add behaviors * created migration --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> * [TCDA-609] Fix/Course Plan Loading Delay (#781) * first commit * refactor, only missing update the table * selects finished but still missing update the table * functionality finished but still missing investigate * small fixes * docs updated --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * fix(reports): Corrigindo o relatório de professores por escola para que o mesmo exiba somente os professores da escola que estão ligados a turmas (#782) Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat/new recovery calculation (#788) * first commit * change grade structure * change grades * add semester field * add semester field * change calulateNumericGradeUseCase * change grades * change calulateNumericGradeUseCase * created new grade calculation * created new grade calculation * fix exhibition * created new grade calculation * new grade calculation * mudado ata de notas --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/rename column type to methodology (#790) * label for objective and type changed * courseplan resource duplication on method fixed * add sql file * fix sql commands * docs updated and classes added to form --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat/create aee record (#791) * Criados os esqueletos das telas Ficha Aee * Corrigindo exibição inicial da ficha e atualização * Corrigindo action de update * Criado o esqueleto do pdf da ficha aee * Criando esqueleto do relatório * Corrigindo a exibição do index * feat(aeeRecord): Criado o módulo de ficha AEE, permitindo o cadastro, alteração e impressão de fichas de alunos pertencentes a turmas AEE * Modificando o changelog * Corrigindo errors do sonarlint * Corrigindo o instance --------- Co-authored-by: TI GUSTAVO <ti.gustavo@thp.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-534] Fix/Student Transfered New Enrollment (#764) * first commit * remove sql change and add new column to schedule object sent to front * model adjusted and inputs added to form * up temp changes * event added to select still missing to show the inputs * input now are been hidden, still missing to update values and check validations * input hide or show according to status input and mask added to inputs * minor changes * SQL migration added and docs updated * remove sonarlint issues * temp changes * remove unnecessary comments --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/courseplan batchclassroom (#776) * Retirado opções de 8 anos no batchupdate de classroom; aumentado campo tipo de 100 para 1000 caracteres * corrigido bug no aparecimento do plano de aula, bem como contagem errada nas aulas ministradas * Corrigido bug no datatable --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * fix create nutritionist profile * fix(food): Retirando a obrigatóriedade do campo de validade no lançamento de estoque e corrigindo erro ao adicionar alimento que já existe no estoque de outra escola (#798) Co-authored-by: TI GUSTAVO <ti.gustavo@thp.org.br> * Fix/Search input disabled (#799) * fix/rename function * CHANGELOG added and update function name --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/report electronic diary data (#796) * first commit * fix/report-eletronic-diary-data * fix/report-eletronic-diary-data * fix/report-eletronic-diary-data * change version * git issues * git issues * change validation on grade-sctruture * updating GradeResults model --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> * Fix/aee record permissions (#797) * Modificando as permissões de acesso as fichas AEE, permitindo que gestores escolares e coordenadores acessem * Corrigindo a variável de banco de dados no instance * Modificando o changelog --------- Co-authored-by: TI GUSTAVO <ti.gustavo@thp.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat/increase maximum number of characters in fields aee (#805) * first commit * change version --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * fix no select da estrutura de unidades, "Forma de Cálculo" da rec. final (#807) * Feat/enrich stage creation (#804) * COlocando o resultado de uma query em um csv * Inserido a modalidade da etapa; Impedido que se vincule uma etapa do censo a outra etapa do censo; Impedido deletar etapa do censo * Resolvido problema do plano de aula não deletando * [TCDA-614] Fix/add creation date enrollment view (#795) * Adicionada a exibição da data de matricula do aluno em uma turma na aba de matrículas no formulário do aluno * Atualizando o changelog * Corrigindo instance --------- Co-authored-by: TI GUSTAVO <ti.gustavo@thp.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/Student frequency (#801) * fix/last change fixed * instructor frequency fixed * add death status to conditional * fix/conditional fixed --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/courseplan abilities early years (#808) * Criando select de minor education disciplines * Resolvendo modificações de plano de aula * Modificando a tabela dos planos de aula * Corrigindo class contents e adicionando separação por habilidades * Exibindo planos de aula com mais de uma disciplina na listagem de planos de aula em aulas ministradas * Permitindo a adição de habilidades de disciplinas diferentes em planos de aula para etapas de fundamental menor * Realizando o merge com a dev e modificando o changelog * modificando o nome do banco de dados --------- Co-authored-by: TI GUSTAVO <ti.gustavo@thp.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * inserido cor/raça na planilha de exportação de alunos (#817) * adding log * chore: adding separete folder to logs * chore: adding monitoring and log * Feat/change classdiary (#822) * first commit * mudado módulo de diário de classe * update classDiary --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> * Feat/change classdiary (#825) * first commit * mudado módulo de diário de classe * update classDiary * update classDiary * update classDiary * consertado módulo de diário de classe * change version --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> * fix: raven capture error * fix: correç~]ao de lançamento de aulas ministradas * add_edcenso_associated_stage_id (#835) * fix: error on order by actions * change version * chore: removendo comentário * Fix/ Delay on courseplan loading (#819) * first commit * create new file for table and add selects * selects and table are already working but still having some bugs * functions finished * CHANGELOG and config updated * css classes updated * sanitize html rendering * sonarLint issues fixed * change type on criteria * Feat/unified frequency (#840) * feat/unified-frequency * change version * finished unified frequency * fix-classcontent-classdiary-module * tab list fix * Feat/reports enrichment (#841) * inserido relatório de certificado de conclusão; inserido bncc e parte diversificadora no relatório de ata de notas da turma * fix no select da estrutura de unidades, "Forma de Cálculo" da rec. final * inserido termo de suspensão --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Aprimorado ficha de matrícula, inserido mais opções de documentos entregues (#843) Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * [TCDA-699] Feat/Frequency for transfered students (#848) * Add new check to function verifyStatusEnrollment * changelod updated * Update sonarcloud-analysis.yml * Update sonarcloud-analysis.yml * Update sonarcloud-analysis.yml * fix: sagres food_menu * change version * fix getGrades withaut params * chore: improve error capture on raven-js * ci: enable tracing * ci: upgrade php version to 8.3 * fix: directory permission and remove node global installer * fix deprecated * fix grades * [TCDA-705]Feat/Add enrollment status label to Grades view (#849) * Add enrollment status label to grades view * remove label for no status enrollments * add label to classdiary view accessed by instructor * minorEducation columns added to response body --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/Student Frequency New Classroom (#853) * Add new check to function verifyStatusEnrollment * changelod updated * Add new column 'enrollment_date' on student_enrollment * Fix frequency on new classroom and add label to instructor frequency view * add label to frequency view * Fix/change class contents schedule (#857) * Criando o sql que modifica a tabela de class_contents * Adicionando campos em class contents * Retirando a chave estrangeira de schedule em class_contents e adicionando campos relacionadoos a data na sua tabela * Modificando o changelog --------- Co-authored-by: TI GUSTAVO <ti.gustavo@thp.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Múltiplas correções (#858) * ver changelog 3.89.198 * changelog --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/add classes count on class contents (#864) * Adicionando o total de aulas ministradas e aulas da carga horária nas telas de aulas ministradas * Adicionando o badge no informativo de total de aulas ministradas * Adicionando o informativo de total de aulas da carga horária e total de aulas ministradas nas telas de aulas ministradas * Corrigindo o texto informativo de total de aulas na tela de aulas ministradas --------- Co-authored-by: TI GUSTAVO <ti.gustavo@thp.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * adicionado formulada média para o cálculo da recuperação final (#876) * adicionado formulada média para o cálculo da recuperação final * change version --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> * Fix/class contents report (#880) * Adicionando o total de aulas ministradas e aulas da carga horária nas telas de aulas ministradas * Adicionando o badge no informativo de total de aulas ministradas * Adicionando o informativo de total de aulas da carga horária e total de aulas ministradas nas telas de aulas ministradas * Corrigindo o texto informativo de total de aulas na tela de aulas ministradas * Criando esqueleto do relatório de aulas ministradas * Pegando os classContents na action que gera o relatório * Criando a tabela de aulas ministradas dentro do relatório * corrigindo o relatório * Corrigindo a action de classContentsReport * Adicionando o filtro de instrutor na action de getClassContentsReport * Criando as tabelas dentro do relatório de class contents * Criando as tabelas de classContentsReport * Adicionando os campos de assinatura * Corrigindo assinaturas * Finalizado o relatório de aulas ministradas * Adicionando frequencia no relatório de aulas ministradas * Realizando o merge com a dev e modificando o changelog * corrigindo errors do sonarlint * Adicionando os campos de mês, ano, turma e discipline ao salvar aulas ministradas na tela de diario de classe --------- Co-authored-by: TI GUSTAVO <ti.gustavo@thp.org.br> * corrigidos TCDAs 744, 745 e 746 (#872) Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/unity recovery (#859) * fix unity with recovery * remove console.log * change version * fix grades * change validation --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * fix: remove wrong * * Finalizado TCDAs 738, 741 e 774 (#877) * Finalizado TCDAs 738, 741 e 774 * Corrigido erro encontrado pelo revisor Almir; resolvido erro do sonarlint * bugfix --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * 2024-12-11_add_new_grade_concept_columns * Corrigido o relatório de alunos por escola (Cpg, Rg e Nis), exibindo somente os alunos do ano em que o relatório foi emitido (#885) Co-authored-by: TI GUSTAVO <ti.gustavo@thp.org.br> * Feat/add multi grade rules (#873) * add stage select * add filter * fix saveGrades * ajustes * ajustes * finished add stage filter * change version * fix github issues * remove colon from line * change grades view * change grades * add classroom stage * fix grade final calculation * change alert * Fix change student status * fix change status student --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: AnotherOne07 <93009549+AnotherOne07@users.noreply.github.com> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Corrigir os dias indisponíveis erroneamente (#800) * Corrigir os dias indisponíveis erroneamente * Ajuste no changeEvent do calendário pra evitar aula indisponivel erroneamente caso o usuário mude o intervalo do evento --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Feat/tcda 789 (#888) * aprimorado ficha de matrícula * bugfix --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * first commit (#894) * Feat/create concept (#903) * Criando esqueleto do modulo de conceito de notas * Corrigindo as rotas * Organizando tela de administração, de index e de create em gradeconcept * Finalizado o formulario de notas por conceito * modificando o local do mod * Corrigindo o cálculo das notas por conceito --------- Co-authored-by: TI GUSTAVO <ti.gustavo@thp.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Corrigindo a exibição da média de nota em turmas por conceito na ata de notas (#911) * feat/TCDA-809 (#904) * - Permitido que se adicione casa decimal na carga horária na matriz curricular. o Valor da hora-aula é definida nas configurações gerais do município. * corrigido bug no changeSchedule --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * fix/recovery-calculation-status * feat/read-user (#914) * read user * fix save grades * change version --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> * 2025-2401_create_atand_update_at_on_log * fix(full-menu): fix issue pulling main version into dev * add create_at and update_at on log * add final recovery by weight (#898) * add columns on grade_unity * change CalculateFinalMediaUsecase.php * CalculateFinalMediaUsecase * change CalculateNumericGrades * change version * fix grade-structure.js * fix calculation * fix final-recovery form --------- Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> * Fix/individual record no filled final media (#916) * first commit * docs/CHANGELOG & config updated * [TCDA-856] Fix/teachers by school report (#922) * first commit * fix/sql query from repository adjusted to include scholarity * fix/scholarity id from form and update rows in db --------- Co-authored-by: Igor Gonçalves <igor_goncalves@live.com> --------- Co-authored-by: TI GUSTAVO <ti.gustavo@ipti.org.br> Co-authored-by: Gusta-Santos01~ <gustavo.santos23703@gmail.com> Co-authored-by: Evellyn Jade <97754536+evellynreis@users.noreply.github.com> Co-authored-by: Francisco Junior <93009549+AnotherOne07@users.noreply.github.com> Co-authored-by: gabriel-IPTI <ti.gabriel@ipti.org.br> Co-authored-by: Paulo Roberto da Costa Cardoso <paulones89@gmail.com> Co-authored-by: GabrielChagas14 <84946326+GabrielChagas14@users.noreply.github.com> Co-authored-by: Nathan Santos <117388330+nathanipti@users.noreply.github.com> Co-authored-by: paulones <Ppcc8986> Co-authored-by: Lívia Martins <131170355+LiviaMartinsIPTI@users.noreply.github.com> Co-authored-by: Nathan Santos <ti.natan@ipti.org.br> Co-authored-by: GabrielChagas14 <gmelo123455@gmail.com> Co-authored-by: Nathan Santos <nathanaelsantos15@gmail.com> Co-authored-by: TI GUSTAVO <ti.gustavo@thp.org.br> Co-authored-by: Felipe Souza <j.felipe.dev.18@gmail.com>
1 parent 76fae4b commit 8dbf957

File tree

147 files changed

+1405
-2175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+1405
-2175
lines changed

CHANGELOG.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
## [Versão 3.94.214]
1+
## [Versão 3.95.217]
2+
- Corrigido o relatório de professores por escola
3+
- Correção no relatório "Ficha de Notas", disciplinas sem nota não afetam mais a situação final de matrícula.
4+
5+
## [Versão 3.96.216]
6+
- Adicionada reuperação final por peso
7+
- Adicionado usuário de leitura
8+
9+
## [Versão 3.95.216]
210
- Corrigida a funcionalidade de imprimir aulas ministradas.
311

4-
## [Versão 3.94.214]
12+
## [Versão 3.95.215]
513
- Correção na funcionalidade de atualizar situação de matrícula após calcular a nota final de aluno.
614

715
## [Versão 3.95.213]
@@ -16,7 +24,7 @@
1624

1725
## [Versão 3.94.210]
1826
- Permitido que se adicione casa decimal na carga horária na matriz curricular. o Valor da hora-aula é definida nas configurações gerais do município.
19-
-
27+
2028
## [Versão 3.93.210]
2129
- Ordem das etapas ajustada no relatório de Matrículas Anuais
2230

@@ -33,7 +41,6 @@ o relatório para ensino intanfil e fundamental menor do fundamental maior;
3341
- Novo campo na turma para definir o periodo da turma: Anual, 1 Semestre ou 2 Semestre;
3442
- Novo campo na turma para deliberadamente desconsiderar ela na exportação do sagres;
3543

36-
3744
## [Versão 3.93.212]
3845
- Ordem das etapas ajustada no relatório de Matrículas Anuais
3946

app/components/UserIdentity.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function authenticate() {
5454
} elseif(!password_verify($this->password, $record->password)) {
5555
$this->errorCode = self::ERROR_PASSWORD_INVALID;
5656
} else {
57-
if(Yii::app()->getAuthManager()->checkAccess('admin',$record->id)|| Yii::app()->getAuthManager()->checkAccess('nutritionist',$record->id)){
57+
if(Yii::app()->getAuthManager()->checkAccess('admin',$record->id)|| Yii::app()->getAuthManager()->checkAccess('nutritionist',$record->id)|| Yii::app()->getAuthManager()->checkAccess('reader',$record->id)){
5858
$userSchools = [];
5959
$this->setState('hardfoot',false);
6060
//@done s2 - mostrar apenas escolas ativas

app/controllers/AdminController.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ public function actionCreateUser()
337337
]
338338
);
339339
if (isset($_POST['Users'])) {
340-
if(!isset($_POST['schools']) && ($_POST['Role']) != 'admin' && ($_POST['Role']) != 'nutritionist')
340+
if(!isset($_POST['schools']) && ($_POST['Role']) != 'admin' && ($_POST['Role']) != 'nutritionist' && ($_POST['Role']) != 'reader')
341341
{
342342
Yii::app()->user->setFlash('error', Yii::t('default', 'É necessário atribuir uma escola para o novo usuário criado!'));
343343
$this->redirect(['index']);
@@ -535,6 +535,8 @@ public function actionSaveUnities()
535535
$finalRecoverMedia = Yii::app()->request->getPost("finalRecoverMedia");
536536
$calculationFinalMedia = Yii::app()->request->getPost("finalMediaCalculation");
537537
$finalRecovery = Yii::app()->request->getPost("finalRecovery");
538+
$finalRecoveryWeight = Yii::app()->request->getPost("finalRecoveryWeight");
539+
$finalMediaWeight = Yii::app()->request->getPost("finalMediaWeight");
538540
$ruleType = Yii::app()->request->getPost("ruleType");
539541
$hasFinalRecovery = Yii::app()->request->getPost("hasFinalRecovery") === "true";
540542
$hasPartialRecovery = Yii::app()->request->getPost("hasPartialRecovery") === "true";
@@ -569,6 +571,13 @@ public function actionSaveUnities()
569571
$recoveryUnity->edcenso_stage_vs_modality_fk = $stage;
570572
$recoveryUnity->final_recovery_avarage_formula = $finalRecovery["final_recovery_avarage_formula"];
571573

574+
$gradeCalculation = GradeCalculation::model()->findByPk($finalRecovery["grade_calculation_fk"]);
575+
576+
if($gradeCalculation->name === "Peso"){
577+
$recoveryUnity->weight_final_media = $finalRecovery["WeightfinalMedia"];
578+
$recoveryUnity->weight_final_recovery = $finalRecovery["WeightfinalRecovery"];
579+
}
580+
572581
if (!$recoveryUnity->validate()) {
573582
$validationMessage = Yii::app()->utils->stringfyValidationErrors($recoveryUnity);
574583
throw new CHttpException(400, "Não foi possivel salvar dados da recuperação final: \n" . $validationMessage, 1);

app/domain/grades/usecases/CalculateFinalMediaUsecase.php

+26-7
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ public function exec()
5555

5656
$gradesFinalRecovery = [];
5757

58-
if ($this->gradeRule->gradeCalculationFk->name == 'Média Semestral' && $gradeUnity->final_recovery_avarage_formula == "Médias dos Semestres") {
58+
59+
60+
if ($gradeUnity->gradeCalculationFk->name == 'Média Semestral' && $gradeUnity->final_recovery_avarage_formula == "Médias dos Semestres") {
5961
// Verifica se os valores são números antes de comparar
6062
$semRecPartial1 = is_numeric($this->gradesResult["sem_rec_partial_1"]) ? $this->gradesResult["sem_rec_partial_1"] : 0;
6163
$semRecPartial2 = is_numeric($this->gradesResult["sem_rec_partial_2"]) ? $this->gradesResult["sem_rec_partial_2"] : 0;
@@ -73,10 +75,12 @@ public function exec()
7375
$gradesFinalRecovery[] = $gradesSemAvarage2;
7476
}
7577

76-
} else {
78+
}
79+
else {
7780
$gradesFinalRecovery[] = $finalMedia;
7881
}
7982

83+
8084
$finalMedia = $this->applyFinalRecovery($this->gradesResult, $gradesFinalRecovery);
8185
$this->saveFinalRecoveryMedia($this->gradesResult, $finalMedia);
8286
}
@@ -105,13 +109,27 @@ private function shouldApplyFinalRecovery($gradeRule, $finalMedia)
105109
private function applyFinalRecovery($gradesResult, $gradesFinalRecovery)
106110
{
107111
$result = null;
108-
$finalRecovery = $this->getFinalRevovery($gradesResult->enrollment_fk, $gradesResult->discipline_fk);
112+
113+
$finalRecovery = GradeUnity::model()->findByAttributes(
114+
["edcenso_stage_vs_modality_fk" => $this->gradeRule->edcenso_stage_vs_modality_fk,
115+
"type" => "RF"]);
109116
$finalRecoveryGrade = $this->getFinalRevoveryGrade($gradesResult->enrollment_fk, $gradesResult->discipline_fk, $finalRecovery->id);
110117
array_push($gradesFinalRecovery, $finalRecoveryGrade);
111118
if ($finalRecovery->gradeCalculationFk->name == "Média Semestral") {
119+
112120
$calculation = GradeCalculation::model()->findByAttributes(["name" => "Média"]);
113121
$result = $this->applyCalculation($calculation, $gradesFinalRecovery);
114-
} else {
122+
} elseif ($finalRecovery->gradeCalculationFk->name == "Peso")
123+
{
124+
$weights = [
125+
$finalRecovery->weight_final_recovery,
126+
$finalRecovery->weight_final_media
127+
128+
];
129+
$result = $this->applyCalculation($finalRecovery->gradeCalculationFk, $gradesFinalRecovery, $weights);
130+
}
131+
else
132+
{
115133
$result = $this->applyCalculation($finalRecovery->gradeCalculationFk, $gradesFinalRecovery);
116134
}
117135
return $result;
@@ -124,8 +142,8 @@ private function getFinalRevovery($enrollmentId, $discipline)
124142
$criteria->select = "distinct gu.id, gu.*";
125143
$criteria->join = "join grade_unity_modality gum on gum.grade_unity_fk = gu.id";
126144
$criteria->join .= " join grade g on g.grade_unity_modality_fk = gum.id";
127-
$criteria->condition = "g.discipline_fk = :discipline_fk and enrollment_fk = :enrollment_fk and gu.type = :type";
128-
$criteria->params = array(":discipline_fk" => $discipline, ":enrollment_fk" => $enrollmentId, ":type" => GradeUnity::TYPE_FINAL_RECOVERY);
145+
$criteria->condition = "g.discipline_fk = :discipline_fk and enrollment_fk = :enrollment_fk and gu.type = :type and gu.edcenso_stage_vs_modality_fk = :edcenso_stage_vs_modality_fk";
146+
$criteria->params = array(":discipline_fk" => $discipline, ":enrollment_fk" => $enrollmentId, ":type" => GradeUnity::TYPE_FINAL_RECOVERY, ":edcenso_stage_vs_modality_fk"=> $this->gradeRule->edcenso_stage_vs_modality_fk);
129147
$criteria->order = "gu.id";
130148
return GradeUnity::model()->find($criteria);
131149
}
@@ -147,10 +165,11 @@ private function getFinalRevoveryGrade($enrollmentId, $discipline, $finalRecover
147165

148166
}
149167

150-
private function applyCalculation($calculation, $grades)
168+
private function applyCalculation($calculation, $grades, $weights = [])
151169
{
152170
return (new ApplyFormulaOnGradesUsecase($calculation))
153171
->setGrades($grades)
172+
->setWeights($weights)
154173
->exec();
155174
}
156175

app/domain/grades/usecases/CalculateNumericGradeUsecase.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,9 @@ private function applyStrategyComputeGradesByFormula($calculation, $unityOrRecov
339339
$acc[0] += $grade * $weights[$key]->weight;
340340
$acc[1] += $weights[$key]->weight;
341341
}
342-
342+
if ($acc[1] == 0) {
343+
return 0;
344+
}
343345
$result = $acc[0] / $acc[1];
344346
break;
345347
}

app/domain/grades/usecases/GetStudentGradesByDisciplineUsecase.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function exec()
4141
} else {
4242
$studentEnrollments= $classroom->activeStudentEnrollments;
4343
}
44-
$showSemAvarageColumn = $this->checkSemesterUnities( $this->stageId);
44+
$showSemAvarageColumn = $this->checkSemesterUnities( $this->stageId) && $rules->gradeCalculationFk->name == 'Média Semestral';
4545

4646
$unitiesByDisciplineResult = $this->getGradeUnitiesByDiscipline( $this->stageId);
4747
$unitiesByDiscipline = array_filter($unitiesByDisciplineResult, function ($item){
@@ -123,7 +123,7 @@ public function checkSemesterUnities($stage) {
123123

124124
$criteria = new CDbCriteria();
125125
$criteria->addCondition("edcenso_stage_vs_modality_fk = :stage");
126-
$criteria->addCondition("semester IS NULL"); // TODO: só deus e chagas sabiam, agora só deus sabe pq faz isso
126+
$criteria->addCondition("semester IS NULL");
127127
$criteria->addCondition("type != :type");
128128
$criteria->params = [
129129
':stage' => $stage,

app/messages/pt_br/default.php

+1
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,7 @@
882882
'instructor' => 'Professor',
883883
'coordinator' => 'Coordenador Pedagógico',
884884
'nutritionist' => 'Nutricionista',
885+
'reader' => 'Somente Leitura',
885886
'admin' => 'Administrador',
886887
'Edit Password' => 'Alterar Senha',
887888

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
alter table grade_unity
2+
add column weight_final_media int(11),
3+
add column weight_final_recovery int(11);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
UPDATE instructor_variable_data ivd
2+
SET scholarity = 5
3+
WHERE ivd.scholarity = 7;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
insert into auth_item (name, type) values ('reader', 2);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ALTER TABLE log
2+
ADD COLUMN created_at DATETIME DEFAULT NULL,
3+
ADD COLUMN updated_at DATETIME DEFAULT NULL;

app/models/AltActiveRecord.php

+8-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
* Date: 23/11/2016
77
* Time: 13:37
88
*/
9-
abstract class AltActiveRecord extends CActiveRecord
9+
class AltActiveRecord extends TagModel
1010
{
11+
public function behaviors()
12+
{
13+
return array_merge([], parent::behaviors());
14+
}
1115
public function setDb2Connection($db2 = false){
1216
if($db2){
1317
self::$db=Yii::app()->db;
@@ -19,6 +23,7 @@ public function setDb2Connection($db2 = false){
1923
self::$db=Yii::app()->db;
2024
self::$db->setActive(true);
2125
return self::$db;
22-
}
26+
}
2327
}
24-
}
28+
29+
}

app/models/Attendance.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @property Professional $professionalFk
1414
* @property Professional[] $professionals
1515
*/
16-
class Attendance extends CActiveRecord
16+
class Attendance extends TagModel
1717
{
1818
/**
1919
* @return string the associated database table name

0 commit comments

Comments
 (0)