sis_core 1.0.13 → 1.0.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/sis/core/user_roles_controller.rb +11 -0
- data/app/controllers/sis/core/utils_controller.rb +19 -0
- data/app/models/sis/core/academic_calendar.rb +9 -0
- data/app/models/sis/core/academic_programme.rb +2 -2
- data/app/models/sis/core/academic_time_line.rb +14 -0
- data/app/models/sis/core/applicant.rb +2 -2
- data/app/models/sis/core/application_document.rb +1 -2
- data/app/models/sis/core/application_record.rb +4 -0
- data/app/models/sis/core/application_setup.rb +2 -2
- data/app/models/sis/core/building.rb +7 -0
- data/app/models/sis/core/class_schedule.rb +18 -0
- data/app/models/sis/core/class_time_table.rb +7 -0
- data/app/models/sis/core/classroom.rb +9 -0
- data/app/models/sis/core/course.rb +2 -4
- data/app/models/sis/core/course_assignment.rb +41 -0
- data/app/models/sis/core/course_offering.rb +19 -0
- data/app/models/sis/core/course_offering_sequence.rb +42 -0
- data/app/models/sis/core/course_registration.rb +12 -2
- data/app/models/sis/core/credit_hour_rate.rb +1 -0
- data/app/models/sis/core/curriculum.rb +17 -0
- data/app/models/sis/core/curriculum_course.rb +19 -0
- data/app/models/sis/core/document_type.rb +0 -1
- data/app/models/sis/core/eligibility_criteria.rb +10 -0
- data/app/models/sis/core/entry.rb +7 -0
- data/app/models/sis/core/exam_result.rb +0 -1
- data/app/models/sis/core/identification_pattern.rb +19 -0
- data/app/models/sis/core/instructor.rb +5 -0
- data/app/models/sis/core/level.rb +7 -0
- data/app/models/sis/core/prerequisite.rb +16 -0
- data/app/models/sis/core/section.rb +9 -0
- data/app/models/sis/core/student.rb +17 -1
- data/app/models/sis/core/student_document.rb +12 -0
- data/app/models/sis/core/student_eligibility.rb +16 -0
- data/app/serializers/sis/core/user_serializer.rb +4 -0
- data/app/services/sis/core/util_service.rb +16 -0
- data/config/routes.rb +2 -0
- data/db/migrate/20201102134749_create_sis_core_curriculums.rb +20 -0
- data/db/migrate/20201102182012_remove_programme_and_add_maximum_class_size_to_course.rb +10 -0
- data/db/migrate/20201102192055_create_sis_core_curriculum_courses.rb +17 -0
- data/db/migrate/20201104085458_create_sis_core_course_offering_sequences.rb +24 -0
- data/db/migrate/20201104111548_create_sis_core_course_offerings.rb +24 -0
- data/db/migrate/20201106091250_create_sis_core_prerequisites.rb +15 -0
- data/db/migrate/20201109064211_create_sis_core_buildings.rb +11 -0
- data/db/migrate/20201109070027_create_sis_core_classrooms.rb +21 -0
- data/db/migrate/20201109074944_create_sis_core_class_time_tables.rb +11 -0
- data/db/migrate/20201110075345_create_sis_core_sections.rb +13 -0
- data/db/migrate/20201110080957_create_sis_core_course_assignments.rb +22 -0
- data/db/migrate/20201110082516_create_sis_core_class_schedules.rb +22 -0
- data/db/migrate/20201130073930_create_sis_core_academic_calendars.rb +19 -0
- data/db/migrate/20201130080122_create_sis_core_academic_time_lines.rb +37 -0
- data/db/migrate/20201130091430_create_sis_core_eligibility_criteria.rb +13 -0
- data/db/migrate/20201130100442_add_fields_to_student.rb +82 -0
- data/db/migrate/20201130103634_create_sis_core_student_eligibilities.rb +29 -0
- data/db/migrate/20201201055256_add_course_offering_to_course_registration.rb +13 -0
- data/db/migrate/20201219073245_remove_full_name_from_instructor.rb +12 -0
- data/db/migrate/20201221100413_add_is_current_field_to_academic_year_and_semester.rb +7 -0
- data/db/migrate/20210113085806_create_sis_core_student_documents.rb +17 -0
- data/db/migrate/20210310071526_add_minimum_class_size_to_course.rb +6 -0
- data/db/migrate/20210429112550_create_active_storage_tables.active_storage.rb +37 -0
- data/db/migrate/20210429113938_rename_uploaded_fields.rb +6 -0
- data/db/migrate/20210504115132_create_sis_core_identification_patterns.rb +23 -0
- data/db/migrate/20210513080708_add_unique_index_to_models.rb +8 -0
- data/lib/sis/core/version.rb +1 -1
- data/lib/sis_core.rb +0 -1
- data/spec/factories/sis/core/academic_calendars.rb +9 -0
- data/spec/factories/sis/core/academic_time_lines.rb +21 -0
- data/spec/factories/sis/core/applicants.rb +1 -1
- data/spec/factories/sis/core/application_documents.rb +1 -1
- data/spec/factories/sis/core/buildings.rb +7 -0
- data/spec/factories/sis/core/class_schedules.rb +8 -0
- data/spec/factories/sis/core/class_time_tables.rb +7 -0
- data/spec/factories/sis/core/classrooms.rb +11 -0
- data/spec/factories/sis/core/course_assignments.rb +9 -0
- data/spec/factories/sis/core/course_offering_sequences.rb +8 -0
- data/spec/factories/sis/core/course_offerings.rb +8 -0
- data/spec/factories/sis/core/course_registrations.rb +3 -2
- data/spec/factories/sis/core/courses.rb +3 -1
- data/spec/factories/sis/core/curriculum_courses.rb +7 -0
- data/spec/factories/sis/core/curriculums.rb +10 -0
- data/spec/factories/sis/core/eligibility_criteria.rb +6 -0
- data/spec/factories/sis/core/entries.rb +5 -0
- data/spec/factories/sis/core/identification_patterns.rb +8 -0
- data/spec/factories/sis/core/instructor_courses.rb +2 -2
- data/spec/factories/sis/core/instructors.rb +3 -2
- data/spec/factories/sis/core/levels.rb +5 -0
- data/spec/factories/sis/core/prerequisites.rb +6 -0
- data/spec/factories/sis/core/sections.rb +6 -0
- data/spec/factories/sis/core/student_documents.rb +6 -0
- data/spec/factories/sis/core/student_eligibilities.rb +10 -0
- data/spec/factories/sis/core/students.rb +11 -5
- metadata +92 -54
- data/app/uploaders/sis/core/application_document_uploader.rb +0 -51
- data/app/uploaders/sis/core/photo_uploader.rb +0 -51
@@ -0,0 +1,82 @@
|
|
1
|
+
class AddFieldsToStudent < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
remove_reference :sis_core_students, :academic_programme, index: true
|
4
|
+
remove_column :sis_core_students, :full_name, :string
|
5
|
+
add_column :sis_core_students, :alternative_email_address, :string
|
6
|
+
add_column :sis_core_students, :primary_phone_number, :string
|
7
|
+
add_column :sis_core_students, :gender, :string
|
8
|
+
add_column :sis_core_students, :address, :string
|
9
|
+
add_column :sis_core_students, :picture_url, :string
|
10
|
+
add_column :sis_core_students, :mother_occupation, :string
|
11
|
+
add_column :sis_core_students, :mother_education_level, :string
|
12
|
+
add_column :sis_core_students, :mother_mobile_number, :string
|
13
|
+
add_column :sis_core_students, :mother_office_phone_number, :string
|
14
|
+
add_column :sis_core_students, :mother_house_number, :string
|
15
|
+
add_column :sis_core_students, :mother_woreda, :string
|
16
|
+
add_column :sis_core_students, :mother_zone, :string
|
17
|
+
add_column :sis_core_students, :mother_region, :string
|
18
|
+
add_column :sis_core_students, :father_full_name, :string
|
19
|
+
add_column :sis_core_students, :father_occupation, :string
|
20
|
+
add_column :sis_core_students, :father_education_level, :string
|
21
|
+
add_column :sis_core_students, :father_mobile_number, :string
|
22
|
+
add_column :sis_core_students, :father_office_phone_number, :string
|
23
|
+
add_column :sis_core_students, :father_house_number, :string
|
24
|
+
add_column :sis_core_students, :father_woreda, :string
|
25
|
+
add_column :sis_core_students, :father_zone, :string
|
26
|
+
add_column :sis_core_students, :father_region, :string
|
27
|
+
add_column :sis_core_students, :middle_name, :string
|
28
|
+
add_column :sis_core_students, :place_of_birth_town, :string
|
29
|
+
add_column :sis_core_students, :place_of_birth_region, :string
|
30
|
+
add_column :sis_core_students, :place_of_birth_country, :string
|
31
|
+
add_column :sis_core_students, :house_number, :string
|
32
|
+
add_column :sis_core_students, :advisor_id, :integer
|
33
|
+
add_column :sis_core_students, :woreda, :string
|
34
|
+
add_column :sis_core_students, :town, :string
|
35
|
+
add_column :sis_core_students, :zone, :string
|
36
|
+
add_column :sis_core_students, :region, :string
|
37
|
+
add_column :sis_core_students, :native_language, :string
|
38
|
+
add_column :sis_core_students, :marital_status, :string
|
39
|
+
add_column :sis_core_students, :physically_disabled, :boolean, default: false
|
40
|
+
add_column :sis_core_students, :nature_of_disability, :string
|
41
|
+
add_column :sis_core_students, :blood_type, :string
|
42
|
+
add_column :sis_core_students, :health_problem, :string
|
43
|
+
add_column :sis_core_students, :tuition_payment_modality, :string
|
44
|
+
add_column :sis_core_students, :emergency_contact_person, :string
|
45
|
+
add_column :sis_core_students, :emergency_contact_person_relationship, :string
|
46
|
+
add_column :sis_core_students, :emergency_contact_telephone_number, :string
|
47
|
+
add_column :sis_core_students, :emergency_contact_office_number, :string
|
48
|
+
add_column :sis_core_students, :emergency_contact_mobile_number, :string
|
49
|
+
add_column :sis_core_students, :emergency_contact_house_number, :string
|
50
|
+
add_column :sis_core_students, :emergency_contact_person_woreda, :string
|
51
|
+
add_column :sis_core_students, :emergency_contact_person_town, :string
|
52
|
+
add_column :sis_core_students, :emergency_contact_person_zone, :string
|
53
|
+
add_column :sis_core_students, :emergency_contact_person_region, :string
|
54
|
+
add_column :sis_core_students, :second_emergency_contact_person, :string
|
55
|
+
add_column :sis_core_students, :second_emergency_contact_person_relationship, :string
|
56
|
+
add_column :sis_core_students, :second_emergency_contact_telephone_number, :string
|
57
|
+
add_column :sis_core_students, :tuition_payer_email, :string
|
58
|
+
add_column :sis_core_students, :tuition_payer_mobile_number, :string
|
59
|
+
add_column :sis_core_students, :guardian_one_full_name, :string
|
60
|
+
add_column :sis_core_students, :guardian_one_email_address, :string
|
61
|
+
add_column :sis_core_students, :guardian_one_phone_number, :string
|
62
|
+
add_column :sis_core_students, :mother_full_name, :string
|
63
|
+
add_column :sis_core_students, :guardian_two_full_name, :string
|
64
|
+
add_column :sis_core_students, :guardian_two_email_address, :string
|
65
|
+
add_column :sis_core_students, :guardian_two_phone_number, :string
|
66
|
+
add_column :sis_core_students, :subcity, :string
|
67
|
+
add_reference :sis_core_students, :level,
|
68
|
+
index: { name: 'level_on_student' }, foreign_key: { to_table: :sis_core_lookups }
|
69
|
+
add_reference :sis_core_students, :semester,
|
70
|
+
index: { name: 'semester_on_student' }, foreign_key: { to_table: :sis_core_semesters }
|
71
|
+
add_reference :sis_core_students, :entry,
|
72
|
+
index: { name: 'entry_on_student' }, foreign_key: { to_table: :sis_core_lookups }
|
73
|
+
add_reference :sis_core_students, :user,
|
74
|
+
index: { name: 'user_on_student' }, foreign_key: { to_table: :sis_core_users }
|
75
|
+
add_reference :sis_core_students, :programme,
|
76
|
+
index: { name: 'programme_on_student' }, foreign_key: { to_table: :sis_core_programmes }
|
77
|
+
add_reference :sis_core_students, :programme_level,
|
78
|
+
index: { name: 'prog_level_on_student' }, foreign_key: { to_table: :sis_core_lookups }
|
79
|
+
add_reference :sis_core_students, :programme_type,
|
80
|
+
index: { name: 'prog_type_on_student' }, foreign_key: { to_table: :sis_core_lookups }
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
class CreateSisCoreStudentEligibilities < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :sis_core_student_eligibilities do |t|
|
4
|
+
t.references :student,
|
5
|
+
null: false,
|
6
|
+
index: { name: 'stud_on_stud_eligibility' },
|
7
|
+
foreign_key: { to_table: :sis_core_students }
|
8
|
+
t.references :academic_year,
|
9
|
+
null: false,
|
10
|
+
index: { name: 'ay_on_stud_eligibility' },
|
11
|
+
foreign_key: { to_table: :sis_core_academic_years }
|
12
|
+
t.references :semester,
|
13
|
+
null: false,
|
14
|
+
index: { name: 'sem_on_stud_eligibility' },
|
15
|
+
foreign_key: { to_table: :sis_core_semesters }
|
16
|
+
t.references :eligibility_criteria,
|
17
|
+
null: false,
|
18
|
+
index: { name: 'elig_cri_on_stud_eligibility' },
|
19
|
+
foreign_key: { to_table: :sis_core_eligibility_criteria }
|
20
|
+
t.references :cleared_by,
|
21
|
+
null: false,
|
22
|
+
index: { name: 'clr_by_stud_eligibility' },
|
23
|
+
foreign_key: { to_table: :sis_core_users }
|
24
|
+
t.boolean :is_eligible, default: false
|
25
|
+
|
26
|
+
t.timestamps
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddCourseOfferingToCourseRegistration < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
remove_reference :sis_core_course_registrations, :course, index: true
|
4
|
+
remove_reference :sis_core_course_registrations, :semester, index: true
|
5
|
+
add_column :sis_core_course_registrations, :registered, :boolean, default: false
|
6
|
+
add_column :sis_core_course_registrations, :date_registered, :date
|
7
|
+
add_column :sis_core_course_registrations, :grade, :string
|
8
|
+
add_reference :sis_core_course_registrations, :section,
|
9
|
+
index: { name: 'sec_on_co_reg' }, foreign_key: { to_table: :sis_core_sections }
|
10
|
+
add_reference :sis_core_course_registrations, :course_offering,
|
11
|
+
index: { name: 'co_off_on_co_reg' }, foreign_key: { to_table: :sis_core_course_offerings }
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class RemoveFullNameFromInstructor < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
change_column :sis_core_courses, :lab_hours, :float, null: true
|
4
|
+
remove_column :sis_core_instructors, :full_name, :string
|
5
|
+
add_column :sis_core_instructors, :middle_name, :string
|
6
|
+
add_column :sis_core_instructors, :gender, :string
|
7
|
+
add_column :sis_core_instructors, :first_name, :string
|
8
|
+
add_column :sis_core_instructors, :last_name, :string
|
9
|
+
add_reference :sis_core_instructors, :user,
|
10
|
+
index: { name: 'user_on_instructor' }, foreign_key: { to_table: :sis_core_users }
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
class AddIsCurrentFieldToAcademicYearAndSemester < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
add_column :sis_core_academic_years, :is_current, :boolean, default: false
|
4
|
+
add_column :sis_core_semesters, :is_current, :boolean, default: false
|
5
|
+
add_column :sis_core_applicants, :is_moved, :boolean, default: false
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateSisCoreStudentDocuments < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :sis_core_student_documents do |t|
|
4
|
+
t.references :document_type,
|
5
|
+
null: true,
|
6
|
+
index: { name: 'dt_on_stud_docs' },
|
7
|
+
foreign_key: { to_table: :sis_core_lookups }
|
8
|
+
t.references :student,
|
9
|
+
null: false,
|
10
|
+
index: { name: 'stud_on_stud_docs' },
|
11
|
+
foreign_key: { to_table: :sis_core_students }
|
12
|
+
t.string :file_url
|
13
|
+
|
14
|
+
t.timestamps
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# This migration comes from active_storage (originally 20170806125915)
|
2
|
+
class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
|
3
|
+
def change
|
4
|
+
create_table :active_storage_blobs do |t|
|
5
|
+
t.string :key, null: false
|
6
|
+
t.string :filename, null: false
|
7
|
+
t.string :content_type
|
8
|
+
t.text :metadata
|
9
|
+
t.string :service_name, null: false
|
10
|
+
t.bigint :byte_size, null: false
|
11
|
+
t.string :checksum, null: false
|
12
|
+
t.datetime :created_at, null: false
|
13
|
+
|
14
|
+
t.index [:key], unique: true
|
15
|
+
end
|
16
|
+
|
17
|
+
create_table :active_storage_attachments do |t|
|
18
|
+
t.string :name, null: false
|
19
|
+
t.references :record, null: false, polymorphic: true, index: false
|
20
|
+
t.references :blob, null: false
|
21
|
+
|
22
|
+
t.datetime :created_at, null: false
|
23
|
+
|
24
|
+
t.index %i[record_type record_id name blob_id], name: 'index_active_storage_attachments_uniqueness',
|
25
|
+
unique: true
|
26
|
+
t.foreign_key :active_storage_blobs, column: :blob_id
|
27
|
+
end
|
28
|
+
|
29
|
+
create_table :active_storage_variant_records do |t|
|
30
|
+
t.belongs_to :blob, null: false, index: false
|
31
|
+
t.string :variation_digest, null: false
|
32
|
+
|
33
|
+
t.index %i[blob_id variation_digest], name: 'index_active_storage_variant_records_uniqueness', unique: true
|
34
|
+
t.foreign_key :active_storage_blobs, column: :blob_id
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class CreateSisCoreIdentificationPatterns < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :sis_core_identification_patterns do |t|
|
4
|
+
t.references :programme_level,
|
5
|
+
null: false,
|
6
|
+
index: { name: 'pl_on_ident_pttr' },
|
7
|
+
foreign_key: { to_table: :sis_core_lookups }
|
8
|
+
t.references :programme_type,
|
9
|
+
null: false,
|
10
|
+
index: { name: 'pt_on_ident_pttr' },
|
11
|
+
foreign_key: { to_table: :sis_core_lookups }
|
12
|
+
t.references :programme,
|
13
|
+
null: false,
|
14
|
+
index: { name: 'pr_on_ident_pttr' },
|
15
|
+
foreign_key: { to_table: :sis_core_programmes }
|
16
|
+
t.string :id_pattern, null: false
|
17
|
+
|
18
|
+
t.timestamps
|
19
|
+
end
|
20
|
+
add_index :sis_core_identification_patterns, %i[programme_id programme_level_id programme_type_id],
|
21
|
+
unique: true, name: 'unq_cons_on_ident_pattern'
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class AddUniqueIndexToModels < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
add_index :sis_core_student_eligibilities, [:student_id, :academic_year_id, :semester_id, :eligibility_criteria_id], unique: true,
|
4
|
+
name: 'stu_ay_sem_elc_uniq_on_stud_elg'
|
5
|
+
add_index :sis_core_course_registrations, [:student_id, :course_offering_id], unique: true,
|
6
|
+
name: 'stu_co_uniq_on_stud_elg'
|
7
|
+
end
|
8
|
+
end
|
data/lib/sis/core/version.rb
CHANGED
data/lib/sis_core.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
FactoryBot.define do
|
2
|
+
factory :academic_time_line, class: Sis::Core::AcademicTimeLine do
|
3
|
+
registration_start_date { '2020-11-30' }
|
4
|
+
registration_end_date { '2020-12-30' }
|
5
|
+
penalty_registration_start_date { '2020-11-30' }
|
6
|
+
penalty_registration_end_date { '2020-11-30' }
|
7
|
+
add_and_drop_start_date { '2020-11-30' }
|
8
|
+
add_and_drop_end_date { '2020-11-30' }
|
9
|
+
penalty_add_and_drop_start_date { '2020-11-30' }
|
10
|
+
penalty_add_and_drop_end_date { '2020-11-30' }
|
11
|
+
mid_exam_start_date { '2020-11-30' }
|
12
|
+
mid_exam_end_date { '2020-11-30' }
|
13
|
+
final_exam_start_date { '2020-11-30' }
|
14
|
+
final_exam_end_date { '2020-11-30' }
|
15
|
+
grade_reporting_date { '2020-11-30' }
|
16
|
+
association :academic_year
|
17
|
+
association :semester
|
18
|
+
association :programme_type
|
19
|
+
association :programme_level
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
FactoryBot.define do
|
2
|
+
factory :classroom, class: Sis::Core::Classroom do
|
3
|
+
association :building
|
4
|
+
association :programme_level
|
5
|
+
room_number { 'RN201' }
|
6
|
+
floor { '3rd Floor' }
|
7
|
+
class_size { 40 }
|
8
|
+
class_type { 'Lab' }
|
9
|
+
square_meter { 32.5 }
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
FactoryBot.define do
|
2
|
+
factory :course_assignment, class: Sis::Core::CourseAssignment do
|
3
|
+
association :course_offering
|
4
|
+
association :section
|
5
|
+
association :instructor
|
6
|
+
association :lab_instructor, factory: :instructor
|
7
|
+
association :tutorial_instructor, factory: :instructor
|
8
|
+
end
|
9
|
+
end
|
@@ -1,7 +1,8 @@
|
|
1
1
|
FactoryBot.define do
|
2
2
|
factory :course_registration, class: 'Sis::Core::CourseRegistration' do
|
3
|
-
association :
|
3
|
+
association :course_offering
|
4
4
|
association :student
|
5
|
-
association :
|
5
|
+
association :section
|
6
|
+
date_registered { '2020-12-01' }
|
6
7
|
end
|
7
8
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
FactoryBot.define do
|
2
|
+
factory :curriculum, class: Sis::Core::Curriculum do
|
3
|
+
association :programme
|
4
|
+
association :programme_level
|
5
|
+
compulsory_course_credit_hours { 1.5 }
|
6
|
+
elective_course_credit_hours { 1.5 }
|
7
|
+
thesis_hour { 1.5 }
|
8
|
+
project_hour { 1.5 }
|
9
|
+
end
|
10
|
+
end
|