sis_core 1.0.14 → 1.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/sis/core/user_roles_controller.rb +11 -0
  3. data/app/controllers/sis/core/utils_controller.rb +19 -0
  4. data/app/models/sis/core/academic_calendar.rb +9 -0
  5. data/app/models/sis/core/academic_programme.rb +2 -2
  6. data/app/models/sis/core/academic_time_line.rb +14 -0
  7. data/app/models/sis/core/applicant.rb +2 -2
  8. data/app/models/sis/core/application_document.rb +1 -2
  9. data/app/models/sis/core/application_record.rb +4 -0
  10. data/app/models/sis/core/application_setup.rb +2 -2
  11. data/app/models/sis/core/building.rb +7 -0
  12. data/app/models/sis/core/class_schedule.rb +18 -0
  13. data/app/models/sis/core/class_time_table.rb +7 -0
  14. data/app/models/sis/core/classroom.rb +9 -0
  15. data/app/models/sis/core/course.rb +2 -4
  16. data/app/models/sis/core/course_assignment.rb +41 -0
  17. data/app/models/sis/core/course_offering.rb +19 -0
  18. data/app/models/sis/core/course_offering_sequence.rb +42 -0
  19. data/app/models/sis/core/course_registration.rb +12 -2
  20. data/app/models/sis/core/credit_hour_rate.rb +1 -0
  21. data/app/models/sis/core/curriculum.rb +17 -0
  22. data/app/models/sis/core/curriculum_course.rb +19 -0
  23. data/app/models/sis/core/document_type.rb +0 -1
  24. data/app/models/sis/core/eligibility_criteria.rb +10 -0
  25. data/app/models/sis/core/entry.rb +7 -0
  26. data/app/models/sis/core/exam_result.rb +0 -1
  27. data/app/models/sis/core/identification_pattern.rb +19 -0
  28. data/app/models/sis/core/instructor.rb +5 -0
  29. data/app/models/sis/core/level.rb +7 -0
  30. data/app/models/sis/core/prerequisite.rb +16 -0
  31. data/app/models/sis/core/section.rb +9 -0
  32. data/app/models/sis/core/student.rb +17 -1
  33. data/app/models/sis/core/student_document.rb +12 -0
  34. data/app/models/sis/core/student_eligibility.rb +16 -0
  35. data/app/serializers/sis/core/user_serializer.rb +8 -0
  36. data/app/services/sis/core/util_service.rb +16 -0
  37. data/config/routes.rb +2 -0
  38. data/db/migrate/20201102134749_create_sis_core_curriculums.rb +20 -0
  39. data/db/migrate/20201102182012_remove_programme_and_add_maximum_class_size_to_course.rb +10 -0
  40. data/db/migrate/20201102192055_create_sis_core_curriculum_courses.rb +17 -0
  41. data/db/migrate/20201104085458_create_sis_core_course_offering_sequences.rb +24 -0
  42. data/db/migrate/20201104111548_create_sis_core_course_offerings.rb +24 -0
  43. data/db/migrate/20201106091250_create_sis_core_prerequisites.rb +15 -0
  44. data/db/migrate/20201109064211_create_sis_core_buildings.rb +11 -0
  45. data/db/migrate/20201109070027_create_sis_core_classrooms.rb +21 -0
  46. data/db/migrate/20201109074944_create_sis_core_class_time_tables.rb +11 -0
  47. data/db/migrate/20201110075345_create_sis_core_sections.rb +13 -0
  48. data/db/migrate/20201110080957_create_sis_core_course_assignments.rb +22 -0
  49. data/db/migrate/20201110082516_create_sis_core_class_schedules.rb +22 -0
  50. data/db/migrate/20201130073930_create_sis_core_academic_calendars.rb +19 -0
  51. data/db/migrate/20201130080122_create_sis_core_academic_time_lines.rb +37 -0
  52. data/db/migrate/20201130091430_create_sis_core_eligibility_criteria.rb +13 -0
  53. data/db/migrate/20201130100442_add_fields_to_student.rb +82 -0
  54. data/db/migrate/20201130103634_create_sis_core_student_eligibilities.rb +29 -0
  55. data/db/migrate/20201201055256_add_course_offering_to_course_registration.rb +13 -0
  56. data/db/migrate/20201219073245_remove_full_name_from_instructor.rb +12 -0
  57. data/db/migrate/20201221100413_add_is_current_field_to_academic_year_and_semester.rb +7 -0
  58. data/db/migrate/20210113085806_create_sis_core_student_documents.rb +17 -0
  59. data/db/migrate/20210310071526_add_minimum_class_size_to_course.rb +6 -0
  60. data/db/migrate/20210429112550_create_active_storage_tables.active_storage.rb +37 -0
  61. data/db/migrate/20210429113938_rename_uploaded_fields.rb +6 -0
  62. data/db/migrate/20210504115132_create_sis_core_identification_patterns.rb +23 -0
  63. data/db/migrate/20210513080708_add_unique_index_to_models.rb +8 -0
  64. data/lib/sis/core/version.rb +1 -1
  65. data/lib/sis_core.rb +0 -1
  66. data/spec/factories/sis/core/academic_calendars.rb +9 -0
  67. data/spec/factories/sis/core/academic_time_lines.rb +21 -0
  68. data/spec/factories/sis/core/applicants.rb +1 -1
  69. data/spec/factories/sis/core/application_documents.rb +1 -1
  70. data/spec/factories/sis/core/buildings.rb +7 -0
  71. data/spec/factories/sis/core/class_schedules.rb +8 -0
  72. data/spec/factories/sis/core/class_time_tables.rb +7 -0
  73. data/spec/factories/sis/core/classrooms.rb +11 -0
  74. data/spec/factories/sis/core/course_assignments.rb +9 -0
  75. data/spec/factories/sis/core/course_offering_sequences.rb +8 -0
  76. data/spec/factories/sis/core/course_offerings.rb +8 -0
  77. data/spec/factories/sis/core/course_registrations.rb +3 -2
  78. data/spec/factories/sis/core/courses.rb +3 -1
  79. data/spec/factories/sis/core/curriculum_courses.rb +7 -0
  80. data/spec/factories/sis/core/eligibility_criteria.rb +6 -0
  81. data/spec/factories/sis/core/entries.rb +5 -0
  82. data/spec/factories/sis/core/identification_patterns.rb +8 -0
  83. data/spec/factories/sis/core/instructor_courses.rb +2 -2
  84. data/spec/factories/sis/core/instructors.rb +3 -2
  85. data/spec/factories/sis/core/levels.rb +5 -0
  86. data/spec/factories/sis/core/prerequisites.rb +6 -0
  87. data/spec/factories/sis/core/sections.rb +6 -0
  88. data/spec/factories/sis/core/student_documents.rb +6 -0
  89. data/spec/factories/sis/core/student_eligibilities.rb +10 -0
  90. data/spec/factories/sis/core/students.rb +11 -5
  91. metadata +91 -54
  92. data/app/uploaders/sis/core/application_document_uploader.rb +0 -51
  93. 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,6 @@
1
+ class AddMinimumClassSizeToCourse < ActiveRecord::Migration[6.0]
2
+ def change
3
+ add_column :sis_core_courses, :minimum_class_size, :integer
4
+ change_column :sis_core_courses, :lab_hours, :float, null: true
5
+ end
6
+ 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,6 @@
1
+ class RenameUploadedFields < ActiveRecord::Migration[6.0]
2
+ def change
3
+ rename_column :sis_core_applicants, :photo, :photo_url
4
+ rename_column :sis_core_application_documents, :document, :document_url
5
+ end
6
+ 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
@@ -1,5 +1,5 @@
1
1
  module Sis
2
2
  module Core
3
- VERSION = '1.0.14'.freeze
3
+ VERSION = '1.0.19'.freeze
4
4
  end
5
5
  end
data/lib/sis_core.rb CHANGED
@@ -4,4 +4,3 @@ require 'jwt'
4
4
  require 'bcrypt'
5
5
  require 'aasm'
6
6
  require 'active_model_serializers'
7
- require 'carrierwave'
@@ -0,0 +1,9 @@
1
+ FactoryBot.define do
2
+ factory :academic_calendar, class: Sis::Core::AcademicCalendar do
3
+ association :academic_year
4
+ association :semester
5
+ start_date { '2020-11-30' }
6
+ end_date { '2020-11-30' }
7
+ event { FFaker::Name.name }
8
+ end
9
+ end
@@ -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
@@ -11,6 +11,6 @@ FactoryBot.define do
11
11
  gender { FFaker::Gender.binary }
12
12
  nationality { FFaker::Name.name }
13
13
  address { FFaker::Address.city }
14
- photo { FFaker::Name.name }
14
+ photo_url { FFaker::Name.name }
15
15
  end
16
16
  end
@@ -1,6 +1,6 @@
1
1
  FactoryBot.define do
2
2
  factory :application_document, class: Sis::Core::ApplicationDocument do
3
- document { FFaker::Name.name }
3
+ document_url { FFaker::Name.name }
4
4
  association :document_requirement
5
5
  association :application
6
6
  end
@@ -0,0 +1,7 @@
1
+ FactoryBot.define do
2
+ factory :building, class: Sis::Core::Building do
3
+ code { FFaker::Name.name }
4
+ name { FFaker::Name.name }
5
+ location { FFaker::Name.name }
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ FactoryBot.define do
2
+ factory :class_schedule, class: Sis::Core::ClassSchedule do
3
+ association :classroom
4
+ association :class_time_table
5
+ association :course_assignment
6
+ day { 'Monday' }
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ FactoryBot.define do
2
+ factory :class_time_table, class: Sis::Core::ClassTimeTable do
3
+ name { FFaker::Name.name }
4
+ from { '8:30am' }
5
+ to { '9:10am' }
6
+ end
7
+ 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
@@ -0,0 +1,8 @@
1
+ FactoryBot.define do
2
+ factory :course_offering_sequence, class: Sis::Core::CourseOfferingSequence do
3
+ association :curriculum_course
4
+ association :programme_type
5
+ association :level
6
+ association :semester
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ FactoryBot.define do
2
+ factory :course_offering, class: Sis::Core::CourseOffering do
3
+ association :course_offering_sequence
4
+ association :academic_year
5
+ association :semester
6
+ association :level
7
+ end
8
+ end
@@ -1,7 +1,8 @@
1
1
  FactoryBot.define do
2
2
  factory :course_registration, class: 'Sis::Core::CourseRegistration' do
3
- association :course
3
+ association :course_offering
4
4
  association :student
5
- association :semester
5
+ association :section
6
+ date_registered { '2020-12-01' }
6
7
  end
7
8
  end
@@ -7,6 +7,8 @@ FactoryBot.define do
7
7
  ects { FFaker::Random.rand(1..10) }
8
8
  lecture_hours { FFaker::Random.rand(1..4) }
9
9
  lab_hours { FFaker::Random.rand(1..4) }
10
- association :program
10
+ has_lab { true }
11
+ has_tutorial { false }
12
+ maximum_class_size { 40 }
11
13
  end
12
14
  end
@@ -0,0 +1,7 @@
1
+ FactoryBot.define do
2
+ factory :curriculum_course, class: Sis::Core::CurriculumCourse do
3
+ association :curriculum
4
+ association :course
5
+ course_type { 'Compulsory' }
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ FactoryBot.define do
2
+ factory :eligibility_criteria, class: Sis::Core::EligibilityCriteria do
3
+ association :clearing_role, factory: :user_role
4
+ description { FFaker::Name.name }
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ FactoryBot.define do
2
+ factory :entry, class: Sis::Core::Entry, parent: :lookup do
3
+ type { 'Sis::Core::Entry' }
4
+ end
5
+ end