├── db ├── seeds.rb └── migrate │ ├── 20150130130925_add_kind_to_roles.rb │ ├── 20150902134925_remove_role_id_from_users.rb │ ├── 20200729122916_add_fullname_to_users.rb │ ├── 20141208171838_add_actived_at_to_users.rb │ ├── 20150219172429_remove_active_from_unities.rb │ ├── 20150930170517_add_opinion_to_contents.rb │ ├── 20141127135103_add_kind_to_users.rb │ ├── 20150123175942_add_api_to_unities.rb │ ├── 20150425172349_rename_tests_to_avaliations.rb │ ├── 20160502184924_add_period_to_classrooms.rb │ ├── 20160628213935_remove_column_kind_from_role.rb │ ├── 20201123195351_remove_student_bioetrics_table.rb │ ├── 20141124161842_add_status_to_users.rb │ ├── 20170206165726_drop_index_deficiencies_on_name.rb │ ├── 20181227194500_add_social_name_to_student.rb │ ├── 20150730174411_add_disabled_to_entity.rb │ ├── 20161226185743_remove_unity_id_from_avaliations.rb │ ├── 20170822195022_add_sequence_to_disciplines.rb │ ├── 20190531131943_add_expiration_date_to_users.rb │ ├── 20200715192205_add_profile_picture_to_users.rb │ ├── 20210202183742_add_opinion_to_teaching_plans.rb │ ├── 20210517195715_remove_grade_id_from_classrooms.rb │ ├── 20150826114916_add_weight_to_avaliations.rb │ ├── 20160628130530_add_column_access_level_to_roles.rb │ ├── 20160704174226_add_current_unity_id_to_users.rb │ ├── 20180523194200_add_pg_trgm_extension.rb │ ├── 20180712131434_add_origin_to_content_records.rb │ ├── 20180716203957_add_entity_id_to_worker_batch.rb │ ├── 20190213203554_add_worker_batches_status_field.rb │ ├── 20200918103403_add_label_color_to_classrooms.rb │ ├── 20210202183744_add_validated_to_lesson_plans.rb │ ├── 20220209133459_add_label_color_to_discipline.rb │ ├── 20240801124518_add_max_students_to_classrooms.rb │ ├── 20150916130321_add_observations_to_avaliations.rb │ ├── 20151006181836_rename_table_contents_to_lesson_plans.rb │ ├── 20160708171230_add_assumed_teacher_id_to_users.rb │ ├── 20170822194904_add_sequence_to_knowledge_areas.rb │ ├── 20171116155121_add_current_school_year_to_users.rb │ ├── 20180215125434_add_active_to_teachers.rb │ ├── 20180605131807_add_timestamps_to_student_enrollments.rb │ ├── 20180711192414_add_origin_to_daily_frequencies.rb │ ├── 20180823114955_add_recorded_at_to_transfer_notes.rb │ ├── 20190607165916_add_migrate_to_entity.rb │ ├── 20190701135013_drop_column_migrate_from_entities.rb │ ├── 20201201125937_add_can_post_to_classrooms.rb │ ├── 20210202183743_add_validated_to_teaching_plans.rb │ ├── 20210517195716_remove_exam_rule_id_from_classrooms.rb │ ├── 20210625172449_add_active_column_on_unities.rb │ ├── 20160701200354_add_current_classroom_id_to_users.rb │ ├── 20160926122548_add_status_to_student_enrollments.rb │ ├── 20170529164343_remove_unity_id_from_lesson_plans.rb │ ├── 20171124111709_create_unaccent_extension.rb │ ├── 20181212115632_add_post_info_to_classrooms.rb │ ├── 20200409164654_add_teacher_id_idx_to_teacher_profiles.rb │ ├── 20200427121113_remove_objectives_from_lesson_plan.rb │ ├── 20201116170617_revmove_school_term_from_test_settings.rb │ ├── 20160502121735_add_action_to_rounding_table_values.rb │ ├── 20160701202347_add_current_discipline_id_to_users.rb │ ├── 20170104171935_remove_fix_tests_from_test_settings.rb │ ├── 20180827183730_add_recorded_at_to_descriptive_exams.rb │ ├── 20190205114323_add_field_period_to_daily_frequencies.rb │ ├── 20190221145058_add_job_index_to_worker_batches.rb │ ├── 20190603193730_change_default_value_for_user_status.rb │ ├── 20190916183746_add_discarded_at_to_transfer_notes.rb │ ├── 20200416131157_add_disabled_sync_to_entities.rb │ ├── 20200424132307_remove_objectives_from_teaching_plan.rb │ ├── 20201117122218_remove_school_term_from_teaching_plans.rb │ ├── 20211123131017_change_index_unities.rb │ ├── 20220117195519_remove_classroom_id_from_lessons_board.rb │ ├── 20221122204036_add_apicode_to_student_unification.rb │ ├── 20150910143723_remove_test_type_from_test_setting_tests.rb │ ├── 20180510181850_change_column_unity_equipments_code_type.rb │ ├── 20181120180028_add_field_period_to_student_enrollments.rb │ ├── 20190903173050_add_user_id_to_absence_justifications.rb │ ├── 20201021125854_add_unities_to_test_settings.rb │ ├── 20201021125904_add_grades_to_test_settings.rb │ ├── 20210618262959_add_last_activity_at_to_user.rb │ ├── 20220222152831_add_discarded_at_to_classrooms_grade.rb │ ├── 20220613181019_add_index_on_daily_frequency_student.rb │ ├── 20230404170127_define_justification_as_null.rb │ ├── 20230607190758_add_period_to_absence_justifications.rb │ ├── 20150909164152_add_unique_index_to_school_calendars.rb │ ├── 20160927211512_add_column_active_to_student_enrollments.rb │ ├── 20161123121329_add_column_active_to_daily_note_students.rb │ ├── 20190426134607_remove_column_entity_id_from_worker_batch.rb │ ├── 20190916183653_add_discarded_at_to_student_biometrics.rb │ ├── 20200401140046_drop_column_error_message_from_worker_states.rb │ ├── 20201117122209_remove_school_term_type_from_teaching_plans.rb │ ├── 20201117203525_add_unique_index_on_school_term_types.rb │ ├── 20150904164258_add_unity_id_to_school_calendars.rb │ ├── 20160324123145_remove_global_absence_from_daily_frequencies.rb │ ├── 20160419143146_remove_author_id_from_absence_justifications.rb │ ├── 20160502191454_add_legend_to_school_calendar_events.rb │ ├── 20160530183440_add_teacher_id_to_teaching_plans.rb │ ├── 20180308131952_add_ieducar_updated_at_to_specific_steps.rb │ ├── 20180326212923_add_sequence_to_daily_frequency_students.rb │ ├── 20180524134431_add_active_to_school_calendar_steps.rb │ ├── 20180629182126_add_stateable_to_worker_batches.rb │ ├── 20180912193345_remove_active_from_school_calendar_steps.rb │ ├── 20181005142236_drop_daily_frequencies_unique_idx.rb │ ├── 20181101181702_add_support_url_to_general_configuration.rb │ ├── 20190320203604_add_unique_index_to_user_login.rb │ ├── 20190917185758_add_discarded_at_to_daily_note_students.rb │ ├── 20191011163831_add_year_to_complementary_exam_settings.rb │ ├── 20200917170802_drop_table_teacher_profiles.rb │ ├── 20200924131011_add_index_knowledge_areas_on_group_descriptors.rb │ ├── 20210622265303_add_last_password_change_to_user.rb │ ├── 20220117194929_add_classrooms_grade_id_to_lessons_board.rb │ ├── 20220427180521_add_index_to_created_at_on_system_notifications.rb │ ├── 20230524182349_create_grouped_teacher_discipline_classrooms.rb │ ├── 20250226130039_add_curriculum_adaptation_to_lesson_plans.rb │ ├── 20150717131223_change_column_description_on_disciplines.rb │ ├── 20161005183719_remove_column_dependence_on_student_enrollment.rb │ ├── 20180115191334_add_generic_to_system_notifications.rb │ ├── 20180306130909_add_job_id_to_ieducar_api_synchronization.rb │ ├── 20190118175356_add_step_number_to_transfer_note.rb │ ├── 20190131194356_remove_column_period_from_student_enrollments.rb │ ├── 20190328211729_drop_ieducar_updated_at_to_specific_steps.rb │ ├── 20191209132619_add_foreign_key_current_unity_id_to_users.rb │ ├── 20191209132635_add_foreign_assumed_teacher_id_to_users.rb │ ├── 20200811142059_add_position_to_contents_lesson_plans.rb │ ├── 20200811142802_populate_position_to_contents_lesson_plans.rb │ ├── 20201120143032_add_discarded_at_to_school_term_type_step.rb │ ├── 20150120161844_rename_actived_at_to_activation_sent_at_on_users.rb │ ├── 20150413102302_add_error_message_to_general_configurations.rb │ ├── 20160317175220_add_unity_to_absence_justifications.rb │ ├── 20161130110940_add_column_active_to_daily_frequency_students.rb │ ├── 20170802115031_add_api_code_to_teacher_discipline_classroom.rb │ ├── 20181101181643_add_copyright_name_to_general_configuration.rb │ ├── 20190118175259_add_step_number_to_conceptual_exam.rb │ ├── 20190118175325_add_step_number_to_descriptive_exam.rb │ ├── 20190213204855_add_worker_batch_id_to_worker_states.rb │ ├── 20190425120057_add_column_meta_data_to_worker_states.rb │ ├── 20190805183310_remove_student_id_from_absence_justification.rb │ ├── 20190913205839_add_id_to_absence_justifications_students.rb │ ├── 20191204204715_add_column_old_record_to_conceptual_exams.rb │ ├── 20200205173112_add_thematic_unit_to_discipline_lesson_plans.rb │ ├── 20200401140325_add_column_error_list_to_worker_states.rb │ ├── 20200811142048_add_position_to_contents_teaching_plans.rb │ ├── 20200811142423_add_position_to_objectives_lesson_plans.rb │ ├── 20200811142745_populate_position_to_contents_teaching_plans.rb │ ├── 20200811142829_populate_position_to_objectives_lesson_plans.rb │ ├── 20201113124620_create_yearly_school_term_type.rb │ ├── 20220404145952_add_minimum_score_to_test_settings.rb │ ├── 20231026182646_update_daily_note_statuses_to_version_2.rb │ ├── 20141215120718_add_role_id_to_users.rb │ ├── 20150824191143_remove_school_calendar_step_id_from_teaching_plans.rb │ ├── 20150825170508_add_allow_break_up_to_test_setting_tests.rb │ ├── 20160519190836_change_lesson_plans_old_contents_type_to_nullable.rb │ ├── 20170214133649_add_course_to_school_calendar_events.rb │ ├── 20180727202436_add_deleted_at_to_avaliations.rb │ ├── 20180727202503_add_deleted_at_to_daily_notes.rb │ ├── 20190214134929_add_daily_activities_record_to_content_record.rb │ ├── 20190301183920_add_step_type_description_to_school_calendars.rb │ ├── 20190916183315_add_discarded_at_to_daily_frequency_students.rb │ ├── 20191204204832_change_column_old_record_to_default_false.rb │ ├── 20191220121016_add_id_to_absence_justifications_discipline.rb │ ├── 20200205173107_add_thematic_unit_to_discipline_teaching_plans.rb │ ├── 20200318114654_add_column_owner_teacher_id_to_daily_frequencies.rb │ ├── 20200811142414_add_position_to_objectives_teaching_plans.rb │ ├── 20200811142818_populate_position_to_objectives_teaching_plans.rb │ ├── 20200910185956_add_group_descriptors_to_knowledge_areas.rb │ ├── 20220720005600_add_grouper_on_discipline.rb │ ├── 20240529134746_add_steps_in_school_calendar_discipline_grades.rb │ ├── 20150714165215_change_column_note_on_daily_note_students.rb │ ├── 20151006191710_add_classes_to_discipline_lesson_plans.rb │ ├── 20160120173044_remove_column_classes_from_discipline_lesson_plan.rb │ ├── 20160419123832_add_teacher_to_absence_justifications.rb │ ├── 20161027161456_add_discipline_id_to_school_calendar_events.rb │ ├── 20161114123307_remove_column_dependence_from_daily_note_students.rb │ ├── 20170906183320_add_changed_at_to_teacher_discipline_classrooms.rb │ ├── 20171103111947_add_score_type_to_teacher_discipline_classrooms.rb │ ├── 20180823115248_fill_recorded_at_to_tranfer_notes.rb │ ├── 20181101181628_add_support_freshdesk_to_general_configuration.rb │ ├── 20181120180434_add_field_period_to_teacher_discipline_classrooms.rb │ ├── 20190118175139_add_step_number_to_complementary_exam.rb │ ├── 20190131194515_add_field_period_to_student_enrollment_clasrooms.rb │ ├── 20190710194140_add_column_index_to_student_enrollment_classroom.rb │ ├── 20190813191157_remove_discipline_id_from_absence_justification.rb │ ├── 20190916183203_add_discarded_at_to_complementary_exam_students.rb │ ├── 20191206202336_add_foreign_key_current_classroom_id_to_users.rb │ ├── 20191206202346_add_foreign_key_current_discipline_id_to_users.rb │ ├── 20200729132601_add_fullname_users_index.rb │ ├── 20201116171751_add_school_term_type_to_teaching_plans.rb │ ├── 20230220192754_add_legacy_column_into_absence_justifications.rb │ ├── 20230220194114_add_class_number_into_absence_justifications.rb │ ├── 20250221190354_add_descricao_geral_to_school_calendar_events.rb │ ├── 20150105201145_add_fields_to_general_configuration.rb │ ├── 20150420203347_add_teacher_to_users.rb │ ├── 20150717112943_add_exam_rule_to_classroom.rb │ ├── 20160318124423_add_classroom_to_absence_justifications.rb │ ├── 20160318180843_add_discipline_to_absence_justifications.rb │ ├── 20160502121819_add_exact_decimal_place_to_rounding_table_values.rb │ ├── 20160502191434_add_periods_to_school_calendar_events.rb │ ├── 20160517165451_add_unique_index_to_avaliation_exemptions.rb │ ├── 20161006174003_remove_foreign_keys_on_conceptual_exams.rb │ ├── 20161123121934_update_all_daily_note_students_to_active.rb │ ├── 20170103124548_add_column_average_calculation_type_to_test_settings.rb │ ├── 20180727202519_add_deleted_at_to_transfer_notes.rb │ ├── 20180912195124_remove_school_calendar_step_id_from_transfer_notes.rb │ ├── 20190115121932_remove_visible_from_student_enrollment_classroom.rb │ ├── 20190118176000_add_step_number_to_school_calendar_step.rb │ ├── 20200212175532_add_discipline_to_learning_objectives_and_skills.rb │ ├── 20200305144424_remove_column_from_general_configurations.rb │ ├── 20200402220846_add_teacher_profile_id_to_users.rb │ ├── 20201022120724_add_default_division_weight_to_test_settings.rb │ ├── 20230422192754_change_legacy_column_into_absence_justifications.rb │ ├── 20141208133548_add_student_id_to_users.rb │ ├── 20150721195422_rename_column_on_rounding_table_values.rb │ ├── 20150908172639_add_fields_to_exam_rules.rb │ ├── 20160926185823_change_column_updated_at_to_string_on_student_enrollments.rb │ ├── 20170413122833_add_birth_date_and_avatar_to_students.rb │ ├── 20180523135859_add_full_error_message_to_ieducar_api_exam_postings.rb │ ├── 20180524134542_add_active_to_school_calendar_classroom_steps.rb │ ├── 20180625171601_add_full_error_message_to_ieducar_api_synchronizer.rb │ ├── 20180912193847_remove_active_from_school_calendar_classroom_steps.rb │ ├── 20180921210316_add_visible_to_student_enrollment_classrooms.rb │ ├── 20190225141100_add_synchronized_at_to_ieducar_api_configurations.rb │ ├── 20190809164952_add_uses_differentiated_exam_rule_to_unities.rb │ ├── 20191217143557_add_column_opened_year_to_school_calendars.rb │ ├── 20200212175406_add_thematic_unit_to_learning_objectives_and_skills.rb │ ├── 20201113173505_add_school_term_type_step_to_test_settings.rb │ ├── 20210517195737_remove_classroom_id_from_student_enrollment_classrooms.rb │ └── 20220720005606_add_descriptor_on_discipline.rb ├── app ├── mailers │ ├── .keep │ └── application_mailer.rb ├── models │ ├── .keep │ ├── concerns │ │ ├── .keep │ │ └── searchable.rb │ ├── null_user_role.rb │ ├── application_record.rb │ ├── grouped_teacher_discipline_classrooms.rb │ ├── user_login.rb │ ├── school_calendar_discipline_grade.rb │ ├── absence_justifications_discipline.rb │ ├── student_unification_student.rb │ ├── teacher_unification_teacher.rb │ ├── specific_step.rb │ ├── null_daily_frequency_student.rb │ ├── active_search_frequency_student.rb │ ├── exempted_daily_frequency_student.rb │ ├── student_unification.rb │ ├── teacher_unification.rb │ ├── daily_note_status.rb │ ├── grouped_discipline.rb │ ├── lesson_plan_attachment.rb │ └── absence_justification_attachment.rb ├── assets │ ├── images │ │ ├── .keep │ │ ├── beta.png │ │ ├── mybg.png │ │ ├── zoom.png │ │ ├── brasil.png │ │ ├── favicon.ico │ │ ├── novembro-azul.jpg │ │ ├── tablet_boletim.png │ │ ├── profile-default.jpg │ │ ├── select2-spinner.gif │ │ └── bg.svg │ ├── javascripts │ │ ├── devise.js.erb │ │ ├── datepicker-custom.js │ │ ├── bootstrap_config.js │ │ ├── bootstrap.js │ │ ├── views │ │ │ └── descriptive_exams │ │ │ │ └── show.js │ │ ├── absence_justification_report.js │ │ └── templates │ │ │ └── parent_dashboard │ │ │ └── partial_scores_tbody.jst.ejs │ ├── stylesheets │ │ ├── resources │ │ │ ├── descriptive_exams.css │ │ │ ├── registrations.css │ │ │ └── conceptual_exams.css │ │ └── absence_justification_report.css.less │ └── fonts │ │ └── twitter │ │ └── fonts │ │ └── glyphicons-halflings-regular.woff ├── enumerations │ ├── .keep │ ├── kinds.rb │ ├── move_types.rb │ ├── unit_types.rb │ ├── notice_types.rb │ ├── step_types.rb │ ├── user_status.rb │ ├── origin_types.rb │ ├── audited_action.rb │ ├── backup_status.rb │ ├── batch_status.rb │ ├── daily_note_statuses.rb │ ├── conceptual_exam_status.rb │ ├── profile_roles.rb │ ├── request_methods.rb │ ├── sidekiq_status.rb │ ├── ieducar_boolean_state.rb │ ├── permissions.rb │ ├── plans_authors.rb │ ├── role_kind.rb │ ├── api_posting_status.rb │ ├── maintenance_adjustment_kinds.rb │ ├── security_levels.rb │ ├── sexs.rb │ ├── translation_subgroups.rb │ ├── permissions_yes_or_no.rb │ ├── backup_types.rb │ ├── synchronization_periods.rb │ ├── api_synchronization_status.rb │ ├── maintenance_adjustment_status.rb │ ├── access_level.rb │ ├── absence_justification_authors.rb │ ├── after_sale_relationship_options.rb │ ├── event_coverage_type.rb │ ├── translation_groups.rb │ ├── child_educations.rb │ ├── frequency_types.rb │ ├── infrequency_tracking_types.rb │ ├── exam_setting_types.rb │ ├── affected_score_types.rb │ ├── bncc_steps.rb │ ├── average_calculation_types.rb │ ├── types_of_teaching.rb │ ├── rounded_avaliations.rb │ ├── biometric_types.rb │ ├── content_record_report_types.rb │ ├── recovery_types.rb │ ├── calculation_types.rb │ ├── rounding_table_action.rb │ ├── parallel_exams_calculation_types.rb │ ├── student_enrollment_score_type_filters.rb │ ├── states.rb │ ├── event_types.rb │ ├── score_types.rb │ └── workdays.rb ├── controllers │ ├── concerns │ │ └── .keep │ ├── courses_controller.rb │ └── sidekiq_monitor_controller.rb ├── services │ ├── ieducar_api.rb │ ├── backup_file │ │ ├── grades.rb │ │ ├── courses.rb │ │ ├── roles.rb │ │ ├── unities.rb │ │ ├── contents.rb │ │ ├── profiles.rb │ │ ├── students.rb │ │ ├── addresses.rb │ │ ├── classrooms.rb │ │ ├── teachers.rb │ │ ├── avaliations.rb │ │ ├── disciplines.rb │ │ ├── exam_rules.rb │ │ ├── lesson_plans.rb │ │ ├── user_roles.rb │ │ ├── teaching_plans.rb │ │ ├── unity_equipaments.rb │ │ ├── daily_notes.rb │ │ ├── knowledge_areas.rb │ │ ├── test_settings.rb │ │ └── transfer_notes.rb │ └── ieducar_api │ │ ├── grades.rb │ │ ├── schools.rb │ │ └── unity_params.rb ├── views │ ├── test_settings │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── complementary_exam_settings │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── lesson_plans │ │ ├── _hidden_fields.html.erb │ │ └── _unity_field.html.erb │ ├── roles │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── avaliations │ │ ├── new.html.erb │ │ └── edit.html.erb │ ├── teaching_plans │ │ ├── edit.html.erb │ │ ├── new.html.erb │ │ ├── _diciplines_modal.erb │ │ └── _experience_fields_modal.erb │ ├── unities │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── conceptual_exams │ │ ├── new.html.erb │ │ └── edit.html.erb │ ├── transfer_notes │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── complementary_exams │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── absence_justifications │ │ ├── edit.html.erb │ │ ├── new.html.erb │ │ └── show.html.erb │ ├── custom_rounding_tables │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── discipline_content_records │ │ ├── new.html.erb │ │ └── edit.html.erb │ ├── discipline_lesson_plans │ │ ├── edit.html.erb │ │ ├── new.html.erb │ │ └── show.html.erb │ ├── discipline_teaching_plans │ │ ├── edit.html.erb │ │ ├── new.html.erb │ │ └── show.html.erb │ ├── maintenance_adjustments │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── observation_diary_records │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── school_calendar_events │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── accounts │ │ └── .edit.html.erb.swn │ ├── conceptual_exams_in_batchs │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── final_recovery_diary_records │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── kaminari │ │ ├── _gap.html.erb │ │ ├── _first_page.html.erb │ │ ├── _last_page.html.erb │ │ ├── _next_page.html.erb │ │ └── _prev_page.html.erb │ ├── knowledge_area_content_records │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── knowledge_area_lesson_plans │ │ ├── edit.html.erb │ │ ├── new.html.erb │ │ └── show.html.erb │ ├── knowledge_area_teaching_plans │ │ ├── edit.html.erb │ │ ├── new.html.erb │ │ └── show.html.erb │ ├── learning_objectives_and_skills │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── school_calendar_event_batches │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── avaliation_recovery_diary_records │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── layouts │ │ └── _profile_selection.html.erb │ ├── school_term_recovery_diary_records │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── grades │ │ └── index.json.jbuilder │ ├── courses │ │ └── index.json.jbuilder │ ├── api │ │ └── v2 │ │ │ ├── teacher_unities │ │ │ └── index.json.jbuilder │ │ │ ├── teacher_disciplines │ │ │ └── index.json.jbuilder │ │ │ └── teacher_classrooms │ │ │ └── index.json.jbuilder │ ├── classrooms │ │ └── show.json.jbuilder │ ├── teacher_avaliations │ │ └── index.json.jbuilder │ ├── knowledge_areas │ │ └── index.json.jbuilder │ ├── teachers │ │ └── index.json.jbuilder │ ├── users │ │ └── edit.html.erb │ ├── shared │ │ └── _pagination.html.erb │ ├── lessons_boards │ │ ├── new.html.erb │ │ └── edit.html.erb │ ├── students │ │ └── index.json.jbuilder │ ├── schools │ │ └── index.json.jbuilder │ └── avaliation_recovery_lowest_notes │ │ └── edit.html.erb ├── jobs │ └── application_job.rb ├── helpers │ ├── absence_justification_report_helper.rb │ ├── school_calendar_event_batch_helper.rb │ ├── content_record_helper.rb │ └── absence_justification_helper.rb ├── javascript │ └── packs │ │ └── event-bus.js ├── serializers │ ├── content_serializer.rb │ ├── rounding_table_serializer.rb │ ├── test_setting_serializer.rb │ ├── student_serializer.rb │ ├── user_role_serializer.rb │ ├── rounding_table_value_serializer.rb │ ├── school_calendar_step_serializer.rb │ ├── student_enrollments_lists_serializer.rb │ ├── complementary_exam_setting_serializer.rb │ ├── daily_note_student_serializer.rb │ ├── student_in_final_recovery_serializer.rb │ └── exam_rule_serializer.rb ├── channels │ └── application_cable │ │ ├── channel.rb │ │ └── connection.rb ├── policies │ ├── daily_frequency_policy.rb │ ├── ieducar_api_configuration_policy.rb │ ├── lesson_plan_policy.rb │ ├── descriptive_exam_policy.rb │ ├── school_calendar_policy.rb │ └── avaliation_policy.rb ├── decorators │ ├── content_record_decorator.rb │ ├── teaching_plan_decorator.rb │ ├── biometric_types_decorator.rb │ ├── hash_decorator.rb │ └── periods_decorator.rb ├── presenters │ └── base_presenter.rb └── uploaders │ ├── asset_uploader.rb │ ├── backup_file_uploader.rb │ └── report_uploader.rb ├── lib ├── assets │ └── .keep ├── tasks │ └── .keep └── audit.rb ├── spec ├── helpers │ └── .keep ├── mailers │ └── .keep ├── models │ ├── .keep │ └── role_permission_spec.rb ├── views │ └── .keep ├── controllers │ └── .keep ├── policies │ └── .keep ├── fixtures │ ├── deficiencies.yml │ ├── general_configurations.yml │ ├── school_calendars.yml │ ├── user_roles.yml │ ├── ieducar_api_configurations.yml │ ├── roles.yml │ ├── school_calendar_steps.yml │ ├── addresses.yml │ ├── test_setting_tests.yml │ └── school_calendar_events.yml ├── support │ ├── assets │ │ ├── image.jpg │ │ └── document.pdf │ ├── factory_girl.rb │ ├── devise.rb │ ├── fixture_load.rb │ └── shoulda_matchers_helper.rb ├── factories │ ├── adresses.rb │ ├── entity_configurations.rb │ ├── contents.rb │ ├── deficiency_students.rb │ ├── objectives.rb │ ├── worker_states.rb │ ├── ieducar_api_synchronizations.rb │ ├── school_term_type_steps.rb │ ├── specific_steps.rb │ ├── courses.rb │ ├── daily_note_students.rb │ ├── school_term_types.rb │ ├── unity_school_day.rb │ ├── worker_batches.rb │ ├── avaliation_recovery_lowest_notes.rb │ ├── grades.rb │ ├── complementary_exam_students.rb │ ├── daily_notes.rb │ ├── role_permissions.rb │ ├── avaliation_exemptions.rb │ ├── conceptual_exam_values.rb │ ├── knowledge_areas.rb │ ├── school_calendar_discipline_grades.rb │ ├── students.rb │ ├── unity_equipments.rb │ ├── observation_diary_record_note_students.rb │ ├── knowledge_area_lesson_plan_knowledge_area.rb │ ├── daily_frequency_students.rb │ ├── observation_diary_record_notes.rb │ ├── custom_rounding_table_values.rb │ ├── entity.rb │ ├── system_notification_targets.rb │ ├── test_setting_tests.rb │ ├── deficiencies.rb │ ├── ieducar_api_exam_postings.rb │ ├── unique_daily_frequency_students.rb │ └── unities.rb └── forms │ └── current_role_form_spec.rb ├── .ruby-version ├── public ├── relatorios │ └── .keep ├── without-avatar.png └── robots.txt ├── .browserslistrc ├── .node-version ├── vendor └── assets │ ├── javascripts │ ├── .keep │ ├── plugins.sample.js │ └── smart_admin │ │ └── app.js │ ├── stylesheets │ ├── .keep │ └── select2.css │ ├── fonts │ ├── summernote.eot │ ├── summernote.ttf │ ├── summernote.woff │ └── summernote.woff2 │ └── images │ ├── img │ └── select2-spinner.gif │ └── jquery-file-upload │ ├── loading.gif │ └── progressbar.gif ├── .claude └── settings.json ├── .rspec ├── config ├── initializers │ ├── uri.rb │ ├── kaminari.rb │ ├── i18n_alchemy.rb │ ├── sidekiq_queues.rb │ ├── decore.rb │ ├── route_translator.rb │ ├── cookies_serializer.rb │ ├── audit.rb │ ├── mime_types.rb │ ├── non_digest_assets.rb │ └── filter_parameter_logging.rb ├── locales │ ├── enumerations │ │ ├── year.yml │ │ ├── unit_types.yml │ │ ├── sexs.yml │ │ ├── move_types.yml │ │ ├── test_types.yml │ │ ├── user_status.yml │ │ ├── kinds.yml │ │ ├── plans_authors.yml │ │ ├── security_levels.yml │ │ ├── frequency_types.yml │ │ ├── translation_subgroups.yml │ │ ├── daily_note_statuses.yml │ │ ├── role_kind.yml │ │ ├── biometric_types.yml │ │ ├── conceptual_exam_status.yml │ │ ├── maintenance_adjustment_kinds.yml │ │ ├── audited_action.yml │ │ ├── permissions.yml │ │ ├── after_sale_relationship_options.yml │ │ ├── permissions_yes_or_no.yml │ │ ├── batch_status.yml │ │ ├── score_types.yml │ │ ├── api_posting_status.yml │ │ ├── absence_justification_authors.yml │ │ ├── recovery_types.yml │ │ ├── infrequency_tracking_types.yml │ │ ├── api_synchronization_status.yml │ │ ├── exam_setting_types.yml │ │ ├── profile_roles.yml │ │ ├── affected_score_types.yml │ │ ├── average_calculation_types.yml │ │ ├── event_coverage_type.yml │ │ ├── translation_groups.yml │ │ ├── periods.yml │ │ ├── bncc_steps.yml │ │ ├── calculation_types.yml │ │ ├── maintenance_adjustment_status.yml │ │ ├── workdays.yml │ │ ├── rounded_avaliations.yml │ │ └── child_educations.yml │ ├── pundit.yml │ ├── views │ │ ├── admin_synchronizations.yml │ │ ├── current_role.yml │ │ ├── observation_record_report.yml │ │ ├── descriptive_exams.yml │ │ ├── form.yml │ │ ├── general_configurations.yml │ │ ├── lesson_plans.yml │ │ ├── terms_dictionaries.yml │ │ └── absence_justifications.yml │ ├── models │ │ ├── content.yml │ │ ├── content_records_contents.yml │ │ ├── observation_diary_record_note_student.yml │ │ ├── role_permission.yml │ │ ├── classroom.yml │ │ ├── contents_lesson_plan.yml │ │ ├── contents_teaching_plan.yml │ │ ├── objectives_lesson_plan.yml │ │ ├── objectives_teaching_plan.yml │ │ ├── observation_diary_record_note.yml │ │ ├── profile.yml │ │ ├── ieducar_api_exam_postings.yml │ │ ├── recovery_diary_record_student.yml │ │ ├── signup.yml │ │ └── complementary_exam_student.yml │ ├── services │ │ ├── profiles_creator.yml │ │ └── student_unification.yml │ ├── controllers │ │ ├── users.yml │ │ ├── absence_justifications.yml │ │ ├── daily_frequencies.yml │ │ ├── conceptual_exams.yml │ │ ├── discipline_lesson_plans.yml │ │ ├── final_recovery_diary_record.yml │ │ └── knowledge_area_lesson_plans.yml │ ├── forms │ │ ├── discipline_lesson_plan_cloner_form.yml │ │ ├── discipline_content_record_cloner_form.yml │ │ ├── knowledge_area_lesson_plan_cloner_form.yml │ │ ├── knowledge_area_content_record_cloner_form.yml │ │ ├── copy_discipline_teaching_plan_form.yml │ │ └── copy_knowledge_area_teaching_plan_form.yml │ ├── workers │ │ ├── maintenance_adjustment_worker.yml │ │ └── copy_discipline_teaching_plan_worker.yml │ └── reports │ │ └── base_report.yml ├── webpack │ ├── loaders │ │ └── vue.js │ ├── staging.js │ ├── test.js │ ├── production.js │ └── development.js ├── spring.rb ├── cable.yml ├── boot.rb ├── sidekiq.yml └── puma.sample.rb ├── SECURITY.md ├── bin ├── bundle └── rake ├── config.ru ├── .editorconfig └── Rakefile /db/seeds.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/helpers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/views/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.6.6 2 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/enumerations/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/relatorios/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/controllers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/policies/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | defaults 2 | -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | 12.22.1 2 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/assets/stylesheets/select2.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/services/ieducar_api.rb: -------------------------------------------------------------------------------- 1 | module IeducarApi 2 | end 3 | -------------------------------------------------------------------------------- /app/views/test_settings/edit.html.erb: -------------------------------------------------------------------------------- 1 | <%= render 'form' %> 2 | -------------------------------------------------------------------------------- /app/views/test_settings/new.html.erb: -------------------------------------------------------------------------------- 1 | <%= render 'form' %> 2 | -------------------------------------------------------------------------------- /.claude/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "includeCoAuthoredBy": false 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/deficiencies.yml: -------------------------------------------------------------------------------- 1 | cegueira: 2 | name: "Cegueira" 3 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --format documentation 3 | --require turnip/rspec 4 | -------------------------------------------------------------------------------- /app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | end 3 | -------------------------------------------------------------------------------- /app/views/complementary_exam_settings/edit.html.erb: -------------------------------------------------------------------------------- 1 | <%= render 'form' %> 2 | -------------------------------------------------------------------------------- /app/views/complementary_exam_settings/new.html.erb: -------------------------------------------------------------------------------- 1 | <%= render 'form' %> 2 | -------------------------------------------------------------------------------- /app/views/lesson_plans/_hidden_fields.html.erb: -------------------------------------------------------------------------------- 1 | <%= f.input :teacher_id, as: :hidden %> 2 | -------------------------------------------------------------------------------- /app/assets/javascripts/devise.js.erb: -------------------------------------------------------------------------------- 1 | //= require jquery 2 | //= require twitter/bootstrap/alert -------------------------------------------------------------------------------- /config/initializers/uri.rb: -------------------------------------------------------------------------------- 1 | module URI 2 | def URI.escape(url) 3 | url 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/plugins.sample.js: -------------------------------------------------------------------------------- 1 | // Add plugins requiriments here or just leave empty -------------------------------------------------------------------------------- /app/helpers/absence_justification_report_helper.rb: -------------------------------------------------------------------------------- 1 | module AbsenceJustificationReportHelper 2 | end 3 | -------------------------------------------------------------------------------- /app/javascript/packs/event-bus.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | export const EventBus = new Vue(); 3 | -------------------------------------------------------------------------------- /config/locales/enumerations/year.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | year: 4 | yearly: "Anual" -------------------------------------------------------------------------------- /app/assets/images/beta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/app/assets/images/beta.png -------------------------------------------------------------------------------- /app/assets/images/mybg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/app/assets/images/mybg.png -------------------------------------------------------------------------------- /app/assets/images/zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/app/assets/images/zoom.png -------------------------------------------------------------------------------- /app/views/roles/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/roles/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /config/initializers/kaminari.rb: -------------------------------------------------------------------------------- 1 | Kaminari.configure do |config| 2 | 3 | config.window = 1 4 | 5 | end 6 | -------------------------------------------------------------------------------- /public/without-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/public/without-avatar.png -------------------------------------------------------------------------------- /app/assets/images/brasil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/app/assets/images/brasil.png -------------------------------------------------------------------------------- /app/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/app/assets/images/favicon.ico -------------------------------------------------------------------------------- /app/enumerations/kinds.rb: -------------------------------------------------------------------------------- 1 | class Kinds < EnumerateIt::Base 2 | associate_values :person, :company 3 | end 4 | -------------------------------------------------------------------------------- /app/models/null_user_role.rb: -------------------------------------------------------------------------------- 1 | class NullUserRole < UserRole 2 | def role 3 | Role.new 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/views/avaliations/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/teaching_plans/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
-------------------------------------------------------------------------------- /app/views/unities/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/unities/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /spec/fixtures/general_configurations.yml: -------------------------------------------------------------------------------- 1 | general_configuration: 2 | employees_default_role_id: secretary 3 | -------------------------------------------------------------------------------- /spec/support/assets/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/spec/support/assets/image.jpg -------------------------------------------------------------------------------- /spec/support/factory_girl.rb: -------------------------------------------------------------------------------- 1 | RSpec.configure do |config| 2 | config.include FactoryGirl::Syntax::Methods 3 | end -------------------------------------------------------------------------------- /app/enumerations/move_types.rb: -------------------------------------------------------------------------------- 1 | class MoveTypes < EnumerateIt::Base 2 | associate_values :entrance, :exit 3 | end 4 | -------------------------------------------------------------------------------- /app/enumerations/unit_types.rb: -------------------------------------------------------------------------------- 1 | class UnitTypes < EnumerateIt::Base 2 | associate_values :school_unit 3 | end 4 | -------------------------------------------------------------------------------- /app/views/avaliations/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/conceptual_exams/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/teaching_plans/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/transfer_notes/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/transfer_notes/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /config/initializers/i18n_alchemy.rb: -------------------------------------------------------------------------------- 1 | ActiveSupport.on_load(:active_record) do 2 | include I18n::Alchemy 3 | end 4 | -------------------------------------------------------------------------------- /spec/fixtures/school_calendars.yml: -------------------------------------------------------------------------------- 1 | school_calendar_a: 2 | year: 2015 3 | number_of_classes: 5 4 | unity: escola_y -------------------------------------------------------------------------------- /app/enumerations/notice_types.rb: -------------------------------------------------------------------------------- 1 | class NoticeTypes < EnumerateIt::Base 2 | associate_values :warning, :error 3 | end 4 | -------------------------------------------------------------------------------- /app/enumerations/step_types.rb: -------------------------------------------------------------------------------- 1 | class StepTypes < EnumerateIt::Base 2 | associate_values :general, :classroom 3 | end 4 | -------------------------------------------------------------------------------- /app/enumerations/user_status.rb: -------------------------------------------------------------------------------- 1 | class UserStatus < EnumerateIt::Base 2 | associate_values :pending, :active 3 | end 4 | -------------------------------------------------------------------------------- /app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | self.abstract_class = true 3 | end 4 | -------------------------------------------------------------------------------- /app/views/complementary_exams/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/complementary_exams/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/conceptual_exams/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /config/locales/pundit.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | pundit: 3 | default: 'Você não possui permissão para realizar esta ação.' 4 | -------------------------------------------------------------------------------- /config/locales/views/admin_synchronizations.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | admin_synchronizations: 3 | title: "Atualizações:" 4 | -------------------------------------------------------------------------------- /spec/support/assets/document.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/spec/support/assets/document.pdf -------------------------------------------------------------------------------- /vendor/assets/fonts/summernote.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/vendor/assets/fonts/summernote.eot -------------------------------------------------------------------------------- /vendor/assets/fonts/summernote.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/vendor/assets/fonts/summernote.ttf -------------------------------------------------------------------------------- /app/assets/images/novembro-azul.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/app/assets/images/novembro-azul.jpg -------------------------------------------------------------------------------- /app/assets/images/tablet_boletim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/app/assets/images/tablet_boletim.png -------------------------------------------------------------------------------- /app/enumerations/origin_types.rb: -------------------------------------------------------------------------------- 1 | class OriginTypes < EnumerateIt::Base 2 | associate_values :web, :api_v2, :worker 3 | end 4 | -------------------------------------------------------------------------------- /app/views/absence_justifications/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/absence_justifications/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/absence_justifications/show.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/custom_rounding_tables/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/custom_rounding_tables/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/discipline_content_records/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/discipline_lesson_plans/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/discipline_lesson_plans/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/discipline_lesson_plans/show.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/discipline_teaching_plans/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/discipline_teaching_plans/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/discipline_teaching_plans/show.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/maintenance_adjustments/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/maintenance_adjustments/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/observation_diary_records/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/observation_diary_records/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/school_calendar_events/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/school_calendar_events/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /vendor/assets/fonts/summernote.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/vendor/assets/fonts/summernote.woff -------------------------------------------------------------------------------- /vendor/assets/fonts/summernote.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/vendor/assets/fonts/summernote.woff2 -------------------------------------------------------------------------------- /app/assets/images/profile-default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/app/assets/images/profile-default.jpg -------------------------------------------------------------------------------- /app/assets/images/select2-spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/app/assets/images/select2-spinner.gif -------------------------------------------------------------------------------- /app/serializers/content_serializer.rb: -------------------------------------------------------------------------------- 1 | class ContentSerializer < ActiveModel::Serializer 2 | attributes :id, :description 3 | end -------------------------------------------------------------------------------- /app/views/accounts/.edit.html.erb.swn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/app/views/accounts/.edit.html.erb.swn -------------------------------------------------------------------------------- /app/views/conceptual_exams_in_batchs/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/discipline_content_records/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/final_recovery_diary_records/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/final_recovery_diary_records/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= render 'form' %> 3 |
4 | -------------------------------------------------------------------------------- /app/views/kaminari/_gap.html.erb: -------------------------------------------------------------------------------- 1 |
  • 2 | <%= content_tag :a, raw(t 'views.pagination.truncate') %> 3 |
  • 4 | -------------------------------------------------------------------------------- /app/views/knowledge_area_content_records/edit.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/knowledge_area_content_records/new.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/knowledge_area_lesson_plans/edit.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/knowledge_area_lesson_plans/new.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/knowledge_area_lesson_plans/show.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/knowledge_area_teaching_plans/edit.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/knowledge_area_teaching_plans/new.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/knowledge_area_teaching_plans/show.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/learning_objectives_and_skills/edit.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/learning_objectives_and_skills/new.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/school_calendar_event_batches/edit.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/school_calendar_event_batches/new.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /spec/factories/adresses.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :address do 3 | zip_code { "32672-124" } 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/assets/javascripts/datepicker-custom.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | $('.datepicker:not([readonly]):not([disabled])').datepicker(); 3 | }) 4 | -------------------------------------------------------------------------------- /app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app/enumerations/audited_action.rb: -------------------------------------------------------------------------------- 1 | class AuditedAction < EnumerateIt::Base 2 | associate_values :update, :create, :destroy 3 | end 4 | -------------------------------------------------------------------------------- /app/enumerations/backup_status.rb: -------------------------------------------------------------------------------- 1 | class BackupStatus < EnumerateIt::Base 2 | associate_values :started, :error, :completed 3 | end 4 | -------------------------------------------------------------------------------- /app/enumerations/batch_status.rb: -------------------------------------------------------------------------------- 1 | class BatchStatus < EnumerateIt::Base 2 | associate_values :started, :error, :completed 3 | end 4 | -------------------------------------------------------------------------------- /app/views/avaliation_recovery_diary_records/edit.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/avaliation_recovery_diary_records/new.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/layouts/_profile_selection.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /app/views/school_term_recovery_diary_records/edit.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /app/views/school_term_recovery_diary_records/new.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render 'form' %> 3 |
    4 | -------------------------------------------------------------------------------- /config/locales/enumerations/unit_types.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | unit_types: 4 | school_unit: "Unidade escolar" 5 | -------------------------------------------------------------------------------- /config/locales/models/content.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | content: 5 | description: "Descrição" -------------------------------------------------------------------------------- /config/locales/views/current_role.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | current_role: 3 | resources: 4 | set_current_user_role: "Usar este perfil" -------------------------------------------------------------------------------- /config/locales/views/observation_record_report.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | observation_record_report: 3 | form: 4 | print: 'Imprimir' 5 | -------------------------------------------------------------------------------- /spec/factories/entity_configurations.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :entity_configuration do 3 | address 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | Please report security issues to `security@portabilis.com.br` 6 | -------------------------------------------------------------------------------- /app/enumerations/daily_note_statuses.rb: -------------------------------------------------------------------------------- 1 | class DailyNoteStatuses < EnumerateIt::Base 2 | associate_values :incomplete, :complete 3 | end 4 | -------------------------------------------------------------------------------- /config/initializers/sidekiq_queues.rb: -------------------------------------------------------------------------------- 1 | EXAM_POSTING_QUEUES = (Rails.application.secrets.EXAM_POSTING_QUEUES || 'exam_posting').split(',') 2 | -------------------------------------------------------------------------------- /config/locales/enumerations/sexs.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | sexs: 4 | male: "Masculino" 5 | female: "Feminino" -------------------------------------------------------------------------------- /config/webpack/loaders/vue.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | test: /\.vue(\.erb)?$/, 3 | use: [{ 4 | loader: 'vue-loader' 5 | }] 6 | } 7 | -------------------------------------------------------------------------------- /vendor/assets/images/img/select2-spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/vendor/assets/images/img/select2-spinner.gif -------------------------------------------------------------------------------- /app/assets/stylesheets/resources/descriptive_exams.css: -------------------------------------------------------------------------------- 1 | form[id^=edit_descriptive_exam_] textarea.form-control.text{ 2 | padding-left: 0px; 3 | } -------------------------------------------------------------------------------- /app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /app/enumerations/conceptual_exam_status.rb: -------------------------------------------------------------------------------- 1 | class ConceptualExamStatus < EnumerateIt::Base 2 | associate_values :incomplete, :complete 3 | end 4 | -------------------------------------------------------------------------------- /app/enumerations/profile_roles.rb: -------------------------------------------------------------------------------- 1 | class ProfileRoles < EnumerateIt::Base 2 | associate_values :admin, :parent, :servant, :student 3 | end 4 | -------------------------------------------------------------------------------- /app/enumerations/request_methods.rb: -------------------------------------------------------------------------------- 1 | class RequestMethods < EnumerateIt::Base 2 | associate_values :get, 3 | :post 4 | end 5 | -------------------------------------------------------------------------------- /app/enumerations/sidekiq_status.rb: -------------------------------------------------------------------------------- 1 | class SidekiqStatus < EnumerateIt::Base 2 | associate_values :ok, :not_ok 3 | 4 | sort_by :none 5 | end 6 | -------------------------------------------------------------------------------- /app/views/grades/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@grades) do |grade| 2 | json.id grade.id 3 | json.description grade.description 4 | end 5 | -------------------------------------------------------------------------------- /config/initializers/decore.rb: -------------------------------------------------------------------------------- 1 | ActiveSupport.on_load(:active_record) do 2 | include Decore::Infection 3 | extend Decore::Infection 4 | end 5 | -------------------------------------------------------------------------------- /config/locales/enumerations/move_types.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | move_types: 4 | entrance: "Entrada" 5 | exit: "Saída" 6 | -------------------------------------------------------------------------------- /app/enumerations/ieducar_boolean_state.rb: -------------------------------------------------------------------------------- 1 | class IeducarBooleanState < EnumerateIt::Base 2 | associate_values active: '1', inactive: '0' 3 | end 4 | -------------------------------------------------------------------------------- /app/enumerations/permissions.rb: -------------------------------------------------------------------------------- 1 | class Permissions < EnumerateIt::Base 2 | associate_values :read, :change, :denied 3 | 4 | sort_by :none 5 | end 6 | -------------------------------------------------------------------------------- /app/enumerations/plans_authors.rb: -------------------------------------------------------------------------------- 1 | class PlansAuthors < EnumerateIt::Base 2 | associate_values :my_plans, :others 3 | 4 | sort_by :none 5 | end 6 | -------------------------------------------------------------------------------- /app/enumerations/role_kind.rb: -------------------------------------------------------------------------------- 1 | class RoleKind < EnumerateIt::Base 2 | associate_values :employee, :parent, :student 3 | 4 | sort_by :none 5 | end 6 | -------------------------------------------------------------------------------- /app/policies/daily_frequency_policy.rb: -------------------------------------------------------------------------------- 1 | class DailyFrequencyPolicy < ApplicationPolicy 2 | def destroy_multiple? 3 | update? 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/views/courses/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@courses) do |course| 2 | json.id course.id 3 | json.description course.description 4 | end 5 | -------------------------------------------------------------------------------- /bin/bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) 3 | load Gem.bin_path('bundler', 'bundle') 4 | -------------------------------------------------------------------------------- /config/locales/enumerations/test_types.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | test_types: 4 | regular: "Normal" 5 | recovery: "Recuperação" -------------------------------------------------------------------------------- /config/locales/enumerations/user_status.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | user_status: 4 | pending: "Pendente" 5 | active: "Ativo" 6 | -------------------------------------------------------------------------------- /config/spring.rb: -------------------------------------------------------------------------------- 1 | %w( 2 | .ruby-version 3 | .rbenv-vars 4 | tmp/restart.txt 5 | tmp/caching-dev.txt 6 | ).each { |path| Spring.watch(path) } 7 | -------------------------------------------------------------------------------- /spec/factories/contents.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :content do 3 | description { Faker::Lorem.unique.sentence } 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/deficiency_students.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :deficiency_student do 3 | student 4 | deficiency 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/factories/objectives.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :objective do 3 | description { Faker::Lorem.unique.sentence } 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/worker_states.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :worker_state do 3 | worker_batch 4 | kind 'worker' 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/assets/javascripts/bootstrap_config.js: -------------------------------------------------------------------------------- 1 | $.fn.modal.Constructor.DEFAULTS.keyboard = false ; 2 | $.fn.modal.Constructor.DEFAULTS.backdrop = 'static' ; 3 | -------------------------------------------------------------------------------- /app/enumerations/api_posting_status.rb: -------------------------------------------------------------------------------- 1 | class ApiPostingStatus < EnumerateIt::Base 2 | associate_values :started, :error, :completed, :warning 3 | end 4 | -------------------------------------------------------------------------------- /app/enumerations/maintenance_adjustment_kinds.rb: -------------------------------------------------------------------------------- 1 | class MaintenanceAdjustmentKinds < EnumerateIt::Base 2 | associate_values :absence_adjustments 3 | end 4 | -------------------------------------------------------------------------------- /app/enumerations/security_levels.rb: -------------------------------------------------------------------------------- 1 | class SecurityLevels < EnumerateIt::Base 2 | associate_values :basic, :advanced 3 | 4 | sort_by :none 5 | end 6 | -------------------------------------------------------------------------------- /app/policies/ieducar_api_configuration_policy.rb: -------------------------------------------------------------------------------- 1 | class IeducarApiConfigurationPolicy < ApplicationPolicy 2 | def edit? 3 | index? 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/views/api/v2/teacher_unities/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@unities) do |unity| 2 | json.id unity.id 3 | json.description unity.to_s 4 | end 5 | -------------------------------------------------------------------------------- /app/views/lesson_plans/_unity_field.html.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= f.input :unity, as: :select2_unity, user: current_user %> 3 |
    4 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require_relative 'config/environment' 4 | run Rails.application 5 | -------------------------------------------------------------------------------- /config/locales/enumerations/kinds.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | kinds: 4 | person: "Pessoa física" 5 | company: "Pessoa jurídica" 6 | -------------------------------------------------------------------------------- /vendor/assets/images/jquery-file-upload/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/vendor/assets/images/jquery-file-upload/loading.gif -------------------------------------------------------------------------------- /app/assets/stylesheets/resources/registrations.css: -------------------------------------------------------------------------------- 1 | form.signup label.checkbox input[type="checkbox"].checkbox:checked + span { 2 | font-weight: normal; 3 | } 4 | -------------------------------------------------------------------------------- /app/views/kaminari/_first_page.html.erb: -------------------------------------------------------------------------------- 1 |
  • 2 | <%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %> 3 |
  • 4 | -------------------------------------------------------------------------------- /app/views/kaminari/_last_page.html.erb: -------------------------------------------------------------------------------- 1 |
  • 2 | <%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %> 3 |
  • 4 | -------------------------------------------------------------------------------- /config/locales/enumerations/plans_authors.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | plans_authors: 4 | my_plans: "Meus planos" 5 | others: "Outros" 6 | -------------------------------------------------------------------------------- /config/locales/enumerations/security_levels.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | security_levels: 4 | basic: "Básico" 5 | advanced: "Avançado" 6 | -------------------------------------------------------------------------------- /config/locales/services/profiles_creator.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | services: 3 | profiles_creator: 4 | success: "\nPerfis de usuário criados com sucesso." 5 | -------------------------------------------------------------------------------- /app/enumerations/sexs.rb: -------------------------------------------------------------------------------- 1 | class Sexs < EnumerateIt::Base 2 | associate_values :male => "M", 3 | :female => "F" 4 | 5 | sort_by :none 6 | end 7 | -------------------------------------------------------------------------------- /app/enumerations/translation_subgroups.rb: -------------------------------------------------------------------------------- 1 | class TranslationSubgroups < EnumerateIt::Base 2 | associate_values :module, :fields 3 | 4 | sort_by :none 5 | end 6 | -------------------------------------------------------------------------------- /app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: "sample@#{ActionMailer::Base.smtp_settings[:domain]}" 3 | end 4 | -------------------------------------------------------------------------------- /app/models/grouped_teacher_discipline_classrooms.rb: -------------------------------------------------------------------------------- 1 | class GroupedTeacherDisciplineClassrooms < ActiveRecord::Base 2 | def readonly? 3 | true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/policies/lesson_plan_policy.rb: -------------------------------------------------------------------------------- 1 | class LessonPlanPolicy < ApplicationPolicy 2 | def update? 3 | @user.employee? || @user.administrator? 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/views/classrooms/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.id @classroom.id 2 | json.description @classroom.description 3 | json.score_type @classroom.first_exam_rule.score_type 4 | -------------------------------------------------------------------------------- /config/initializers/route_translator.rb: -------------------------------------------------------------------------------- 1 | RouteTranslator.config do |config| 2 | config.hide_locale = true 3 | config.generate_unlocalized_routes = false 4 | end 5 | -------------------------------------------------------------------------------- /config/locales/enumerations/frequency_types.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | frequency_types: 4 | general: "Geral" 5 | by_discipline: "Por disciplina" -------------------------------------------------------------------------------- /config/locales/models/content_records_contents.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | content_records_content: 5 | content_id: "Conteúdo" -------------------------------------------------------------------------------- /spec/support/devise.rb: -------------------------------------------------------------------------------- 1 | Devise.stretches = 1 2 | 3 | RSpec.configure do |config| 4 | config.include Devise::Test::ControllerHelpers, type: :controller 5 | end 6 | -------------------------------------------------------------------------------- /vendor/assets/images/jquery-file-upload/progressbar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/vendor/assets/images/jquery-file-upload/progressbar.gif -------------------------------------------------------------------------------- /app/assets/javascripts/bootstrap.js: -------------------------------------------------------------------------------- 1 | jQuery(function() { 2 | $("a[rel~=popover], .has-popover").popover(); 3 | $("a[rel~=tooltip], .has-tooltip").tooltip(); 4 | }); 5 | -------------------------------------------------------------------------------- /app/enumerations/permissions_yes_or_no.rb: -------------------------------------------------------------------------------- 1 | class PermissionsYesOrNo < EnumerateIt::Base 2 | associate_values :read, :change, :denied 3 | 4 | sort_by :none 5 | end 6 | -------------------------------------------------------------------------------- /config/locales/controllers/users.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | users: 3 | not_allow_admin: "Não pode ser marcado como administrador, pois suas permissões não são deste nível" 4 | -------------------------------------------------------------------------------- /config/locales/enumerations/translation_subgroups.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | translation_subgroups: 4 | module: "Módulo" 5 | fields: "Campos" 6 | -------------------------------------------------------------------------------- /spec/factories/ieducar_api_synchronizations.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :ieducar_api_synchronization do 3 | ieducar_api_configuration 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/school_term_type_steps.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :school_term_type_step do 3 | school_term_type 4 | step_number 1 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/factories/specific_steps.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :specific_step do 3 | classroom 4 | discipline 5 | 6 | used_steps '' 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/enumerations/backup_types.rb: -------------------------------------------------------------------------------- 1 | class BackupTypes < EnumerateIt::Base 2 | associate_values :full_system_backup, :school_calendar_backup, :unique_school_days_backup 3 | end 4 | -------------------------------------------------------------------------------- /app/enumerations/synchronization_periods.rb: -------------------------------------------------------------------------------- 1 | class SynchronizationPeriods < EnumerateIt::Base 2 | associate_values :current_year, 3 | :last_two_years 4 | end -------------------------------------------------------------------------------- /app/serializers/rounding_table_serializer.rb: -------------------------------------------------------------------------------- 1 | class RoundingTableSerializer < ActiveModel::Serializer 2 | attributes :id 3 | 4 | has_many :rounding_table_values 5 | end 6 | -------------------------------------------------------------------------------- /app/views/api/v2/teacher_disciplines/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@disciplines) do |discipline| 2 | json.id discipline.id 3 | json.description discipline.to_s 4 | end 5 | -------------------------------------------------------------------------------- /app/views/kaminari/_next_page.html.erb: -------------------------------------------------------------------------------- 1 |
  • 2 | <%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %> 3 |
  • 4 | -------------------------------------------------------------------------------- /config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: async 6 | 7 | production: 8 | adapter: redis 9 | url: redis://localhost:6379/1 10 | -------------------------------------------------------------------------------- /config/locales/enumerations/daily_note_statuses.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | daily_note_statuses: 4 | incomplete: "Incompleto" 5 | complete: "Completo" 6 | -------------------------------------------------------------------------------- /config/locales/enumerations/role_kind.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | role_kind: 4 | employee: "Servidor" 5 | parent: "Pais" 6 | student: "Aluno" 7 | -------------------------------------------------------------------------------- /spec/factories/courses.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :course do 3 | sequence(:api_code, &:to_s) 4 | description { Faker::Educator.course } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/factories/daily_note_students.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :daily_note_student do 3 | daily_note 4 | student 5 | 6 | active true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/assets/fonts/twitter/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/portabilis/i-diario/HEAD/app/assets/fonts/twitter/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /app/assets/javascripts/views/descriptive_exams/show.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | createSummerNote("textarea[id^=descriptive_exam_students_attributes_]", { disabled: true }) 3 | }); 4 | -------------------------------------------------------------------------------- /app/enumerations/api_synchronization_status.rb: -------------------------------------------------------------------------------- 1 | class ApiSynchronizationStatus < EnumerateIt::Base 2 | associate_values :started, :error, :completed, :warning, :enqueued 3 | end 4 | -------------------------------------------------------------------------------- /app/enumerations/maintenance_adjustment_status.rb: -------------------------------------------------------------------------------- 1 | class MaintenanceAdjustmentStatus < EnumerateIt::Base 2 | associate_values :completed, :in_progress, :pending, :error 3 | end 4 | -------------------------------------------------------------------------------- /app/models/user_login.rb: -------------------------------------------------------------------------------- 1 | class UserLogin < ApplicationRecord 2 | acts_as_copy_target 3 | 4 | belongs_to :user 5 | 6 | validates :user, :sign_in_ip, presence: true 7 | end 8 | -------------------------------------------------------------------------------- /app/views/kaminari/_prev_page.html.erb: -------------------------------------------------------------------------------- 1 |
  • 2 | <%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %> 3 |
  • 4 | -------------------------------------------------------------------------------- /config/locales/enumerations/biometric_types.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | biometric_types: 4 | sagem: "Sagem" 5 | inttelix: "Inttelix" 6 | suprema: "Suprema" -------------------------------------------------------------------------------- /config/locales/enumerations/conceptual_exam_status.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | conceptual_exam_status: 4 | incomplete: "Incompleto" 5 | complete: "Completo" 6 | -------------------------------------------------------------------------------- /config/locales/enumerations/maintenance_adjustment_kinds.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | maintenance_adjustment_kinds: 4 | absence_adjustments: 'Ajustes de faltas' 5 | -------------------------------------------------------------------------------- /db/migrate/20150130130925_add_kind_to_roles.rb: -------------------------------------------------------------------------------- 1 | class AddKindToRoles < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :roles, :kind, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/school_term_types.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :school_term_type do 3 | description { Faker::Lorem.sentence } 4 | steps_number 4 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/factories/unity_school_day.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :unity_school_day do 3 | school_day { Faker::Date.forward(days: 30) } 4 | unity 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/factories/worker_batches.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :worker_batch do 3 | main_job_class 'IeducarExamPostingWorker' 4 | main_job_id '123' 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/enumerations/access_level.rb: -------------------------------------------------------------------------------- 1 | class AccessLevel < EnumerateIt::Base 2 | associate_values :administrator, :employee, :teacher, :parent, :student 3 | 4 | sort_by :none 5 | end 6 | -------------------------------------------------------------------------------- /app/views/teacher_avaliations/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@avaliations) do |avaliation| 2 | json.id avaliation.id 3 | json.description avaliation.description_to_teacher 4 | end 5 | -------------------------------------------------------------------------------- /config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | Rails.application.config.action_dispatch.cookies_serializer = :hybrid 4 | -------------------------------------------------------------------------------- /config/locales/enumerations/audited_action.yml: -------------------------------------------------------------------------------- 1 | 'pt-BR': 2 | enumerations: 3 | audited_action: 4 | create: 'Criação' 5 | update: 'Edição' 6 | destroy: 'Exclusão' 7 | -------------------------------------------------------------------------------- /config/locales/enumerations/permissions.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | permissions: 4 | read: "Leitura" 5 | change: "Leitura/Escrita" 6 | denied: "Sem acesso" 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true -------------------------------------------------------------------------------- /app/enumerations/absence_justification_authors.rb: -------------------------------------------------------------------------------- 1 | class AbsenceJustificationAuthors < EnumerateIt::Base 2 | associate_values :my_justifications, :others 3 | 4 | sort_by :none 5 | end 6 | -------------------------------------------------------------------------------- /app/enumerations/after_sale_relationship_options.rb: -------------------------------------------------------------------------------- 1 | class AfterSaleRelationshipOptions < EnumerateIt::Base 2 | associate_values :allows, :does_not_allow 3 | 4 | sort_by :none 5 | end 6 | -------------------------------------------------------------------------------- /app/enumerations/event_coverage_type.rb: -------------------------------------------------------------------------------- 1 | class EventCoverageType < EnumerateIt::Base 2 | associate_values :by_unity, :by_course, :by_grade, :by_classroom 3 | 4 | sort_by :none 5 | end 6 | -------------------------------------------------------------------------------- /app/enumerations/translation_groups.rb: -------------------------------------------------------------------------------- 1 | class TranslationGroups < EnumerateIt::Base 2 | associate_values :teaching_plans, :lesson_plans, :content_records 3 | 4 | sort_by :none 5 | end 6 | -------------------------------------------------------------------------------- /app/helpers/school_calendar_event_batch_helper.rb: -------------------------------------------------------------------------------- 1 | module SchoolCalendarEventBatchHelper 2 | def formatted_date(object, date) 3 | object.new_record? ? nil : l(date) 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/views/knowledge_areas/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@knowledge_areas) do |knowledge_area| 2 | json.id knowledge_area.id 3 | json.description knowledge_area.description 4 | end 5 | -------------------------------------------------------------------------------- /config/initializers/audit.rb: -------------------------------------------------------------------------------- 1 | module Audited 2 | class Audit < ::ActiveRecord::Base 3 | private 4 | 5 | def set_version_number 6 | 0 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /config/locales/enumerations/after_sale_relationship_options.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | after_sale_relationship_options: 4 | allows: "Sim" 5 | does_not_allow: "Não" 6 | -------------------------------------------------------------------------------- /config/locales/enumerations/permissions_yes_or_no.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | permissions_yes_or_no: 4 | read: "Não" 5 | change: "Sim" 6 | denied: "Sem acesso" 7 | -------------------------------------------------------------------------------- /config/locales/forms/discipline_lesson_plan_cloner_form.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activemodel: 3 | attributes: 4 | discipline_lesson_plan_cloner_form: 5 | classroom_ids: 'Turmas' 6 | -------------------------------------------------------------------------------- /config/locales/models/observation_diary_record_note_student.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | observation_diary_record_note_student: 5 | student_id: "Aluno" -------------------------------------------------------------------------------- /config/locales/models/role_permission.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | role_permission: 5 | feature: "Funcionalidade" 6 | permission: "Permissão" 7 | -------------------------------------------------------------------------------- /db/migrate/20150902134925_remove_role_id_from_users.rb: -------------------------------------------------------------------------------- 1 | class RemoveRoleIdFromUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :users, :role_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200729122916_add_fullname_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddFullnameToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :fullname, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/avaliation_recovery_lowest_notes.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :avaliation_recovery_lowest_note do 3 | association :recovery_diary_record 4 | 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/factories/grades.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :grade do 3 | course 4 | 5 | sequence(:api_code, &:to_s) 6 | description { course.description } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/support/fixture_load.rb: -------------------------------------------------------------------------------- 1 | module FixtureLoad 2 | def json_file_fixture(file_path) 3 | JSON.parse(File.read(Rails.root.to_s + file_path), symbolize_names: true) 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/enumerations/child_educations.rb: -------------------------------------------------------------------------------- 1 | class ChildEducations < EnumerateIt::Base 2 | associate_values :nursery_1, 3 | :nursery_2, 4 | :preschool 5 | end 6 | -------------------------------------------------------------------------------- /app/enumerations/frequency_types.rb: -------------------------------------------------------------------------------- 1 | class FrequencyTypes < EnumerateIt::Base 2 | associate_values :general => "1", 3 | :by_discipline => "2" 4 | 5 | sort_by :none 6 | end 7 | -------------------------------------------------------------------------------- /app/policies/descriptive_exam_policy.rb: -------------------------------------------------------------------------------- 1 | class DescriptiveExamPolicy < ApplicationPolicy 2 | def new? 3 | index? 4 | end 5 | 6 | def edit? 7 | index? 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/policies/school_calendar_policy.rb: -------------------------------------------------------------------------------- 1 | class SchoolCalendarPolicy < ApplicationPolicy 2 | def edit? 3 | index? 4 | end 5 | 6 | def close? 7 | edit? 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/teaching_plans/_diciplines_modal.erb: -------------------------------------------------------------------------------- 1 | <%= render 'teaching_plans/copy_objectives', f: f, type: 'disciplines', modal_id: 'disciplines-modal', confirm_btn: 'disciplines-confirm-btn' %> 2 | -------------------------------------------------------------------------------- /config/locales/enumerations/batch_status.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | batch_status: 4 | started: "Em andamento" 5 | error: "Ocorreu erro" 6 | completed: "Finalizada" 7 | -------------------------------------------------------------------------------- /config/locales/enumerations/score_types.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | score_types: 4 | dont_use: "Não utiliza" 5 | numeric: "Nota numérica" 6 | concept: "Nota conceitual" -------------------------------------------------------------------------------- /config/locales/forms/discipline_content_record_cloner_form.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activemodel: 3 | attributes: 4 | discipline_content_record_cloner_form: 5 | classroom_ids: 'Turmas' 6 | -------------------------------------------------------------------------------- /config/locales/models/classroom.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | classroom: 5 | unity: "Escola" 6 | post_info: "Envia informações para o i-educar" 7 | -------------------------------------------------------------------------------- /config/locales/models/contents_lesson_plan.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | contents_lesson_plan: 5 | content_id: "Conteúdo" 6 | position: "Posição" 7 | -------------------------------------------------------------------------------- /config/webpack/staging.js: -------------------------------------------------------------------------------- 1 | process.env.NODE_ENV = process.env.NODE_ENV || 'staging' 2 | 3 | const environment = require('./environment') 4 | 5 | module.exports = environment.toWebpackConfig() 6 | -------------------------------------------------------------------------------- /config/webpack/test.js: -------------------------------------------------------------------------------- 1 | process.env.NODE_ENV = process.env.NODE_ENV || 'development' 2 | 3 | const environment = require('./environment') 4 | 5 | module.exports = environment.toWebpackConfig() 6 | -------------------------------------------------------------------------------- /db/migrate/20141208171838_add_actived_at_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddActivedAtToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :actived_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150219172429_remove_active_from_unities.rb: -------------------------------------------------------------------------------- 1 | class RemoveActiveFromUnities < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :unities, :active 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150930170517_add_opinion_to_contents.rb: -------------------------------------------------------------------------------- 1 | class AddOpinionToContents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :contents, :opinion, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/complementary_exam_students.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :complementary_exam_student do 3 | complementary_exam 4 | student 5 | 6 | score 1 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/factories/daily_notes.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :daily_note do 3 | association :avaliation, factory: [:avaliation, :with_teacher_discipline_classroom] 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/role_permissions.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :role_permission do 3 | association :role 4 | feature { 'roles' } 5 | permission { 'change' } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /spec/support/shoulda_matchers_helper.rb: -------------------------------------------------------------------------------- 1 | Shoulda::Matchers.configure do |config| 2 | config.integrate do |with| 3 | with.test_framework :rspec 4 | with.library :rails 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/assets/images/bg.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/controllers/courses_controller.rb: -------------------------------------------------------------------------------- 1 | class CoursesController < ApplicationController 2 | respond_to :json 3 | 4 | def index 5 | @courses = apply_scopes(Course).ordered 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/enumerations/infrequency_tracking_types.rb: -------------------------------------------------------------------------------- 1 | class InfrequencyTrackingTypes < EnumerateIt::Base 2 | associate_values :consecutive_absences, 3 | :alternating_absences 4 | end 5 | -------------------------------------------------------------------------------- /app/models/school_calendar_discipline_grade.rb: -------------------------------------------------------------------------------- 1 | class SchoolCalendarDisciplineGrade < ApplicationRecord 2 | belongs_to :school_calendar 3 | belongs_to :discipline 4 | belongs_to :grade 5 | end 6 | -------------------------------------------------------------------------------- /app/serializers/test_setting_serializer.rb: -------------------------------------------------------------------------------- 1 | class TestSettingSerializer < ActiveModel::Serializer 2 | attributes :id, :exam_setting_type, :average_calculation_type, :number_of_decimal_places 3 | end 4 | -------------------------------------------------------------------------------- /config/locales/controllers/absence_justifications.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | absence_justifications: 3 | edit: 4 | current_user_not_allowed: "O usuário atual não tem permissão para acessar esse cadastro" -------------------------------------------------------------------------------- /config/locales/forms/knowledge_area_lesson_plan_cloner_form.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activemodel: 3 | attributes: 4 | knowledge_area_lesson_plan_cloner_form: 5 | classroom_ids: 'Turmas' 6 | -------------------------------------------------------------------------------- /config/locales/models/contents_teaching_plan.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | contents_teaching_plan: 5 | content_id: "Conteúdo" 6 | position: "Posição" 7 | -------------------------------------------------------------------------------- /config/locales/models/objectives_lesson_plan.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | objectives_lesson_plan: 5 | objective_id: "Objetivo" 6 | position: "Posição" 7 | -------------------------------------------------------------------------------- /config/webpack/production.js: -------------------------------------------------------------------------------- 1 | process.env.NODE_ENV = process.env.NODE_ENV || 'production' 2 | 3 | const environment = require('./environment') 4 | 5 | module.exports = environment.toWebpackConfig() 6 | -------------------------------------------------------------------------------- /db/migrate/20141127135103_add_kind_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddKindToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :kind, :string, default: "employee" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150123175942_add_api_to_unities.rb: -------------------------------------------------------------------------------- 1 | class AddApiToUnities < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :unities, :api, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150425172349_rename_tests_to_avaliations.rb: -------------------------------------------------------------------------------- 1 | class RenameTestsToAvaliations < ActiveRecord::Migration[4.2] 2 | def change 3 | rename_table :tests, :avaliations 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160502184924_add_period_to_classrooms.rb: -------------------------------------------------------------------------------- 1 | class AddPeriodToClassrooms < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :classrooms, :period, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160628213935_remove_column_kind_from_role.rb: -------------------------------------------------------------------------------- 1 | class RemoveColumnKindFromRole < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :roles, :kind, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201123195351_remove_student_bioetrics_table.rb: -------------------------------------------------------------------------------- 1 | class RemoveStudentBioetricsTable < ActiveRecord::Migration[4.2] 2 | def change 3 | drop_table :student_biometrics 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | # 3 | # Ban all spiders from the entire site 4 | User-agent: * 5 | Disallow: / 6 | -------------------------------------------------------------------------------- /spec/factories/avaliation_exemptions.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :avaliation_exemption do 3 | avaliation 4 | student 5 | 6 | reason { Faker::Lorem.sentence } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/factories/conceptual_exam_values.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :conceptual_exam_value do 3 | discipline 4 | conceptual_exam 5 | 6 | value { rand(0..10) } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/factories/knowledge_areas.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :knowledge_area do 3 | sequence(:api_code, &:to_s) 4 | description { Faker::Lorem.unique.sentence } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/factories/school_calendar_discipline_grades.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :school_calendar_discipline_grade do 3 | school_calendar 4 | discipline 5 | grade 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /spec/factories/students.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :student do 3 | sequence(:api_code, &:to_s) 4 | name { Faker::Name.unique.name_with_middle } 5 | api true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/enumerations/exam_setting_types.rb: -------------------------------------------------------------------------------- 1 | class ExamSettingTypes < EnumerateIt::Base 2 | associate_values :general, 3 | :by_school_term, 4 | :general_by_school 5 | end 6 | -------------------------------------------------------------------------------- /app/models/absence_justifications_discipline.rb: -------------------------------------------------------------------------------- 1 | class AbsenceJustificationsDiscipline < ApplicationRecord 2 | audited 3 | 4 | belongs_to :discipline 5 | belongs_to :absence_justification 6 | end 7 | -------------------------------------------------------------------------------- /app/serializers/student_serializer.rb: -------------------------------------------------------------------------------- 1 | class StudentSerializer < ActiveModel::Serializer 2 | attributes :id, :name, :exempted_from_discipline 3 | 4 | def name 5 | object.to_s 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/serializers/user_role_serializer.rb: -------------------------------------------------------------------------------- 1 | class UserRoleSerializer < ActiveModel::Serializer 2 | attributes :id, :user_id, :role_id, :unity_id, :can_change_school_year? 3 | 4 | has_one :role 5 | end 6 | -------------------------------------------------------------------------------- /app/views/teachers/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@teachers) do |teacher| 2 | json.id teacher.id 3 | json.name teacher.name 4 | json.api_code teacher.api_code 5 | json.value teacher.name 6 | end 7 | -------------------------------------------------------------------------------- /app/views/teaching_plans/_experience_fields_modal.erb: -------------------------------------------------------------------------------- 1 | <%= render 'teaching_plans/copy_objectives', f: f, type: 'experience_fields', modal_id: 'experience-modal', confirm_btn: 'experience-confirm-btn' %> 2 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /config/locales/controllers/daily_frequencies.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | daily_frequencies: 3 | destroy_multiple: 4 | alert: 'Registro do diário de frequência que você está tentando apagar não existe.' 5 | -------------------------------------------------------------------------------- /config/locales/enumerations/api_posting_status.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | api_posting_status: 4 | started: "Em andamento" 5 | error: "Ocorreu erro" 6 | completed: "Finalizada" -------------------------------------------------------------------------------- /config/locales/forms/knowledge_area_content_record_cloner_form.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activemodel: 3 | attributes: 4 | knowledge_area_content_record_cloner_form: 5 | classroom_ids: 'Turmas' 6 | -------------------------------------------------------------------------------- /config/locales/models/objectives_teaching_plan.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | objectives_teaching_plan: 5 | objective_id: "Objetivo" 6 | position: "Posição" 7 | -------------------------------------------------------------------------------- /config/webpack/development.js: -------------------------------------------------------------------------------- 1 | process.env.NODE_ENV = process.env.NODE_ENV || 'development' 2 | 3 | const environment = require('./environment') 4 | 5 | module.exports = environment.toWebpackConfig() 6 | -------------------------------------------------------------------------------- /db/migrate/20141124161842_add_status_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddStatusToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :status, :string, default: 'actived' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170206165726_drop_index_deficiencies_on_name.rb: -------------------------------------------------------------------------------- 1 | class DropIndexDeficienciesOnName < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_index :deficiencies, "name" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20181227194500_add_social_name_to_student.rb: -------------------------------------------------------------------------------- 1 | class AddSocialNameToStudent < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :students, :social_name, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/unity_equipments.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :unity_equipment do 3 | unity 4 | 5 | sequence(:code, &:to_s) 6 | biometric_type BiometricTypes::SAGEM 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /vendor/assets/javascripts/smart_admin/app.js: -------------------------------------------------------------------------------- 1 | $('#hide-menu span a').on('click', function (e) { 2 | $.root_.toggleClass("hidden-menu"); 3 | $("html").toggleClass("hidden-menu-mobile-lock"); 4 | } ); 5 | -------------------------------------------------------------------------------- /app/assets/javascripts/absence_justification_report.js: -------------------------------------------------------------------------------- 1 | // Place all the behaviors and hooks related to the matching controller here. 2 | // All this logic will automatically be available in application.js. 3 | -------------------------------------------------------------------------------- /app/enumerations/affected_score_types.rb: -------------------------------------------------------------------------------- 1 | class AffectedScoreTypes < EnumerateIt::Base 2 | associate_values :step_average, 3 | :step_recovery_score, 4 | :both 5 | end 6 | -------------------------------------------------------------------------------- /app/enumerations/bncc_steps.rb: -------------------------------------------------------------------------------- 1 | class BnccSteps < EnumerateIt::Base 2 | associate_values :child_school, 3 | :elementary_school, 4 | :adult_and_youth_education 5 | end 6 | -------------------------------------------------------------------------------- /app/serializers/rounding_table_value_serializer.rb: -------------------------------------------------------------------------------- 1 | class RoundingTableValueSerializer < ActiveModel::Serializer 2 | attributes :id, :value, :to_s 3 | 4 | def to_s 5 | object.to_s 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/serializers/school_calendar_step_serializer.rb: -------------------------------------------------------------------------------- 1 | class SchoolCalendarStepSerializer < ActiveModel::Serializer 2 | attributes :id, :test_setting, :start_at, :end_at 3 | 4 | has_one :test_setting 5 | end 6 | -------------------------------------------------------------------------------- /app/serializers/student_enrollments_lists_serializer.rb: -------------------------------------------------------------------------------- 1 | class StudentEnrollmentsListsSerializer < ActiveModel::Serializer 2 | attributes :id, :student_id, :status, :active 3 | 4 | has_one :student 5 | end 6 | -------------------------------------------------------------------------------- /app/views/users/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :js do %> 2 | <%= javascript_include_tag 'views/users/edit' %> 3 | <% end %> 4 | 5 |
    6 | <%= render 'form' %> 7 |
    8 | -------------------------------------------------------------------------------- /config/locales/controllers/conceptual_exams.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | conceptual_exams: 3 | new: 4 | current_discipline_does_not_have_conceptual_exam: 'A disciplina selecionada não possui nota conceitual' 5 | -------------------------------------------------------------------------------- /config/locales/controllers/discipline_lesson_plans.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | discipline_lesson_plans: 3 | clone: 4 | messages: 5 | copy_succeed: 'Plano de aula por disciplina copiado com sucesso!' 6 | -------------------------------------------------------------------------------- /config/locales/enumerations/absence_justification_authors.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | absence_justification_authors: 4 | my_justifications: 'Minhas justificativas' 5 | others: 'Outras' 6 | -------------------------------------------------------------------------------- /db/migrate/20150730174411_add_disabled_to_entity.rb: -------------------------------------------------------------------------------- 1 | class AddDisabledToEntity < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :entities, :disabled, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20161226185743_remove_unity_id_from_avaliations.rb: -------------------------------------------------------------------------------- 1 | class RemoveUnityIdFromAvaliations < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :avaliations, :unity_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170822195022_add_sequence_to_disciplines.rb: -------------------------------------------------------------------------------- 1 | class AddSequenceToDisciplines < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :disciplines, :sequence, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190531131943_add_expiration_date_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddExpirationDateToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :expiration_date, :date 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200715192205_add_profile_picture_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddProfilePictureToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :profile_picture, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210202183742_add_opinion_to_teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class AddOpinionToTeachingPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :teaching_plans, :opinion, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210517195715_remove_grade_id_from_classrooms.rb: -------------------------------------------------------------------------------- 1 | class RemoveGradeIdFromClassrooms < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :classrooms, :grade_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/observation_diary_record_note_students.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :observation_diary_record_note_student do 3 | observation_diary_record_note 4 | student 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/models/role_permission_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe RolePermission, :type => :model do 4 | context "Associations" do 5 | it { should belong_to :role } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/decorators/content_record_decorator.rb: -------------------------------------------------------------------------------- 1 | class ContentRecordDecorator 2 | include Decore 3 | 4 | def author(current_teacher) 5 | PlanAuthorFetcher.new(component, current_teacher).author 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/decorators/teaching_plan_decorator.rb: -------------------------------------------------------------------------------- 1 | class TeachingPlanDecorator 2 | include Decore 3 | 4 | def author(current_teacher) 5 | PlanAuthorFetcher.new(component, current_teacher).author 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/enumerations/average_calculation_types.rb: -------------------------------------------------------------------------------- 1 | class AverageCalculationTypes < EnumerateIt::Base 2 | associate_values :arithmetic, 3 | :sum, 4 | :arithmetic_and_sum 5 | end 6 | -------------------------------------------------------------------------------- /app/enumerations/types_of_teaching.rb: -------------------------------------------------------------------------------- 1 | class TypesOfTeaching < EnumerateIt::Base 2 | associate_values presential: 1, 3 | hybrid: 2, 4 | remote: 3 5 | sort_by :none 6 | end 7 | -------------------------------------------------------------------------------- /app/serializers/complementary_exam_setting_serializer.rb: -------------------------------------------------------------------------------- 1 | class ComplementaryExamSettingSerializer < ActiveModel::Serializer 2 | attributes :id, :description, :number_of_decimal_places, :affected_score 3 | end 4 | -------------------------------------------------------------------------------- /app/serializers/daily_note_student_serializer.rb: -------------------------------------------------------------------------------- 1 | class DailyNoteStudentSerializer < ActiveModel::Serializer 2 | attributes :id, :note, :daily_note_id 3 | 4 | has_one :student 5 | has_one :avaliation 6 | end 7 | -------------------------------------------------------------------------------- /config/locales/controllers/final_recovery_diary_record.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | final_recovery_diary_records: 3 | new: 4 | not_exists_test_setting: 'Não existe configuração de avaliação numérica para essa escola' 5 | -------------------------------------------------------------------------------- /config/locales/enumerations/recovery_types.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | recovery_types: 4 | dont_use: 'Não utiliza' 5 | parallel: 'Recuperação paralela' 6 | specifc: 'Recuperação específica' -------------------------------------------------------------------------------- /config/locales/models/observation_diary_record_note.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | observation_diary_record_note: 5 | students: 'Alunos' 6 | description: 'Descrição' 7 | -------------------------------------------------------------------------------- /db/migrate/20150826114916_add_weight_to_avaliations.rb: -------------------------------------------------------------------------------- 1 | class AddWeightToAvaliations < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :avaliations, :weight, :decimal, null: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160628130530_add_column_access_level_to_roles.rb: -------------------------------------------------------------------------------- 1 | class AddColumnAccessLevelToRoles < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :roles, :access_level, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160704174226_add_current_unity_id_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddCurrentUnityIdToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :current_unity_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180523194200_add_pg_trgm_extension.rb: -------------------------------------------------------------------------------- 1 | class AddPgTrgmExtension < ActiveRecord::Migration[4.2] 2 | def change 3 | execute <<-SQL 4 | CREATE EXTENSION pg_trgm; 5 | SQL 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20180712131434_add_origin_to_content_records.rb: -------------------------------------------------------------------------------- 1 | class AddOriginToContentRecords < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :content_records, :origin, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180716203957_add_entity_id_to_worker_batch.rb: -------------------------------------------------------------------------------- 1 | class AddEntityIdToWorkerBatch < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :worker_batches, :entity_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190213203554_add_worker_batches_status_field.rb: -------------------------------------------------------------------------------- 1 | class AddWorkerBatchesStatusField < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :worker_batches, :status, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200918103403_add_label_color_to_classrooms.rb: -------------------------------------------------------------------------------- 1 | class AddLabelColorToClassrooms < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :classrooms, :label_color, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210202183744_add_validated_to_lesson_plans.rb: -------------------------------------------------------------------------------- 1 | class AddValidatedToLessonPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :lesson_plans, :validated, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220209133459_add_label_color_to_discipline.rb: -------------------------------------------------------------------------------- 1 | class AddLabelColorToDiscipline < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :disciplines, :label_color, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240801124518_add_max_students_to_classrooms.rb: -------------------------------------------------------------------------------- 1 | class AddMaxStudentsToClassrooms < ActiveRecord::Migration[5.0] 2 | def change 3 | add_column :classrooms, :max_students, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/user_roles.yml: -------------------------------------------------------------------------------- 1 | john_doe_user_role: 2 | user: john_doe 3 | role: admin 4 | unity: escola_y 5 | 6 | mary_jane_user_role: 7 | user: mary_jane 8 | role: admin 9 | unity: escola_y 10 | -------------------------------------------------------------------------------- /app/enumerations/rounded_avaliations.rb: -------------------------------------------------------------------------------- 1 | class RoundedAvaliations < EnumerateIt::Base 2 | associate_values :numerical_exam, 3 | :school_term_recovery, 4 | :final_recovery 5 | end 6 | -------------------------------------------------------------------------------- /app/presenters/base_presenter.rb: -------------------------------------------------------------------------------- 1 | class BasePresenter < SimpleDelegator 2 | def initialize(model, view) 3 | @view = view 4 | super(model) 5 | end 6 | 7 | def h 8 | @view 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/uploaders/asset_uploader.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | class AssetUploader < CarrierWave::Uploader::Base 3 | def store_dir 4 | "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/views/shared/_pagination.html.erb: -------------------------------------------------------------------------------- 1 | 4 | 5 |
    6 | <%= paginate records %> 7 |
    8 | -------------------------------------------------------------------------------- /db/migrate/20150916130321_add_observations_to_avaliations.rb: -------------------------------------------------------------------------------- 1 | class AddObservationsToAvaliations < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :avaliations, :observations, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20151006181836_rename_table_contents_to_lesson_plans.rb: -------------------------------------------------------------------------------- 1 | class RenameTableContentsToLessonPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | rename_table :contents, :lesson_plans 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160708171230_add_assumed_teacher_id_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddAssumedTeacherIdToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :assumed_teacher_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170822194904_add_sequence_to_knowledge_areas.rb: -------------------------------------------------------------------------------- 1 | class AddSequenceToKnowledgeAreas < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :knowledge_areas, :sequence, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20171116155121_add_current_school_year_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddCurrentSchoolYearToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :current_school_year, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180215125434_add_active_to_teachers.rb: -------------------------------------------------------------------------------- 1 | class AddActiveToTeachers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :teachers, :active, :boolean, default: true, null: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180605131807_add_timestamps_to_student_enrollments.rb: -------------------------------------------------------------------------------- 1 | class AddTimestampsToStudentEnrollments < ActiveRecord::Migration[4.2] 2 | def change 3 | add_timestamps(:student_enrollments) 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180711192414_add_origin_to_daily_frequencies.rb: -------------------------------------------------------------------------------- 1 | class AddOriginToDailyFrequencies < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :daily_frequencies, :origin, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180823114955_add_recorded_at_to_transfer_notes.rb: -------------------------------------------------------------------------------- 1 | class AddRecordedAtToTransferNotes < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :transfer_notes, :recorded_at, :date 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190607165916_add_migrate_to_entity.rb: -------------------------------------------------------------------------------- 1 | class AddMigrateToEntity < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :entities, :migrate, :boolean, null: false, default: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190701135013_drop_column_migrate_from_entities.rb: -------------------------------------------------------------------------------- 1 | class DropColumnMigrateFromEntities < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :entities, :migrate, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201201125937_add_can_post_to_classrooms.rb: -------------------------------------------------------------------------------- 1 | class AddCanPostToClassrooms < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :classrooms, :can_post, :boolean, default: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210202183743_add_validated_to_teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class AddValidatedToTeachingPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :teaching_plans, :validated, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210517195716_remove_exam_rule_id_from_classrooms.rb: -------------------------------------------------------------------------------- 1 | class RemoveExamRuleIdFromClassrooms < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :classrooms, :exam_rule_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210625172449_add_active_column_on_unities.rb: -------------------------------------------------------------------------------- 1 | class AddActiveColumnOnUnities < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :unities, :active, :boolean, default: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/knowledge_area_lesson_plan_knowledge_area.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :knowledge_area_lesson_plan_knowledge_area do 3 | knowledge_area_lesson_plan 4 | knowledge_area 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/enumerations/biometric_types.rb: -------------------------------------------------------------------------------- 1 | class BiometricTypes < EnumerateIt::Base 2 | associate_values :sagem => 1, 3 | :inttelix => 2, 4 | :suprema => 3 5 | 6 | sort_by :none 7 | end 8 | -------------------------------------------------------------------------------- /app/enumerations/content_record_report_types.rb: -------------------------------------------------------------------------------- 1 | class ContentRecordReportTypes < EnumerateIt::Base 2 | associate_values :lesson_plan => "1", 3 | :content_record => "2" 4 | 5 | sort_by :none 6 | end 7 | -------------------------------------------------------------------------------- /app/enumerations/recovery_types.rb: -------------------------------------------------------------------------------- 1 | class RecoveryTypes < EnumerateIt::Base 2 | associate_values :dont_use => 0, 3 | :parallel => 1, 4 | :specific => 2 5 | 6 | sort_by :none 7 | end 8 | -------------------------------------------------------------------------------- /app/models/student_unification_student.rb: -------------------------------------------------------------------------------- 1 | class StudentUnificationStudent < ActiveRecord::Base 2 | audited associated_with: :student_unification 3 | 4 | belongs_to :student_unification 5 | belongs_to :student 6 | end 7 | -------------------------------------------------------------------------------- /app/models/teacher_unification_teacher.rb: -------------------------------------------------------------------------------- 1 | class TeacherUnificationTeacher < ActiveRecord::Base 2 | audited associated_with: :teacher_unification 3 | 4 | belongs_to :teacher_unification 5 | belongs_to :teacher 6 | end 7 | -------------------------------------------------------------------------------- /app/serializers/student_in_final_recovery_serializer.rb: -------------------------------------------------------------------------------- 1 | class StudentInFinalRecoverySerializer < StudentSerializer 2 | attributes :needed_score 3 | 4 | def needed_score 5 | object.needed_score 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/views/lessons_boards/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :js do %> 2 | <%= javascript_include_tag 'views/lessons_boards/new' %> 3 | <% end %> 4 | 5 |
    6 | <%= render 'form' %> 7 |
    8 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | # Set up gems listed in the Gemfile. 2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 3 | 4 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) 5 | require 'bootsnap/setup' 6 | -------------------------------------------------------------------------------- /config/initializers/non_digest_assets.rb: -------------------------------------------------------------------------------- 1 | NonStupidDigestAssets.whitelist += %w( 2 | profile-default.jpg 3 | favicon.ico 4 | select2-spinner.gif 5 | 500.html 6 | 422.html 7 | 404.html 8 | bg.svg 9 | ) 10 | -------------------------------------------------------------------------------- /config/locales/controllers/knowledge_area_lesson_plans.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | knowledge_area_lesson_plans: 3 | clone: 4 | messages: 5 | copy_succeed: 'Plano de aula por áreas de conhecimento copiado com sucesso!' 6 | -------------------------------------------------------------------------------- /config/locales/enumerations/infrequency_tracking_types.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | infrequency_tracking_types: 4 | consecutive_absences: Faltas consecutivas 5 | alternating_absences: Faltas alternadas 6 | -------------------------------------------------------------------------------- /config/locales/models/profile.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | profile: 5 | role: "Função" 6 | manage_users: "Gerenciar usuários" 7 | manage_profiles: "Gerenciar perfis" 8 | -------------------------------------------------------------------------------- /config/locales/workers/maintenance_adjustment_worker.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | maintenance_adjustment_worker: 3 | title: 'Ajustes realizados com sucesso' 4 | description: 'Os ajustes solicitados foram realizados com sucesso.' 5 | -------------------------------------------------------------------------------- /db/migrate/20160701200354_add_current_classroom_id_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddCurrentClassroomIdToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :current_classroom_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160926122548_add_status_to_student_enrollments.rb: -------------------------------------------------------------------------------- 1 | class AddStatusToStudentEnrollments < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :student_enrollments, :status, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170529164343_remove_unity_id_from_lesson_plans.rb: -------------------------------------------------------------------------------- 1 | class RemoveUnityIdFromLessonPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :lesson_plans, :unity_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20171124111709_create_unaccent_extension.rb: -------------------------------------------------------------------------------- 1 | class CreateUnaccentExtension < ActiveRecord::Migration[4.2] 2 | def change 3 | execute <<-SQL 4 | CREATE EXTENSION unaccent; 5 | SQL 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20181212115632_add_post_info_to_classrooms.rb: -------------------------------------------------------------------------------- 1 | class AddPostInfoToClassrooms < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :classrooms, :post_info, :boolean, default: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200409164654_add_teacher_id_idx_to_teacher_profiles.rb: -------------------------------------------------------------------------------- 1 | class AddTeacherIdIdxToTeacherProfiles < ActiveRecord::Migration[4.2] 2 | def change 3 | add_index :teacher_profiles, :teacher_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200427121113_remove_objectives_from_lesson_plan.rb: -------------------------------------------------------------------------------- 1 | class RemoveObjectivesFromLessonPlan < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :lesson_plans, :objectives, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201116170617_revmove_school_term_from_test_settings.rb: -------------------------------------------------------------------------------- 1 | class RevmoveSchoolTermFromTestSettings < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :test_settings, :school_term 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/daily_frequency_students.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :daily_frequency_student do 3 | daily_frequency 4 | student 5 | 6 | present true 7 | active true 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /spec/factories/observation_diary_record_notes.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :observation_diary_record_note do 3 | observation_diary_record 4 | 5 | description { Faker::Lorem.sentence } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /spec/fixtures/ieducar_api_configurations.yml: -------------------------------------------------------------------------------- 1 | api_configuration: 2 | url: "http://test.ieducar.com.br" 3 | token: "8IOwGIjiHvbeTklgwo10yVLgwDhhvs" 4 | secret_token: "5y8cfq31oGvFdAlGMCLIeSKdfc8pUC" 5 | unity_code: "1" 6 | -------------------------------------------------------------------------------- /app/models/specific_step.rb: -------------------------------------------------------------------------------- 1 | class SpecificStep < ApplicationRecord 2 | include Discardable 3 | 4 | audited 5 | 6 | belongs_to :classroom 7 | belongs_to :discipline 8 | 9 | default_scope -> { kept } 10 | end 11 | -------------------------------------------------------------------------------- /app/uploaders/backup_file_uploader.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | class BackupFileUploader < CarrierWave::Uploader::Base 3 | def store_dir 4 | "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/views/lessons_boards/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :js do %> 2 | <%= javascript_include_tag 'views/lessons_boards/edit' %> 3 | <% end %> 4 | 5 |
    6 | <%= render 'form' %> 7 |
    8 | -------------------------------------------------------------------------------- /config/locales/enumerations/api_synchronization_status.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | api_synchronization_status: 4 | started: "Em andamento" 5 | error: "Finalizadas com erro" 6 | completed: "Finalizada" 7 | -------------------------------------------------------------------------------- /config/locales/enumerations/exam_setting_types.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | exam_setting_types: 4 | general: "Geral" 5 | by_school_term: "Por período escolar" 6 | general_by_school: 'Geral por escola' 7 | -------------------------------------------------------------------------------- /config/locales/models/ieducar_api_exam_postings.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | models: 4 | ieducar_api_exam_posting: 5 | one: "Postagem de exames do i-educar" 6 | other: "Postagens de exames do i-educar" -------------------------------------------------------------------------------- /db/migrate/20160502121735_add_action_to_rounding_table_values.rb: -------------------------------------------------------------------------------- 1 | class AddActionToRoundingTableValues < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :rounding_table_values, :action, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160701202347_add_current_discipline_id_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddCurrentDisciplineIdToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :current_discipline_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170104171935_remove_fix_tests_from_test_settings.rb: -------------------------------------------------------------------------------- 1 | class RemoveFixTestsFromTestSettings < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :test_settings, :fix_tests, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180827183730_add_recorded_at_to_descriptive_exams.rb: -------------------------------------------------------------------------------- 1 | class AddRecordedAtToDescriptiveExams < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :descriptive_exams, :recorded_at, :date 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190205114323_add_field_period_to_daily_frequencies.rb: -------------------------------------------------------------------------------- 1 | class AddFieldPeriodToDailyFrequencies < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :daily_frequencies, :period, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190221145058_add_job_index_to_worker_batches.rb: -------------------------------------------------------------------------------- 1 | class AddJobIndexToWorkerBatches < ActiveRecord::Migration[4.2] 2 | def change 3 | add_index :worker_batches, [:main_job_class, :main_job_id] 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190603193730_change_default_value_for_user_status.rb: -------------------------------------------------------------------------------- 1 | class ChangeDefaultValueForUserStatus < ActiveRecord::Migration[4.2] 2 | def change 3 | change_column_default(:users, :status, 'active') 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190916183746_add_discarded_at_to_transfer_notes.rb: -------------------------------------------------------------------------------- 1 | class AddDiscardedAtToTransferNotes < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :transfer_notes, :discarded_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200416131157_add_disabled_sync_to_entities.rb: -------------------------------------------------------------------------------- 1 | class AddDisabledSyncToEntities < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :entities, :disabled_sync, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200424132307_remove_objectives_from_teaching_plan.rb: -------------------------------------------------------------------------------- 1 | class RemoveObjectivesFromTeachingPlan < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :teaching_plans, :objectives, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201117122218_remove_school_term_from_teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class RemoveSchoolTermFromTeachingPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :teaching_plans, :school_term 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20211123131017_change_index_unities.rb: -------------------------------------------------------------------------------- 1 | class ChangeIndexUnities < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_index :unities, :name 4 | add_index :unities, :name, unique: false 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20220117195519_remove_classroom_id_from_lessons_board.rb: -------------------------------------------------------------------------------- 1 | class RemoveClassroomIdFromLessonsBoard < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :lessons_boards, :classroom_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20221122204036_add_apicode_to_student_unification.rb: -------------------------------------------------------------------------------- 1 | class AddApicodeToStudentUnification < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :student_unifications, :api_code, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/custom_rounding_table_values.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :custom_rounding_table_value do 3 | custom_rounding_table 4 | 5 | label { '0' } 6 | action { 0 } 7 | 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /spec/fixtures/roles.yml: -------------------------------------------------------------------------------- 1 | admin: 2 | name: "Administrador" 3 | access_level: "administrator" 4 | author: john_doe 5 | 6 | secretary: 7 | name: "Secretária" 8 | access_level: "teacher" 9 | author: john_doe 10 | -------------------------------------------------------------------------------- /app/models/null_daily_frequency_student.rb: -------------------------------------------------------------------------------- 1 | class NullDailyFrequencyStudent 2 | def dependence? 3 | false 4 | end 5 | 6 | def present 7 | true 8 | end 9 | 10 | def to_s 11 | 'N' 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/views/students/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@students) do |student| 2 | json.id student.id 3 | json.name student.name 4 | json.api_code student.api_code 5 | json.api student.api? 6 | json.value student.name 7 | end 8 | -------------------------------------------------------------------------------- /config/locales/enumerations/profile_roles.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | profile_roles: 4 | admin: "Administradores" 5 | parent: "Pais ou responsáveis" 6 | servant: "Servidores" 7 | student: "Alunos" 8 | -------------------------------------------------------------------------------- /config/locales/models/recovery_diary_record_student.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | recovery_diary_record_student: 5 | student: "Aluno" 6 | student_id: "Aluno" 7 | score: "Nota" 8 | -------------------------------------------------------------------------------- /config/locales/reports/base_report.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | reports: 3 | base_report: 4 | date_and_time: 'Data e hora: %{date_time}' 5 | date_time_format: '%d/%m/%Y %H:%M' 6 | number_pages: 'Página de ' 7 | -------------------------------------------------------------------------------- /config/sidekiq.yml: -------------------------------------------------------------------------------- 1 | --- 2 | :concurrency: 5 3 | staging: 4 | :concurrency: 10 5 | production: 6 | :concurrency: 50 7 | :queues: 8 | - [default, 1] 9 | - [low, 1] 10 | - [exam_posting, 2] 11 | - [synchronizer, 1] 12 | -------------------------------------------------------------------------------- /db/migrate/20150910143723_remove_test_type_from_test_setting_tests.rb: -------------------------------------------------------------------------------- 1 | class RemoveTestTypeFromTestSettingTests < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :test_setting_tests, :test_type 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180510181850_change_column_unity_equipments_code_type.rb: -------------------------------------------------------------------------------- 1 | class ChangeColumnUnityEquipmentsCodeType < ActiveRecord::Migration[4.2] 2 | def change 3 | change_column :unity_equipments, :code, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20181120180028_add_field_period_to_student_enrollments.rb: -------------------------------------------------------------------------------- 1 | class AddFieldPeriodToStudentEnrollments < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :student_enrollments, :period, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190903173050_add_user_id_to_absence_justifications.rb: -------------------------------------------------------------------------------- 1 | class AddUserIdToAbsenceJustifications < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :absence_justifications, :user_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201021125854_add_unities_to_test_settings.rb: -------------------------------------------------------------------------------- 1 | class AddUnitiesToTestSettings < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :test_settings, :unities, :integer, array: true, default: [] 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201021125904_add_grades_to_test_settings.rb: -------------------------------------------------------------------------------- 1 | class AddGradesToTestSettings < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :test_settings, :grades, :integer, array: true, default: [] 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210618262959_add_last_activity_at_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddLastActivityAtToUser < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :last_activity_at, :datetime, default: Date.current 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220222152831_add_discarded_at_to_classrooms_grade.rb: -------------------------------------------------------------------------------- 1 | class AddDiscardedAtToClassroomsGrade < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :classrooms_grades, :discarded_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220613181019_add_index_on_daily_frequency_student.rb: -------------------------------------------------------------------------------- 1 | class AddIndexOnDailyFrequencyStudent < ActiveRecord::Migration[4.2] 2 | def change 3 | add_index :daily_frequency_students, :daily_frequency_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230404170127_define_justification_as_null.rb: -------------------------------------------------------------------------------- 1 | class DefineJustificationAsNull < ActiveRecord::Migration 2 | def change 3 | change_column :absence_justifications, :justification, :text, null: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230607190758_add_period_to_absence_justifications.rb: -------------------------------------------------------------------------------- 1 | class AddPeriodToAbsenceJustifications < ActiveRecord::Migration[5.0] 2 | def change 3 | add_column :absence_justifications, :period, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/entity.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :entity do 3 | name 'Prefeitura' 4 | domain '127.0.0.1' 5 | config do 6 | { config: { database: 'idiario_test' } } 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /spec/factories/system_notification_targets.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :system_notification_target do 3 | association :system_notification 4 | association :user 5 | read false 6 | read_at nil 7 | end 8 | end -------------------------------------------------------------------------------- /spec/factories/test_setting_tests.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :test_setting_test do 3 | test_setting 4 | 5 | description { Faker::Lorem.sentence } 6 | weight { test_setting.maximum_score } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/assets/javascripts/templates/parent_dashboard/partial_scores_tbody.jst.ejs: -------------------------------------------------------------------------------- 1 | 2 | <%= discipline %> 3 | <%= date %> 4 | <%= avaliation %> 5 | <%= weight %> 6 | <%= score %> 7 | -------------------------------------------------------------------------------- /app/enumerations/calculation_types.rb: -------------------------------------------------------------------------------- 1 | class CalculationTypes < EnumerateIt::Base 2 | associate_values :substitution, 3 | :sum, 4 | :substitution_if_greater, 5 | :integral 6 | end 7 | -------------------------------------------------------------------------------- /app/enumerations/rounding_table_action.rb: -------------------------------------------------------------------------------- 1 | class RoundingTableAction < EnumerateIt::Base 2 | associate_values( 3 | none: 0, 4 | below: 1, 5 | above: 2, 6 | specific: 3 7 | ) 8 | 9 | sort_by :value 10 | end 11 | -------------------------------------------------------------------------------- /app/models/active_search_frequency_student.rb: -------------------------------------------------------------------------------- 1 | class ActiveSearchFrequencyStudent 2 | def dependence? 3 | false 4 | end 5 | 6 | def present 7 | true 8 | end 9 | 10 | def to_s 11 | 'B' 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/models/exempted_daily_frequency_student.rb: -------------------------------------------------------------------------------- 1 | class ExemptedDailyFrequencyStudent 2 | def dependence? 3 | false 4 | end 5 | 6 | def present 7 | true 8 | end 9 | 10 | def to_s 11 | 'D' 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/models/student_unification.rb: -------------------------------------------------------------------------------- 1 | class StudentUnification < ApplicationRecord 2 | audited 3 | 4 | belongs_to :student 5 | has_many :unified_students, class_name: 'StudentUnificationStudent', dependent: :restrict_with_error 6 | end 7 | -------------------------------------------------------------------------------- /app/models/teacher_unification.rb: -------------------------------------------------------------------------------- 1 | class TeacherUnification < ActiveRecord::Base 2 | audited 3 | 4 | belongs_to :teacher 5 | has_many :unified_teachers, class_name: 'TeacherUnificationTeacher', dependent: :restrict_with_error 6 | end 7 | -------------------------------------------------------------------------------- /app/services/backup_file/grades.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class Grades < Base 3 | def filename 4 | "series.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | Grade 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/views/schools/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@unities) do |unity| 2 | json.id unity.id 3 | json.name unity.name 4 | json.address unity.address.to_s 5 | json.responsible unity.responsible 6 | json.phone unity.phone 7 | end 8 | -------------------------------------------------------------------------------- /config/locales/enumerations/affected_score_types.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | affected_score_types: 4 | step_average: "Média da etapa" 5 | step_recovery_score: "Nota de recuperação da etapa" 6 | both: "Ambas" 7 | -------------------------------------------------------------------------------- /config/locales/enumerations/average_calculation_types.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | average_calculation_types: 4 | arithmetic: "Aritmética" 5 | sum: "Somatório" 6 | arithmetic_and_sum: "Somatório e aritmética" 7 | -------------------------------------------------------------------------------- /config/locales/enumerations/event_coverage_type.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | event_coverage_type: 4 | by_unity: "Da escola" 5 | by_grade: "Da série" 6 | by_classroom: "Da turma" 7 | by_course: "Do curso" 8 | -------------------------------------------------------------------------------- /db/migrate/20150909164152_add_unique_index_to_school_calendars.rb: -------------------------------------------------------------------------------- 1 | class AddUniqueIndexToSchoolCalendars < ActiveRecord::Migration[4.2] 2 | def change 3 | add_index :school_calendars, [:year, :unity_id], unique: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160927211512_add_column_active_to_student_enrollments.rb: -------------------------------------------------------------------------------- 1 | class AddColumnActiveToStudentEnrollments < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :student_enrollments, :active, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20161123121329_add_column_active_to_daily_note_students.rb: -------------------------------------------------------------------------------- 1 | class AddColumnActiveToDailyNoteStudents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :daily_note_students, :active, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190426134607_remove_column_entity_id_from_worker_batch.rb: -------------------------------------------------------------------------------- 1 | class RemoveColumnEntityIdFromWorkerBatch < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :worker_batches, :entity_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190916183653_add_discarded_at_to_student_biometrics.rb: -------------------------------------------------------------------------------- 1 | class AddDiscardedAtToStudentBiometrics < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :student_biometrics, :discarded_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200401140046_drop_column_error_message_from_worker_states.rb: -------------------------------------------------------------------------------- 1 | class DropColumnErrorMessageFromWorkerStates < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :worker_states, :error_message 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201117122209_remove_school_term_type_from_teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class RemoveSchoolTermTypeFromTeachingPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :teaching_plans, :school_term_type 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201117203525_add_unique_index_on_school_term_types.rb: -------------------------------------------------------------------------------- 1 | class AddUniqueIndexOnSchoolTermTypes < ActiveRecord::Migration[4.2] 2 | def change 3 | add_index :school_term_types, :description, unique: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/school_calendar_steps.yml: -------------------------------------------------------------------------------- 1 | school_calendar_step_a: 2 | school_calendar: school_calendar_a 3 | start_at: '2015-01-01' 4 | end_at: '2015-03-01' 5 | start_date_for_posting: '2015-02-20' 6 | end_date_for_posting: '2015-03-01' -------------------------------------------------------------------------------- /spec/forms/current_role_form_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe CurrentRoleForm, type: :model do 4 | describe 'validations' do 5 | it { expect(subject).to validate_presence_of(:current_user) } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/helpers/content_record_helper.rb: -------------------------------------------------------------------------------- 1 | module ContentRecordHelper 2 | def content_record_destroy?(content_record) 3 | content_record.teacher.id == current_teacher.try(:id) || current_user.current_role_is_admin_or_employee? 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/models/daily_note_status.rb: -------------------------------------------------------------------------------- 1 | class DailyNoteStatus < ActiveRecord::Base 2 | belongs_to :daily_note 3 | 4 | scope :by_status, lambda { |status| where(status: status) } 5 | 6 | def readonly? 7 | true 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/models/grouped_discipline.rb: -------------------------------------------------------------------------------- 1 | class GroupedDiscipline < ApplicationRecord 2 | scope :by_teacher_unity_and_year, lambda { |teacher_id, unity_id, year| 3 | where(teacher_id: teacher_id, unity_id: unity_id, year: year) 4 | } 5 | end 6 | -------------------------------------------------------------------------------- /app/services/backup_file/courses.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class Courses < Base 3 | def filename 4 | "cursos.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | Course 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/roles.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class Roles < Base 3 | def filename 4 | "permissoes.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | Role 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/unities.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class Unities < Base 3 | def filename 4 | "unidades.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | Unity 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/uploaders/report_uploader.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | class ReportUploader < CarrierWave::Uploader::Base 3 | def store_dir 4 | "uploads/entity-#{model.entity_id}/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /config/locales/enumerations/translation_groups.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | translation_groups: 4 | teaching_plans: "Planos de ensino" 5 | lesson_plans: "Planos de aula" 6 | content_records: "Registros de conteúdos" 7 | -------------------------------------------------------------------------------- /config/locales/forms/copy_discipline_teaching_plan_form.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activemodel: 3 | attributes: 4 | copy_discipline_teaching_plan_form: 5 | year: "Ano" 6 | unities_ids: "Escolas" 7 | grades_ids: "Séries" 8 | -------------------------------------------------------------------------------- /config/locales/views/descriptive_exams.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | descriptive_exams: 3 | edit: 4 | dependence_students: '* Alunos cursando dependência' 5 | exempted_students_from_discipline_legend: '**** Alunos dispensados da disciplina' 6 | -------------------------------------------------------------------------------- /config/locales/views/form.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | views: 3 | form: 4 | back: "Voltar" 5 | history: "Histórico" 6 | save: "Salvar" 7 | copy: "Copiar" 8 | required: "obrigatório" 9 | adjust: "Ajustar" 10 | -------------------------------------------------------------------------------- /db/migrate/20150904164258_add_unity_id_to_school_calendars.rb: -------------------------------------------------------------------------------- 1 | class AddUnityIdToSchoolCalendars < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference(:school_calendars, :unity, index: true, foreign_key: true) 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160324123145_remove_global_absence_from_daily_frequencies.rb: -------------------------------------------------------------------------------- 1 | class RemoveGlobalAbsenceFromDailyFrequencies < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :daily_frequencies, :global_absence 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160419143146_remove_author_id_from_absence_justifications.rb: -------------------------------------------------------------------------------- 1 | class RemoveAuthorIdFromAbsenceJustifications < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :absence_justifications, :author_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160502191454_add_legend_to_school_calendar_events.rb: -------------------------------------------------------------------------------- 1 | class AddLegendToSchoolCalendarEvents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :school_calendar_events, :legend, :string, limit: 1 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160530183440_add_teacher_id_to_teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class AddTeacherIdToTeachingPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :teaching_plans, :teacher, index: true, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180308131952_add_ieducar_updated_at_to_specific_steps.rb: -------------------------------------------------------------------------------- 1 | class AddIeducarUpdatedAtToSpecificSteps < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :specific_steps, :ieducar_updated_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180326212923_add_sequence_to_daily_frequency_students.rb: -------------------------------------------------------------------------------- 1 | class AddSequenceToDailyFrequencyStudents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :daily_frequency_students, :sequence, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180524134431_add_active_to_school_calendar_steps.rb: -------------------------------------------------------------------------------- 1 | class AddActiveToSchoolCalendarSteps < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :school_calendar_steps, :active, :boolean, default: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180629182126_add_stateable_to_worker_batches.rb: -------------------------------------------------------------------------------- 1 | class AddStateableToWorkerBatches < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :worker_batches, :stateable, polymorphic: true, index: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180912193345_remove_active_from_school_calendar_steps.rb: -------------------------------------------------------------------------------- 1 | class RemoveActiveFromSchoolCalendarSteps < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :school_calendar_steps, :active, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20181005142236_drop_daily_frequencies_unique_idx.rb: -------------------------------------------------------------------------------- 1 | class DropDailyFrequenciesUniqueIdx < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_index :daily_frequencies, name: 'daily_frequencies_unique_idx' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20181101181702_add_support_url_to_general_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddSupportUrlToGeneralConfiguration < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :general_configurations, :support_url, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190320203604_add_unique_index_to_user_login.rb: -------------------------------------------------------------------------------- 1 | class AddUniqueIndexToUserLogin < ActiveRecord::Migration[4.2] 2 | def change 3 | add_index :users, :login, unique: true, where: "COALESCE(login, '') <> ''" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190917185758_add_discarded_at_to_daily_note_students.rb: -------------------------------------------------------------------------------- 1 | class AddDiscardedAtToDailyNoteStudents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :daily_note_students, :discarded_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20191011163831_add_year_to_complementary_exam_settings.rb: -------------------------------------------------------------------------------- 1 | class AddYearToComplementaryExamSettings < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :complementary_exam_settings, :year, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200917170802_drop_table_teacher_profiles.rb: -------------------------------------------------------------------------------- 1 | class DropTableTeacherProfiles < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :users, :teacher_profile_id 4 | drop_table :teacher_profiles 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20200924131011_add_index_knowledge_areas_on_group_descriptors.rb: -------------------------------------------------------------------------------- 1 | class AddIndexKnowledgeAreasOnGroupDescriptors < ActiveRecord::Migration[4.2] 2 | def change 3 | add_index :knowledge_areas, :group_descriptors 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210622265303_add_last_password_change_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddLastPasswordChangeToUser < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :last_password_change, :datetime, default: Date.current 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220117194929_add_classrooms_grade_id_to_lessons_board.rb: -------------------------------------------------------------------------------- 1 | class AddClassroomsGradeIdToLessonsBoard < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :lessons_boards, :classrooms_grade_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220427180521_add_index_to_created_at_on_system_notifications.rb: -------------------------------------------------------------------------------- 1 | class AddIndexToCreatedAtOnSystemNotifications < ActiveRecord::Migration[4.2] 2 | def change 3 | add_index :system_notifications, :created_at 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230524182349_create_grouped_teacher_discipline_classrooms.rb: -------------------------------------------------------------------------------- 1 | class CreateGroupedTeacherDisciplineClassrooms < ActiveRecord::Migration 2 | def change 3 | create_view :grouped_teacher_discipline_classrooms 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20250226130039_add_curriculum_adaptation_to_lesson_plans.rb: -------------------------------------------------------------------------------- 1 | class AddCurriculumAdaptationToLessonPlans < ActiveRecord::Migration[5.0] 2 | def change 3 | add_column :lesson_plans, :curriculum_adaptation, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/deficiencies.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :deficiency do 3 | sequence(:api_code, &:to_s) 4 | name { Faker::Name.unique.name_with_middle } 5 | disconsider_differentiated_exam_rule { true } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/enumerations/parallel_exams_calculation_types.rb: -------------------------------------------------------------------------------- 1 | class ParallelExamsCalculationTypes < EnumerateIt::Base 2 | associate_values substitution: 1, 3 | average: 2, 4 | sum: 3 5 | 6 | sort_by :none 7 | end 8 | -------------------------------------------------------------------------------- /app/enumerations/student_enrollment_score_type_filters.rb: -------------------------------------------------------------------------------- 1 | class StudentEnrollmentScoreTypeFilters < EnumerateIt::Base 2 | associate_values :numeric, 3 | :concept, 4 | :both 5 | 6 | sort_by :none 7 | end 8 | -------------------------------------------------------------------------------- /app/models/lesson_plan_attachment.rb: -------------------------------------------------------------------------------- 1 | class LessonPlanAttachment < ApplicationRecord 2 | audited 3 | 4 | belongs_to :lesson_plan 5 | 6 | mount_uploader :attachment, DocUploader 7 | 8 | delegate :filename, to: :attachment 9 | end 10 | -------------------------------------------------------------------------------- /app/services/backup_file/contents.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class Contents < Base 3 | def filename 4 | "conteudos.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | Content 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/profiles.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class Profiles < Base 3 | def filename 4 | "perfis.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | Profile 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/students.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class Students < Base 3 | def filename 4 | "alunos.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | Student 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /config/locales/enumerations/periods.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | periods: 4 | matutinal: "Matutino" 5 | vespertine: "Vespertino" 6 | nightly: "Noturno" 7 | full: "Integral" 8 | intermediate: "Intermediário" 9 | -------------------------------------------------------------------------------- /config/locales/models/signup.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activemodel: 3 | errors: 4 | models: 5 | signup: 6 | attributes: 7 | base: 8 | must_inform_email_or_document: 'Necessário informar e-mail ou CPF' 9 | -------------------------------------------------------------------------------- /config/locales/views/general_configurations.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | general_configurations: 3 | edit: 4 | infrequency_tracking_configurations: Configurações de notificação de faltas 5 | profile_configurations: Configuração do menu de perfil 6 | -------------------------------------------------------------------------------- /db/migrate/20150717131223_change_column_description_on_disciplines.rb: -------------------------------------------------------------------------------- 1 | class ChangeColumnDescriptionOnDisciplines < ActiveRecord::Migration[4.2] 2 | def change 3 | change_column :disciplines, :description, :string, limit: 500 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20161005183719_remove_column_dependence_on_student_enrollment.rb: -------------------------------------------------------------------------------- 1 | class RemoveColumnDependenceOnStudentEnrollment < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :student_enrollments, :dependence 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180115191334_add_generic_to_system_notifications.rb: -------------------------------------------------------------------------------- 1 | class AddGenericToSystemNotifications < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :system_notifications, :generic, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180306130909_add_job_id_to_ieducar_api_synchronization.rb: -------------------------------------------------------------------------------- 1 | class AddJobIdToIeducarApiSynchronization < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :ieducar_api_synchronizations, :job_id, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190118175356_add_step_number_to_transfer_note.rb: -------------------------------------------------------------------------------- 1 | class AddStepNumberToTransferNote < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :transfer_notes, :step_number, :integer, null: false, default: 0 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190131194356_remove_column_period_from_student_enrollments.rb: -------------------------------------------------------------------------------- 1 | class RemoveColumnPeriodFromStudentEnrollments < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :student_enrollments, :period, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190328211729_drop_ieducar_updated_at_to_specific_steps.rb: -------------------------------------------------------------------------------- 1 | class DropIeducarUpdatedAtToSpecificSteps < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :specific_steps, :ieducar_updated_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20191209132619_add_foreign_key_current_unity_id_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddForeignKeyCurrentUnityIdToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_foreign_key :users, :unities, column: :current_unity_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20191209132635_add_foreign_assumed_teacher_id_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddForeignAssumedTeacherIdToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_foreign_key :users, :teachers, column: :assumed_teacher_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200811142059_add_position_to_contents_lesson_plans.rb: -------------------------------------------------------------------------------- 1 | class AddPositionToContentsLessonPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :contents_lesson_plans, :position, :integer, null: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200811142802_populate_position_to_contents_lesson_plans.rb: -------------------------------------------------------------------------------- 1 | class PopulatePositionToContentsLessonPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | execute 'UPDATE contents_lesson_plans SET position = id' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201120143032_add_discarded_at_to_school_term_type_step.rb: -------------------------------------------------------------------------------- 1 | class AddDiscardedAtToSchoolTermTypeStep < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :school_term_type_steps, :discarded_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/addresses.yml: -------------------------------------------------------------------------------- 1 | rua_goiania: 2 | source: escola_y (Unity) 3 | zip_code: "32672-124" 4 | street: "Rua Goiania" 5 | number: "54" 6 | neighborhood: "Centro" 7 | city: "Betim" 8 | state: "mg" 9 | country: "Brasil" 10 | -------------------------------------------------------------------------------- /spec/fixtures/test_setting_tests.yml: -------------------------------------------------------------------------------- 1 | test_setting_test_a: 2 | test_setting: test_setting_a 3 | description: 'Avaliação 1' 4 | weight: 5 5 | test_setting_test_b: 6 | test_setting: test_setting_b 7 | description: 'Avaliação 2' 8 | weight: 5 -------------------------------------------------------------------------------- /app/assets/stylesheets/resources/conceptual_exams.css: -------------------------------------------------------------------------------- 1 | table.table-condensed.table-bordered > tbody > tr > td.knowledge-area-table-data { 2 | padding-top: 10px !important; 3 | padding-bottom: 10px !important; 4 | background-color: #f9f9f9; 5 | } 6 | -------------------------------------------------------------------------------- /app/models/absence_justification_attachment.rb: -------------------------------------------------------------------------------- 1 | class AbsenceJustificationAttachment < ActiveRecord::Base 2 | belongs_to :absence_justification 3 | 4 | mount_uploader :attachment, DocUploader 5 | 6 | delegate :filename, to: :attachment 7 | end 8 | -------------------------------------------------------------------------------- /app/models/concerns/searchable.rb: -------------------------------------------------------------------------------- 1 | module Searchable 2 | extend ActiveSupport::Concern 3 | 4 | included do 5 | def self.split_search(input) 6 | input.split.map { |w| "\"#{w}\"" }.join(':* & ') << ':*' 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/services/backup_file/addresses.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class Addresses < Base 3 | def filename 4 | "enderecos.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | Address 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/classrooms.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class Classrooms < Base 3 | def filename 4 | "turmas.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | Classroom 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/teachers.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class Teachers < Base 3 | def filename 4 | "professores.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | Teacher 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/views/api/v2/teacher_classrooms/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | json.array!(@classrooms) do |classroom| 2 | json.id classroom.id 3 | json.description classroom.description 4 | json.grade_id classroom.grade_ids.first 5 | json.year classroom.year 6 | end 7 | -------------------------------------------------------------------------------- /app/views/conceptual_exams_in_batchs/new.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :js do %> 2 | <%= javascript_include_tag 'views/conceptual_exams_in_batchs/new' %> 3 | <% end %> 4 | 5 |
    6 | <%= render 'form' %> 7 |
    8 | 9 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure sensitive parameters which will be filtered from the log file. 4 | Rails.application.config.filter_parameters += [:password] 5 | -------------------------------------------------------------------------------- /config/locales/enumerations/bncc_steps.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | bncc_steps: 4 | child_school: "Educação infantil" 5 | elementary_school: "Ensino fundamental" 6 | adult_and_youth_education: "Educação para jovens e adultos" 7 | -------------------------------------------------------------------------------- /config/locales/enumerations/calculation_types.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | calculation_types: 4 | substitution: "Substituição" 5 | sum: "Soma" 6 | substitution_if_greater: "Substituição se maior" 7 | integral: "Integral" 8 | -------------------------------------------------------------------------------- /config/locales/enumerations/maintenance_adjustment_status.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | maintenance_adjustment_status: 4 | completed: 'Completo' 5 | in_progress: 'Em andamento' 6 | pending: 'Pendente' 7 | error: 'Erro' 8 | -------------------------------------------------------------------------------- /config/locales/enumerations/workdays.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | workdays: 4 | monday: "Segunda-feira" 5 | tuesday: "Terça-feira" 6 | wednesday: "Quarta-feira" 7 | thursday: "Quinta-feira" 8 | friday: "Sexta-feira" -------------------------------------------------------------------------------- /config/locales/forms/copy_knowledge_area_teaching_plan_form.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activemodel: 3 | attributes: 4 | copy_knowledge_area_teaching_plan_form: 5 | year: "Ano" 6 | unities_ids: "Escolas" 7 | grades_ids: "Séries" 8 | -------------------------------------------------------------------------------- /config/locales/services/student_unification.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | services: 3 | student_unification: 4 | delete_error: 'Erro ao excluir aluno' 5 | unification_error: 'Erro ao realizar unificação' 6 | unexpected_error: 'Ocorreu um erro' 7 | -------------------------------------------------------------------------------- /config/locales/views/lesson_plans.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | lesson_plans: 3 | opinion_field: 4 | additional_information: "Informações adicionais" 5 | fields: 6 | add_content: "Adicionar conteúdo" 7 | add_attachment: "Adicionar anexo" 8 | -------------------------------------------------------------------------------- /config/locales/views/terms_dictionaries.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | terms_dictionaries: 3 | help: 4 | presence_identifier_character: 'Esse caractere é exibido nos relatórios para identificar quando o aluno teve presença. Exemplo: Registro de frequência.' 5 | -------------------------------------------------------------------------------- /db/migrate/20150120161844_rename_actived_at_to_activation_sent_at_on_users.rb: -------------------------------------------------------------------------------- 1 | class RenameActivedAtToActivationSentAtOnUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | rename_column :users, :actived_at, :activation_sent_at 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150413102302_add_error_message_to_general_configurations.rb: -------------------------------------------------------------------------------- 1 | class AddErrorMessageToGeneralConfigurations < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :general_configurations, :error_message, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160317175220_add_unity_to_absence_justifications.rb: -------------------------------------------------------------------------------- 1 | class AddUnityToAbsenceJustifications < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :absence_justifications, :unity, index: true, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20161130110940_add_column_active_to_daily_frequency_students.rb: -------------------------------------------------------------------------------- 1 | class AddColumnActiveToDailyFrequencyStudents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :daily_frequency_students, :active, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170802115031_add_api_code_to_teacher_discipline_classroom.rb: -------------------------------------------------------------------------------- 1 | class AddApiCodeToTeacherDisciplineClassroom < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :teacher_discipline_classrooms, :api_code, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20181101181643_add_copyright_name_to_general_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddCopyrightNameToGeneralConfiguration < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :general_configurations, :copyright_name, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190118175259_add_step_number_to_conceptual_exam.rb: -------------------------------------------------------------------------------- 1 | class AddStepNumberToConceptualExam < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :conceptual_exams, :step_number, :integer, null: false, default: 0 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190118175325_add_step_number_to_descriptive_exam.rb: -------------------------------------------------------------------------------- 1 | class AddStepNumberToDescriptiveExam < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :descriptive_exams, :step_number, :integer, null: false, default: 0 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190213204855_add_worker_batch_id_to_worker_states.rb: -------------------------------------------------------------------------------- 1 | class AddWorkerBatchIdToWorkerStates < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :worker_states, :worker_batch, index: true, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190425120057_add_column_meta_data_to_worker_states.rb: -------------------------------------------------------------------------------- 1 | class AddColumnMetaDataToWorkerStates < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :worker_states, :meta_data, :json, null: false, default: '{}' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190805183310_remove_student_id_from_absence_justification.rb: -------------------------------------------------------------------------------- 1 | class RemoveStudentIdFromAbsenceJustification < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :absence_justifications, :student_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190913205839_add_id_to_absence_justifications_students.rb: -------------------------------------------------------------------------------- 1 | class AddIdToAbsenceJustificationsStudents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :absence_justifications_students, :id, :primary_key 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20191204204715_add_column_old_record_to_conceptual_exams.rb: -------------------------------------------------------------------------------- 1 | class AddColumnOldRecordToConceptualExams < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :conceptual_exams, :old_record, :boolean, default: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200205173112_add_thematic_unit_to_discipline_lesson_plans.rb: -------------------------------------------------------------------------------- 1 | class AddThematicUnitToDisciplineLessonPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :discipline_lesson_plans, :thematic_unit, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200401140325_add_column_error_list_to_worker_states.rb: -------------------------------------------------------------------------------- 1 | class AddColumnErrorListToWorkerStates < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :worker_states, :error_list, :text, array: true, default: [] 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200811142048_add_position_to_contents_teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class AddPositionToContentsTeachingPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :contents_teaching_plans, :position, :integer, null: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200811142423_add_position_to_objectives_lesson_plans.rb: -------------------------------------------------------------------------------- 1 | class AddPositionToObjectivesLessonPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :objectives_lesson_plans, :position, :integer, null: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200811142745_populate_position_to_contents_teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class PopulatePositionToContentsTeachingPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | execute 'UPDATE contents_teaching_plans SET position = id' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200811142829_populate_position_to_objectives_lesson_plans.rb: -------------------------------------------------------------------------------- 1 | class PopulatePositionToObjectivesLessonPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | execute 'UPDATE objectives_lesson_plans SET position = id' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201113124620_create_yearly_school_term_type.rb: -------------------------------------------------------------------------------- 1 | class CreateYearlySchoolTermType < ActiveRecord::Migration[4.2] 2 | def change 3 | execute "INSERT INTO school_term_types (description ,steps_number) VALUES ('Anual', 1)" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220404145952_add_minimum_score_to_test_settings.rb: -------------------------------------------------------------------------------- 1 | class AddMinimumScoreToTestSettings < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :test_settings, :minimum_score, :integer, default: 0, null: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20231026182646_update_daily_note_statuses_to_version_2.rb: -------------------------------------------------------------------------------- 1 | class UpdateDailyNoteStatusesToVersion2 < ActiveRecord::Migration[5.0] 2 | def change 3 | replace_view :daily_note_statuses, version: 2, revert_to_version: 1 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/ieducar_api_exam_postings.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :ieducar_api_exam_posting do 3 | worker_batch 4 | ieducar_api_configuration 5 | school_calendar_step 6 | association :author, factory: :user 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # Add your own tasks in files placed in lib/tasks ending in .rake, 2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 3 | 4 | require_relative 'config/application' 5 | 6 | Rails.application.load_tasks 7 | -------------------------------------------------------------------------------- /app/assets/stylesheets/absence_justification_report.css.less: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the absence_justification_report controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Less here: http://lesscss.org/ 4 | -------------------------------------------------------------------------------- /app/decorators/biometric_types_decorator.rb: -------------------------------------------------------------------------------- 1 | class BiometricTypesDecorator 2 | include Decore 3 | include Decore::Proxy 4 | 5 | def self.data_for_select2 6 | BiometricTypes.to_a.map { |t,v| { id: v, name: t, text: t } }.to_json 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/decorators/hash_decorator.rb: -------------------------------------------------------------------------------- 1 | class HashDecorator < SimpleDelegator 2 | def initialize(hash) 3 | super(JSON.parse(hash.to_json, object_class: OpenStruct)) 4 | end 5 | 6 | def key_exist?(key) 7 | self[key].present? 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/enumerations/states.rb: -------------------------------------------------------------------------------- 1 | class States < EnumerateIt::Base 2 | associate_values :ac, :al, :am, :ap, :ba, :ce, :df, :es, :go, :ma, :mg, :ms, 3 | :mt, :pa, :pb, :pe, :pi, :pr, :rj, :rn, :ro, :rr, :rs, :sc, :se, :sp, :to 4 | 5 | sort_by :none 6 | end 7 | -------------------------------------------------------------------------------- /app/serializers/exam_rule_serializer.rb: -------------------------------------------------------------------------------- 1 | class ExamRuleSerializer < ActiveModel::Serializer 2 | attributes :id, :frequency_type, :score_type, :opinion_type, :recovery_type, :allow_frequency_by_discipline 3 | 4 | has_one :conceptual_rounding_table 5 | end 6 | -------------------------------------------------------------------------------- /app/services/backup_file/avaliations.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class Avaliations < Base 3 | def filename 4 | "avaliacoes.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | Avaliation 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/disciplines.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class Disciplines < Base 3 | def filename 4 | "disciplinas.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | Discipline 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/ieducar_api/grades.rb: -------------------------------------------------------------------------------- 1 | module IeducarApi 2 | class Grades < Base 3 | def fetch(params = {}) 4 | params[:path] = 'module/Api/Serie' 5 | params[:resource] = 'series' 6 | 7 | super 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/views/avaliation_recovery_lowest_notes/edit.html.erb: -------------------------------------------------------------------------------- 1 | <% content_for :js do %> 2 | <%= javascript_include_tag 'views/avaliation_recovery_lowest_notes/form' %> 3 | <% end %> 4 |
    5 | <%= render 'form' %> 6 |
    7 | -------------------------------------------------------------------------------- /config/locales/enumerations/rounded_avaliations.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | rounded_avaliations: 4 | numerical_exam: Avaliações numéricas 5 | school_term_recovery: Recuperações de etapas 6 | final_recovery: Recuperações finais 7 | -------------------------------------------------------------------------------- /db/migrate/20141215120718_add_role_id_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddRoleIdToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :role_id, :integer 4 | add_index :users, :role_id 5 | add_foreign_key :users, :roles 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20150824191143_remove_school_calendar_step_id_from_teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class RemoveSchoolCalendarStepIdFromTeachingPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :teaching_plans, :school_calendar_step_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150825170508_add_allow_break_up_to_test_setting_tests.rb: -------------------------------------------------------------------------------- 1 | class AddAllowBreakUpToTestSettingTests < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :test_setting_tests, :allow_break_up, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160519190836_change_lesson_plans_old_contents_type_to_nullable.rb: -------------------------------------------------------------------------------- 1 | class ChangeLessonPlansOldContentsTypeToNullable < ActiveRecord::Migration[4.2] 2 | def change 3 | change_column_null :lesson_plans, :old_contents, true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170214133649_add_course_to_school_calendar_events.rb: -------------------------------------------------------------------------------- 1 | class AddCourseToSchoolCalendarEvents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :school_calendar_events, :course, index: true, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180727202436_add_deleted_at_to_avaliations.rb: -------------------------------------------------------------------------------- 1 | class AddDeletedAtToAvaliations < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :avaliations, :deleted_at, :datetime 4 | add_index :avaliations, :deleted_at 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20180727202503_add_deleted_at_to_daily_notes.rb: -------------------------------------------------------------------------------- 1 | class AddDeletedAtToDailyNotes < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :daily_notes, :deleted_at, :datetime 4 | add_index :daily_notes, :deleted_at 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20190214134929_add_daily_activities_record_to_content_record.rb: -------------------------------------------------------------------------------- 1 | class AddDailyActivitiesRecordToContentRecord < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :content_records, :daily_activities_record, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190301183920_add_step_type_description_to_school_calendars.rb: -------------------------------------------------------------------------------- 1 | class AddStepTypeDescriptionToSchoolCalendars < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :school_calendars, :step_type_description, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190916183315_add_discarded_at_to_daily_frequency_students.rb: -------------------------------------------------------------------------------- 1 | class AddDiscardedAtToDailyFrequencyStudents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :daily_frequency_students, :discarded_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20191204204832_change_column_old_record_to_default_false.rb: -------------------------------------------------------------------------------- 1 | class ChangeColumnOldRecordToDefaultFalse < ActiveRecord::Migration[4.2] 2 | def change 3 | change_column :conceptual_exams, :old_record, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20191220121016_add_id_to_absence_justifications_discipline.rb: -------------------------------------------------------------------------------- 1 | class AddIdToAbsenceJustificationsDiscipline < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :absence_justifications_disciplines, :id, :primary_key 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200205173107_add_thematic_unit_to_discipline_teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class AddThematicUnitToDisciplineTeachingPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :discipline_teaching_plans, :thematic_unit, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200318114654_add_column_owner_teacher_id_to_daily_frequencies.rb: -------------------------------------------------------------------------------- 1 | class AddColumnOwnerTeacherIdToDailyFrequencies < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :daily_frequencies, :owner_teacher_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200811142414_add_position_to_objectives_teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class AddPositionToObjectivesTeachingPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :objectives_teaching_plans, :position, :integer, null: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200811142818_populate_position_to_objectives_teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class PopulatePositionToObjectivesTeachingPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | execute 'UPDATE objectives_teaching_plans SET position = id' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200910185956_add_group_descriptors_to_knowledge_areas.rb: -------------------------------------------------------------------------------- 1 | class AddGroupDescriptorsToKnowledgeAreas < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :knowledge_areas, :group_descriptors, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220720005600_add_grouper_on_discipline.rb: -------------------------------------------------------------------------------- 1 | class AddGrouperOnDiscipline < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :disciplines, :grouper, :boolean, default: false 4 | add_index :disciplines, :grouper 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20240529134746_add_steps_in_school_calendar_discipline_grades.rb: -------------------------------------------------------------------------------- 1 | class AddStepsInSchoolCalendarDisciplineGrades < ActiveRecord::Migration[5.0] 2 | def change 3 | add_column :school_calendar_discipline_grades, :steps, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/services/backup_file/exam_rules.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class ExamRules < Base 3 | def filename 4 | "regras_de_avaliacao.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | ExamRule 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/lesson_plans.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class LessonPlans < Base 3 | def filename 4 | "planos_de_aula.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | LessonPlan 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/user_roles.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class UserRoles < Base 3 | def filename 4 | "permissoes_do_usuario.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | UserRole 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | require_relative '../config/boot' 8 | require 'rake' 9 | Rake.application.run 10 | -------------------------------------------------------------------------------- /config/locales/enumerations/child_educations.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | enumerations: 3 | child_educations: 4 | nursery_1: Creche - 0 a 1 ano e 6 meses 5 | nursery_2: Creche - 1 ano e 7 meses a 3 anos e 11 meses 6 | preschool: Pré-escola - 4 a 5 anos 7 | -------------------------------------------------------------------------------- /config/locales/models/complementary_exam_student.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | activerecord: 3 | attributes: 4 | complementary_exam_student: 5 | sequencial: "Sequencial" 6 | student: "Aluno" 7 | student_id: "Aluno" 8 | score: "Nota" 9 | -------------------------------------------------------------------------------- /db/migrate/20150714165215_change_column_note_on_daily_note_students.rb: -------------------------------------------------------------------------------- 1 | class ChangeColumnNoteOnDailyNoteStudents < ActiveRecord::Migration[4.2] 2 | def change 3 | change_column :daily_note_students, :note, :decimal, precision: 7, scale: 3 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20151006191710_add_classes_to_discipline_lesson_plans.rb: -------------------------------------------------------------------------------- 1 | class AddClassesToDisciplineLessonPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :discipline_lesson_plans, :classes, :integer, array: true, default: [] 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160120173044_remove_column_classes_from_discipline_lesson_plan.rb: -------------------------------------------------------------------------------- 1 | class RemoveColumnClassesFromDisciplineLessonPlan < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :discipline_lesson_plans, :classes, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160419123832_add_teacher_to_absence_justifications.rb: -------------------------------------------------------------------------------- 1 | class AddTeacherToAbsenceJustifications < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :absence_justifications, :teacher, index: true, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20161027161456_add_discipline_id_to_school_calendar_events.rb: -------------------------------------------------------------------------------- 1 | class AddDisciplineIdToSchoolCalendarEvents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :school_calendar_events, :discipline_id, :integer, index: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20161114123307_remove_column_dependence_from_daily_note_students.rb: -------------------------------------------------------------------------------- 1 | class RemoveColumnDependenceFromDailyNoteStudents < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :daily_note_students, :dependence, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170906183320_add_changed_at_to_teacher_discipline_classrooms.rb: -------------------------------------------------------------------------------- 1 | class AddChangedAtToTeacherDisciplineClassrooms < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :teacher_discipline_classrooms, :changed_at, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20171103111947_add_score_type_to_teacher_discipline_classrooms.rb: -------------------------------------------------------------------------------- 1 | class AddScoreTypeToTeacherDisciplineClassrooms < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :teacher_discipline_classrooms, :score_type, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180823115248_fill_recorded_at_to_tranfer_notes.rb: -------------------------------------------------------------------------------- 1 | class FillRecordedAtToTranferNotes < ActiveRecord::Migration[4.2] 2 | def change 3 | execute <<-SQL 4 | UPDATE transfer_notes SET recorded_at = transfer_date; 5 | SQL 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20181101181628_add_support_freshdesk_to_general_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddSupportFreshdeskToGeneralConfiguration < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :general_configurations, :support_freshdesk, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20181120180434_add_field_period_to_teacher_discipline_classrooms.rb: -------------------------------------------------------------------------------- 1 | class AddFieldPeriodToTeacherDisciplineClassrooms < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :teacher_discipline_classrooms, :period, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190118175139_add_step_number_to_complementary_exam.rb: -------------------------------------------------------------------------------- 1 | class AddStepNumberToComplementaryExam < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :complementary_exams, :step_number, :integer, null: false, default: 0 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190131194515_add_field_period_to_student_enrollment_clasrooms.rb: -------------------------------------------------------------------------------- 1 | class AddFieldPeriodToStudentEnrollmentClasrooms < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :student_enrollment_classrooms, :period, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190710194140_add_column_index_to_student_enrollment_classroom.rb: -------------------------------------------------------------------------------- 1 | class AddColumnIndexToStudentEnrollmentClassroom < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :student_enrollment_classrooms, :index, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190813191157_remove_discipline_id_from_absence_justification.rb: -------------------------------------------------------------------------------- 1 | class RemoveDisciplineIdFromAbsenceJustification < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :absence_justifications, :discipline_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190916183203_add_discarded_at_to_complementary_exam_students.rb: -------------------------------------------------------------------------------- 1 | class AddDiscardedAtToComplementaryExamStudents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :complementary_exam_students, :discarded_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20191206202336_add_foreign_key_current_classroom_id_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddForeignKeyCurrentClassroomIdToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_foreign_key :users, :classrooms, column: :current_classroom_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20191206202346_add_foreign_key_current_discipline_id_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddForeignKeyCurrentDisciplineIdToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_foreign_key :users, :disciplines, column: :current_discipline_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200729132601_add_fullname_users_index.rb: -------------------------------------------------------------------------------- 1 | class AddFullnameUsersIndex < ActiveRecord::Migration[4.2] 2 | disable_ddl_transaction! 3 | 4 | def change 5 | add_index :users, :fullname, using: :btree, algorithm: :concurrently 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20201116171751_add_school_term_type_to_teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class AddSchoolTermTypeToTeachingPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :teaching_plans, :school_term_type, index: true, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230220192754_add_legacy_column_into_absence_justifications.rb: -------------------------------------------------------------------------------- 1 | class AddLegacyColumnIntoAbsenceJustifications < ActiveRecord::Migration 2 | def change 3 | add_column :absence_justifications, :legacy, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230220194114_add_class_number_into_absence_justifications.rb: -------------------------------------------------------------------------------- 1 | class AddClassNumberIntoAbsenceJustifications < ActiveRecord::Migration 2 | def change 3 | add_column :absence_justifications, :class_number, :integer, null: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20250221190354_add_descricao_geral_to_school_calendar_events.rb: -------------------------------------------------------------------------------- 1 | class AddDescricaoGeralToSchoolCalendarEvents < ActiveRecord::Migration[5.0] 2 | def change 3 | add_column :school_calendar_events, :general_description, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/school_calendar_events.yml: -------------------------------------------------------------------------------- 1 | school_calendar_event_a: 2 | school_calendar: school_calendar_a 3 | start_date: "2015-01-01" 4 | end_date: "2015-01-01" 5 | description: Ano Novo 6 | event_type: no_school 7 | legend: "X" 8 | periods: "{1}" 9 | -------------------------------------------------------------------------------- /app/decorators/periods_decorator.rb: -------------------------------------------------------------------------------- 1 | class PeriodsDecorator 2 | include Decore 3 | include Decore::Proxy 4 | 5 | def self.data_for_select2 6 | periods = Periods.to_a.map { |t,v| { id: v, name: t, text: t } } 7 | periods.to_json 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /config/puma.sample.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env puma 2 | 3 | # Min and Max threads per worker 4 | threads 1, 1 5 | 6 | preload_app! 7 | 8 | on_worker_boot do 9 | ActiveSupport.on_load(:active_record) do 10 | ActiveRecord::Base.establish_connection 11 | end 12 | end -------------------------------------------------------------------------------- /db/migrate/20150105201145_add_fields_to_general_configuration.rb: -------------------------------------------------------------------------------- 1 | class AddFieldsToGeneralConfiguration < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :general_configurations, :employees_default_role_id, :integer, references: :roles 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150420203347_add_teacher_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddTeacherToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :teacher_id, :integer 4 | add_index :users, :teacher_id 5 | add_foreign_key :users, :teachers 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20150717112943_add_exam_rule_to_classroom.rb: -------------------------------------------------------------------------------- 1 | class AddExamRuleToClassroom < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :classrooms, :exam_rule_id, :integer, index: true 4 | add_foreign_key :classrooms, :exam_rules 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20160318124423_add_classroom_to_absence_justifications.rb: -------------------------------------------------------------------------------- 1 | class AddClassroomToAbsenceJustifications < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :absence_justifications, :classroom, index: true, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160318180843_add_discipline_to_absence_justifications.rb: -------------------------------------------------------------------------------- 1 | class AddDisciplineToAbsenceJustifications < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :absence_justifications, :discipline, index: true, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160502121819_add_exact_decimal_place_to_rounding_table_values.rb: -------------------------------------------------------------------------------- 1 | class AddExactDecimalPlaceToRoundingTableValues < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :rounding_table_values, :exact_decimal_place, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160502191434_add_periods_to_school_calendar_events.rb: -------------------------------------------------------------------------------- 1 | class AddPeriodsToSchoolCalendarEvents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :school_calendar_events, :periods, :string, array: true, default: Periods.list 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160517165451_add_unique_index_to_avaliation_exemptions.rb: -------------------------------------------------------------------------------- 1 | class AddUniqueIndexToAvaliationExemptions < ActiveRecord::Migration[4.2] 2 | def change 3 | add_index :avaliation_exemptions, [:avaliation_id, :student_id], unique: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20161006174003_remove_foreign_keys_on_conceptual_exams.rb: -------------------------------------------------------------------------------- 1 | class RemoveForeignKeysOnConceptualExams < ActiveRecord::Migration[4.2] 2 | def change 3 | execute <<-SQL 4 | DROP INDEX unique_index_on_conceptual_exams; 5 | SQL 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20161123121934_update_all_daily_note_students_to_active.rb: -------------------------------------------------------------------------------- 1 | class UpdateAllDailyNoteStudentsToActive < ActiveRecord::Migration[4.2] 2 | def change 3 | execute <<-SQL 4 | UPDATE daily_note_students set active = 't'; 5 | SQL 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20170103124548_add_column_average_calculation_type_to_test_settings.rb: -------------------------------------------------------------------------------- 1 | class AddColumnAverageCalculationTypeToTestSettings < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :test_settings, :average_calculation_type, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180727202519_add_deleted_at_to_transfer_notes.rb: -------------------------------------------------------------------------------- 1 | class AddDeletedAtToTransferNotes < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :transfer_notes, :deleted_at, :datetime 4 | add_index :transfer_notes, :deleted_at 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20180912195124_remove_school_calendar_step_id_from_transfer_notes.rb: -------------------------------------------------------------------------------- 1 | class RemoveSchoolCalendarStepIdFromTransferNotes < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :transfer_notes, :school_calendar_step_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190115121932_remove_visible_from_student_enrollment_classroom.rb: -------------------------------------------------------------------------------- 1 | class RemoveVisibleFromStudentEnrollmentClassroom < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :student_enrollment_classrooms, :visible, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190118176000_add_step_number_to_school_calendar_step.rb: -------------------------------------------------------------------------------- 1 | class AddStepNumberToSchoolCalendarStep < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :school_calendar_steps, :step_number, :integer, null: false, default: 0 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200212175532_add_discipline_to_learning_objectives_and_skills.rb: -------------------------------------------------------------------------------- 1 | class AddDisciplineToLearningObjectivesAndSkills < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :learning_objectives_and_skills, :discipline, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200305144424_remove_column_from_general_configurations.rb: -------------------------------------------------------------------------------- 1 | class RemoveColumnFromGeneralConfigurations < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :general_configurations, :display_knowledge_area_as_discipline 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200402220846_add_teacher_profile_id_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddTeacherProfileIdToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :teacher_profile_id, :integer 4 | add_foreign_key :users, :teacher_profiles 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20201022120724_add_default_division_weight_to_test_settings.rb: -------------------------------------------------------------------------------- 1 | class AddDefaultDivisionWeightToTestSettings < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :test_settings, :default_division_weight, :integer, default: 1 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230422192754_change_legacy_column_into_absence_justifications.rb: -------------------------------------------------------------------------------- 1 | class ChangeLegacyColumnIntoAbsenceJustifications < ActiveRecord::Migration 2 | def change 3 | change_column :absence_justifications, :legacy, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /lib/audit.rb: -------------------------------------------------------------------------------- 1 | module Audit 2 | def all_audits 3 | ids = audits.pluck(:id) 4 | 5 | ids = ids.concat(associated_audits.pluck(:id)) if respond_to?(:associated_audits) 6 | 7 | Audited::Audit.where(:id => ids).reorder("id DESC") 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/enumerations/event_types.rb: -------------------------------------------------------------------------------- 1 | class EventTypes < EnumerateIt::Base 2 | associate_values( 3 | :extra_school, 4 | :extra_school_without_frequency, 5 | :no_school, 6 | :no_school_with_frequency 7 | ) 8 | 9 | sort_by :translation 10 | end 11 | -------------------------------------------------------------------------------- /app/enumerations/score_types.rb: -------------------------------------------------------------------------------- 1 | class ScoreTypes < EnumerateIt::Base 2 | associate_values :dont_use => "0", 3 | :numeric => "1", 4 | :concept => "2", 5 | :numeric_and_concept => "3" 6 | 7 | sort_by :none 8 | end 9 | -------------------------------------------------------------------------------- /app/policies/avaliation_policy.rb: -------------------------------------------------------------------------------- 1 | class AvaliationPolicy < ApplicationPolicy 2 | def edit? 3 | Avaliation.teacher_avaliations(@user.current_teacher.id, @record.classroom_id, @record.discipline_id).any? { |avaliation| avaliation.id.eql?(@record.id) } 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/services/backup_file/teaching_plans.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class TeachingPlans < Base 3 | def filename 4 | "planos_de_ensino.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | TeachingPlan 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/unity_equipaments.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class UnityEquipments < Base 3 | def filename 4 | "equipamentos.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | UnityEquipment 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /config/locales/views/absence_justifications.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | absence_justifications: 3 | index: 4 | by_author: "Filtrar autor" 5 | new_html: " Nova justificativa de falta" 6 | form: 7 | add_attachment: "Adicionar anexo" 8 | -------------------------------------------------------------------------------- /config/locales/workers/copy_discipline_teaching_plan_worker.yml: -------------------------------------------------------------------------------- 1 | pt-BR: 2 | copy_discipline_teaching_plan_worker: 3 | title: 'Plano de ensino copiado com sucesso' 4 | description: 'O plano de ensino foi copiado com sucesso para as escolas e séries selecionadas.' 5 | -------------------------------------------------------------------------------- /db/migrate/20141208133548_add_student_id_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddStudentIdToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :student_id, :integer 4 | add_index :users, :student_id 5 | add_foreign_key :users, :students 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20150721195422_rename_column_on_rounding_table_values.rb: -------------------------------------------------------------------------------- 1 | class RenameColumnOnRoundingTableValues < ActiveRecord::Migration[4.2] 2 | def change 3 | rename_column :rounding_table_values, :tabela_arredondamento_id, :rounding_table_api_code 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150908172639_add_fields_to_exam_rules.rb: -------------------------------------------------------------------------------- 1 | class AddFieldsToExamRules < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :exam_rules, :recovery_type, :integer 4 | add_column :exam_rules, :parallel_recovery_average, :decimal 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20160926185823_change_column_updated_at_to_string_on_student_enrollments.rb: -------------------------------------------------------------------------------- 1 | class ChangeColumnUpdatedAtToStringOnStudentEnrollments < ActiveRecord::Migration[4.2] 2 | def change 3 | change_column :student_enrollments, :updated_at, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170413122833_add_birth_date_and_avatar_to_students.rb: -------------------------------------------------------------------------------- 1 | class AddBirthDateAndAvatarToStudents < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :students, :birth_date, :date 4 | add_column :students, :avatar_url, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20180523135859_add_full_error_message_to_ieducar_api_exam_postings.rb: -------------------------------------------------------------------------------- 1 | class AddFullErrorMessageToIeducarApiExamPostings < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :ieducar_api_exam_postings, :full_error_message, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180524134542_add_active_to_school_calendar_classroom_steps.rb: -------------------------------------------------------------------------------- 1 | class AddActiveToSchoolCalendarClassroomSteps < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :school_calendar_classroom_steps, :active, :boolean, default: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180625171601_add_full_error_message_to_ieducar_api_synchronizer.rb: -------------------------------------------------------------------------------- 1 | class AddFullErrorMessageToIeducarApiSynchronizer < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :ieducar_api_synchronizations, :full_error_message, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180912193847_remove_active_from_school_calendar_classroom_steps.rb: -------------------------------------------------------------------------------- 1 | class RemoveActiveFromSchoolCalendarClassroomSteps < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :school_calendar_classroom_steps, :active, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180921210316_add_visible_to_student_enrollment_classrooms.rb: -------------------------------------------------------------------------------- 1 | class AddVisibleToStudentEnrollmentClassrooms < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :student_enrollment_classrooms, :visible, :boolean, default: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190225141100_add_synchronized_at_to_ieducar_api_configurations.rb: -------------------------------------------------------------------------------- 1 | class AddSynchronizedAtToIeducarApiConfigurations < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :ieducar_api_configurations, :synchronized_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190809164952_add_uses_differentiated_exam_rule_to_unities.rb: -------------------------------------------------------------------------------- 1 | class AddUsesDifferentiatedExamRuleToUnities < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :unities, :uses_differentiated_exam_rule, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20191217143557_add_column_opened_year_to_school_calendars.rb: -------------------------------------------------------------------------------- 1 | class AddColumnOpenedYearToSchoolCalendars < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :school_calendars, :opened_year, :boolean, null: false, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200212175406_add_thematic_unit_to_learning_objectives_and_skills.rb: -------------------------------------------------------------------------------- 1 | class AddThematicUnitToLearningObjectivesAndSkills < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :learning_objectives_and_skills, :thematic_unit, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201113173505_add_school_term_type_step_to_test_settings.rb: -------------------------------------------------------------------------------- 1 | class AddSchoolTermTypeStepToTestSettings < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :test_settings, :school_term_type_step, index: true, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210517195737_remove_classroom_id_from_student_enrollment_classrooms.rb: -------------------------------------------------------------------------------- 1 | class RemoveClassroomIdFromStudentEnrollmentClassrooms < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :student_enrollment_classrooms, :classroom_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220720005606_add_descriptor_on_discipline.rb: -------------------------------------------------------------------------------- 1 | class AddDescriptorOnDiscipline < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :disciplines, :descriptor, :boolean, default: false 4 | add_index :disciplines, :descriptor 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/factories/unique_daily_frequency_students.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :unique_daily_frequency_student do 3 | classroom 4 | student 5 | 6 | frequency_date { Date.current } 7 | present true 8 | absences_by [] 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /spec/factories/unities.rb: -------------------------------------------------------------------------------- 1 | FactoryGirl.define do 2 | factory :unity do 3 | association :author, factory: :user 4 | 5 | sequence(:api_code, &:to_s) 6 | name { Faker::University.unique.name } 7 | unit_type UnitTypes::SCHOOL_UNIT 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/controllers/sidekiq_monitor_controller.rb: -------------------------------------------------------------------------------- 1 | class SidekiqMonitorController < ActionController::Base 2 | def processes_status 3 | status = SidekiqMonitor.processses_running? ? SidekiqStatus::OK : SidekiqStatus::NOT_OK 4 | 5 | render text: status 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/enumerations/workdays.rb: -------------------------------------------------------------------------------- 1 | class Workdays < EnumerateIt::Base 2 | associate_values :monday, 3 | :tuesday, 4 | :wednesday, 5 | :thursday, 6 | :friday 7 | 8 | sort_by :none 9 | 10 | end 11 | -------------------------------------------------------------------------------- /app/helpers/absence_justification_helper.rb: -------------------------------------------------------------------------------- 1 | module AbsenceJustificationHelper 2 | def absence_justification_destroy?(absence_justification) 3 | absence_justification.teacher.id == current_teacher.try(:id) || current_user.current_role_is_admin_or_employee? 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/services/backup_file/daily_notes.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class DailyNotes < Base 3 | def filename 4 | "registros_diarios_de_avaliacoes.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | DailyNote 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/knowledge_areas.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class KnowledgeAreas < Base 3 | def filename 4 | "areas_de_conhecimento.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | KnowledgeArea 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/test_settings.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class TestSettings < Base 3 | def filename 4 | "configuracoes_de_avaliacao.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | TestSetting 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/backup_file/transfer_notes.rb: -------------------------------------------------------------------------------- 1 | class BackupFile 2 | class TransferNotes < Base 3 | def filename 4 | "notas_de_transferencia.csv" 5 | end 6 | 7 | protected 8 | 9 | def query 10 | TransferNote 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/ieducar_api/schools.rb: -------------------------------------------------------------------------------- 1 | module IeducarApi 2 | class Schools < Base 3 | def fetch_all(params = {}) 4 | params[:path] = 'module/Api/Escola' 5 | params[:resource] = 'info-escolas' 6 | 7 | fetch(params) 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/services/ieducar_api/unity_params.rb: -------------------------------------------------------------------------------- 1 | module IeducarApi 2 | class UnityParams < Base 3 | def fetch(params = {}) 4 | params[:path] = 'module/Api/Escola' 5 | params[:resource] = 'parametros-escolas' 6 | 7 | super 8 | end 9 | end 10 | end 11 | --------------------------------------------------------------------------------