sis_core 1.0.16 → 1.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/sis/core/user_roles_controller.rb +11 -0
  3. data/app/models/sis/core/academic_calendar.rb +9 -0
  4. data/app/models/sis/core/academic_programme.rb +2 -2
  5. data/app/models/sis/core/academic_time_line.rb +14 -0
  6. data/app/models/sis/core/applicant.rb +2 -2
  7. data/app/models/sis/core/application_document.rb +1 -2
  8. data/app/models/sis/core/application_setup.rb +2 -2
  9. data/app/models/sis/core/building.rb +7 -0
  10. data/app/models/sis/core/class_schedule.rb +18 -0
  11. data/app/models/sis/core/class_time_table.rb +7 -0
  12. data/app/models/sis/core/classroom.rb +9 -0
  13. data/app/models/sis/core/course_assignment.rb +29 -0
  14. data/app/models/sis/core/course_registration.rb +12 -2
  15. data/app/models/sis/core/document_type.rb +0 -1
  16. data/app/models/sis/core/eligibility_criteria.rb +10 -0
  17. data/app/models/sis/core/entry.rb +7 -0
  18. data/app/models/sis/core/exam_result.rb +0 -1
  19. data/app/models/sis/core/identification_pattern.rb +19 -0
  20. data/app/models/sis/core/instructor.rb +5 -0
  21. data/app/models/sis/core/section.rb +9 -0
  22. data/app/models/sis/core/student.rb +17 -1
  23. data/app/models/sis/core/student_document.rb +12 -0
  24. data/app/models/sis/core/student_eligibility.rb +16 -0
  25. data/app/serializers/sis/core/user_serializer.rb +4 -0
  26. data/db/migrate/20201109064211_create_sis_core_buildings.rb +11 -0
  27. data/db/migrate/20201109070027_create_sis_core_classrooms.rb +21 -0
  28. data/db/migrate/20201109074944_create_sis_core_class_time_tables.rb +11 -0
  29. data/db/migrate/20201110075345_create_sis_core_sections.rb +13 -0
  30. data/db/migrate/20201110080957_create_sis_core_course_assignments.rb +22 -0
  31. data/db/migrate/20201110082516_create_sis_core_class_schedules.rb +22 -0
  32. data/db/migrate/20201130073930_create_sis_core_academic_calendars.rb +19 -0
  33. data/db/migrate/20201130080122_create_sis_core_academic_time_lines.rb +37 -0
  34. data/db/migrate/20201130091430_create_sis_core_eligibility_criteria.rb +13 -0
  35. data/db/migrate/20201130100442_add_fields_to_student.rb +79 -0
  36. data/db/migrate/20201130103634_create_sis_core_student_eligibilities.rb +29 -0
  37. data/db/migrate/20201201055256_add_course_offering_to_course_registration.rb +13 -0
  38. data/db/migrate/20201219073245_remove_full_name_from_instructor.rb +12 -0
  39. data/db/migrate/20201221100413_add_is_current_field_to_academic_year_and_semester.rb +7 -0
  40. data/db/migrate/20210113085806_create_sis_core_student_documents.rb +17 -0
  41. data/db/migrate/20210429112550_create_active_storage_tables.active_storage.rb +37 -0
  42. data/db/migrate/20210429113938_rename_uploaded_fields.rb +6 -0
  43. data/db/migrate/20210504115132_create_sis_core_identification_patterns.rb +23 -0
  44. data/lib/sis/core/version.rb +1 -1
  45. data/lib/sis_core.rb +0 -1
  46. data/spec/factories/sis/core/academic_calendars.rb +9 -0
  47. data/spec/factories/sis/core/academic_time_lines.rb +21 -0
  48. data/spec/factories/sis/core/applicants.rb +1 -1
  49. data/spec/factories/sis/core/application_documents.rb +1 -1
  50. data/spec/factories/sis/core/buildings.rb +7 -0
  51. data/spec/factories/sis/core/class_schedules.rb +8 -0
  52. data/spec/factories/sis/core/class_time_tables.rb +7 -0
  53. data/spec/factories/sis/core/classrooms.rb +11 -0
  54. data/spec/factories/sis/core/course_assignments.rb +9 -0
  55. data/spec/factories/sis/core/course_registrations.rb +3 -2
  56. data/spec/factories/sis/core/eligibility_criteria.rb +6 -0
  57. data/spec/factories/sis/core/entries.rb +5 -0
  58. data/spec/factories/sis/core/identification_patterns.rb +8 -0
  59. data/spec/factories/sis/core/instructor_courses.rb +2 -2
  60. data/spec/factories/sis/core/instructors.rb +3 -2
  61. data/spec/factories/sis/core/sections.rb +6 -0
  62. data/spec/factories/sis/core/student_documents.rb +6 -0
  63. data/spec/factories/sis/core/student_eligibilities.rb +10 -0
  64. data/spec/factories/sis/core/students.rb +11 -5
  65. metadata +70 -54
  66. data/app/uploaders/sis/core/application_document_uploader.rb +0 -51
  67. data/app/uploaders/sis/core/photo_uploader.rb +0 -51
@@ -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 :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
@@ -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
@@ -0,0 +1,8 @@
1
+ FactoryBot.define do
2
+ factory :identification_pattern, class: 'Sis::Core::IdentificationPattern' do
3
+ association :programme_level
4
+ association :programme_type
5
+ association :programme
6
+ id_pattern { FFaker::Name.name }
7
+ end
8
+ end
@@ -1,6 +1,6 @@
1
1
  FactoryBot.define do
2
2
  factory :instructor_course, class: 'Sis::Core::InstructorCourse' do
3
- # association :instructor
4
- # association :course
3
+ association :instructor
4
+ association :course
5
5
  end
6
6
  end
@@ -1,6 +1,7 @@
1
1
  FactoryBot.define do
2
2
  factory :instructor, class: 'Sis::Core::Instructor' do
3
- # full_name { FFaker::Name.name }
4
- # date_of_birth { Date.new(2000, 1, 1) }
3
+ middle_name { FFaker::Name.name }
4
+ date_of_birth { Date.new(2000, 1, 1) }
5
+ association :user
5
6
  end
6
7
  end
@@ -0,0 +1,6 @@
1
+ FactoryBot.define do
2
+ factory :section, class: Sis::Core::Section do
3
+ name { FFaker::Name.name }
4
+ association :entry
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ FactoryBot.define do
2
+ factory :student_document, class: Sis::Core::StudentDocument do
3
+ association :document_type
4
+ association :student
5
+ end
6
+ end
@@ -0,0 +1,10 @@
1
+ FactoryBot.define do
2
+ factory :student_eligibility, class: Sis::Core::StudentEligibility do
3
+ association :student
4
+ association :academic_year
5
+ association :semester
6
+ association :eligibility_criteria
7
+ association :cleared_by, factory: :user
8
+ is_eligible { false }
9
+ end
10
+ end
@@ -1,9 +1,15 @@
1
1
  FactoryBot.define do
2
2
  factory :student, class: 'Sis::Core::Student' do
3
- # student_id { FFaker::Name.name }
4
- # full_name { FFaker::Name.name }
5
- # date_of_birth { Date.new(2000, 1, 1) }
6
- # nationality { FFaker::Name.name }
7
- # association :program
3
+ student_id { FFaker::Name.name }
4
+ date_of_birth { Date.new(2000, 1, 1) }
5
+ nationality { FFaker::Name.name }
6
+ association :user
7
+ association :level
8
+ association :semester
9
+ association :entry
10
+ association :programme
11
+ association :programme_level
12
+ association :programme_type
13
+ association :advisor, factory: :instructor
8
14
  end
9
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sis_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.16
4
+ version: 1.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-15 00:00:00.000000000 Z
11
+ date: 2021-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aasm
@@ -44,42 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 3.1.7
47
+ version: 3.1.16
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 3.1.7
55
- - !ruby/object:Gem::Dependency
56
- name: carrierwave
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '2.0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '2.0'
69
- - !ruby/object:Gem::Dependency
70
- name: carrierwave-base64
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
54
+ version: 3.1.16
83
55
  - !ruby/object:Gem::Dependency
84
56
  name: jwt
85
57
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +72,14 @@ dependencies:
100
72
  requirements:
101
73
  - - "~>"
102
74
  - !ruby/object:Gem::Version
103
- version: 6.0.3
75
+ version: 6.1.3
104
76
  type: :runtime
105
77
  prerelease: false
106
78
  version_requirements: !ruby/object:Gem::Requirement
107
79
  requirements:
108
80
  - - "~>"
109
81
  - !ruby/object:Gem::Version
110
- version: 6.0.3
82
+ version: 6.1.3
111
83
  - !ruby/object:Gem::Dependency
112
84
  name: sqlite3
113
85
  requirement: !ruby/object:Gem::Requirement
@@ -151,21 +123,27 @@ dependencies:
151
123
  - !ruby/object:Gem::Version
152
124
  version: '0'
153
125
  - !ruby/object:Gem::Dependency
154
- name: rspec-rails
126
+ name: pg
155
127
  requirement: !ruby/object:Gem::Requirement
156
128
  requirements:
157
129
  - - ">="
158
130
  - !ruby/object:Gem::Version
159
- version: '0'
131
+ version: '0.18'
132
+ - - "<"
133
+ - !ruby/object:Gem::Version
134
+ version: '2.0'
160
135
  type: :development
161
136
  prerelease: false
162
137
  version_requirements: !ruby/object:Gem::Requirement
163
138
  requirements:
164
139
  - - ">="
165
140
  - !ruby/object:Gem::Version
166
- version: '0'
141
+ version: '0.18'
142
+ - - "<"
143
+ - !ruby/object:Gem::Version
144
+ version: '2.0'
167
145
  - !ruby/object:Gem::Dependency
168
- name: shoulda-matchers
146
+ name: rspec-rails
169
147
  requirement: !ruby/object:Gem::Requirement
170
148
  requirements:
171
149
  - - ">="
@@ -179,7 +157,7 @@ dependencies:
179
157
  - !ruby/object:Gem::Version
180
158
  version: '0'
181
159
  - !ruby/object:Gem::Dependency
182
- name: simplecov
160
+ name: shoulda-matchers
183
161
  requirement: !ruby/object:Gem::Requirement
184
162
  requirements:
185
163
  - - ">="
@@ -193,25 +171,19 @@ dependencies:
193
171
  - !ruby/object:Gem::Version
194
172
  version: '0'
195
173
  - !ruby/object:Gem::Dependency
196
- name: pg
174
+ name: simplecov
197
175
  requirement: !ruby/object:Gem::Requirement
198
176
  requirements:
199
177
  - - ">="
200
178
  - !ruby/object:Gem::Version
201
- version: '0.18'
202
- - - "<"
203
- - !ruby/object:Gem::Version
204
- version: '2.0'
179
+ version: '0'
205
180
  type: :development
206
181
  prerelease: false
207
182
  version_requirements: !ruby/object:Gem::Requirement
208
183
  requirements:
209
184
  - - ">="
210
185
  - !ruby/object:Gem::Version
211
- version: '0.18'
212
- - - "<"
213
- - !ruby/object:Gem::Version
214
- version: '2.0'
186
+ version: '0'
215
187
  description: An engine which contains the core of the student information system app
216
188
  as a layer.
217
189
  email:
@@ -225,10 +197,13 @@ files:
225
197
  - Rakefile
226
198
  - app/controllers/sis/core/application_controller.rb
227
199
  - app/controllers/sis/core/menus_controller.rb
200
+ - app/controllers/sis/core/user_roles_controller.rb
228
201
  - app/controllers/sis/core/users_controller.rb
229
202
  - app/controllers/sis/core/utils_controller.rb
203
+ - app/models/sis/core/academic_calendar.rb
230
204
  - app/models/sis/core/academic_programme.rb
231
205
  - app/models/sis/core/academic_programme_document.rb
206
+ - app/models/sis/core/academic_time_line.rb
232
207
  - app/models/sis/core/academic_year.rb
233
208
  - app/models/sis/core/applicant.rb
234
209
  - app/models/sis/core/application.rb
@@ -236,7 +211,12 @@ files:
236
211
  - app/models/sis/core/application_module.rb
237
212
  - app/models/sis/core/application_record.rb
238
213
  - app/models/sis/core/application_setup.rb
214
+ - app/models/sis/core/building.rb
215
+ - app/models/sis/core/class_schedule.rb
216
+ - app/models/sis/core/class_time_table.rb
217
+ - app/models/sis/core/classroom.rb
239
218
  - app/models/sis/core/course.rb
219
+ - app/models/sis/core/course_assignment.rb
240
220
  - app/models/sis/core/course_offering.rb
241
221
  - app/models/sis/core/course_offering_sequence.rb
242
222
  - app/models/sis/core/course_registration.rb
@@ -246,10 +226,13 @@ files:
246
226
  - app/models/sis/core/curriculum_course.rb
247
227
  - app/models/sis/core/document_requirement.rb
248
228
  - app/models/sis/core/document_type.rb
229
+ - app/models/sis/core/eligibility_criteria.rb
230
+ - app/models/sis/core/entry.rb
249
231
  - app/models/sis/core/exam.rb
250
232
  - app/models/sis/core/exam_result.rb
251
233
  - app/models/sis/core/exam_setup.rb
252
234
  - app/models/sis/core/field_of_study.rb
235
+ - app/models/sis/core/identification_pattern.rb
253
236
  - app/models/sis/core/instructor.rb
254
237
  - app/models/sis/core/instructor_course.rb
255
238
  - app/models/sis/core/level.rb
@@ -259,14 +242,16 @@ files:
259
242
  - app/models/sis/core/programme.rb
260
243
  - app/models/sis/core/programme_level.rb
261
244
  - app/models/sis/core/programme_type.rb
245
+ - app/models/sis/core/section.rb
262
246
  - app/models/sis/core/semester.rb
263
247
  - app/models/sis/core/student.rb
248
+ - app/models/sis/core/student_document.rb
249
+ - app/models/sis/core/student_eligibility.rb
264
250
  - app/models/sis/core/user.rb
265
251
  - app/models/sis/core/user_role.rb
252
+ - app/serializers/sis/core/user_serializer.rb
266
253
  - app/services/sis/core/user_service.rb
267
254
  - app/services/sis/core/util_service.rb
268
- - app/uploaders/sis/core/application_document_uploader.rb
269
- - app/uploaders/sis/core/photo_uploader.rb
270
255
  - config/database.ci.yml
271
256
  - config/routes.rb
272
257
  - db/migrate/20200105061717_create_sis_core_lookups.rb
@@ -299,7 +284,25 @@ files:
299
284
  - db/migrate/20201104085458_create_sis_core_course_offering_sequences.rb
300
285
  - db/migrate/20201104111548_create_sis_core_course_offerings.rb
301
286
  - db/migrate/20201106091250_create_sis_core_prerequisites.rb
287
+ - db/migrate/20201109064211_create_sis_core_buildings.rb
288
+ - db/migrate/20201109070027_create_sis_core_classrooms.rb
289
+ - db/migrate/20201109074944_create_sis_core_class_time_tables.rb
290
+ - db/migrate/20201110075345_create_sis_core_sections.rb
291
+ - db/migrate/20201110080957_create_sis_core_course_assignments.rb
292
+ - db/migrate/20201110082516_create_sis_core_class_schedules.rb
293
+ - db/migrate/20201130073930_create_sis_core_academic_calendars.rb
294
+ - db/migrate/20201130080122_create_sis_core_academic_time_lines.rb
295
+ - db/migrate/20201130091430_create_sis_core_eligibility_criteria.rb
296
+ - db/migrate/20201130100442_add_fields_to_student.rb
297
+ - db/migrate/20201130103634_create_sis_core_student_eligibilities.rb
298
+ - db/migrate/20201201055256_add_course_offering_to_course_registration.rb
299
+ - db/migrate/20201219073245_remove_full_name_from_instructor.rb
300
+ - db/migrate/20201221100413_add_is_current_field_to_academic_year_and_semester.rb
301
+ - db/migrate/20210113085806_create_sis_core_student_documents.rb
302
302
  - db/migrate/20210310071526_add_minimum_class_size_to_course.rb
303
+ - db/migrate/20210429112550_create_active_storage_tables.active_storage.rb
304
+ - db/migrate/20210429113938_rename_uploaded_fields.rb
305
+ - db/migrate/20210504115132_create_sis_core_identification_patterns.rb
303
306
  - lib/authorize_request.rb
304
307
  - lib/json_web_token.rb
305
308
  - lib/sis/core.rb
@@ -307,14 +310,21 @@ files:
307
310
  - lib/sis/core/version.rb
308
311
  - lib/sis_core.rb
309
312
  - lib/tasks/sis_core_tasks.rake
313
+ - spec/factories/sis/core/academic_calendars.rb
310
314
  - spec/factories/sis/core/academic_programme_documents.rb
311
315
  - spec/factories/sis/core/academic_programmes.rb
316
+ - spec/factories/sis/core/academic_time_lines.rb
312
317
  - spec/factories/sis/core/academic_years.rb
313
318
  - spec/factories/sis/core/applicants.rb
314
319
  - spec/factories/sis/core/application_documents.rb
315
320
  - spec/factories/sis/core/application_modules.rb
316
321
  - spec/factories/sis/core/application_setups.rb
317
322
  - spec/factories/sis/core/applications.rb
323
+ - spec/factories/sis/core/buildings.rb
324
+ - spec/factories/sis/core/class_schedules.rb
325
+ - spec/factories/sis/core/class_time_tables.rb
326
+ - spec/factories/sis/core/classrooms.rb
327
+ - spec/factories/sis/core/course_assignments.rb
318
328
  - spec/factories/sis/core/course_offering_sequences.rb
319
329
  - spec/factories/sis/core/course_offerings.rb
320
330
  - spec/factories/sis/core/course_registrations.rb
@@ -325,9 +335,12 @@ files:
325
335
  - spec/factories/sis/core/curriculums.rb
326
336
  - spec/factories/sis/core/document_requirements.rb
327
337
  - spec/factories/sis/core/document_types.rb
338
+ - spec/factories/sis/core/eligibility_criteria.rb
339
+ - spec/factories/sis/core/entries.rb
328
340
  - spec/factories/sis/core/exam_results.rb
329
341
  - spec/factories/sis/core/exam_setups.rb
330
342
  - spec/factories/sis/core/exams.rb
343
+ - spec/factories/sis/core/identification_patterns.rb
331
344
  - spec/factories/sis/core/instructor_courses.rb
332
345
  - spec/factories/sis/core/instructors.rb
333
346
  - spec/factories/sis/core/levels.rb
@@ -337,7 +350,10 @@ files:
337
350
  - spec/factories/sis/core/programme_levels.rb
338
351
  - spec/factories/sis/core/programme_types.rb
339
352
  - spec/factories/sis/core/programmes.rb
353
+ - spec/factories/sis/core/sections.rb
340
354
  - spec/factories/sis/core/semesters.rb
355
+ - spec/factories/sis/core/student_documents.rb
356
+ - spec/factories/sis/core/student_eligibilities.rb
341
357
  - spec/factories/sis/core/students.rb
342
358
  - spec/factories/sis/core/user_roles.rb
343
359
  - spec/factories/sis/core/users.rb
@@ -345,7 +361,7 @@ homepage: http://www.mks.com.et
345
361
  licenses:
346
362
  - MIT
347
363
  metadata: {}
348
- post_install_message:
364
+ post_install_message:
349
365
  rdoc_options: []
350
366
  require_paths:
351
367
  - lib
@@ -360,8 +376,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
360
376
  - !ruby/object:Gem::Version
361
377
  version: '0'
362
378
  requirements: []
363
- rubygems_version: 3.1.4
364
- signing_key:
379
+ rubygems_version: 3.2.15
380
+ signing_key:
365
381
  specification_version: 4
366
382
  summary: Core engine for student information system application.
367
383
  test_files: []
@@ -1,51 +0,0 @@
1
- module Sis
2
- module Core
3
- class ApplicationDocumentUploader < CarrierWave::Uploader::Base
4
- # Include RMagick or MiniMagick support:
5
- # include CarrierWave::RMagick
6
- # include CarrierWave::MiniMagick
7
-
8
- # Choose what kind of storage to use for this uploader:
9
- storage :file
10
- # storage :fog
11
-
12
- # Override the directory where uploaded files will be stored.
13
- # This is a sensible default for uploaders that are meant to be mounted:
14
- def store_dir
15
- ENV.fetch('UPLOAD_PREFIX') + "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
16
- end
17
-
18
- # Provide a default URL as a default if there hasn't been a file uploaded:
19
- # def default_url(*args)
20
- # # For Rails 3.1+ asset pipeline compatibility:
21
- # # ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
22
- #
23
- # "/images/fallback/" + [version_name, "default.png"].compact.join('_')
24
- # end
25
-
26
- # Process files as they are uploaded:
27
- # process scale: [200, 300]
28
- #
29
- # def scale(width, height)
30
- # # do something
31
- # end
32
-
33
- # Create different versions of your uploaded files:
34
- # version :thumb do
35
- # process resize_to_fit: [50, 50]
36
- # end
37
-
38
- # Add a white list of extensions which are allowed to be uploaded.
39
- # For images you might use something like this:
40
- def extension_whitelist
41
- %w[pdf]
42
- end
43
-
44
- # Override the filename of the uploaded files:
45
- # Avoid using model.id or version_name here, see uploader/store.rb for details.
46
- # def filename
47
- # "something.jpg" if original_filename
48
- # end
49
- end
50
- end
51
- end