sis_core 1.0.12 → 1.0.17
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 +5 -1
- data/app/models/sis/core/academic_programme_document.rb +11 -0
- 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.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 +22 -3
- 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 +29 -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_requirement.rb +8 -1
- data/app/models/sis/core/document_type.rb +1 -0
- 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/exam_setup.rb +3 -0
- 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/programme.rb +1 -1
- data/app/models/sis/core/section.rb +9 -0
- data/app/models/sis/core/semester.rb +1 -5
- 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/20200105061717_create_sis_core_lookups.rb +3 -1
- data/db/migrate/20200105072142_create_sis_core_academic_years.rb +1 -1
- data/db/migrate/20200106072246_create_sis_core_semesters.rb +1 -5
- data/db/migrate/20200106132521_create_sis_core_application_setups.rb +4 -0
- data/db/migrate/20200106133034_create_sis_core_document_requirements.rb +2 -2
- data/db/migrate/20200107094449_create_sis_core_applications.rb +0 -4
- data/db/migrate/20201019055620_create_sis_core_academic_programme_documents.rb +19 -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 +79 -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/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_programme_documents.rb +9 -0
- data/spec/factories/sis/core/academic_time_lines.rb +21 -0
- data/spec/factories/sis/core/academic_years.rb +1 -1
- data/spec/factories/sis/core/applicants.rb +1 -1
- data/spec/factories/sis/core/application_documents.rb +1 -1
- data/spec/factories/sis/core/application_setups.rb +1 -0
- data/spec/factories/sis/core/applications.rb +0 -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/lookups.rb +2 -0
- data/spec/factories/sis/core/prerequisites.rb +6 -0
- data/spec/factories/sis/core/sections.rb +6 -0
- data/spec/factories/sis/core/semesters.rb +1 -2
- 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 +94 -54
- data/app/uploaders/sis/core/application_document_uploader.rb +0 -51
- data/app/uploaders/sis/core/photo_uploader.rb +0 -51
@@ -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
|
@@ -1,51 +0,0 @@
|
|
1
|
-
module Sis
|
2
|
-
module Core
|
3
|
-
class PhotoUploader < 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[jpg jpeg gif png]
|
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
|