sis_core 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/sis/core/academic_programme.rb +7 -0
- data/app/models/sis/core/academic_year.rb +1 -0
- data/app/models/sis/core/applicant.rb +1 -1
- data/app/models/sis/core/application.rb +47 -0
- data/app/models/sis/core/application_document.rb +10 -0
- data/app/models/sis/core/application_setup.rb +14 -0
- data/app/models/sis/core/document_requirement.rb +10 -0
- data/app/models/sis/core/{program_type.rb → document_type.rb} +1 -1
- data/app/models/sis/core/exam.rb +15 -0
- data/app/models/sis/core/exam_result.rb +19 -0
- data/app/models/sis/core/exam_setup.rb +7 -0
- data/app/models/sis/core/programme.rb +7 -0
- data/app/models/sis/core/programme_level.rb +6 -0
- data/app/models/sis/core/programme_type.rb +6 -0
- data/app/models/sis/core/semester.rb +2 -0
- data/db/migrate/{20200307072142_create_sis_core_academic_years.rb → 20200105072142_create_sis_core_academic_years.rb} +2 -1
- data/db/migrate/{20200307072246_create_sis_core_semesters.rb → 20200106072246_create_sis_core_semesters.rb} +0 -0
- data/db/migrate/20200106130428_create_sis_core_programmes.rb +10 -0
- data/db/migrate/20200106132035_create_sis_core_academic_programmes.rb +21 -0
- data/db/migrate/20200106132521_create_sis_core_application_setups.rb +19 -0
- data/db/migrate/20200106133034_create_sis_core_document_requirements.rb +19 -0
- data/db/migrate/20200106133937_create_sis_core_applicants.rb +1 -3
- data/db/migrate/20200107094449_create_sis_core_applications.rb +26 -0
- data/db/migrate/20200107101638_create_sis_core_application_documents.rb +16 -0
- data/db/migrate/20200107302251_create_sis_core_exam_setups.rb +15 -0
- data/db/migrate/20200107333411_create_sis_core_exams.rb +17 -0
- data/db/migrate/20200107434658_create_sis_core_exam_results.rb +18 -0
- data/db/migrate/20200307033100_create_sis_core_courses.rb +2 -2
- data/db/migrate/20200307072006_create_sis_core_students.rb +2 -2
- data/lib/sis/core/engine.rb +0 -2
- data/lib/sis/core/version.rb +1 -1
- data/lib/sis_core.rb +3 -0
- data/spec/factories/sis/core/academic_programmes.rb +8 -0
- data/spec/factories/sis/core/academic_years.rb +2 -1
- data/spec/factories/sis/core/applicants.rb +2 -4
- data/spec/factories/sis/core/application_documents.rb +7 -0
- data/spec/factories/sis/core/application_setups.rb +9 -0
- data/spec/factories/sis/core/applications.rb +16 -0
- data/spec/factories/sis/core/document_requirements.rb +9 -0
- data/spec/factories/sis/core/document_types.rb +5 -0
- data/spec/factories/sis/core/exam_results.rb +8 -0
- data/spec/factories/sis/core/exam_setups.rb +8 -0
- data/spec/factories/sis/core/exams.rb +10 -0
- data/spec/factories/sis/core/instructor_courses.rb +2 -2
- data/spec/factories/sis/core/instructors.rb +2 -2
- data/spec/factories/sis/core/programme_levels.rb +5 -0
- data/spec/factories/sis/core/programme_types.rb +5 -0
- data/spec/factories/sis/core/programmes.rb +6 -0
- data/spec/factories/sis/core/semesters.rb +1 -1
- data/spec/factories/sis/core/staffs.rb +31 -28
- data/spec/factories/sis/core/students.rb +5 -5
- metadata +65 -17
- data/app/models/sis/core/attached_document.rb +0 -8
- data/app/models/sis/core/enrollment_application.rb +0 -9
- data/app/models/sis/core/program.rb +0 -9
- data/db/migrate/20200106001016_create_sis_core_field_of_studies.rb +0 -9
- data/db/migrate/20200106130428_create_sis_core_programs.rb +0 -10
- data/db/migrate/20200108094449_create_sis_core_enrollment_applications.rb +0 -10
- data/db/migrate/20200108101638_create_sis_core_attached_documents.rb +0 -11
- data/spec/factories/sis/core/attached_documents.rb +0 -7
- data/spec/factories/sis/core/enrollment_applications.rb +0 -7
- data/spec/factories/sis/core/field_of_studies.rb +0 -6
- data/spec/factories/sis/core/program_types.rb +0 -5
- data/spec/factories/sis/core/programs.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a88af09f30c54f634169a0051ad20db0e505581463a8b94af3baf6cfc10b9f17
|
4
|
+
data.tar.gz: ebe53808d2a44ab226f2bc4f8d9e087e9504586eac604286bbe1c16b9d35dad0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a422801f3afecd6e9e7ca9f2b7c5aeb03caebdf0dcbdffe10e446b9aa4f7f87cbfc8f882a40879d21533fd3a049e04a91885d263c4b67c6656d7b25f411094c9
|
7
|
+
data.tar.gz: 27c8b0c2091c608f81193b01af3973769e9281c161a2f6283b568fb6bca725bbe38543d6c00e814fc155774285d752e46e021524bc40e040dcb617e3abd2feee
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Sis
|
2
|
+
module Core
|
3
|
+
class Application < ApplicationRecord
|
4
|
+
include AASM
|
5
|
+
|
6
|
+
# Gender types
|
7
|
+
MALE = 'Male'.freeze
|
8
|
+
FEMALE = 'Female'.freeze
|
9
|
+
|
10
|
+
aasm column: :status do
|
11
|
+
state :draft, initial: true
|
12
|
+
state :submitted, :under_review, :accepted, :rejected, :selected_for_exam, :selected_for_admission
|
13
|
+
|
14
|
+
event :submit do
|
15
|
+
transitions from: :draft, to: :submitted
|
16
|
+
end
|
17
|
+
|
18
|
+
event :review do
|
19
|
+
transitions from: [:submitted, :rejected, :accepted], to: :under_review
|
20
|
+
end
|
21
|
+
|
22
|
+
event :accept do
|
23
|
+
transitions from: :under_review, to: :accepted
|
24
|
+
end
|
25
|
+
|
26
|
+
event :reject do
|
27
|
+
transitions from: :under_review, to: :rejected
|
28
|
+
end
|
29
|
+
|
30
|
+
event :select_for_exam do
|
31
|
+
transitions from: :accepted, to: :selected_for_exam
|
32
|
+
end
|
33
|
+
|
34
|
+
event :select_for_admission do
|
35
|
+
transitions from: :selected_for_exam, to: :selected_for_admission
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
|
40
|
+
validates :full_name, :email, :age, :gender, :nationality, :status, presence: true
|
41
|
+
validates :payment_information, presence: true, if: :payment_made
|
42
|
+
|
43
|
+
belongs_to :applicant
|
44
|
+
belongs_to :academic_programme
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Sis::Core
|
2
|
+
class ApplicationSetup < ApplicationRecord
|
3
|
+
OPEN = 'Open'.freeze
|
4
|
+
CLOSED = 'Closed'.freeze
|
5
|
+
|
6
|
+
belongs_to :academic_programme
|
7
|
+
belongs_to :target_semester, class_name: 'Sis::Core::Semester'
|
8
|
+
has_many :document_requirements
|
9
|
+
|
10
|
+
validates :start_date, :end_date, :status, presence: true
|
11
|
+
validates :status, inclusion: [OPEN, CLOSED]
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Sis
|
2
|
+
module Core
|
3
|
+
class Exam < ApplicationRecord
|
4
|
+
belongs_to :exam_setup
|
5
|
+
|
6
|
+
validates :title, :start, :finish, :pass_point, :points, presence: true
|
7
|
+
|
8
|
+
before_validation :set_pass_point
|
9
|
+
|
10
|
+
def set_pass_point
|
11
|
+
self.pass_point = self.points / 2 unless self.pass_point || !self.points
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Sis
|
2
|
+
module Core
|
3
|
+
class ExamResult < ApplicationRecord
|
4
|
+
PASS = 'Pass'.freeze
|
5
|
+
FAIL = 'Fail'.freeze
|
6
|
+
|
7
|
+
belongs_to :exam
|
8
|
+
belongs_to :application
|
9
|
+
|
10
|
+
validates :points, presence: true
|
11
|
+
|
12
|
+
before_validation :set_status
|
13
|
+
|
14
|
+
def set_status
|
15
|
+
self.status = (exam && exam.pass_point >= points) ? PASS : FAIL
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class CreateSisCoreAcademicProgrammes < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :sis_core_academic_programmes do |t|
|
4
|
+
t.integer :duration, null: false
|
5
|
+
t.references :programme,
|
6
|
+
null: false,
|
7
|
+
index: { name: 'ap_on_programme_indx' },
|
8
|
+
foreign_key: { to_table: :sis_core_programmes }
|
9
|
+
t.references :programme_type,
|
10
|
+
null: false,
|
11
|
+
index: { name: 'ap_on_pt_indx' },
|
12
|
+
foreign_key: { to_table: :sis_core_lookups }
|
13
|
+
t.references :programme_level,
|
14
|
+
null: false,
|
15
|
+
index: { name: 'ap_on_pl_indx' },
|
16
|
+
foreign_key: { to_table: :sis_core_lookups }
|
17
|
+
|
18
|
+
t.timestamps
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreateSisCoreApplicationSetups < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :sis_core_application_setups do |t|
|
4
|
+
t.date :start_date, null: false
|
5
|
+
t.date :end_date, null: false
|
6
|
+
t.string :status, null: false, default: 'Open'
|
7
|
+
t.references :academic_programme,
|
8
|
+
null: false,
|
9
|
+
index: { name: 'as_on_ap_indx' },
|
10
|
+
foreign_key: { to_table: :sis_core_academic_programmes }
|
11
|
+
t.references :target_semester,
|
12
|
+
null: false,
|
13
|
+
index: { name: 'as_on_ts_indx' },
|
14
|
+
foreign_key: { to_table: :sis_core_semesters }
|
15
|
+
|
16
|
+
t.timestamps
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreateSisCoreDocumentRequirements < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :sis_core_document_requirements do |t|
|
4
|
+
t.integer :original, null: false, default: 0
|
5
|
+
t.integer :copy, null: false, default: 0
|
6
|
+
t.string :remark
|
7
|
+
t.references :document_type,
|
8
|
+
null: false,
|
9
|
+
index: { name: 'adr_on_dc_indx' },
|
10
|
+
foreign_key: { to_table: :sis_core_lookups }
|
11
|
+
t.references :application_setup,
|
12
|
+
null: false,
|
13
|
+
index: { name: 'adr_on_as_indx' },
|
14
|
+
foreign_key: { to_table: :sis_core_application_setups }
|
15
|
+
|
16
|
+
t.timestamps
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -1,9 +1,7 @@
|
|
1
1
|
class CreateSisCoreApplicants < ActiveRecord::Migration[6.0]
|
2
2
|
def change
|
3
3
|
create_table :sis_core_applicants do |t|
|
4
|
-
t.string :
|
5
|
-
t.string :middle_name, null: false
|
6
|
-
t.string :last_name, null: false
|
4
|
+
t.string :full_name, null: false
|
7
5
|
t.string :email, null: false, unique: true
|
8
6
|
t.string :phone_number, null: false
|
9
7
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class CreateSisCoreApplications < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :sis_core_applications do |t|
|
4
|
+
t.string :full_name, null: false
|
5
|
+
t.string :email, null: false
|
6
|
+
t.integer :age, null: false
|
7
|
+
t.string :gender, null: false
|
8
|
+
t.string :nationality, null: false
|
9
|
+
t.string :status, null: false, default: 'Draft'
|
10
|
+
t.boolean :payment_made, null: false, default: false
|
11
|
+
t.string :address
|
12
|
+
t.string :payment_information
|
13
|
+
t.date :application_date
|
14
|
+
t.references :applicant,
|
15
|
+
null: false,
|
16
|
+
index: { name: 'applications_on_applicant_indx' },
|
17
|
+
foreign_key: { to_table: :sis_core_applicants }
|
18
|
+
t.references :academic_programme,
|
19
|
+
null: false,
|
20
|
+
index: { name: 'applications_on_ap_indx' },
|
21
|
+
foreign_key: { to_table: :sis_core_academic_programmes }
|
22
|
+
|
23
|
+
t.timestamps
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateSisCoreApplicationDocuments < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :sis_core_application_documents do |t|
|
4
|
+
t.string :document, null: false
|
5
|
+
t.references :document_requirement,
|
6
|
+
null: false,
|
7
|
+
index: { name: 'ad_on_adr_indx' },
|
8
|
+
foreign_key: { to_table: :sis_core_document_requirements }
|
9
|
+
t.references :application,
|
10
|
+
null: false,
|
11
|
+
index: { name: 'ad_on_application_indx' },
|
12
|
+
foreign_key: { to_table: :sis_core_applications }
|
13
|
+
t.timestamps
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateSisCoreExamSetups < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :sis_core_exam_setups do |t|
|
4
|
+
t.date :date, null: false
|
5
|
+
t.float :hours, null: false
|
6
|
+
t.string :venue, null: false
|
7
|
+
t.references :application_setup,
|
8
|
+
null: false,
|
9
|
+
index: { name: 'es_on_as_indx' },
|
10
|
+
foreign_key: { to_table: :sis_core_application_setups }
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateSisCoreExams < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :sis_core_exams do |t|
|
4
|
+
t.string :title, null: false
|
5
|
+
t.datetime :start, null: false
|
6
|
+
t.datetime :finish, null: false
|
7
|
+
t.float :points, null: false
|
8
|
+
t.float :pass_point, null: false
|
9
|
+
t.references :exam_setup,
|
10
|
+
null: false,
|
11
|
+
index: { name: 'exams_on_es_indx' },
|
12
|
+
foreign_key: { to_table: :sis_core_exam_setups }
|
13
|
+
|
14
|
+
t.timestamps
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateSisCoreExamResults < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :sis_core_exam_results do |t|
|
4
|
+
t.float :points, null: false
|
5
|
+
t.string :status, null: false
|
6
|
+
t.references :exam,
|
7
|
+
null: false,
|
8
|
+
index: { name: 'er_on_exam_indx' },
|
9
|
+
foreign_key: { to_table: :sis_core_exams }
|
10
|
+
t.references :application,
|
11
|
+
null: false,
|
12
|
+
index: { name: 'er_on_application_indx' },
|
13
|
+
foreign_key: { to_table: :sis_core_applications }
|
14
|
+
|
15
|
+
t.timestamps
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -8,10 +8,10 @@ class CreateSisCoreCourses < ActiveRecord::Migration[6.0]
|
|
8
8
|
t.float :ects, null: false
|
9
9
|
t.float :lecture_hours, null: false
|
10
10
|
t.float :lab_hours, null: false
|
11
|
-
t.references :
|
11
|
+
t.references :academic_programme,
|
12
12
|
index: { name: 'program_on_courses_indx' },
|
13
13
|
null: false,
|
14
|
-
foreign_key: { to_table: :
|
14
|
+
foreign_key: { to_table: :sis_core_academic_programmes }
|
15
15
|
|
16
16
|
t.timestamps
|
17
17
|
end
|
@@ -5,10 +5,10 @@ class CreateSisCoreStudents < ActiveRecord::Migration[6.0]
|
|
5
5
|
t.string :full_name, null: false
|
6
6
|
t.date :date_of_birth, null: false
|
7
7
|
t.string :nationality, null: false
|
8
|
-
t.references :
|
8
|
+
t.references :academic_programme,
|
9
9
|
index: { name: 'program_on_student_indx' },
|
10
10
|
null: false,
|
11
|
-
foreign_key: { to_table: :
|
11
|
+
foreign_key: { to_table: :sis_core_academic_programmes }
|
12
12
|
|
13
13
|
t.timestamps
|
14
14
|
end
|
data/lib/sis/core/engine.rb
CHANGED
data/lib/sis/core/version.rb
CHANGED
data/lib/sis_core.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
FactoryBot.define do
|
2
|
-
factory :applicant, class:
|
3
|
-
|
4
|
-
middle_name { FFaker::Name.name }
|
5
|
-
last_name { FFaker::Name.name }
|
2
|
+
factory :applicant, class: Sis::Core::Applicant do
|
3
|
+
full_name { FFaker::Name.name }
|
6
4
|
email { FFaker::Internet.email }
|
7
5
|
phone_number { FFaker::PhoneNumber.phone_number }
|
8
6
|
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
FactoryBot.define do
|
2
|
+
factory :application_setup, class: Sis::Core::ApplicationSetup do
|
3
|
+
association :academic_programme
|
4
|
+
association :target_semester, factory: :semester
|
5
|
+
start_date { Date.today - 15.days }
|
6
|
+
end_date { Date.today + 15.days }
|
7
|
+
status { 'Open' }
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
FactoryBot.define do
|
2
|
+
factory :application, class: Sis::Core::Application do
|
3
|
+
full_name { FFaker::Name.name }
|
4
|
+
email { FFaker::Internet.email }
|
5
|
+
age { FFaker::Random.rand(20..30) }
|
6
|
+
gender { Sis::Core::Application::MALE }
|
7
|
+
nationality { FFaker::Address.country }
|
8
|
+
status { :draft }
|
9
|
+
payment_made { false }
|
10
|
+
payment_information { nil }
|
11
|
+
address { FFaker::Address.street_address }
|
12
|
+
application_date { Date.today }
|
13
|
+
association :applicant
|
14
|
+
association :academic_programme
|
15
|
+
end
|
16
|
+
end
|
@@ -1,32 +1,35 @@
|
|
1
1
|
FactoryBot.define do
|
2
|
-
SINGLE = 'Single'.freeze
|
3
|
-
MARRIED = 'Married'.freeze
|
4
|
-
MARITAL_STATUS = [SINGLE, MARRIED].freeze
|
5
2
|
factory :staff, class: 'Sis::Core::Staff' do
|
6
|
-
|
7
|
-
job_title { FFaker::Job.title }
|
8
|
-
job_level { FFaker::Company.position }
|
9
|
-
department { FFaker::Education.school_name }
|
10
|
-
date_of_employment { FFaker::Time.date }
|
11
|
-
salary { [2000, 5500.5, 10_000, 20_000].sample }
|
12
|
-
remark { FFaker::Lorem.sentence }
|
13
|
-
mothers_name { FFaker::Name.name }
|
14
|
-
education_level { FFaker::Education.degree }
|
15
|
-
phone_number { FFaker::PhoneNumber.phone_number }
|
16
|
-
place_of_birth { FFaker::Address.city }
|
17
|
-
marital_status { %w[Single Married].sample }
|
18
|
-
region { FFaker::Address.city }
|
19
|
-
zone { FFaker::Address.neighborhood }
|
20
|
-
wereda { [1, 2, 5, 13].sample }
|
21
|
-
kebele { [1, 2, 5, 13].sample }
|
22
|
-
passport_number { FFaker::Guid.guid }
|
23
|
-
id_number { FFaker::Guid.guid }
|
24
|
-
emergency_contact_name { FFaker::Name.name }
|
25
|
-
emergency_contact_phone { FFaker::PhoneNumber.phone_number }
|
26
|
-
relation_to_emergency_contact do
|
27
|
-
%w[mother,father,brother,spouse].sample
|
28
|
-
end
|
29
|
-
created_at { FFaker::Time.datetime }
|
30
|
-
updated_at { FFaker::Time.datetime }
|
3
|
+
|
31
4
|
end
|
5
|
+
# SINGLE = 'Single'.freeze
|
6
|
+
# MARRIED = 'Married'.freeze
|
7
|
+
# MARITAL_STATUS = [SINGLE, MARRIED].freeze
|
8
|
+
# factory :staff, class: 'Sis::Core::Staff' do
|
9
|
+
# user
|
10
|
+
# job_title { FFaker::Job.title }
|
11
|
+
# job_level { FFaker::Company.position }
|
12
|
+
# department { FFaker::Education.school_name }
|
13
|
+
# date_of_employment { FFaker::Time.date }
|
14
|
+
# salary { [2000, 5500.5, 10_000, 20_000].sample }
|
15
|
+
# remark { FFaker::Lorem.sentence }
|
16
|
+
# mothers_name { FFaker::Name.name }
|
17
|
+
# education_level { FFaker::Education.degree }
|
18
|
+
# phone_number { FFaker::PhoneNumber.phone_number }
|
19
|
+
# place_of_birth { FFaker::Address.city }
|
20
|
+
# marital_status { %w[Single Married].sample }
|
21
|
+
# region { FFaker::Address.city }
|
22
|
+
# zone { FFaker::Address.neighborhood }
|
23
|
+
# wereda { [1, 2, 5, 13].sample }
|
24
|
+
# kebele { [1, 2, 5, 13].sample }
|
25
|
+
# passport_number { FFaker::Guid.guid }
|
26
|
+
# id_number { FFaker::Guid.guid }
|
27
|
+
# emergency_contact_name { FFaker::Name.name }
|
28
|
+
# emergency_contact_phone { FFaker::PhoneNumber.phone_number }
|
29
|
+
# relation_to_emergency_contact do
|
30
|
+
# %w[mother,father,brother,spouse].sample
|
31
|
+
# end
|
32
|
+
# created_at { FFaker::Time.datetime }
|
33
|
+
# updated_at { FFaker::Time.datetime }
|
34
|
+
# end
|
32
35
|
end
|
@@ -1,9 +1,9 @@
|
|
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
|
+
# full_name { FFaker::Name.name }
|
5
|
+
# date_of_birth { Date.new(2000, 1, 1) }
|
6
|
+
# nationality { FFaker::Name.name }
|
7
|
+
# association :program
|
8
8
|
end
|
9
9
|
end
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sis_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henock L.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aasm
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: active_model_serializers
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.10.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.10.0
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: devise_token_auth
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,19 +168,27 @@ files:
|
|
140
168
|
- README.md
|
141
169
|
- Rakefile
|
142
170
|
- app/controllers/sis/core/application_controller.rb
|
171
|
+
- app/models/sis/core/academic_programme.rb
|
143
172
|
- app/models/sis/core/academic_year.rb
|
144
173
|
- app/models/sis/core/applicant.rb
|
174
|
+
- app/models/sis/core/application.rb
|
175
|
+
- app/models/sis/core/application_document.rb
|
145
176
|
- app/models/sis/core/application_record.rb
|
146
|
-
- app/models/sis/core/
|
177
|
+
- app/models/sis/core/application_setup.rb
|
147
178
|
- app/models/sis/core/course.rb
|
148
179
|
- app/models/sis/core/course_registration.rb
|
149
|
-
- app/models/sis/core/
|
180
|
+
- app/models/sis/core/document_requirement.rb
|
181
|
+
- app/models/sis/core/document_type.rb
|
182
|
+
- app/models/sis/core/exam.rb
|
183
|
+
- app/models/sis/core/exam_result.rb
|
184
|
+
- app/models/sis/core/exam_setup.rb
|
150
185
|
- app/models/sis/core/field_of_study.rb
|
151
186
|
- app/models/sis/core/instructor.rb
|
152
187
|
- app/models/sis/core/instructor_course.rb
|
153
188
|
- app/models/sis/core/lookup.rb
|
154
|
-
- app/models/sis/core/
|
155
|
-
- app/models/sis/core/
|
189
|
+
- app/models/sis/core/programme.rb
|
190
|
+
- app/models/sis/core/programme_level.rb
|
191
|
+
- app/models/sis/core/programme_type.rb
|
156
192
|
- app/models/sis/core/semester.rb
|
157
193
|
- app/models/sis/core/staff.rb
|
158
194
|
- app/models/sis/core/student.rb
|
@@ -161,18 +197,23 @@ files:
|
|
161
197
|
- config/initializers/devise_token_auth.rb
|
162
198
|
- config/routes.rb
|
163
199
|
- db/migrate/20200105061717_create_sis_core_lookups.rb
|
164
|
-
- db/migrate/
|
165
|
-
- db/migrate/
|
200
|
+
- db/migrate/20200105072142_create_sis_core_academic_years.rb
|
201
|
+
- db/migrate/20200106072246_create_sis_core_semesters.rb
|
202
|
+
- db/migrate/20200106130428_create_sis_core_programmes.rb
|
203
|
+
- db/migrate/20200106132035_create_sis_core_academic_programmes.rb
|
204
|
+
- db/migrate/20200106132521_create_sis_core_application_setups.rb
|
205
|
+
- db/migrate/20200106133034_create_sis_core_document_requirements.rb
|
166
206
|
- db/migrate/20200106133937_create_sis_core_applicants.rb
|
207
|
+
- db/migrate/20200107094449_create_sis_core_applications.rb
|
208
|
+
- db/migrate/20200107101638_create_sis_core_application_documents.rb
|
209
|
+
- db/migrate/20200107302251_create_sis_core_exam_setups.rb
|
210
|
+
- db/migrate/20200107333411_create_sis_core_exams.rb
|
211
|
+
- db/migrate/20200107434658_create_sis_core_exam_results.rb
|
167
212
|
- db/migrate/20200108092202_devise_token_auth_create_users.rb
|
168
|
-
- db/migrate/20200108094449_create_sis_core_enrollment_applications.rb
|
169
|
-
- db/migrate/20200108101638_create_sis_core_attached_documents.rb
|
170
213
|
- db/migrate/20200307033100_create_sis_core_courses.rb
|
171
214
|
- db/migrate/20200307071511_create_sis_core_instructors.rb
|
172
215
|
- db/migrate/20200307071736_create_sis_core_instructor_courses.rb
|
173
216
|
- db/migrate/20200307072006_create_sis_core_students.rb
|
174
|
-
- db/migrate/20200307072142_create_sis_core_academic_years.rb
|
175
|
-
- db/migrate/20200307072246_create_sis_core_semesters.rb
|
176
217
|
- db/migrate/20200307072317_create_sis_core_course_registrations.rb
|
177
218
|
- db/migrate/20200316120805_create_sis_core_staffs.rb
|
178
219
|
- db/migrate/20200319074334_modify_user.rb
|
@@ -181,18 +222,25 @@ files:
|
|
181
222
|
- lib/sis/core/version.rb
|
182
223
|
- lib/sis_core.rb
|
183
224
|
- lib/tasks/sis_core_tasks.rake
|
225
|
+
- spec/factories/sis/core/academic_programmes.rb
|
184
226
|
- spec/factories/sis/core/academic_years.rb
|
185
227
|
- spec/factories/sis/core/applicants.rb
|
186
|
-
- spec/factories/sis/core/
|
228
|
+
- spec/factories/sis/core/application_documents.rb
|
229
|
+
- spec/factories/sis/core/application_setups.rb
|
230
|
+
- spec/factories/sis/core/applications.rb
|
187
231
|
- spec/factories/sis/core/course_registrations.rb
|
188
232
|
- spec/factories/sis/core/courses.rb
|
189
|
-
- spec/factories/sis/core/
|
190
|
-
- spec/factories/sis/core/
|
233
|
+
- spec/factories/sis/core/document_requirements.rb
|
234
|
+
- spec/factories/sis/core/document_types.rb
|
235
|
+
- spec/factories/sis/core/exam_results.rb
|
236
|
+
- spec/factories/sis/core/exam_setups.rb
|
237
|
+
- spec/factories/sis/core/exams.rb
|
191
238
|
- spec/factories/sis/core/instructor_courses.rb
|
192
239
|
- spec/factories/sis/core/instructors.rb
|
193
240
|
- spec/factories/sis/core/lookups.rb
|
194
|
-
- spec/factories/sis/core/
|
195
|
-
- spec/factories/sis/core/
|
241
|
+
- spec/factories/sis/core/programme_levels.rb
|
242
|
+
- spec/factories/sis/core/programme_types.rb
|
243
|
+
- spec/factories/sis/core/programmes.rb
|
196
244
|
- spec/factories/sis/core/semesters.rb
|
197
245
|
- spec/factories/sis/core/staffs.rb
|
198
246
|
- spec/factories/sis/core/students.rb
|
@@ -1,9 +0,0 @@
|
|
1
|
-
module Sis
|
2
|
-
module Core
|
3
|
-
class Program < ApplicationRecord
|
4
|
-
belongs_to :program_type, class_name: 'Sis::Core::ProgramType', foreign_key: 'lookup_id'
|
5
|
-
belongs_to :field_of_study, class_name: 'Sis::Core::FieldOfStudy'
|
6
|
-
validates :mode_of_attendance, presence: true
|
7
|
-
end
|
8
|
-
end
|
9
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
class CreateSisCoreFieldOfStudies < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
create_table :sis_core_field_of_studies do |t|
|
4
|
-
t.string :name
|
5
|
-
t.references :lookup, index: true, null: false, foreign_key: { to_table: :sis_core_lookups }
|
6
|
-
t.timestamps
|
7
|
-
end
|
8
|
-
end
|
9
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
class CreateSisCorePrograms < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
create_table :sis_core_programs do |t|
|
4
|
-
t.string :mode_of_attendance, null: false
|
5
|
-
t.references :lookup, index: true, null: false, foreign_key: { to_table: :sis_core_lookups }
|
6
|
-
t.references :field_of_study, index: true, null: false, foreign_key: { to_table: :sis_core_field_of_studies }
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
@@ -1,10 +0,0 @@
|
|
1
|
-
class CreateSisCoreEnrollmentApplications < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
create_table :sis_core_enrollment_applications do |t|
|
4
|
-
t.string :status, null: false
|
5
|
-
t.references :applicant, index: true, null: false, foreign_key: { to_table: :sis_core_applicants }
|
6
|
-
t.references :program, index: true, null: false, foreign_key: { to_table: :sis_core_programs }
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
class CreateSisCoreAttachedDocuments < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
create_table :sis_core_attached_documents do |t|
|
4
|
-
t.string :document, null: false
|
5
|
-
t.string :document_type, null: false
|
6
|
-
t.references :enrollment_application, index: true, null: false,
|
7
|
-
foreign_key: { to_table: :sis_core_enrollment_applications }
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|