gaku 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +10 -1
- data/.hound.yml +36 -0
- data/.rubocop.yml +36 -0
- data/.travis.yml +20 -13
- data/Gemfile +3 -1
- data/LICENSE.md +4 -0
- data/README.md +32 -55
- data/Rakefile +44 -47
- data/VERSION +1 -1
- data/admin/Gemfile +3 -3
- data/admin/Rakefile +1 -15
- data/admin/app/assets/javascripts/gaku/admin.js.coffee +6 -0
- data/admin/app/assets/javascripts/gaku/admin/admin.coffee +6 -6
- data/admin/app/assets/javascripts/gaku/admin/base.js.coffee +11 -2
- data/admin/app/assets/stylesheets/gaku/admin.css +0 -1
- data/admin/app/assets/stylesheets/gaku/admin/bootstrap_and_theme.css.scss +16 -1
- data/admin/app/controllers/concerns/admin_picture_controller.rb +28 -0
- data/admin/app/controllers/gaku/admin/attendance_types_controller.rb +8 -8
- data/admin/app/controllers/gaku/admin/badge_types_controller.rb +9 -16
- data/admin/app/controllers/gaku/admin/base_controller.rb +1 -1
- data/admin/app/controllers/gaku/admin/campuses/addresses_controller.rb +58 -0
- data/admin/app/controllers/gaku/admin/campuses/contacts_controller.rb +73 -0
- data/admin/app/controllers/gaku/admin/campuses_controller.rb +68 -0
- data/admin/app/controllers/gaku/admin/commute_method_types_controller.rb +8 -7
- data/admin/app/controllers/gaku/admin/contact_types_controller.rb +7 -7
- data/admin/app/controllers/gaku/admin/departments_controller.rb +7 -7
- data/admin/app/controllers/gaku/admin/enrollment_statuses_controller.rb +9 -8
- data/admin/app/controllers/gaku/admin/grading_method_sets/grading_method_set_items_controller.rb +1 -1
- data/admin/app/controllers/gaku/admin/grading_method_sets_controller.rb +11 -11
- data/admin/app/controllers/gaku/admin/grading_methods_controller.rb +10 -9
- data/admin/app/controllers/gaku/admin/home_controller.rb +11 -0
- data/admin/app/controllers/gaku/admin/presets_controller.rb +4 -6
- data/admin/app/controllers/gaku/admin/roles_controller.rb +8 -7
- data/admin/app/controllers/gaku/admin/school_years/semesters_controller.rb +0 -1
- data/admin/app/controllers/gaku/admin/school_years_controller.rb +3 -7
- data/admin/app/controllers/gaku/admin/schools/programs_controller.rb +11 -4
- data/admin/app/controllers/gaku/admin/schools_controller.rb +82 -79
- data/admin/app/controllers/gaku/admin/simple_grade_types_controller.rb +71 -0
- data/admin/app/controllers/gaku/admin/specialties_controller.rb +2 -5
- data/admin/app/controllers/gaku/admin/states_controller.rb +71 -71
- data/admin/app/controllers/gaku/admin/student_review_categories_controller.rb +57 -0
- data/admin/app/controllers/gaku/admin/templates_controller.rb +47 -50
- data/admin/app/controllers/gaku/admin/users_controller.rb +5 -7
- data/admin/app/controllers/gaku/states_controller.rb +2 -0
- data/admin/app/helpers/gaku/admin_helper.rb +16 -1
- data/admin/app/helpers/gaku/shared_helper.rb +2 -2
- data/admin/app/overrides/admin_menu.rb +7 -6
- data/admin/app/views/gaku/admin/attendance_types/_attendance_types.html.slim +25 -0
- data/admin/app/views/gaku/admin/attendance_types/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/attendance_types/index.json.rb +1 -1
- data/admin/app/views/gaku/admin/badge_types/_badge_types.html.slim +23 -0
- data/admin/app/views/gaku/admin/badge_types/_form.html.slim +1 -1
- data/admin/app/views/gaku/admin/badge_types/_modal.html.slim +1 -1
- data/admin/app/views/gaku/admin/badge_types/create.js.erb +7 -0
- data/admin/app/views/gaku/admin/badge_types/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/badge_types/new.js.erb +1 -1
- data/admin/app/views/gaku/admin/badge_types/update.js.erb +3 -0
- data/admin/app/views/gaku/admin/campuses/_campus.html.slim +4 -0
- data/admin/app/views/gaku/admin/campuses/_campuses.html.slim +21 -0
- data/admin/app/views/gaku/admin/campuses/_edit_form.html.slim +3 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/_form.html.slim +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/_form_fields.html.slim +0 -0
- data/admin/app/views/gaku/admin/campuses/addresses/_address.html.slim +6 -0
- data/admin/app/views/gaku/admin/campuses/addresses/_address_row_fields.html.slim +4 -0
- data/admin/app/views/gaku/admin/campuses/addresses/_addresses.html.slim +23 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_fields.html.slim +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_form.html.slim +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_form_fields.html.slim +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/addresses/_modal.html.slim +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/addresses/create.js.erb +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/addresses/destroy.js.erb +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/addresses/edit.js.erb +0 -0
- data/admin/app/views/gaku/admin/campuses/addresses/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/addresses/new.js.erb +0 -0
- data/admin/app/views/gaku/admin/campuses/addresses/update.js.erb +4 -0
- data/admin/app/views/gaku/admin/campuses/contacts/_contact.html.slim +3 -0
- data/admin/app/views/gaku/admin/campuses/contacts/_contacts.html.slim +22 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_delete_link.html.slim +0 -0
- data/admin/app/views/gaku/admin/campuses/contacts/_fields.html.slim +11 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_form.html.slim +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_form_fields.html.slim +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/contacts/_modal.html.slim +0 -0
- data/admin/app/views/gaku/admin/campuses/contacts/_primary_field.html.slim +6 -0
- data/admin/app/views/gaku/admin/campuses/contacts/create.js.erb +20 -0
- data/admin/app/views/gaku/admin/campuses/contacts/destroy.js.erb +8 -0
- data/admin/app/views/gaku/admin/campuses/contacts/edit.js.erb +4 -0
- data/admin/app/views/gaku/admin/campuses/contacts/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/contacts/make_primary.js.erb +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/contacts/new.js.erb +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/contacts/soft_delete.js.erb +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/contacts/update.js.erb +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/create.js.erb +0 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/destroy.js.erb +0 -0
- data/admin/app/views/gaku/admin/campuses/edit.html.slim +34 -0
- data/admin/app/views/gaku/admin/campuses/edit.js.erb +1 -0
- data/admin/app/views/gaku/admin/campuses/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/{schools/campuses → campuses}/new.js.erb +0 -0
- data/admin/app/views/gaku/admin/campuses/update.js.erb +2 -0
- data/admin/app/views/gaku/admin/commute_method_types/_commute_method_types.html.slim +18 -0
- data/admin/app/views/gaku/admin/commute_method_types/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/contact_types/_contact_types.html.slim +18 -0
- data/admin/app/views/gaku/admin/contact_types/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/departments/_departments.html.slim +21 -0
- data/admin/app/views/gaku/admin/departments/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/enrollment_statuses/_enrollment_statuses.html.slim +20 -0
- data/admin/app/views/gaku/admin/enrollment_statuses/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/grading_method_sets/_fields.html.slim +1 -1
- data/admin/app/views/gaku/admin/grading_method_sets/_grading_method_sets.html.slim +24 -0
- data/admin/app/views/gaku/admin/grading_method_sets/_show.html.slim +4 -0
- data/admin/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_fields.html.slim +2 -2
- data/admin/app/views/gaku/admin/grading_method_sets/grading_method_set_items/_items.html.slim +1 -1
- data/admin/app/views/gaku/admin/grading_method_sets/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/grading_method_sets/show.js.erb +1 -0
- data/admin/app/views/gaku/admin/grading_methods/_criteria_form_fields.html.slim +19 -0
- data/admin/app/views/gaku/admin/grading_methods/_criteria_template.html.slim +11 -0
- data/admin/app/views/gaku/admin/grading_methods/_fields.html.slim +1 -1
- data/admin/app/views/gaku/admin/grading_methods/_form_fields.html.slim +3 -2
- data/admin/app/views/gaku/admin/grading_methods/_grading_methods.html.slim +21 -0
- data/admin/app/views/gaku/admin/grading_methods/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/home/index.html.slim +5 -0
- data/admin/app/views/gaku/admin/presets/_address.html.slim +8 -7
- data/admin/app/views/gaku/admin/presets/_chooser_fields.html.slim +1 -1
- data/admin/app/views/gaku/admin/presets/_export_formats.html.slim +5 -4
- data/admin/app/views/gaku/admin/presets/_fields.html.slim +1 -1
- data/admin/app/views/gaku/admin/presets/_grading.html.slim +4 -3
- data/admin/app/views/gaku/admin/presets/_locale.html.slim +6 -3
- data/admin/app/views/gaku/admin/presets/_names_order.html.slim +1 -1
- data/admin/app/views/gaku/admin/presets/_pagination.html.slim +10 -9
- data/admin/app/views/gaku/admin/presets/_person.html.slim +3 -2
- data/admin/app/views/gaku/admin/presets/_presets.html.slim +19 -0
- data/admin/app/views/gaku/admin/presets/_student.html.slim +1 -1
- data/admin/app/views/gaku/admin/presets/_tabs.html.slim +2 -3
- data/admin/app/views/gaku/admin/presets/edit.js.erb +1 -0
- data/admin/app/views/gaku/admin/presets/index.js.erb +1 -0
- data/{archive/app/views/gaku/course_groups/recovery.js.erb → admin/app/views/gaku/admin/presets/update.js.erb} +0 -0
- data/admin/app/views/gaku/admin/roles/_roles.html.slim +21 -0
- data/admin/app/views/gaku/admin/roles/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/school_years/_edit_form.html.slim +4 -0
- data/admin/app/views/gaku/admin/school_years/_fields.html.slim +1 -2
- data/admin/app/views/gaku/admin/school_years/_school_years.html.slim +23 -0
- data/admin/app/views/gaku/admin/school_years/edit.html.slim +20 -0
- data/admin/app/views/gaku/admin/school_years/edit.js.erb +4 -2
- data/admin/app/views/gaku/admin/school_years/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/school_years/semesters/_semesters.html.slim +1 -1
- data/admin/app/views/gaku/admin/school_years/semesters/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/schools/_edit_form.html.slim +3 -0
- data/admin/app/views/gaku/admin/schools/_edit_master_form.html.slim +10 -0
- data/admin/app/views/gaku/admin/schools/_school.html.slim +4 -2
- data/admin/app/views/gaku/admin/schools/_schools.html.slim +26 -0
- data/admin/app/views/gaku/admin/schools/_tabs.html.slim +1 -1
- data/admin/app/views/gaku/admin/schools/edit.html.slim +37 -14
- data/admin/app/views/gaku/admin/schools/edit.js.erb +1 -0
- data/admin/app/views/gaku/admin/schools/edit_master.html.slim +36 -16
- data/admin/app/views/gaku/admin/schools/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/schools/programs/_fields.html.slim +3 -4
- data/admin/app/views/gaku/admin/schools/programs/_programs.html.slim +2 -2
- data/admin/app/views/gaku/admin/schools/programs/create.js.erb +1 -0
- data/admin/app/views/gaku/admin/schools/programs/destroy.js.erb +1 -0
- data/admin/app/views/gaku/admin/schools/programs/index.js.erb +1 -0
- data/{archive/app/views/gaku/syllabuses/recovery.js.erb → admin/app/views/gaku/admin/schools/update.js.erb} +0 -0
- data/admin/app/views/gaku/admin/shared/_ajax_picture.html.slim +8 -0
- data/admin/app/views/gaku/admin/shared/_ajax_upload_picture.html.slim +14 -0
- data/admin/app/views/gaku/admin/shared/remove_picture.js.erb +3 -0
- data/admin/app/views/gaku/admin/shared/set_picture.js.erb +3 -0
- data/admin/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_fields.html.slim +0 -0
- data/admin/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_form.html.slim +0 -0
- data/admin/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_form_fields.html.slim +0 -0
- data/admin/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_modal.html.slim +0 -0
- data/admin/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/_simple_grade_type.html.slim +0 -0
- data/admin/app/views/gaku/admin/simple_grade_types/_simple_grade_types.html.slim +24 -0
- data/admin/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/create.js.erb +0 -0
- data/admin/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/destroy.js.erb +0 -0
- data/admin/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/edit.js.erb +0 -0
- data/admin/app/views/gaku/admin/simple_grade_types/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/new.js.erb +0 -0
- data/admin/app/views/gaku/admin/{achievements/simple_grade_types → simple_grade_types}/update.js.erb +0 -0
- data/admin/app/views/gaku/admin/specialties/_specialties.html.slim +22 -0
- data/admin/app/views/gaku/admin/specialties/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/states/_country_select_form.html.slim +1 -2
- data/admin/app/views/gaku/admin/states/_form_fields.html.slim +1 -1
- data/admin/app/views/gaku/admin/states/_states.html.slim +16 -0
- data/admin/app/views/gaku/admin/states/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/student_review_categories/_form.html.slim +3 -0
- data/admin/app/views/gaku/admin/student_review_categories/_form_fields.html.slim +1 -0
- data/admin/app/views/gaku/admin/student_review_categories/_modal.html.slim +4 -0
- data/admin/app/views/gaku/admin/student_review_categories/_student_review_categories.html.slim +18 -0
- data/admin/app/views/gaku/admin/student_review_categories/_student_review_category.html.slim +2 -0
- data/admin/app/views/gaku/admin/student_review_categories/_table_fields.html.slim +4 -0
- data/admin/app/views/gaku/admin/student_review_categories/create.js.erb +7 -0
- data/admin/app/views/gaku/admin/student_review_categories/destroy.js.erb +2 -0
- data/admin/app/views/gaku/admin/student_review_categories/edit.js.erb +3 -0
- data/admin/app/views/gaku/admin/student_review_categories/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/student_review_categories/new.js.erb +3 -0
- data/admin/app/views/gaku/admin/student_review_categories/update.js.erb +3 -0
- data/admin/app/views/gaku/admin/templates/_fields.html.slim +2 -2
- data/admin/app/views/gaku/admin/templates/_form.html.slim +1 -1
- data/admin/app/views/gaku/admin/templates/_modal.html.slim +5 -2
- data/admin/app/views/gaku/admin/templates/_templates.html.slim +21 -0
- data/admin/app/views/gaku/admin/templates/create.js.erb +7 -0
- data/admin/app/views/gaku/admin/templates/edit.js.erb +3 -0
- data/admin/app/views/gaku/admin/templates/index.js.erb +1 -0
- data/admin/app/views/gaku/admin/templates/new.js.erb +3 -0
- data/admin/app/views/gaku/admin/templates/update.js.erb +3 -0
- data/admin/app/views/gaku/admin/users/_users.html.slim +22 -0
- data/admin/app/views/gaku/admin/users/index.js.erb +1 -0
- data/admin/app/views/gaku/layouts/admin/index.html.slim +0 -1
- data/admin/app/views/gaku/shared/menu/_admin.html.erb +1 -71
- data/admin/app/views/gaku/shared/menu/_admin_menu.html.erb +154 -0
- data/admin/config/routes.rb +20 -10
- data/admin/gaku_admin.gemspec +19 -22
- data/admin/lib/gaku/admin.rb +2 -1
- data/admin/lib/gaku/admin/engine.rb +3 -5
- data/admin/lib/gaku/app_responder.rb +1 -1
- data/admin/lib/gaku_admin.rb +1 -1
- data/admin/lib/tasks/admin_user.rake +2 -1
- data/admin/spec/controllers/gaku/admin/badge_types_controller_spec.rb +32 -33
- data/admin/spec/controllers/gaku/admin/departments_controller_spec.rb +6 -9
- data/admin/spec/controllers/gaku/admin/grading/grading_method_set_items_controller_spec.rb +35 -23
- data/admin/spec/controllers/gaku/admin/grading/grading_method_sets_controller_spec.rb +10 -11
- data/admin/spec/controllers/gaku/admin/grading/grading_methods_controller_spec.rb +10 -11
- data/admin/spec/controllers/gaku/admin/presets_controller_spec.rb +9 -12
- data/admin/spec/controllers/gaku/admin/roles_controller_spec.rb +6 -9
- data/admin/spec/controllers/gaku/admin/school_years/school_years_controller_spec.rb +10 -10
- data/admin/spec/controllers/gaku/admin/school_years/semesters_controller_spec.rb +11 -3
- data/admin/spec/controllers/gaku/admin/schools/campuses/addresses_controller_spec.rb +14 -5
- data/admin/spec/controllers/gaku/admin/schools/campuses/campuses_controller_spec.rb +41 -41
- data/admin/spec/controllers/gaku/admin/schools/schools_controller_spec.rb +29 -30
- data/admin/spec/controllers/gaku/admin/simple_grade_types_controller_spec.rb +168 -0
- data/admin/spec/controllers/gaku/admin/specialties_controller_spec.rb +6 -9
- data/admin/spec/controllers/gaku/admin/templates_controller_spec.rb +15 -22
- data/admin/spec/controllers/gaku/admin/types_and_methods/attendance_types_controller_spec.rb +11 -12
- data/admin/spec/controllers/gaku/admin/types_and_methods/commute_method_types_controller_spec.rb +15 -12
- data/admin/spec/controllers/gaku/admin/types_and_methods/contact_types_controller_spec.rb +6 -9
- data/admin/spec/controllers/gaku/admin/types_and_methods/enrollment_statuses_controller_spec.rb +10 -11
- data/admin/spec/controllers/gaku/admin/users_controller_spec.rb +6 -9
- data/admin/spec/features/achievements/badge_types_spec.rb +76 -0
- data/admin/spec/features/achievements/simple_grade_types_spec.rb +12 -6
- data/admin/spec/features/departments_spec.rb +4 -3
- data/admin/spec/features/grading/grading_method_set_items_spec.rb +8 -4
- data/admin/spec/features/grading/grading_method_sets_spec.rb +9 -4
- data/admin/spec/features/grading/grading_methods_spec.rb +17 -13
- data/admin/spec/features/presets/address_preset_spec.rb +3 -2
- data/admin/spec/features/presets/chooser_fields_preset_spec.rb +3 -2
- data/admin/spec/features/presets/export_formats_spec.rb +4 -3
- data/admin/spec/features/presets/grading_preset_spec.rb +3 -2
- data/admin/spec/features/presets/locale_preset_spec.rb +4 -3
- data/admin/spec/features/presets/names_order_preset_spec.rb +3 -3
- data/admin/spec/features/presets/pagination_preset_spec.rb +3 -2
- data/admin/spec/features/presets/person_preset_spec.rb +3 -2
- data/admin/spec/features/presets/time_format_spec.rb +29 -0
- data/admin/spec/features/roles_spec.rb +7 -3
- data/admin/spec/features/school_years/school_years_spec.rb +22 -25
- data/admin/spec/features/school_years/semesters_spec.rb +20 -15
- data/admin/spec/features/schools/campuses/addresses_spec.rb +6 -3
- data/admin/spec/features/schools/campuses/campuses_spec.rb +13 -18
- data/admin/spec/features/schools/campuses/contacts_spec.rb +3 -4
- data/admin/spec/features/schools/campuses/picture_spec.rb +30 -12
- data/admin/spec/features/schools/picture_spec.rb +36 -12
- data/admin/spec/features/schools/programs_spec.rb +19 -15
- data/admin/spec/features/schools/school_details_spec.rb +35 -13
- data/admin/spec/features/schools/school_levels_spec.rb +14 -31
- data/admin/spec/features/schools/schools_spec.rb +7 -10
- data/admin/spec/features/specialties_spec.rb +5 -3
- data/admin/spec/features/templates_spec.rb +7 -20
- data/admin/spec/features/types_and_methods/attendance_types_spec.rb +14 -10
- data/admin/spec/features/types_and_methods/commute_method_types_spec.rb +14 -10
- data/admin/spec/features/types_and_methods/contact_types_spec.rb +6 -2
- data/admin/spec/features/types_and_methods/enrollment_statuses_spec.rb +15 -12
- data/admin/spec/features/types_and_methods/states_spec.rb +16 -11
- data/admin/spec/features/types_and_methods/student_review_categories_spec.rb +77 -0
- data/admin/spec/features/users_spec.rb +6 -4
- data/admin/spec/routing/admin/campuses/addresses_routes_spec.rb +56 -0
- data/admin/spec/routing/admin/campuses/campuses_routing_spec.rb +80 -0
- data/admin/spec/routing/admin/campuses/contacts_routing_spec.rb +56 -0
- data/admin/spec/routing/admin/school_years/school_years_routing_spec.rb +1 -3
- data/admin/spec/routing/admin/school_years/semesters_routing_spec.rb +1 -2
- data/admin/spec/routing/admin/schools/schools_routes_spec.rb +79 -0
- data/admin/spec/routing/admin/simple_grade_types_routing_spec.rb +6 -7
- data/admin/spec/routing/admin/templates_routing_spec.rb +1 -3
- data/admin/spec/support/controllers/shared_examples/allow.rb +1 -1
- data/admin/spec/support/features/shared_examples/addresses_spec.rb +9 -20
- data/admin/spec/support/features/shared_examples/avatarable_spec.rb +2 -7
- data/admin/spec/support/features/shared_examples/contacts_spec.rb +9 -11
- data/admin/spec/support/features/uploaded_file.rb +6 -0
- data/admin/spec/support/test.txt +1 -0
- data/common_gaku_dependencies.rb +10 -0
- data/common_gaku_gemspec_mixin.rb +11 -0
- data/core/Gemfile +1 -1
- data/core/Rakefile +1 -15
- data/core/app/controllers/gaku/core_controller.rb +3 -8
- data/core/app/decorators/gaku/course_decorator.rb +1 -2
- data/core/app/decorators/gaku/guardian_decorator.rb +1 -1
- data/core/app/decorators/gaku/person_decorator.rb +8 -12
- data/core/app/decorators/gaku/student_decorator.rb +0 -2
- data/core/app/decorators/gaku/teacher_decorator.rb +1 -1
- data/core/app/models/concerns/addresses.rb +6 -6
- data/core/app/models/concerns/contacts.rb +6 -6
- data/core/app/models/concerns/enrollmentable.rb +9 -0
- data/core/app/models/concerns/gradable.rb +14 -0
- data/core/app/models/concerns/notes.rb +1 -2
- data/core/app/models/concerns/pagination.rb +1 -2
- data/core/app/models/concerns/person.rb +0 -2
- data/core/app/models/concerns/picture.rb +1 -3
- data/core/app/models/concerns/semesterable.rb +12 -0
- data/core/app/models/concerns/student_reviewable.rb +7 -0
- data/core/app/models/gaku/ability.rb +2 -4
- data/core/app/models/gaku/address.rb +11 -10
- data/core/app/models/gaku/admin_ability.rb +0 -1
- data/core/app/models/gaku/assignment.rb +0 -2
- data/core/app/models/gaku/assignment_score.rb +0 -1
- data/core/app/models/gaku/attachment.rb +1 -4
- data/core/app/models/gaku/attendance.rb +0 -2
- data/core/app/models/gaku/attendance_type.rb +0 -2
- data/core/app/models/gaku/badge.rb +0 -2
- data/core/app/models/gaku/badge_type.rb +0 -1
- data/core/app/models/gaku/class_group.rb +13 -13
- data/core/app/models/gaku/commute_method_type.rb +0 -2
- data/core/app/models/gaku/contact.rb +6 -36
- data/core/app/models/gaku/contact_type.rb +0 -2
- data/core/app/models/gaku/country.rb +0 -3
- data/core/app/models/gaku/course.rb +11 -25
- data/core/app/models/gaku/course_group.rb +0 -2
- data/core/app/models/gaku/course_group_enrollment.rb +3 -4
- data/core/app/models/gaku/department.rb +0 -2
- data/core/app/models/gaku/enrollment.rb +85 -0
- data/core/app/models/gaku/enrollment_status.rb +0 -2
- data/core/app/models/gaku/exam.rb +17 -22
- data/core/app/models/gaku/exam_portion.rb +2 -6
- data/core/app/models/gaku/exam_portion_score.rb +0 -2
- data/core/app/models/gaku/exam_schedule.rb +0 -1
- data/core/app/models/gaku/exam_session.rb +14 -0
- data/core/app/models/gaku/exam_syllabus.rb +2 -6
- data/core/app/models/gaku/external_school_record.rb +1 -9
- data/core/app/models/gaku/extracurricular_activity.rb +1 -2
- data/core/app/models/gaku/faculty.rb +0 -2
- data/core/app/models/gaku/grading_method.rb +14 -2
- data/core/app/models/gaku/grading_method_connector.rb +35 -0
- data/core/app/models/gaku/grading_method_set.rb +6 -4
- data/core/app/models/gaku/grading_method_set_item.rb +4 -5
- data/core/app/models/gaku/guardian.rb +1 -3
- data/core/app/models/gaku/install.rb +0 -2
- data/core/app/models/gaku/lesson.rb +0 -1
- data/core/app/models/gaku/lesson_plan.rb +0 -2
- data/core/app/models/gaku/level.rb +0 -2
- data/core/app/models/gaku/preset.rb +18 -18
- data/core/app/models/gaku/program.rb +0 -2
- data/core/app/models/gaku/program_level.rb +0 -2
- data/core/app/models/gaku/program_specialty.rb +0 -2
- data/core/app/models/gaku/program_syllabus.rb +0 -2
- data/core/app/models/gaku/role.rb +0 -2
- data/core/app/models/gaku/schedule.rb +0 -1
- data/core/app/models/gaku/scholarship_status.rb +0 -2
- data/core/app/models/gaku/school.rb +0 -2
- data/core/app/models/gaku/school_role.rb +0 -2
- data/core/app/models/gaku/school_year.rb +4 -2
- data/core/app/models/gaku/semester.rb +21 -6
- data/core/app/models/gaku/semester_attendance.rb +14 -0
- data/core/app/models/gaku/semester_connector.rb +27 -0
- data/core/app/models/gaku/simple_grade.rb +0 -2
- data/core/app/models/gaku/simple_grade_type.rb +0 -1
- data/core/app/models/gaku/specialty.rb +0 -2
- data/core/app/models/gaku/state.rb +0 -3
- data/core/app/models/gaku/student.rb +47 -45
- data/core/app/models/gaku/student_exam_session.rb +11 -0
- data/core/app/models/gaku/student_guardian.rb +0 -2
- data/core/app/models/gaku/student_review.rb +11 -0
- data/core/app/models/gaku/student_review_category.rb +13 -0
- data/core/app/models/gaku/student_specialty.rb +2 -5
- data/core/app/models/gaku/syllabus.rb +0 -4
- data/core/app/models/gaku/teacher.rb +0 -2
- data/core/app/models/gaku/template.rb +7 -9
- data/core/app/models/gaku/user.rb +10 -22
- data/core/app/models/gaku/user_role.rb +0 -2
- data/core/app/services/gaku/contact_creation.rb +49 -0
- data/core/app/services/gaku/contact_updation.rb +41 -0
- data/core/app/services/gaku/student_selection.rb +57 -0
- data/core/app/services/gaku/user_creator.rb +31 -0
- data/core/config/initializers/devise.rb +1 -1
- data/core/config/initializers/redis.rb +5 -0
- data/core/config/routes.rb +5 -10
- data/core/core_dependencies.rb +24 -0
- data/core/db/default/gaku/attendance_types.rb +14 -16
- data/core/db/default/gaku/commute_method_types.rb +2 -4
- data/core/db/default/gaku/enrollment_status.rb +3 -3
- data/core/db/default/gaku/master_school.rb +7 -6
- data/core/db/default/gaku/presets.rb +6 -9
- data/core/db/default/gaku/scholarship_statuses.rb +1 -1
- data/core/db/migrate/20140128141752_change_grading_methods_arguments_field.rb +5 -0
- data/core/db/migrate/20140213113405_create_grading_method_connectors_table.rb +9 -0
- data/core/db/migrate/20140304094422_create_gaku_exam_sessions_table.rb +10 -0
- data/core/db/migrate/20140304101025_create_gaku_student_exam_session_table.rb +8 -0
- data/core/db/migrate/20140325073941_add_time_format_24_to_presets_table.rb +5 -0
- data/core/db/migrate/20140408111314_remove_semester_join_tables.rb +6 -0
- data/core/db/migrate/20140408111358_create_semester_connectors_table.rb +8 -0
- data/core/db/migrate/20140423093155_create_enrollments_table.rb +11 -0
- data/core/db/migrate/20140423100114_clean_enrollments_join_models.rb +8 -0
- data/core/db/migrate/20140429112725_add_counters_to_enrollmentable.rb +11 -0
- data/core/db/migrate/20140604104210_rename_method_to_grading_method.rb +5 -0
- data/core/db/migrate/20140604113045_add_default_value_to_curved.rb +5 -0
- data/core/db/migrate/20140610091053_add_seat_number_to_enrollments.rb +5 -0
- data/core/db/migrate/20140701104700_change_hstore_to_string_criteria.rb +5 -0
- data/core/db/migrate/20140715135152_create_semester_attendance_table.rb +16 -0
- data/core/db/migrate/20140718105226_create_student_review_categories_table.rb +13 -0
- data/core/db/migrate/20140728121353_create_student_review_table.rb +12 -0
- data/core/db/seeds.rb +1 -1
- data/core/gaku_core.gemspec +12 -16
- data/core/lib/gaku/core.rb +2 -1
- data/core/lib/gaku/core/engine.rb +7 -5
- data/core/lib/gaku/core/url_helpers.rb +1 -1
- data/core/lib/gaku/grading/collection/base_method.rb +30 -0
- data/core/lib/gaku/grading/collection/calculations.rb +36 -0
- data/core/lib/gaku/grading/collection/interval.rb +55 -0
- data/core/lib/gaku/grading/collection/ordinal.rb +10 -0
- data/core/lib/gaku/grading/collection/percentage.rb +10 -0
- data/core/lib/gaku/grading/collection/result.rb +18 -0
- data/core/lib/gaku/grading/collection/score.rb +10 -0
- data/core/lib/gaku/grading/single/base_method.rb +30 -0
- data/core/lib/gaku/grading/single/calculations.rb +42 -0
- data/core/lib/gaku/grading/single/interval.rb +7 -0
- data/core/lib/gaku/grading/single/ordinal.rb +30 -0
- data/core/lib/gaku/grading/single/pass_fail.rb +2 -0
- data/core/lib/gaku/grading/single/percentage.rb +26 -0
- data/core/lib/gaku/grading/single/ratio.rb +2 -0
- data/core/lib/gaku/grading/single/result.rb +18 -0
- data/core/lib/gaku/grading/single/score.rb +15 -0
- data/core/lib/gaku/migrations.rb +1 -1
- data/core/lib/gaku/streamer/sse.rb +5 -5
- data/core/lib/gaku/testing/auth_helpers.rb +6 -2
- data/core/lib/gaku/testing/common_rake.rb +9 -3
- data/core/lib/gaku/testing/controller_helpers.rb +17 -12
- data/core/lib/gaku/testing/coverage.rb +1 -1
- data/core/lib/gaku/testing/deferred_garbage_collection.rb +3 -3
- data/core/lib/gaku/testing/factories/attachment_factory.rb +0 -1
- data/core/lib/gaku/testing/factories/attendance_type_factory.rb +1 -1
- data/core/lib/gaku/testing/factories/class_group_factory.rb +12 -1
- data/core/lib/gaku/testing/factories/contact_creation_factory.rb +18 -0
- data/core/lib/gaku/testing/factories/course_enrollment_factory.rb +9 -9
- data/core/lib/gaku/testing/factories/course_factory.rb +2 -4
- data/core/lib/gaku/testing/factories/course_group_factory.rb +2 -4
- data/core/lib/gaku/testing/factories/enrollment_factory.rb +10 -0
- data/core/lib/gaku/testing/factories/exam_factory.rb +1 -1
- data/core/lib/gaku/testing/factories/exam_portion_factory.rb +2 -4
- data/core/lib/gaku/testing/factories/exam_score_factory.rb +1 -1
- data/core/lib/gaku/testing/factories/exam_session_factory.rb +14 -0
- data/core/lib/gaku/testing/factories/extracurricular_activity_factory.rb +1 -1
- data/core/lib/gaku/testing/factories/grading_method_connector_factory.rb +11 -0
- data/core/lib/gaku/testing/factories/grading_method_factory.rb +3 -2
- data/core/lib/gaku/testing/factories/guardian_factory.rb +2 -4
- data/core/lib/gaku/testing/factories/lesson_plan_factory.rb +2 -2
- data/core/lib/gaku/testing/factories/preset_factory.rb +7 -7
- data/core/lib/gaku/testing/factories/program_factory.rb +0 -1
- data/core/lib/gaku/testing/factories/school_factory.rb +3 -3
- data/core/lib/gaku/testing/factories/semester_attendance_factory.rb +8 -0
- data/core/lib/gaku/testing/factories/semester_connectors_factory.rb +11 -0
- data/core/lib/gaku/testing/factories/semester_factory.rb +16 -0
- data/core/lib/gaku/testing/factories/simple_grade_type_factory.rb +1 -1
- data/core/lib/gaku/testing/factories/state_factory.rb +2 -1
- data/core/lib/gaku/testing/factories/student_exam_session_factory.rb +8 -0
- data/core/lib/gaku/testing/factories/student_factory.rb +15 -5
- data/core/lib/gaku/testing/factories/student_review_category_factory.rb +7 -0
- data/core/lib/gaku/testing/factories/student_review_factory.rb +13 -0
- data/core/lib/gaku/testing/factories/teacher_factory.rb +1 -1
- data/core/lib/gaku/testing/factories/template_factory.rb +5 -7
- data/core/lib/gaku/testing/factories/traits.rb +32 -4
- data/core/lib/gaku/testing/factories/user_factory.rb +0 -1
- data/core/lib/gaku_core.rb +1 -1
- data/core/lib/generators/gaku/dummy/dummy_generator.rb +5 -4
- data/core/lib/generators/gaku/install/install_generator.rb +16 -14
- data/core/lib/tasks/admin_user.rake +2 -1
- data/core/spec/lib/gaku/grading/collection/calculations_spec.rb +52 -0
- data/core/spec/lib/gaku/grading/collection/interval_spec.rb +56 -0
- data/core/spec/lib/gaku/grading/collection/ordinal_spec.rb +36 -0
- data/core/spec/lib/gaku/grading/collection/percentage_spec.rb +31 -0
- data/core/spec/lib/gaku/grading/collection/result_spec.rb +13 -0
- data/core/spec/lib/gaku/grading/collection/score_spec.rb +31 -0
- data/core/spec/lib/gaku/grading/single/calculations_spec.rb +88 -0
- data/core/spec/lib/gaku/grading/single/ordinal_spec.rb +95 -0
- data/core/spec/lib/gaku/grading/single/percentage_spec.rb +52 -0
- data/core/spec/lib/gaku/grading/single/result_spec.rb +12 -0
- data/core/spec/lib/gaku/grading/single/score_spec.rb +54 -0
- data/core/spec/models/address_spec.rb +1 -3
- data/core/spec/models/attendance_spec.rb +2 -2
- data/core/spec/models/campus_spec.rb +6 -3
- data/core/spec/models/class_group_spec.rb +52 -11
- data/core/spec/models/contact_spec.rb +10 -3
- data/core/spec/models/course_group_enrollment_spec.rb +4 -1
- data/core/spec/models/course_spec.rb +28 -30
- data/core/spec/models/enrollment_spec.rb +44 -0
- data/core/spec/models/exam_portion_score_spec.rb +1 -1
- data/core/spec/models/exam_portion_spec.rb +1 -1
- data/core/spec/models/exam_session_spec.rb +20 -0
- data/core/spec/models/exam_spec.rb +7 -5
- data/core/spec/models/external_school_record_spec.rb +4 -5
- data/core/spec/models/extracurricular_activity_spec.rb +27 -2
- data/core/spec/models/factories_spec.rb +2 -1
- data/core/spec/models/grading_method_connector_spec.rb +19 -0
- data/core/spec/models/grading_method_set_item_spec.rb +3 -2
- data/core/spec/models/grading_method_spec.rb +7 -3
- data/core/spec/models/guardian_spec.rb +12 -10
- data/core/spec/models/lesson_plan_spec.rb +5 -5
- data/core/spec/models/preset_spec.rb +14 -3
- data/core/spec/models/school_spec.rb +13 -13
- data/core/spec/models/school_year_spec.rb +1 -1
- data/core/spec/models/semester_attendance_spec.rb +15 -0
- data/core/spec/models/semester_connector_spec.rb +23 -0
- data/core/spec/models/semester_spec.rb +37 -7
- data/core/spec/models/student_exam_session_spec.rb +16 -0
- data/core/spec/models/student_review_category_spec.rb +18 -0
- data/core/spec/models/student_review_spec.rb +23 -0
- data/core/spec/models/student_spec.rb +94 -65
- data/core/spec/models/syllabus_spec.rb +4 -4
- data/core/spec/models/teacher_spec.rb +14 -8
- data/core/spec/models/user_spec.rb +52 -0
- data/core/spec/services/contact_creation_spec.rb +90 -0
- data/core/spec/services/contact_updation_spec.rb +78 -0
- data/core/spec/services/student_selection_spec.rb +65 -0
- data/core/spec/services/user_creator_spec.rb +58 -0
- data/core/spec/spec_helper_base.rb +5 -1
- data/core/spec/spec_helper_models.rb +3 -2
- data/core/spec/support/models/matchers/accept_nested_attributes_for_matcher.rb +14 -10
- data/core/spec/support/models/shared_examples/addressable.rb +1 -1
- data/core/spec/support/models/shared_examples/enrollmentable.rb +4 -0
- data/core/spec/support/models/shared_examples/gradable.rb +4 -0
- data/core/spec/support/models/shared_examples/notable.rb +1 -1
- data/core/spec/support/models/shared_examples/person.rb +1 -1
- data/core/spec/support/models/shared_examples/semesterable.rb +4 -0
- data/core/spec/support/models/shared_examples/student_reviewable.rb +3 -0
- data/frontend/Gemfile +5 -3
- data/frontend/Rakefile +1 -15
- data/frontend/app/assets/javascripts/gaku/frontend.js.coffee +8 -1
- data/frontend/app/assets/javascripts/gaku/frontend/base.js.coffee +95 -22
- data/frontend/app/assets/javascripts/gaku/frontend/class_groups.js.coffee +2 -0
- data/frontend/app/assets/javascripts/gaku/frontend/courses.js.coffee +20 -7
- data/frontend/app/assets/javascripts/gaku/frontend/exams.js.coffee +3 -1
- data/frontend/app/assets/javascripts/gaku/frontend/guardians.js.coffee +14 -0
- data/frontend/app/assets/javascripts/gaku/frontend/students.js.coffee +7 -0
- data/frontend/app/assets/javascripts/gaku/frontend/syllabuses.js.coffee +0 -14
- data/frontend/app/assets/javascripts/gaku/frontend/teachers.js.coffee +2 -0
- data/frontend/app/assets/stylesheets/gaku/bootstrap_and_theme.css.scss +10 -1
- data/frontend/app/assets/stylesheets/gaku/frontend.css +1 -1
- data/frontend/app/controllers/concerns/picture_controller.rb +29 -0
- data/frontend/app/controllers/concerns/poly_controller.rb +49 -0
- data/frontend/app/controllers/concerns/polymorphic_resource_concern.rb +5 -5
- data/frontend/app/controllers/concerns/student_chooser_controller.rb +1 -1
- data/frontend/app/controllers/gaku/addresses_controller.rb +12 -4
- data/frontend/app/controllers/gaku/attachments_controller.rb +17 -25
- data/frontend/app/controllers/gaku/class_groups/enrollments_controller.rb +30 -0
- data/frontend/app/controllers/gaku/class_groups/semester_attendances_controller.rb +53 -0
- data/frontend/app/controllers/gaku/class_groups/student_reviews_controller.rb +60 -0
- data/frontend/app/controllers/gaku/class_groups_controller.rb +20 -12
- data/frontend/app/controllers/gaku/contacts_controller.rb +10 -5
- data/frontend/app/controllers/gaku/course_groups/course_group_enrollments_controller.rb +10 -1
- data/frontend/app/controllers/gaku/course_groups_controller.rb +1 -2
- data/frontend/app/controllers/gaku/courses/exams_controller.rb +18 -10
- data/frontend/app/controllers/gaku/courses_controller.rb +25 -10
- data/frontend/app/controllers/gaku/devise/passwords_controller.rb +1 -1
- data/frontend/app/controllers/gaku/devise/registrations_controller.rb +1 -1
- data/frontend/app/controllers/gaku/devise/sessions_controller.rb +4 -2
- data/frontend/app/controllers/gaku/enrollments_controller.rb +130 -0
- data/frontend/app/controllers/gaku/exam_portion_scores_controller.rb +29 -6
- data/frontend/app/controllers/gaku/exams/exam_portions_controller.rb +11 -3
- data/frontend/app/controllers/gaku/exams/exam_sessions_controller.rb +58 -0
- data/frontend/app/controllers/gaku/exams_controller.rb +19 -45
- data/frontend/app/controllers/gaku/extracurricular_activities_controller.rb +6 -2
- data/frontend/app/controllers/gaku/gaku_controller.rb +11 -0
- data/frontend/app/controllers/gaku/grading_method_connectors_controller.rb +109 -0
- data/frontend/app/controllers/gaku/guardians_controller.rb +66 -0
- data/frontend/app/controllers/gaku/notes_controller.rb +6 -1
- data/frontend/app/controllers/gaku/realtime_controller.rb +6 -7
- data/frontend/app/controllers/gaku/semester_connectors_controller.rb +66 -0
- data/frontend/app/controllers/gaku/student_selection_controller.rb +58 -0
- data/frontend/app/controllers/gaku/students/badges_controller.rb +2 -2
- data/frontend/app/controllers/gaku/students/class_group_enrollments_controller.rb +24 -16
- data/frontend/app/controllers/gaku/students/course_enrollments_controller.rb +21 -19
- data/frontend/app/controllers/gaku/students/external_school_records_controller.rb +5 -12
- data/frontend/app/controllers/gaku/students/extracurricular_activity_enrollments_controller.rb +53 -0
- data/frontend/app/controllers/gaku/students/simple_grades_controller.rb +1 -1
- data/frontend/app/controllers/gaku/students_controller.rb +31 -47
- data/frontend/app/controllers/gaku/syllabuses/exam_syllabuses_controller.rb +6 -1
- data/frontend/app/controllers/gaku/syllabuses/exams_controller.rb +3 -2
- data/frontend/app/controllers/gaku/syllabuses_controller.rb +2 -4
- data/frontend/app/controllers/gaku/teachers_controller.rb +7 -4
- data/frontend/app/helpers/gaku/autocomplete_helper.rb +1 -1
- data/frontend/app/helpers/gaku/exam_helper.rb +1 -1
- data/frontend/app/helpers/gaku/frontend_helper.rb +23 -7
- data/frontend/app/helpers/gaku/person_helper.rb +7 -8
- data/frontend/app/helpers/gaku/shared_helper.rb +2 -6
- data/frontend/app/helpers/gaku/students_helper.rb +4 -6
- data/frontend/app/overrides/frontend_menu.rb +6 -6
- data/frontend/app/views/gaku/addresses/_addresses.html.slim +3 -2
- data/frontend/app/views/gaku/addresses/_fields.html.slim +3 -4
- data/frontend/app/views/gaku/addresses/_form_fields.html.slim +5 -7
- data/frontend/app/views/gaku/addresses/_primary_field.html.slim +3 -10
- data/frontend/app/views/gaku/addresses/create.js.erb +2 -1
- data/frontend/app/views/gaku/addresses/destroy.js.erb +2 -1
- data/frontend/app/views/gaku/addresses/index.js.erb +1 -0
- data/frontend/app/views/gaku/addresses/show/_address.html.slim +9 -0
- data/frontend/app/views/gaku/addresses/show/_addresses.html.slim +19 -0
- data/frontend/app/views/gaku/addresses/soft_delete.js.erb +2 -1
- data/frontend/app/views/gaku/attachments/_attachment.html.slim +2 -0
- data/frontend/app/views/gaku/attachments/_attachments.html.slim +20 -0
- data/frontend/app/views/gaku/attachments/_form.html.slim +3 -0
- data/frontend/app/views/gaku/{exams/exam_portions/attachments → attachments}/_form_fields.html.slim +0 -0
- data/frontend/app/views/gaku/attachments/_modal.html.slim +4 -0
- data/frontend/app/views/gaku/attachments/_table_fields.html.slim +9 -0
- data/frontend/app/views/gaku/attachments/create.js.erb +8 -0
- data/frontend/app/views/gaku/attachments/edit.js.erb +3 -3
- data/frontend/app/views/gaku/attachments/new.js.erb +3 -1
- data/frontend/app/views/gaku/attachments/update.js.erb +5 -0
- data/frontend/app/views/gaku/class_groups/_edit_form.html.slim +9 -0
- data/frontend/app/views/gaku/class_groups/edit.html.slim +14 -12
- data/frontend/app/views/gaku/class_groups/edit.js.erb +1 -0
- data/frontend/app/views/gaku/class_groups/enrollments/_enrollment.html.slim +2 -0
- data/frontend/app/views/gaku/class_groups/enrollments/_enrollments.html.slim +21 -0
- data/frontend/app/views/gaku/class_groups/enrollments/_form.html.slim +4 -0
- data/frontend/app/views/gaku/class_groups/enrollments/_form_fields.html.slim +3 -0
- data/frontend/app/views/gaku/class_groups/enrollments/_table_fields.html.slim +5 -0
- data/frontend/app/views/gaku/class_groups/enrollments/create.js.erb +11 -0
- data/frontend/app/views/gaku/class_groups/enrollments/create_from_selection.js.erb +7 -0
- data/frontend/app/views/gaku/class_groups/enrollments/destroy.js.erb +9 -0
- data/frontend/app/views/gaku/class_groups/enrollments/index.js.erb +2 -0
- data/frontend/app/views/gaku/class_groups/enrollments/new.js.erb +3 -0
- data/frontend/app/views/gaku/class_groups/enrollments/sort.js.erb +3 -0
- data/frontend/app/views/gaku/class_groups/enrollments/student_selection.js.erb +2 -0
- data/frontend/app/views/gaku/class_groups/semester_attendances/_semester_attendances.html.slim +27 -0
- data/frontend/app/views/gaku/class_groups/semester_attendances/index.js.erb +1 -0
- data/frontend/app/views/gaku/class_groups/student_reviews/_edit_modal.html.slim +4 -0
- data/frontend/app/views/gaku/class_groups/student_reviews/_form_fields.html.slim +3 -0
- data/frontend/app/views/gaku/class_groups/student_reviews/_new_modal.html.slim +4 -0
- data/frontend/app/views/gaku/class_groups/student_reviews/_show_modal.html.slim +11 -0
- data/frontend/app/views/gaku/class_groups/student_reviews/create.js.erb +2 -0
- data/frontend/app/views/gaku/class_groups/student_reviews/destroy.js.erb +2 -0
- data/frontend/app/views/gaku/class_groups/student_reviews/edit.js.erb +5 -0
- data/frontend/app/views/gaku/class_groups/student_reviews/index.js.erb +8 -0
- data/frontend/app/views/gaku/class_groups/student_reviews/update.js.erb +2 -0
- data/{archive/app/views/gaku/class_groups/recovery.js.erb → frontend/app/views/gaku/class_groups/update.js.erb} +0 -0
- data/frontend/app/views/gaku/contacts/_contacts.html.slim +2 -2
- data/frontend/app/views/gaku/contacts/_fields.html.slim +3 -5
- data/frontend/app/views/gaku/contacts/_primary_field.html.slim +3 -11
- data/frontend/app/views/gaku/contacts/create.js.erb +2 -1
- data/frontend/app/views/gaku/contacts/destroy.js.erb +1 -0
- data/frontend/app/views/gaku/contacts/index.js.erb +2 -0
- data/frontend/app/views/gaku/contacts/show/_contact.html.slim +7 -0
- data/frontend/app/views/gaku/contacts/show/_contacts.html.slim +15 -0
- data/frontend/app/views/gaku/contacts/soft_delete.js.erb +1 -1
- data/frontend/app/views/gaku/course_groups/_edit_form.html.slim +9 -0
- data/frontend/app/views/gaku/course_groups/course_group_enrollments/_courses.html.slim +21 -20
- data/frontend/app/views/gaku/course_groups/course_group_enrollments/create.js.erb +1 -0
- data/frontend/app/views/gaku/course_groups/course_group_enrollments/destroy.js.erb +1 -0
- data/frontend/app/views/gaku/course_groups/course_group_enrollments/index.js.erb +1 -0
- data/frontend/app/views/gaku/course_groups/course_group_enrollments/new.js.erb +1 -1
- data/frontend/app/views/gaku/course_groups/edit.html.slim +13 -17
- data/frontend/app/views/gaku/course_groups/edit.js.erb +1 -0
- data/{archive/app/views/gaku/courses/recovery.js.erb → frontend/app/views/gaku/course_groups/update.js.erb} +0 -0
- data/frontend/app/views/gaku/courses/_courses.html.slim +1 -1
- data/frontend/app/views/gaku/courses/_edit_form.html.slim +9 -0
- data/frontend/app/views/gaku/courses/edit.html.slim +23 -12
- data/frontend/app/views/gaku/courses/edit.js.erb +1 -0
- data/frontend/app/views/gaku/courses/exams/_grading_table_head.html.slim +5 -2
- data/frontend/app/views/gaku/courses/exams/_grading_table_student_field.html.slim +5 -1
- data/frontend/app/views/gaku/courses/exams/index.js.erb +1 -0
- data/{archive/app/views/gaku/exams/recovery.js.erb → frontend/app/views/gaku/courses/update.js.erb} +0 -0
- data/frontend/app/views/gaku/enrollments/_enrollment.html.slim +2 -0
- data/frontend/app/views/gaku/enrollments/_enrollments.html.slim +19 -0
- data/frontend/app/views/gaku/enrollments/_form.html.slim +3 -0
- data/frontend/app/views/gaku/enrollments/_form_fields.html.slim +3 -0
- data/frontend/app/views/gaku/enrollments/_table_fields.html.slim +3 -0
- data/frontend/app/views/gaku/enrollments/create.js.erb +6 -0
- data/frontend/app/views/gaku/enrollments/create_from_selection.js.erb +7 -0
- data/frontend/app/views/gaku/enrollments/destroy.js.erb +4 -0
- data/frontend/app/views/gaku/enrollments/index.js.erb +1 -0
- data/frontend/app/views/gaku/enrollments/new.js.erb +3 -0
- data/frontend/app/views/gaku/enrollments/student_selection.js.erb +2 -0
- data/frontend/app/views/gaku/exams/_edit_form.html.slim +9 -0
- data/frontend/app/views/gaku/exams/_exams.html.slim +21 -0
- data/frontend/app/views/gaku/exams/_tabs.html.slim +5 -0
- data/frontend/app/views/gaku/exams/create.js.erb +1 -0
- data/frontend/app/views/gaku/exams/edit.html.slim +22 -12
- data/frontend/app/views/gaku/exams/edit.js.erb +1 -0
- data/frontend/app/views/gaku/exams/exam_portions/_edit_form.html.slim +14 -0
- data/frontend/app/views/gaku/exams/exam_portions/_exam_portion_menu_link.html.slim +1 -0
- data/frontend/app/views/gaku/exams/exam_portions/_exam_portions.html.slim +2 -5
- data/frontend/app/views/gaku/exams/exam_portions/_table_fields.slim +3 -7
- data/frontend/app/views/gaku/exams/exam_portions/_tabs.html.slim +1 -1
- data/frontend/app/views/gaku/exams/exam_portions/create.js.erb +4 -0
- data/frontend/app/views/gaku/exams/exam_portions/destroy.js.erb +2 -0
- data/frontend/app/views/gaku/exams/exam_portions/edit.html.slim +1 -16
- data/frontend/app/views/gaku/exams/exam_portions/edit.js.erb +1 -0
- data/frontend/app/views/gaku/exams/exam_portions/index.js.erb +1 -0
- data/frontend/app/views/gaku/exams/exam_portions/update.js.erb +2 -0
- data/frontend/app/views/gaku/exams/exam_sessions/_exam_session.html.slim +2 -0
- data/frontend/app/views/gaku/exams/exam_sessions/_exam_sessions.html.slim +20 -0
- data/frontend/app/views/gaku/exams/exam_sessions/_form.html.slim +3 -0
- data/frontend/app/views/gaku/exams/exam_sessions/_form_fields.html.slim +10 -0
- data/frontend/app/views/gaku/exams/exam_sessions/_students.html.slim +1 -0
- data/frontend/app/views/gaku/exams/exam_sessions/_table_fields.html.slim +6 -0
- data/frontend/app/views/gaku/exams/exam_sessions/_tabs.html.slim +10 -0
- data/frontend/app/views/gaku/exams/exam_sessions/create.js.erb +7 -0
- data/frontend/app/views/gaku/exams/{exam_portions/attachments/create.js.erb → exam_sessions/destroy.js.erb} +0 -0
- data/frontend/app/views/gaku/exams/exam_sessions/edit.html.slim +16 -0
- data/frontend/app/views/gaku/exams/exam_sessions/new.js.erb +4 -0
- data/frontend/app/views/gaku/exams/exam_sessions/update.js.erb +0 -0
- data/frontend/app/views/gaku/exams/export.xls.rb +9 -10
- data/frontend/app/views/gaku/exams/index.html.slim +18 -21
- data/frontend/app/views/gaku/extracurricular_activities/_edit_form.html.slim +9 -0
- data/frontend/app/views/gaku/extracurricular_activities/edit.html.slim +12 -12
- data/frontend/app/views/gaku/extracurricular_activities/edit.js.erb +1 -0
- data/{archive/app/views/gaku/extracurricular_activities/recovery.js.erb → frontend/app/views/gaku/extracurricular_activities/update.js.erb} +0 -0
- data/frontend/app/views/gaku/grading_method_connectors/_form.html.slim +3 -0
- data/frontend/app/views/gaku/grading_method_connectors/_form_fields.html.slim +1 -0
- data/frontend/app/views/gaku/grading_method_connectors/_grading_method_connector.html.slim +2 -0
- data/frontend/app/views/gaku/grading_method_connectors/_grading_method_connectors.html.slim +23 -0
- data/frontend/app/views/gaku/grading_method_connectors/_set_form.html.slim +6 -0
- data/frontend/app/views/gaku/grading_method_connectors/_table_fields.html.slim +4 -0
- data/frontend/app/views/gaku/grading_method_connectors/add_set.js.erb +12 -0
- data/frontend/app/views/gaku/grading_method_connectors/create.js.erb +10 -0
- data/frontend/app/views/gaku/grading_method_connectors/destroy.js.erb +5 -0
- data/frontend/app/views/gaku/grading_method_connectors/index.js.erb +1 -0
- data/frontend/app/views/gaku/grading_method_connectors/new.js.erb +7 -0
- data/frontend/app/views/gaku/grading_method_connectors/new_set.js.erb +6 -0
- data/frontend/app/views/gaku/guardians/_delete_modal.html.slim +11 -0
- data/frontend/app/views/gaku/guardians/_edit_form.html.slim +10 -0
- data/frontend/app/views/gaku/guardians/_form.html.slim +3 -0
- data/frontend/app/views/gaku/{students/guardians → guardians}/_form_fields.html.slim +0 -0
- data/frontend/app/views/gaku/guardians/_guardian.html.slim +6 -0
- data/frontend/app/views/gaku/guardians/_guardians.html.slim +21 -0
- data/frontend/app/views/gaku/guardians/create.js.erb +7 -0
- data/frontend/app/views/gaku/guardians/destroy.js.erb +2 -0
- data/frontend/app/views/gaku/guardians/edit.html.slim +32 -0
- data/frontend/app/views/gaku/guardians/edit.js.erb +1 -0
- data/frontend/app/views/gaku/guardians/index.js.erb +1 -0
- data/frontend/app/views/gaku/{students/guardians → guardians}/new.js.erb +0 -0
- data/{archive/app/views/gaku/students → frontend/app/views/gaku/guardians}/recovery.js.erb +0 -0
- data/frontend/app/views/gaku/notes/_buttons.html.slim +4 -8
- data/frontend/app/views/gaku/notes/_notes.html.slim +3 -5
- data/frontend/app/views/gaku/notes/create.js.erb +3 -1
- data/frontend/app/views/gaku/notes/destroy.js.erb +2 -1
- data/frontend/app/views/gaku/notes/index.js.erb +1 -0
- data/frontend/app/views/gaku/notes/show/_notes.html.slim +17 -0
- data/frontend/app/views/gaku/semester_connectors/_form.html.slim +4 -0
- data/frontend/app/views/gaku/semester_connectors/_form_fields.html.slim +3 -0
- data/frontend/app/views/gaku/semester_connectors/_modal.html.slim +4 -0
- data/frontend/app/views/gaku/semester_connectors/_semester_connector.html.slim +2 -0
- data/frontend/app/views/gaku/semester_connectors/_semester_connectors.html.slim +17 -0
- data/frontend/app/views/gaku/semester_connectors/_table_fields.html.slim +4 -0
- data/frontend/app/views/gaku/semester_connectors/create.js.erb +8 -0
- data/frontend/app/views/gaku/semester_connectors/destroy.js.erb +4 -0
- data/frontend/app/views/gaku/semester_connectors/edit.js.erb +3 -0
- data/frontend/app/views/gaku/semester_connectors/index.js.erb +1 -0
- data/frontend/app/views/gaku/semester_connectors/new.js.erb +4 -0
- data/frontend/app/views/gaku/semester_connectors/update.js.erb +3 -0
- data/frontend/app/views/gaku/shared/_ajax_picture.html.slim +8 -0
- data/frontend/app/views/gaku/shared/_ajax_upload_picture.html.slim +14 -0
- data/frontend/app/views/gaku/shared/_delete_modal_without_soft.html.slim +11 -0
- data/frontend/app/views/gaku/shared/fields/_attachment_fields.html.slim +4 -5
- data/frontend/app/views/gaku/shared/fields/_exam_portion_fields.html.slim +1 -1
- data/frontend/app/views/gaku/shared/js/remove_picture.js.erb +3 -0
- data/frontend/app/views/gaku/shared/js/set_picture.js.erb +3 -0
- data/frontend/app/views/gaku/shared/student_selection/_chooser.html.slim +16 -0
- data/frontend/app/views/gaku/shared/student_selection/_modal.html.slim +3 -0
- data/frontend/app/views/gaku/states/_no_states_select.html.slim +1 -1
- data/frontend/app/views/gaku/states/_states_select.html.slim +1 -1
- data/frontend/app/views/gaku/student_selection/_selected_student.html.slim +4 -0
- data/frontend/app/views/gaku/student_selection/add.js.erb +3 -0
- data/frontend/app/views/gaku/student_selection/clear.js.erb +2 -0
- data/frontend/app/views/gaku/student_selection/collection.js.erb +0 -0
- data/frontend/app/views/gaku/student_selection/index.js.erb +10 -0
- data/frontend/app/views/gaku/student_selection/remove.js.erb +8 -0
- data/frontend/app/views/gaku/students/_chooser_widget.html.slim +6 -2
- data/frontend/app/views/gaku/students/_edit_form.html.slim +9 -0
- data/frontend/app/views/gaku/students/_form_fields.html.slim +4 -7
- data/frontend/app/views/gaku/students/_student.html.slim +1 -2
- data/frontend/app/views/gaku/students/_student_unit.html.slim +0 -1
- data/frontend/app/views/gaku/students/_students.html.slim +5 -3
- data/frontend/app/views/gaku/students/_table_fields.html.slim +1 -1
- data/frontend/app/views/gaku/students/badges/_badges.html.slim +20 -2
- data/frontend/app/views/gaku/students/badges/_edit.html.slim +9 -8
- data/frontend/app/views/gaku/students/badges/create.js.erb +2 -7
- data/frontend/app/views/gaku/students/badges/destroy.js.erb +2 -4
- data/frontend/app/views/gaku/students/badges/edit.js.erb +2 -1
- data/frontend/app/views/gaku/students/badges/index.js.erb +1 -3
- data/frontend/app/views/gaku/students/badges/new.js.erb +1 -1
- data/frontend/app/views/gaku/students/badges/update.js.erb +3 -5
- data/frontend/app/views/gaku/students/chosen.js.erb +1 -3
- data/frontend/app/views/gaku/students/class_group_enrollments/_class_group_enrollment.html.slim +5 -0
- data/frontend/app/views/gaku/students/class_group_enrollments/_class_group_enrollments.html.slim +19 -0
- data/frontend/app/views/gaku/students/class_group_enrollments/_form.html.slim +4 -0
- data/frontend/app/views/gaku/students/class_group_enrollments/create.js.erb +10 -8
- data/frontend/app/views/gaku/students/class_group_enrollments/destroy.js.erb +3 -0
- data/frontend/app/views/gaku/students/class_group_enrollments/index.js.erb +1 -0
- data/frontend/app/views/gaku/students/class_group_enrollments/new.js.erb +3 -2
- data/frontend/app/views/gaku/students/course_enrollments/_course_enrollment.html.slim +3 -4
- data/frontend/app/views/gaku/students/course_enrollments/_course_enrollments.html.slim +3 -3
- data/frontend/app/views/gaku/students/course_enrollments/_form.html.slim +3 -4
- data/frontend/app/views/gaku/students/course_enrollments/create.js.erb +5 -5
- data/frontend/app/views/gaku/students/course_enrollments/destroy.js.erb +1 -1
- data/frontend/app/views/gaku/students/course_enrollments/index.js.erb +1 -0
- data/frontend/app/views/gaku/students/edit.html.slim +65 -35
- data/frontend/app/views/gaku/students/edit.js.erb +1 -0
- data/frontend/app/views/gaku/students/external_school_records/_external_school_record.html.slim +1 -1
- data/frontend/app/views/gaku/students/external_school_records/_external_school_records.html.slim +2 -2
- data/frontend/app/views/gaku/students/external_school_records/_fields.html.slim +3 -4
- data/frontend/app/views/gaku/students/external_school_records/_form_fields.html.slim +1 -1
- data/frontend/app/views/gaku/students/external_school_records/create.js.erb +3 -2
- data/frontend/app/views/gaku/students/external_school_records/destroy.js.erb +2 -1
- data/frontend/app/views/gaku/students/external_school_records/index.js.erb +1 -0
- data/frontend/app/views/gaku/students/external_school_records/update.js.erb +1 -1
- data/frontend/app/views/gaku/students/extracurricular_activity_enrollments/_extracurricular_activity_enrollment.html.slim +3 -0
- data/frontend/app/views/gaku/students/extracurricular_activity_enrollments/_extracurricular_activity_enrollments.html.slim +17 -0
- data/frontend/app/views/gaku/students/extracurricular_activity_enrollments/_form.html.slim +3 -0
- data/frontend/app/views/gaku/students/extracurricular_activity_enrollments/create.js.erb +9 -0
- data/frontend/app/views/gaku/students/extracurricular_activity_enrollments/destroy.js.erb +3 -0
- data/frontend/app/views/gaku/students/extracurricular_activity_enrollments/index.js.erb +1 -0
- data/frontend/app/views/gaku/students/extracurricular_activity_enrollments/new.js.erb +3 -0
- data/frontend/app/views/gaku/students/index.html.slim +0 -1
- data/frontend/app/views/gaku/students/simple_grades/_edit.html.slim +6 -8
- data/frontend/app/views/gaku/students/simple_grades/_form_fields.html.slim +7 -3
- data/frontend/app/views/gaku/students/simple_grades/_simple_grades.html.slim +21 -2
- data/frontend/app/views/gaku/students/simple_grades/create.js.erb +1 -1
- data/frontend/app/views/gaku/students/simple_grades/destroy.js.erb +1 -2
- data/frontend/app/views/gaku/students/simple_grades/edit.js.erb +5 -3
- data/frontend/app/views/gaku/students/simple_grades/index.js.erb +1 -5
- data/frontend/app/views/gaku/students/simple_grades/update.js.erb +2 -3
- data/frontend/app/views/gaku/students/student_specialties/_edit.html.slim +5 -7
- data/frontend/app/views/gaku/students/student_specialties/_student_specialties.html.slim +18 -2
- data/frontend/app/views/gaku/students/student_specialties/create.js.erb +3 -3
- data/frontend/app/views/gaku/students/student_specialties/destroy.js.erb +1 -1
- data/frontend/app/views/gaku/students/student_specialties/edit.js.erb +3 -2
- data/frontend/app/views/gaku/students/student_specialties/index.js.erb +1 -5
- data/frontend/app/views/gaku/students/student_specialties/update.js.erb +2 -3
- data/frontend/app/views/gaku/syllabuses/_edit_form.html.slim +9 -0
- data/frontend/app/views/gaku/syllabuses/edit.html.slim +12 -12
- data/frontend/app/views/gaku/syllabuses/edit.js.erb +1 -0
- data/frontend/app/views/gaku/syllabuses/exam_syllabuses/_form.html.slim +6 -0
- data/frontend/app/views/gaku/syllabuses/exam_syllabuses/create.js.erb +3 -3
- data/frontend/app/views/gaku/syllabuses/exam_syllabuses/destroy.js.erb +3 -2
- data/frontend/app/views/gaku/syllabuses/exam_syllabuses/new.js.erb +8 -0
- data/frontend/app/views/gaku/syllabuses/exams/_exams.html.slim +29 -13
- data/frontend/app/views/gaku/syllabuses/exams/destroy.js.erb +2 -2
- data/frontend/app/views/gaku/syllabuses/exams/index.js.erb +1 -0
- data/frontend/app/views/gaku/syllabuses/exams/new.js.erb +5 -0
- data/{archive/app/views/gaku/teachers/recovery.js.erb → frontend/app/views/gaku/syllabuses/update.js.erb} +0 -0
- data/frontend/app/views/gaku/teachers/_edit_form.html.slim +9 -0
- data/frontend/app/views/gaku/teachers/_fields.html.slim +5 -1
- data/frontend/app/views/gaku/teachers/_teacher.html.slim +1 -1
- data/frontend/app/views/gaku/teachers/_teachers.html.slim +1 -1
- data/frontend/app/views/gaku/teachers/edit.html.slim +22 -14
- data/frontend/app/views/gaku/teachers/edit.js.erb +1 -0
- data/frontend/app/views/gaku/teachers/show.html.slim +6 -8
- data/frontend/config/routes.rb +71 -37
- data/frontend/gaku_frontend.gemspec +23 -22
- data/frontend/lib/gaku/app_responder.rb +1 -1
- data/frontend/lib/gaku/frontend.rb +4 -1
- data/frontend/lib/gaku/frontend/engine.rb +2 -2
- data/frontend/lib/gaku_frontend.rb +1 -1
- data/frontend/lib/tasks/admin_user.rake +2 -1
- data/frontend/spec/controllers/gaku/addresses_controller_spec.rb +23 -7
- data/frontend/spec/controllers/gaku/class_groups/class_groups_controller_spec.rb +11 -6
- data/frontend/spec/controllers/gaku/contacts_controller_spec.rb +25 -8
- data/frontend/spec/controllers/gaku/course_groups/course_group_enrollments_controller.rb +12 -4
- data/frontend/spec/controllers/gaku/course_groups/course_groups_controller_spec.rb +0 -1
- data/frontend/spec/controllers/gaku/exams/exam_portions_controller_spec.rb +8 -4
- data/frontend/spec/controllers/gaku/exams/exam_sessions_controller_spec.rb +147 -0
- data/frontend/spec/controllers/gaku/exams/exams_controller_spec.rb +0 -2
- data/frontend/spec/controllers/gaku/extracurricular_activities_controller_spec.rb +66 -35
- data/frontend/spec/controllers/gaku/guardians_controller_spec.rb +125 -0
- data/frontend/spec/controllers/gaku/student_selection_controller_spec.rb +66 -0
- data/frontend/spec/controllers/gaku/students/badges_controller_spec.rb +17 -9
- data/frontend/spec/controllers/gaku/students/external_school_records_controller_spec.rb +35 -19
- data/frontend/spec/controllers/gaku/students/simple_grades_controller_spec.rb +16 -9
- data/frontend/spec/controllers/gaku/students/student_specialties_controller_spec.rb +17 -9
- data/frontend/spec/controllers/gaku/students/students_controller_spec.rb +179 -36
- data/frontend/spec/controllers/gaku/syllabuses_controller_spec.rb +44 -34
- data/frontend/spec/controllers/gaku/teachers_controller_spec.rb +10 -3
- data/frontend/spec/features/{change_language_spec.rb → other/change_language_spec.rb} +0 -0
- data/frontend/spec/features/other/class_groups/class_groups_spec.rb +96 -0
- data/frontend/spec/features/other/class_groups/enrollments_spec.rb +109 -0
- data/frontend/spec/features/other/class_groups/notes_spec.rb +32 -0
- data/frontend/spec/features/other/class_groups/semester_attendances_spec.rb +52 -0
- data/frontend/spec/features/other/class_groups/semester_connectors_spec.rb +106 -0
- data/frontend/spec/features/other/class_groups/student_reviews_spec.rb +77 -0
- data/frontend/spec/features/other/course_groups/course_groups_spec.rb +75 -0
- data/frontend/spec/features/other/course_groups/courses_spec.rb +38 -0
- data/frontend/spec/features/other/courses/courses_spec.rb +137 -0
- data/frontend/spec/features/other/courses/enrollments_spec.rb +96 -0
- data/frontend/spec/features/other/courses/exams_spec.rb +36 -0
- data/frontend/spec/features/other/courses/grading_method_connectors_spec.rb +99 -0
- data/frontend/spec/features/other/courses/notes_spec.rb +32 -0
- data/frontend/spec/features/other/courses/semester_connectors_spec.rb +97 -0
- data/frontend/spec/features/other/exams/exam_portions/attachments_spec.rb +90 -0
- data/frontend/spec/features/other/exams/exam_portions/exam_portions_spec.rb +86 -0
- data/frontend/spec/features/other/exams/exam_sessions_spec.rb +75 -0
- data/frontend/spec/features/other/exams/exams_spec.rb +138 -0
- data/frontend/spec/features/other/exams/grading_method_connectors_spec.rb +106 -0
- data/frontend/spec/features/other/exams/notes_spec.rb +32 -0
- data/frontend/spec/features/other/extracurricular_activities/enrollments_spec.rb +84 -0
- data/frontend/spec/features/other/extracurricular_activities/extracurricular_activities_spec.rb +66 -0
- data/frontend/spec/features/{sign_in_spec.rb → other/sign_in_spec.rb} +0 -0
- data/frontend/spec/features/{sign_out_spec.rb → other/sign_out_spec.rb} +0 -0
- data/frontend/spec/features/other/sign_up_spec.rb +70 -0
- data/frontend/spec/features/other/syllabuses/exams_spec.rb +161 -0
- data/frontend/spec/features/other/syllabuses/notes_spec.rb +32 -0
- data/frontend/spec/features/{syllabuses → other/syllabuses}/syllabuses_spec.rb +0 -0
- data/frontend/spec/features/other/teachers/addresses_spec.rb +62 -0
- data/frontend/spec/features/other/teachers/contacts_spec.rb +55 -0
- data/frontend/spec/features/other/teachers/notes_spec.rb +34 -0
- data/frontend/spec/features/other/teachers/picture_spec.rb +54 -0
- data/frontend/spec/features/other/teachers/teachers_spec.rb +81 -0
- data/frontend/spec/features/students/addresses_spec.rb +4 -2
- data/frontend/spec/features/students/badges_spec.rb +14 -18
- data/frontend/spec/features/students/class_group_enrollments_spec.rb +72 -28
- data/frontend/spec/features/students/contacts_spec.rb +3 -4
- data/frontend/spec/features/students/course_enrollments_spec.rb +43 -20
- data/frontend/spec/features/students/external_school_records_spec.rb +5 -6
- data/frontend/spec/features/students/extracurricular_activity_enrollments_spec.rb +64 -0
- data/frontend/spec/features/students/guardians/addresses_spec.rb +5 -3
- data/frontend/spec/features/students/guardians/contacts_spec.rb +5 -10
- data/frontend/spec/features/students/guardians/guardians_spec.rb +3 -5
- data/frontend/spec/features/students/guardians/picture_spec.rb +41 -8
- data/frontend/spec/features/students/notes_spec.rb +2 -4
- data/frontend/spec/features/students/picture_spec.rb +39 -8
- data/frontend/spec/features/students/preset_spec.rb +44 -48
- data/frontend/spec/features/students/simple_grades_spec.rb +12 -17
- data/frontend/spec/features/students/student_specialties_spec.rb +12 -18
- data/frontend/spec/features/students/students_selection_spec.rb +150 -0
- data/frontend/spec/features/students/students_spec.rb +51 -34
- data/frontend/spec/requests/class_groups/enrollments_spec.rb +236 -0
- data/frontend/spec/requests/courses/enrollments_spec.rb +242 -0
- data/frontend/spec/requests/extracurricular_activities/enrollments_spec.rb +258 -0
- data/frontend/spec/routing/class_groups/enrollments_routing_spec.rb +55 -0
- data/frontend/spec/routing/courses/enrollments_routing_spec.rb +55 -0
- data/frontend/spec/routing/extracurricular_activities/enrollments_routing_spec.rb +55 -0
- data/frontend/spec/routing/guardians_routing_spec.rb +79 -0
- data/frontend/spec/routing/student_routes_spec.rb +1 -7
- data/frontend/spec/routing/students/external_school_records_routing_spec.rb +62 -0
- data/frontend/spec/routing/students/simple_grades_routes_spec.rb +1 -2
- data/frontend/spec/routing/students/student_specialties_routes_spec.rb +1 -2
- data/frontend/spec/routing/teachers_routes_spec.rb +75 -0
- data/frontend/spec/support/controllers/shared_examples/allow.rb +1 -1
- data/frontend/spec/support/features/shared_examples/addresses_spec.rb +13 -15
- data/frontend/spec/support/features/shared_examples/avatarable_spec.rb +2 -3
- data/frontend/spec/support/features/shared_examples/contacts_spec.rb +2 -4
- data/frontend/spec/support/features/shared_examples/course_enrollable_spec.rb +10 -2
- data/frontend/spec/support/features/shared_examples/notes_spec.rb +10 -7
- data/frontend/spec/support/models/matchers/accept_nested_attributes_for_matcher.rb +36 -33
- data/frontend/spec/support/models/shared_examples/addressable.rb +1 -1
- data/frontend/spec/support/models/shared_examples/notable.rb +1 -1
- data/frontend/spec/support/models/shared_examples/person.rb +1 -1
- data/gaku.gemspec +25 -17
- data/lib/gaku.rb +1 -2
- data/sample/Rakefile +0 -12
- data/sample/db/sample/gaku/01_syllabuses.rb +128 -0
- data/sample/db/sample/gaku/02_courses.rb +12 -0
- data/sample/db/sample/gaku/20-grading_methods.rb +32 -0
- data/sample/db/sample/gaku/badge_types.rb +3 -7
- data/sample/db/sample/gaku/changes/student_changes.rb +27 -27
- data/sample/db/sample/gaku/class_groups.rb +3 -3
- data/sample/db/sample/gaku/disposals/address_and_contact_disposals.rb +1 -1
- data/sample/db/sample/gaku/disposals/attachment_disposals.rb +15 -7
- data/sample/db/sample/gaku/disposals/course_group_disposals.rb +6 -6
- data/sample/db/sample/gaku/disposals/exam_disposals.rb +6 -6
- data/sample/db/sample/gaku/disposals/student_disposals.rb +8 -8
- data/sample/db/sample/gaku/disposals/teacher_disposals.rb +6 -6
- data/sample/db/sample/gaku/exams.rb +1 -4
- data/sample/db/sample/gaku/extracurricular_activities.rb +1 -4
- data/sample/db/sample/gaku/grading_widget.rb +7 -13
- data/sample/db/sample/gaku/roles.rb +2 -5
- data/sample/db/sample/gaku/schools.rb +22 -0
- data/sample/db/sample/gaku/specialties.rb +2 -8
- data/sample/db/sample/gaku/students.rb +6 -8
- data/sample/db/sample/gaku/teachers.rb +5 -12
- data/sample/db/sample/gaku/users.rb +2 -3
- data/sample/gaku_sample.gemspec +6 -9
- data/sample/lib/shared_sample_data.rb +35 -24
- data/testing/Rakefile +6 -10
- data/testing/gaku_testing.gemspec +6 -11
- data/testing/lib/gaku/testing/env.rb +2 -2
- data/testing/lib/gaku/testing/feature_helpers.rb +3 -7
- data/testing/lib/gaku/testing/flash_helpers.rb +1 -1
- data/testing/lib/gaku/testing/spec_helpers/spec_helper.rb +7 -4
- data/testing/lib/gaku/testing/spec_helpers/spec_helper_base.rb +5 -1
- data/testing/lib/gaku/testing/spec_helpers/spec_helper_controllers.rb +4 -4
- data/testing/lib/gaku/testing/spec_helpers/spec_helper_models.rb +1 -1
- data/testing/lib/gaku_testing.rb +1 -1
- metadata +494 -459
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/admin/.ruby-gemset +0 -1
- data/admin/.ruby-version +0 -1
- data/admin/app/controllers/gaku/admin/achievements/simple_grade_types_controller.rb +0 -70
- data/admin/app/controllers/gaku/admin/schools/campuses/addresses_controller.rb +0 -64
- data/admin/app/controllers/gaku/admin/schools/campuses/contacts_controller.rb +0 -77
- data/admin/app/controllers/gaku/admin/schools/campuses_controller.rb +0 -72
- data/admin/app/views/gaku/admin/achievements/simple_grade_types/index.html.slim +0 -23
- data/admin/app/views/gaku/admin/attendance_types/index.html.slim +0 -24
- data/admin/app/views/gaku/admin/badge_types/index.html.slim +0 -22
- data/admin/app/views/gaku/admin/commute_method_types/index.html.slim +0 -18
- data/admin/app/views/gaku/admin/contact_types/index.html.slim +0 -18
- data/admin/app/views/gaku/admin/departments/index.html.slim +0 -20
- data/admin/app/views/gaku/admin/enrollment_statuses/index.html.slim +0 -21
- data/admin/app/views/gaku/admin/grading_method_sets/index.html.slim +0 -23
- data/admin/app/views/gaku/admin/grading_method_sets/show.html.slim +0 -13
- data/admin/app/views/gaku/admin/grading_methods/index.html.slim +0 -20
- data/admin/app/views/gaku/admin/presets/index.html.slim +0 -16
- data/admin/app/views/gaku/admin/roles/index.html.slim +0 -20
- data/admin/app/views/gaku/admin/school_years/index.html.slim +0 -21
- data/admin/app/views/gaku/admin/school_years/show.html.slim +0 -15
- data/admin/app/views/gaku/admin/schools/campuses/_campus.html.slim +0 -6
- data/admin/app/views/gaku/admin/schools/campuses/_campuses.html.slim +0 -23
- data/admin/app/views/gaku/admin/schools/campuses/_picture.html.slim +0 -8
- data/admin/app/views/gaku/admin/schools/campuses/_show_table.html.slim +0 -10
- data/admin/app/views/gaku/admin/schools/campuses/_tabs.html.slim +0 -15
- data/admin/app/views/gaku/admin/schools/campuses/_upload_picture.html.slim +0 -7
- data/admin/app/views/gaku/admin/schools/campuses/addresses/_address.html.slim +0 -7
- data/admin/app/views/gaku/admin/schools/campuses/addresses/_address_row_fields.html.slim +0 -4
- data/admin/app/views/gaku/admin/schools/campuses/addresses/_addresses.html.slim +0 -24
- data/admin/app/views/gaku/admin/schools/campuses/addresses/update.js.erb +0 -4
- data/admin/app/views/gaku/admin/schools/campuses/contacts/_contact.html.slim +0 -3
- data/admin/app/views/gaku/admin/schools/campuses/contacts/_contacts.html.slim +0 -22
- data/admin/app/views/gaku/admin/schools/campuses/contacts/_fields.html.slim +0 -12
- data/admin/app/views/gaku/admin/schools/campuses/contacts/_primary_field.html.slim +0 -13
- data/admin/app/views/gaku/admin/schools/campuses/contacts/create.js.erb +0 -20
- data/admin/app/views/gaku/admin/schools/campuses/contacts/destroy.js.erb +0 -8
- data/admin/app/views/gaku/admin/schools/campuses/contacts/edit.js.erb +0 -4
- data/admin/app/views/gaku/admin/schools/campuses/edit.html.slim +0 -19
- data/admin/app/views/gaku/admin/schools/campuses/show.html.slim +0 -13
- data/admin/app/views/gaku/admin/schools/index.html.slim +0 -25
- data/admin/app/views/gaku/admin/schools/show.html.slim +0 -13
- data/admin/app/views/gaku/admin/schools/show_master.html.slim +0 -14
- data/admin/app/views/gaku/admin/specialties/index.html.slim +0 -21
- data/admin/app/views/gaku/admin/states/index.html.slim +0 -15
- data/admin/app/views/gaku/admin/templates/edit.html.slim +0 -1
- data/admin/app/views/gaku/admin/templates/index.html.slim +0 -20
- data/admin/app/views/gaku/admin/templates/new.html.slim +0 -1
- data/admin/app/views/gaku/admin/users/index.html.slim +0 -21
- data/admin/config/initializers/client_side_validations.rb +0 -9
- data/admin/spec/controllers/gaku/admin/achievements/simple_grade_types_controller_spec.rb +0 -168
- data/admin/spec/features/badge_types/badge_types_spec.rb +0 -72
- data/admin/spec/routing/admin/schools/admin_school_routes_spec.rb +0 -79
- data/admin/spec/routing/admin/schools/campuses/admin_schools_campus_routes_spec.rb +0 -65
- data/admin/spec/routing/admin/schools/campuses/admin_schools_campuses_address_routes_spec.rb +0 -61
- data/admin/spec/routing/admin/schools/campuses/contacts_routing_spec.rb +0 -61
- data/all_dependencies.rb +0 -23
- data/archive/.rspec +0 -2
- data/archive/.ruby-gemset +0 -1
- data/archive/.ruby-version +0 -1
- data/archive/Gemfile +0 -8
- data/archive/Rakefile +0 -31
- data/archive/app/assets/javascripts/gaku/archive.js.coffee +0 -4
- data/archive/app/assets/stylesheets/gaku/archive.css +0 -5
- data/archive/app/controllers/concerns/trashable_controller.rb +0 -32
- data/archive/app/controllers/gaku/admin/changes/student_address_changes_controller.rb +0 -14
- data/archive/app/controllers/gaku/admin/changes/student_changes_controller.rb +0 -13
- data/archive/app/controllers/gaku/admin/changes/student_contact_changes_controller.rb +0 -13
- data/archive/app/controllers/gaku/admin/disposals_controller.rb +0 -55
- data/archive/app/controllers/gaku/admin/students_controller.rb +0 -22
- data/archive/app/controllers/gaku/class_groups_controller_injector.rb +0 -5
- data/archive/app/controllers/gaku/contacts_controller_injector.rb +0 -21
- data/archive/app/controllers/gaku/course_groups_controller_injector.rb +0 -5
- data/archive/app/controllers/gaku/courses_controller_injector.rb +0 -5
- data/archive/app/controllers/gaku/exams_controller_injector.rb +0 -5
- data/archive/app/controllers/gaku/extracurricular_activities_controller_injector.rb +0 -5
- data/archive/app/controllers/gaku/students_controller_injector.rb +0 -5
- data/archive/app/controllers/gaku/syllabuses_controller_injector.rb +0 -5
- data/archive/app/controllers/gaku/teachers_controller_injector.rb +0 -5
- data/archive/app/models/concerns/trashable.rb +0 -17
- data/archive/app/models/gaku/address_injector.rb +0 -31
- data/archive/app/models/gaku/attachment_injector.rb +0 -5
- data/archive/app/models/gaku/class_group_injector.rb +0 -5
- data/archive/app/models/gaku/contact_injector.rb +0 -34
- data/archive/app/models/gaku/course_group_injector.rb +0 -5
- data/archive/app/models/gaku/course_injector.rb +0 -5
- data/archive/app/models/gaku/exam_injector.rb +0 -5
- data/archive/app/models/gaku/extracurricular_activity_injector.rb +0 -5
- data/archive/app/models/gaku/guardian_injector.rb +0 -5
- data/archive/app/models/gaku/student_injector.rb +0 -16
- data/archive/app/models/gaku/syllabus_injector.rb +0 -5
- data/archive/app/models/gaku/teacher_injector.rb +0 -5
- data/archive/app/models/gaku/versioning/address_version.rb +0 -9
- data/archive/app/models/gaku/versioning/contact_version.rb +0 -7
- data/archive/app/models/gaku/versioning/student_version.rb +0 -47
- data/archive/app/overrides/archive_menu.rb +0 -6
- data/archive/app/views/gaku/addresses/_delete_link.html.slim +0 -1
- data/archive/app/views/gaku/admin/changes/student_address_changes/_change.html.slim +0 -10
- data/archive/app/views/gaku/admin/changes/student_address_changes/_changes.html.slim +0 -19
- data/archive/app/views/gaku/admin/changes/student_address_changes/_deletion.html.slim +0 -9
- data/archive/app/views/gaku/admin/changes/student_address_changes/index.html.slim +0 -11
- data/archive/app/views/gaku/admin/changes/student_changes/_change.html.slim +0 -10
- data/archive/app/views/gaku/admin/changes/student_changes/_changes.html.slim +0 -18
- data/archive/app/views/gaku/admin/changes/student_changes/_deletion.html.slim +0 -9
- data/archive/app/views/gaku/admin/changes/student_changes/index.html.slim +0 -13
- data/archive/app/views/gaku/admin/changes/student_contact_changes/_change.html.slim +0 -10
- data/archive/app/views/gaku/admin/changes/student_contact_changes/_changes.html.slim +0 -19
- data/archive/app/views/gaku/admin/changes/student_contact_changes/_deletion.html.slim +0 -9
- data/archive/app/views/gaku/admin/changes/student_contact_changes/index.html.slim +0 -11
- data/archive/app/views/gaku/admin/disposals/_address.html.slim +0 -12
- data/archive/app/views/gaku/admin/disposals/_addresses.html.slim +0 -17
- data/archive/app/views/gaku/admin/disposals/_contact.html.slim +0 -9
- data/archive/app/views/gaku/admin/disposals/_contacts.html.slim +0 -14
- data/archive/app/views/gaku/admin/disposals/_course_group.html.slim +0 -3
- data/archive/app/views/gaku/admin/disposals/_course_groups.html.slim +0 -12
- data/archive/app/views/gaku/admin/disposals/_exam.html.slim +0 -10
- data/archive/app/views/gaku/admin/disposals/_guardian.html.slim +0 -10
- data/archive/app/views/gaku/admin/disposals/_student.html.slim +0 -10
- data/archive/app/views/gaku/admin/disposals/_tabs.html.slim +0 -17
- data/archive/app/views/gaku/admin/disposals/_teacher.html.slim +0 -10
- data/archive/app/views/gaku/admin/disposals/addresses.html.slim +0 -2
- data/archive/app/views/gaku/admin/disposals/attachments.html.slim +0 -30
- data/archive/app/views/gaku/admin/disposals/contacts.html.slim +0 -2
- data/archive/app/views/gaku/admin/disposals/course_groups.html.slim +0 -12
- data/archive/app/views/gaku/admin/disposals/exams.html.slim +0 -16
- data/archive/app/views/gaku/admin/disposals/guardians.html.slim +0 -16
- data/archive/app/views/gaku/admin/disposals/index.html.slim +0 -1
- data/archive/app/views/gaku/admin/disposals/students.html.slim +0 -16
- data/archive/app/views/gaku/admin/disposals/tabs/_addresses_tabs.html.slim +0 -19
- data/archive/app/views/gaku/admin/disposals/tabs/_contacts_tabs.html.slim +0 -19
- data/archive/app/views/gaku/admin/disposals/teachers.html.slim +0 -16
- data/archive/app/views/gaku/contacts/_delete_link.html.slim +0 -1
- data/archive/app/views/gaku/shared/_delete_link.html.slim +0 -1
- data/archive/app/views/gaku/shared/_delete_modal.html.slim +0 -11
- data/archive/app/views/gaku/shared/menu/_archive.html.erb +0 -1
- data/archive/config/initializers/paper_trail.rb +0 -3
- data/archive/config/routes.rb +0 -67
- data/archive/db/migrate/20131203160531_create_versioning_tables.rb +0 -47
- data/archive/db/migrate/20131203160607_add_deleted_fields.rb +0 -53
- data/archive/gaku_archive.gemspec +0 -28
- data/archive/lib/gaku/archive.rb +0 -13
- data/archive/lib/gaku/archive/engine.rb +0 -22
- data/archive/lib/gaku_archive.rb +0 -1
- data/archive/spec/controllers/gaku/addresses_controller_spec.rb +0 -144
- data/archive/spec/controllers/gaku/admin/disposals_controller_spec.rb +0 -177
- data/archive/spec/controllers/gaku/class_groups_controller_spec.rb +0 -86
- data/archive/spec/controllers/gaku/contacts_controller_spec.rb +0 -133
- data/archive/spec/controllers/gaku/course_groups_controller_spec.rb +0 -86
- data/archive/spec/controllers/gaku/courses_controller_spec.rb +0 -86
- data/archive/spec/controllers/gaku/exams_controller_spec.rb +0 -86
- data/archive/spec/controllers/gaku/extracurricular_activities_controller_spec.rb +0 -85
- data/archive/spec/controllers/gaku/students_controller_spec.rb +0 -72
- data/archive/spec/controllers/gaku/syllabuses_controller_spec.rb +0 -86
- data/archive/spec/controllers/gaku/teachers_controller_spec.rb +0 -86
- data/archive/spec/features/admin/changes_and_deletions/student_addresses_spec.rb +0 -40
- data/archive/spec/features/admin/changes_and_deletions/student_contacts_spec.rb +0 -28
- data/archive/spec/features/admin/changes_and_deletions/students_spec.rb +0 -45
- data/archive/spec/features/admin/disposals/student_disposals_spec.rb +0 -51
- data/archive/spec/features/admin/disposals/teacher_disposals_spec.rb +0 -51
- data/archive/spec/features/students/addresses_spec.rb +0 -29
- data/archive/spec/features/students/contacts_spec.rb +0 -36
- data/archive/spec/features/students/guardians/addresses_spec.rb +0 -32
- data/archive/spec/features/students/guardians/contacts_spec.rb +0 -31
- data/archive/spec/features/students/guardians/guardians_spec.rb +0 -33
- data/archive/spec/features/students/students_spec.rb +0 -36
- data/archive/spec/integration/student_address_versioning_spec.rb +0 -20
- data/archive/spec/integration/student_contact_vesioning_spec.rb +0 -21
- data/archive/spec/integration/student_versioning_spec.rb +0 -91
- data/archive/spec/models/address_spec.rb +0 -64
- data/archive/spec/models/attachment_spec.rb +0 -9
- data/archive/spec/models/class_group_spec.rb +0 -9
- data/archive/spec/models/contact_spec.rb +0 -9
- data/archive/spec/models/course_group_spec.rb +0 -9
- data/archive/spec/models/course_spec.rb +0 -9
- data/archive/spec/models/exam_spec.rb +0 -11
- data/archive/spec/models/extracurricular_activity_spec.rb +0 -9
- data/archive/spec/models/guardian_spec.rb +0 -9
- data/archive/spec/models/student_spec.rb +0 -13
- data/archive/spec/models/syllabus_spec.rb +0 -9
- data/archive/spec/models/teacher_spec.rb +0 -9
- data/archive/spec/routing/student_routes_spec.rb +0 -26
- data/archive/spec/routing/students/guardians_routes_spec.rb +0 -37
- data/archive/spec/spec_helper.rb +0 -5
- data/archive/spec/spec_helper_base.rb +0 -20
- data/archive/spec/spec_helper_controllers.rb +0 -4
- data/archive/spec/spec_helper_models.rb +0 -38
- data/archive/spec/spec_helper_routing.rb +0 -4
- data/archive/spec/support/controllers.rb +0 -3
- data/archive/spec/support/controllers/matchers/have_attributes_matcher.rb +0 -8
- data/archive/spec/support/controllers/shared_examples/allow.rb +0 -10
- data/archive/spec/support/controllers/shared_examples/deny.rb +0 -27
- data/archive/spec/support/features.rb +0 -5
- data/archive/spec/support/features/shared_examples/addresses_spec.rb +0 -22
- data/archive/spec/support/features/shared_examples/contacts_spec.rb +0 -26
- data/archive/spec/support/models/shared_examples/thrashable.rb +0 -6
- data/core/.ruby-gemset +0 -1
- data/core/.ruby-version +0 -1
- data/core/app/models/gaku/class_group_course_enrollment.rb +0 -17
- data/core/app/models/gaku/class_group_enrollment.rb +0 -31
- data/core/app/models/gaku/course_enrollment.rb +0 -23
- data/core/app/models/gaku/disposal.rb +0 -45
- data/core/app/models/gaku/extracurricular_activity_enrollment.rb +0 -15
- data/core/app/models/gaku/semester_class_group.rb +0 -21
- data/core/app/models/gaku/semester_course.rb +0 -21
- data/core/lib/gaku/grading/calculations.rb +0 -279
- data/core/lib/gaku/grading/grade.rb +0 -17
- data/core/lib/gaku/grading/japanese_hs_standard.rb +0 -8
- data/core/lib/gaku/testing/factories/class_group_course_enrollment_factory.rb +0 -8
- data/core/lib/gaku/testing/factories/class_group_enrollment_factory.rb +0 -9
- data/core/lib/gaku/testing/factories/semester_class_group_factory.rb +0 -8
- data/core/lib/gaku/testing/factories/semester_course.rb +0 -8
- data/core/spec/models/class_group_course_enrollment_spec.rb +0 -16
- data/core/spec/models/class_group_enrollment_spec.rb +0 -24
- data/core/spec/models/course_enrollment_spec.rb +0 -16
- data/core/spec/models/extracurricular_activity_enrollment_spec.rb +0 -18
- data/core/spec/models/semester_class_group_spec.rb +0 -17
- data/core/spec/models/semester_course_spec.rb +0 -17
- data/core_dependencies.rb +0 -12
- data/frontend/.ruby-gemset +0 -1
- data/frontend/.ruby-version +0 -1
- data/frontend/app/controllers/concerns/enrollments_controller.rb +0 -83
- data/frontend/app/controllers/gaku/class_group_enrollments_controller.rb +0 -15
- data/frontend/app/controllers/gaku/class_groups/courses_controller.rb +0 -50
- data/frontend/app/controllers/gaku/class_groups/semester_class_groups_controller.rb +0 -63
- data/frontend/app/controllers/gaku/class_groups/students_controller.rb +0 -37
- data/frontend/app/controllers/gaku/course_enrollments_controller.rb +0 -10
- data/frontend/app/controllers/gaku/courses/enrollments_controller.rb +0 -55
- data/frontend/app/controllers/gaku/courses/semester_courses_controller.rb +0 -64
- data/frontend/app/controllers/gaku/exams/exam_portions/attachments_controller.rb +0 -46
- data/frontend/app/controllers/gaku/extracurricular_activities/students_controller.rb +0 -21
- data/frontend/app/controllers/gaku/extracurricular_activity_enrollments_controller.rb +0 -16
- data/frontend/app/controllers/gaku/students/guardians_controller.rb +0 -70
- data/frontend/app/views/gaku/class_groups/_student_chooser_form.html.slim +0 -4
- data/frontend/app/views/gaku/class_groups/_tabs.html.slim +0 -41
- data/frontend/app/views/gaku/class_groups/courses/_course.html.slim +0 -4
- data/frontend/app/views/gaku/class_groups/courses/_courses.html.slim +0 -14
- data/frontend/app/views/gaku/class_groups/courses/_form.html.slim +0 -5
- data/frontend/app/views/gaku/class_groups/courses/create.js.erb +0 -7
- data/frontend/app/views/gaku/class_groups/courses/destroy.js.erb +0 -2
- data/frontend/app/views/gaku/class_groups/courses/new.js.erb +0 -3
- data/frontend/app/views/gaku/class_groups/semester_class_groups/_fields.html.slim +0 -4
- data/frontend/app/views/gaku/class_groups/semester_class_groups/_form.html.slim +0 -4
- data/frontend/app/views/gaku/class_groups/semester_class_groups/_form_fields.html.slim +0 -3
- data/frontend/app/views/gaku/class_groups/semester_class_groups/_modal.html.slim +0 -5
- data/frontend/app/views/gaku/class_groups/semester_class_groups/_semester.html.slim +0 -3
- data/frontend/app/views/gaku/class_groups/semester_class_groups/_semester_modal.html.slim +0 -4
- data/frontend/app/views/gaku/class_groups/semester_class_groups/_semesters.html.slim +0 -13
- data/frontend/app/views/gaku/class_groups/semester_class_groups/create.js.erb +0 -8
- data/frontend/app/views/gaku/class_groups/semester_class_groups/destroy.js.erb +0 -2
- data/frontend/app/views/gaku/class_groups/semester_class_groups/edit.js.erb +0 -3
- data/frontend/app/views/gaku/class_groups/semester_class_groups/new.js.erb +0 -3
- data/frontend/app/views/gaku/class_groups/semester_class_groups/update.js.erb +0 -3
- data/frontend/app/views/gaku/class_groups/student_chooser.js.erb +0 -9
- data/frontend/app/views/gaku/class_groups/students/_student.html.slim +0 -5
- data/frontend/app/views/gaku/class_groups/students/_students.html.slim +0 -14
- data/frontend/app/views/gaku/class_groups/students/destroy.js.erb +0 -2
- data/frontend/app/views/gaku/class_groups/students/enroll_students.js.erb +0 -16
- data/frontend/app/views/gaku/class_groups/students/new.js.erb +0 -3
- data/frontend/app/views/gaku/class_groups/students/without_semester.js.erb +0 -2
- data/frontend/app/views/gaku/courses/_student_chooser_form.html.slim +0 -4
- data/frontend/app/views/gaku/courses/_tabs.html.slim +0 -26
- data/frontend/app/views/gaku/courses/enrollments/_enrolled.html.slim +0 -7
- data/frontend/app/views/gaku/courses/enrollments/_enrollments.html.slim +0 -27
- data/frontend/app/views/gaku/courses/enrollments/_errors_modal.html.slim +0 -11
- data/frontend/app/views/gaku/courses/enrollments/class_groups/_form.html.slim +0 -3
- data/frontend/app/views/gaku/courses/enrollments/class_groups/enroll.js.erb +0 -16
- data/frontend/app/views/gaku/courses/enrollments/class_groups/new.js.erb +0 -4
- data/frontend/app/views/gaku/courses/enrollments/error.js.erb +0 -2
- data/frontend/app/views/gaku/courses/enrollments/students/enroll_students.js.erb +0 -11
- data/frontend/app/views/gaku/courses/semester_courses/_fields.html.slim +0 -4
- data/frontend/app/views/gaku/courses/semester_courses/_form.html.slim +0 -4
- data/frontend/app/views/gaku/courses/semester_courses/_form_fields.html.slim +0 -3
- data/frontend/app/views/gaku/courses/semester_courses/_modal.html.slim +0 -4
- data/frontend/app/views/gaku/courses/semester_courses/_semester_course.html.slim +0 -3
- data/frontend/app/views/gaku/courses/semester_courses/_semester_courses.html.slim +0 -16
- data/frontend/app/views/gaku/courses/semester_courses/create.js.erb +0 -6
- data/frontend/app/views/gaku/courses/semester_courses/destroy.js.erb +0 -3
- data/frontend/app/views/gaku/courses/semester_courses/edit.js.erb +0 -3
- data/frontend/app/views/gaku/courses/semester_courses/new.js.erb +0 -3
- data/frontend/app/views/gaku/courses/semester_courses/update.js.erb +0 -3
- data/frontend/app/views/gaku/courses/student_chooser.js.erb +0 -7
- data/frontend/app/views/gaku/exams/exam_portions/attachments/_attachment.html.slim +0 -2
- data/frontend/app/views/gaku/exams/exam_portions/attachments/_attachments.html.slim +0 -20
- data/frontend/app/views/gaku/exams/exam_portions/attachments/_form.html.slim +0 -3
- data/frontend/app/views/gaku/exams/exam_portions/attachments/_modal.html.slim +0 -4
- data/frontend/app/views/gaku/exams/exam_portions/attachments/new.js.erb +0 -3
- data/frontend/app/views/gaku/extracurricular_activities/_student_chooser_form.html.slim +0 -4
- data/frontend/app/views/gaku/extracurricular_activities/_tabs.html.slim +0 -15
- data/frontend/app/views/gaku/extracurricular_activities/student_chooser.js.erb +0 -9
- data/frontend/app/views/gaku/extracurricular_activities/students/_student.html.slim +0 -5
- data/frontend/app/views/gaku/extracurricular_activities/students/_students.html.slim +0 -16
- data/frontend/app/views/gaku/extracurricular_activities/students/destroy.js.erb +0 -3
- data/frontend/app/views/gaku/extracurricular_activities/students/enroll_students.js.erb +0 -11
- data/frontend/app/views/gaku/shared/_external_school_record.html.slim +0 -36
- data/frontend/app/views/gaku/shared/_picture.html.slim +0 -8
- data/frontend/app/views/gaku/shared/_upload_picture.html.slim +0 -7
- data/frontend/app/views/gaku/shared/student/_show.html.slim +0 -12
- data/frontend/app/views/gaku/students/_academic.html.slim +0 -18
- data/frontend/app/views/gaku/students/_personal.html.slim +0 -3
- data/frontend/app/views/gaku/students/_student_chooser_form.html.slim +0 -16
- data/frontend/app/views/gaku/students/_tabs.html.slim +0 -48
- data/frontend/app/views/gaku/students/_tabs_academic.html.slim +0 -40
- data/frontend/app/views/gaku/students/_tabs_personal.html.slim +0 -27
- data/frontend/app/views/gaku/students/badges/_badge_type.html.slim +0 -5
- data/frontend/app/views/gaku/students/badges/_badges_tab.html.slim +0 -8
- data/frontend/app/views/gaku/students/badges/_index.html.slim +0 -20
- data/frontend/app/views/gaku/students/badges/_index_modal.html.slim +0 -4
- data/frontend/app/views/gaku/students/class_group_enrollments/_new_modal.html.slim +0 -28
- data/frontend/app/views/gaku/students/course_enrollments/_errors_modal.html.slim +0 -11
- data/frontend/app/views/gaku/students/course_enrollments/error.js.erb +0 -2
- data/frontend/app/views/gaku/students/guardians/_delete_modal.html.slim +0 -12
- data/frontend/app/views/gaku/students/guardians/_form.html.slim +0 -3
- data/frontend/app/views/gaku/students/guardians/_guardian.html.slim +0 -12
- data/frontend/app/views/gaku/students/guardians/_guardians.html.slim +0 -24
- data/frontend/app/views/gaku/students/guardians/_picture.html.slim +0 -8
- data/frontend/app/views/gaku/students/guardians/_tabs.html.slim +0 -14
- data/frontend/app/views/gaku/students/guardians/_upload_picture.html.slim +0 -7
- data/frontend/app/views/gaku/students/guardians/create.js.erb +0 -7
- data/frontend/app/views/gaku/students/guardians/destroy.js.erb +0 -1
- data/frontend/app/views/gaku/students/guardians/edit.html.slim +0 -21
- data/frontend/app/views/gaku/students/guardians/recovery.js.erb +0 -1
- data/frontend/app/views/gaku/students/guardians/show.html.slim +0 -17
- data/frontend/app/views/gaku/students/show.html.slim +0 -24
- data/frontend/app/views/gaku/students/simple_grades/_index.html.slim +0 -21
- data/frontend/app/views/gaku/students/simple_grades/_index_modal.html.slim +0 -4
- data/frontend/app/views/gaku/students/student_specialties/_index.html.slim +0 -18
- data/frontend/app/views/gaku/students/student_specialties/_index_modal.html.slim +0 -4
- data/frontend/app/views/gaku/syllabuses/_all_exams.html.slim +0 -14
- data/frontend/app/views/gaku/syllabuses/_tabs.html.slim +0 -16
- data/frontend/app/views/gaku/syllabuses/exams/_select_form.html.slim +0 -6
- data/frontend/app/views/gaku/teachers/_tabs.html.slim +0 -20
- data/frontend/config/initializers/client_side_validations.rb +0 -9
- data/frontend/spec/controllers/gaku/class_group_enrollments_controller_spec.rb +0 -62
- data/frontend/spec/controllers/gaku/class_groups/courses_controller_spec.rb +0 -90
- data/frontend/spec/controllers/gaku/class_groups/semesters_controller_spec.rb +0 -90
- data/frontend/spec/controllers/gaku/students/course_enrollments_controller_spec.rb +0 -121
- data/frontend/spec/controllers/gaku/students/guardians_controller_spec.rb +0 -115
- data/frontend/spec/features/class_groups/class_groups_spec.rb +0 -96
- data/frontend/spec/features/class_groups/courses_spec.rb +0 -39
- data/frontend/spec/features/class_groups/notes_spec.rb +0 -32
- data/frontend/spec/features/class_groups/semester_class_groups_spec.rb +0 -96
- data/frontend/spec/features/class_groups/students_spec.rb +0 -90
- data/frontend/spec/features/course_groups/course_groups_spec.rb +0 -76
- data/frontend/spec/features/course_groups/courses_spec.rb +0 -37
- data/frontend/spec/features/courses/courses_spec.rb +0 -108
- data/frontend/spec/features/courses/enrollments/class_groups_spec.rb +0 -81
- data/frontend/spec/features/courses/enrollments/students_spec.rb +0 -75
- data/frontend/spec/features/courses/exams_spec.rb +0 -36
- data/frontend/spec/features/courses/notes_spec.rb +0 -32
- data/frontend/spec/features/courses/semester_courses_spec.rb +0 -108
- data/frontend/spec/features/exams/exam_portions/attachments_spec.rb +0 -101
- data/frontend/spec/features/exams/exam_portions/exam_portions_spec.rb +0 -81
- data/frontend/spec/features/exams/exams_spec.rb +0 -101
- data/frontend/spec/features/exams/notes_spec.rb +0 -32
- data/frontend/spec/features/extracurricular_activities/extracurricular_activities_spec.rb +0 -67
- data/frontend/spec/features/extracurricular_activities/students_spec.rb +0 -164
- data/frontend/spec/features/sign_up_spec.rb +0 -71
- data/frontend/spec/features/syllabuses/exams_spec.rb +0 -161
- data/frontend/spec/features/syllabuses/notes_spec.rb +0 -32
- data/frontend/spec/features/teachers/addresses_spec.rb +0 -60
- data/frontend/spec/features/teachers/contacts_spec.rb +0 -56
- data/frontend/spec/features/teachers/notes_spec.rb +0 -34
- data/frontend/spec/features/teachers/picture_spec.rb +0 -22
- data/frontend/spec/features/teachers/teachers_spec.rb +0 -82
- data/frontend/spec/routing/class_groups/courses_routing_spec.rb +0 -40
- data/frontend/spec/routing/class_groups/students_routing_spec.rb +0 -40
- data/frontend/spec/routing/students/course_enrollments_routes_spec.rb +0 -36
- data/frontend/spec/routing/students/guardians_routes_spec.rb +0 -55
- data/sample/db/sample/gaku/01-syllabuses.rb +0 -130
- data/sample/db/sample/gaku/02-courses.rb +0 -13
@@ -12,18 +12,24 @@ describe Gaku::ClassGroupsController do
|
|
12
12
|
describe 'GET #index' do
|
13
13
|
let(:class_group_for_semester) { create(:class_group) }
|
14
14
|
let(:semester) { create(:semester) }
|
15
|
-
let(:
|
15
|
+
let(:semester_connector_class_group) do
|
16
|
+
create(:semester_connector_class_group, semester: semester, semesterable: class_group)
|
17
|
+
end
|
16
18
|
|
17
19
|
before do
|
18
20
|
class_group
|
19
|
-
|
21
|
+
semester_connector_class_group
|
20
22
|
gaku_get :index
|
21
23
|
end
|
22
24
|
|
23
25
|
it { should respond_with 200 }
|
24
|
-
xit('assigns @class_groups') { expect(assigns(:class_groups)).to eq [
|
25
|
-
|
26
|
-
|
26
|
+
xit('assigns @class_groups') { expect(assigns(:class_groups)).to eq [semester_connector_class_group] }
|
27
|
+
|
28
|
+
xit('assigns @class_groups_without_semester') do
|
29
|
+
expect(assigns(:class_groups_without_semester)).to eq [class_group]
|
30
|
+
end
|
31
|
+
|
32
|
+
xit('assigns @count') { expect(assigns(:count)).to eq 1 }
|
27
33
|
it('renders :index template') { template? :index }
|
28
34
|
end
|
29
35
|
|
@@ -32,7 +38,6 @@ describe Gaku::ClassGroupsController do
|
|
32
38
|
|
33
39
|
it { should respond_with 200 }
|
34
40
|
it('assigns @class_group') { expect(assigns(:class_group)).to eq class_group }
|
35
|
-
it('assigns @class_group_course_enrollment') { expect(assigns(:class_group_course_enrollment)).to be_a_new(Gaku::ClassGroupCourseEnrollment) }
|
36
41
|
it('renders the :edit template') { template? :edit }
|
37
42
|
end
|
38
43
|
|
@@ -18,7 +18,11 @@ describe Gaku::ContactsController do
|
|
18
18
|
it { should respond_with 200 }
|
19
19
|
it('assigns @contact') { expect(assigns(:contact)).to be_a_new(Gaku::Contact) }
|
20
20
|
it('assigns @contact_types') { expect(assigns(:contact_types)).to eq [contact_type] }
|
21
|
-
|
21
|
+
|
22
|
+
it('assigns @polymorphic_resource_name') do
|
23
|
+
expect(assigns(:polymorphic_resource_name)).to eq 'student-contact'
|
24
|
+
end
|
25
|
+
|
22
26
|
it('assigns @polymorphic_resource') { expect(assigns(:polymorphic_resource)).to eq student }
|
23
27
|
it('assigns @nested_resources') { expect(assigns(:nested_resources)).to eq [] }
|
24
28
|
it('renders the :new template') { template? :new }
|
@@ -27,7 +31,8 @@ describe Gaku::ContactsController do
|
|
27
31
|
describe 'XHR POST #create' do
|
28
32
|
context 'with valid attributes' do
|
29
33
|
let(:valid_js_create) do
|
30
|
-
gaku_js_post :create, contact: attributes_for(:contact, contact_type_id: contact_type.id),
|
34
|
+
gaku_js_post :create, contact: attributes_for(:contact, contact_type_id: contact_type.id),
|
35
|
+
student_id: student.id
|
31
36
|
end
|
32
37
|
|
33
38
|
it 'creates new contact' do
|
@@ -64,7 +69,8 @@ describe Gaku::ContactsController do
|
|
64
69
|
|
65
70
|
context 'with invalid attributes' do
|
66
71
|
let(:invalid_js_create) do
|
67
|
-
gaku_js_post :create, contact: attributes_for(:invalid_contact, contact_type_id: contact_type.id),
|
72
|
+
gaku_js_post :create, contact: attributes_for(:invalid_contact, contact_type_id: contact_type.id),
|
73
|
+
student_id: student.id
|
68
74
|
end
|
69
75
|
|
70
76
|
it 'does not save the new contact' do
|
@@ -91,7 +97,11 @@ describe Gaku::ContactsController do
|
|
91
97
|
it { should respond_with 200 }
|
92
98
|
it('assigns @contact') { expect(assigns(:contact)).to eq contact }
|
93
99
|
it('assigns @contact_types') { expect(assigns(:contact_types)).to eq [contact_type] }
|
94
|
-
|
100
|
+
|
101
|
+
it('assigns @polymorphic_resource_name') do
|
102
|
+
expect(assigns(:polymorphic_resource_name)).to eq 'student-contact'
|
103
|
+
end
|
104
|
+
|
95
105
|
it('assigns @polymorphic_resource') { expect(assigns(:polymorphic_resource)).to eq student }
|
96
106
|
it('assigns @nested_resources') { expect(assigns(:nested_resources)).to eq [] }
|
97
107
|
it('renders the :edit template') { template? :edit }
|
@@ -100,12 +110,18 @@ describe Gaku::ContactsController do
|
|
100
110
|
describe 'PATCH #update' do
|
101
111
|
context 'with valid attributes' do
|
102
112
|
before do
|
103
|
-
gaku_js_patch :update, id: contact.id,
|
113
|
+
gaku_js_patch :update, id: contact.id,
|
114
|
+
student_id: student.id,
|
115
|
+
contact: attributes_for(:contact, data: 'mobifon')
|
104
116
|
end
|
105
117
|
|
106
118
|
it { should respond_with 200 }
|
107
119
|
it('assigns @contact') { expect(assigns(:contact)).to eq contact }
|
108
|
-
|
120
|
+
|
121
|
+
it('assigns @polymorphic_resource_name') do
|
122
|
+
expect(assigns(:polymorphic_resource_name)).to eq 'student-contact'
|
123
|
+
end
|
124
|
+
|
109
125
|
it('assigns @polymorphic_resource') { expect(assigns(:polymorphic_resource)).to eq student }
|
110
126
|
it('assigns @nested_resources') { expect(assigns(:nested_resources)).to eq [] }
|
111
127
|
it('sets flash') { flash_updated? }
|
@@ -116,7 +132,9 @@ describe Gaku::ContactsController do
|
|
116
132
|
|
117
133
|
context 'with invalid attributes' do
|
118
134
|
before do
|
119
|
-
gaku_js_patch :update, id: contact.id,
|
135
|
+
gaku_js_patch :update, id: contact.id,
|
136
|
+
student_id: student.id,
|
137
|
+
contact: attributes_for(:invalid_contact, data: '')
|
120
138
|
end
|
121
139
|
|
122
140
|
it { should respond_with 200 }
|
@@ -128,7 +146,6 @@ describe Gaku::ContactsController do
|
|
128
146
|
end
|
129
147
|
end
|
130
148
|
|
131
|
-
|
132
149
|
end
|
133
150
|
end
|
134
151
|
|
@@ -4,7 +4,7 @@ describe Gaku::CourseGroups::CourseGroupEnrollmentsController do
|
|
4
4
|
|
5
5
|
let(:course_group) { create(:course_group) }
|
6
6
|
let(:course) { create(:course) }
|
7
|
-
let(:course_group_enrollment) { create(:course_group_enrollment, course_group: course_group, course: course)}
|
7
|
+
let(:course_group_enrollment) { create(:course_group_enrollment, course_group: course_group, course: course) }
|
8
8
|
|
9
9
|
context 'as admin' do
|
10
10
|
before { as :admin }
|
@@ -15,14 +15,21 @@ describe Gaku::CourseGroups::CourseGroupEnrollmentsController do
|
|
15
15
|
before { gaku_js_get :new, course_group_id: course_group }
|
16
16
|
|
17
17
|
it { should respond_with 200 }
|
18
|
-
|
18
|
+
|
19
|
+
it('assigns @course_group_enrollment') do
|
20
|
+
expect(assigns(:course_group_enrollment)).to be_a_new(Gaku::CourseGroupEnrollment)
|
21
|
+
end
|
22
|
+
|
19
23
|
it('renders the :new template') { template? :new }
|
20
24
|
end
|
21
25
|
|
22
26
|
describe 'JS POST #create' do
|
23
27
|
context 'with valid attributes' do
|
24
28
|
let(:valid_js_create) do
|
25
|
-
gaku_js_post :create, course_group_id: course_group,
|
29
|
+
gaku_js_post :create, course_group_id: course_group,
|
30
|
+
course_group_enrollment: attributes_for(:course_group_enrollment,
|
31
|
+
course_id: course.id,
|
32
|
+
course_group_id: course_group.id)
|
26
33
|
end
|
27
34
|
|
28
35
|
it 'creates new course_group' do
|
@@ -44,7 +51,8 @@ describe Gaku::CourseGroups::CourseGroupEnrollmentsController do
|
|
44
51
|
|
45
52
|
context 'with invalid attributes' do
|
46
53
|
let(:invalid_js_create) do
|
47
|
-
gaku_js_post :create, course_group_id: course_group,
|
54
|
+
gaku_js_post :create, course_group_id: course_group,
|
55
|
+
course_group_enrollment: attributes_for(:course_group, course_id: nil)
|
48
56
|
end
|
49
57
|
|
50
58
|
xit 'does not save the new course_group' do
|
@@ -14,10 +14,12 @@ describe Gaku::Exams::ExamPortionsController do
|
|
14
14
|
describe 'PATCH #update' do
|
15
15
|
context 'with valid attributes' do
|
16
16
|
before do
|
17
|
-
|
17
|
+
gaku_js_patch :update, exam_id: exam,
|
18
|
+
id: exam_portion,
|
19
|
+
exam_portion: attributes_for(:exam_portion, name: 'mobifon')
|
18
20
|
end
|
19
21
|
|
20
|
-
it { should respond_with
|
22
|
+
it { should respond_with 200 }
|
21
23
|
it('assigns @exam_portion') { expect(assigns(:exam_portion)).to eq exam_portion }
|
22
24
|
it('sets flash') { flash_updated? }
|
23
25
|
it "changes exam_portion's attributes" do
|
@@ -28,7 +30,9 @@ describe Gaku::Exams::ExamPortionsController do
|
|
28
30
|
|
29
31
|
context 'with invalid attributes' do
|
30
32
|
before do
|
31
|
-
gaku_patch :update, id: exam_portion,
|
33
|
+
gaku_patch :update, id: exam_portion,
|
34
|
+
exam_id: exam,
|
35
|
+
exam_portion: attributes_for(:invalid_exam_portion, name: '')
|
32
36
|
end
|
33
37
|
|
34
38
|
it { should respond_with 200 }
|
@@ -103,7 +107,7 @@ describe Gaku::Exams::ExamPortionsController do
|
|
103
107
|
|
104
108
|
it "doesn't increment @count" do
|
105
109
|
invalid_js_create
|
106
|
-
#because there are autocreated master portion
|
110
|
+
# because there are autocreated master portion
|
107
111
|
expect(assigns(:count)).to eq 0
|
108
112
|
end
|
109
113
|
end
|
@@ -0,0 +1,147 @@
|
|
1
|
+
require 'spec_helper_controllers'
|
2
|
+
|
3
|
+
describe Gaku::Exams::ExamSessionsController do
|
4
|
+
|
5
|
+
let(:exam) { create(:exam) }
|
6
|
+
let(:exam_session) { create(:exam_session) }
|
7
|
+
let(:invalid_exam_session) { create(:invalid_exam_session) }
|
8
|
+
|
9
|
+
context 'as student' do
|
10
|
+
before do
|
11
|
+
exam_session
|
12
|
+
as :student
|
13
|
+
end
|
14
|
+
|
15
|
+
pending 'GET #edit' do
|
16
|
+
before { gaku_get :edit, id: exam_session }
|
17
|
+
|
18
|
+
it { should respond_with 302 }
|
19
|
+
it('redirects') { redirect_to? gaku.root_path }
|
20
|
+
it('sets unauthorized flash') { flash_unauthorized? }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'as admin' do
|
25
|
+
before { as :admin }
|
26
|
+
|
27
|
+
context 'html' do
|
28
|
+
describe 'XHR #edit' do
|
29
|
+
before { gaku_get :edit, id: exam_session }
|
30
|
+
|
31
|
+
it { should respond_with 200 }
|
32
|
+
it('assigns @exam_session') { expect(assigns(:exam_session)).to eq exam_session }
|
33
|
+
it('renders the :edit template') { template? :edit }
|
34
|
+
end
|
35
|
+
|
36
|
+
describe 'PATCH #update' do
|
37
|
+
context 'with valid attributes' do
|
38
|
+
before do
|
39
|
+
gaku_patch :update, id: exam_session, exam_session: attributes_for(:exam_session, name: 'new method')
|
40
|
+
end
|
41
|
+
|
42
|
+
it('assigns @exam_session') { expect(assigns(:exam_session)).to eq exam_session }
|
43
|
+
it('sets flash') { flash_updated? }
|
44
|
+
it { should respond_with 302 }
|
45
|
+
it('redirects') { redirect_to? gaku.edit_exam_session_path(exam_session) }
|
46
|
+
it "changes exam_session's attributes" do
|
47
|
+
exam_session.reload
|
48
|
+
expect(exam_session.name).to eq 'new method'
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
context 'with invalid attributes' do
|
53
|
+
before do
|
54
|
+
gaku_js_patch :update, id: exam_session, exam_session: attributes_for(:invalid_exam_session, name: '')
|
55
|
+
end
|
56
|
+
|
57
|
+
it { should respond_with 200 }
|
58
|
+
it('assigns @exam_session') { expect(assigns(:exam_session)).to eq exam_session }
|
59
|
+
|
60
|
+
it "does not change exam_session's attributes" do
|
61
|
+
exam_session.reload
|
62
|
+
expect(exam_session.name).not_to eq ''
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
describe 'XHR DELETE #destroy' do
|
68
|
+
it 'deletes the exam_session' do
|
69
|
+
exam_session
|
70
|
+
expect do
|
71
|
+
gaku_delete :destroy, id: exam_session
|
72
|
+
end.to change(Gaku::ExamSession, :count).by(-1)
|
73
|
+
end
|
74
|
+
|
75
|
+
it 'sets flash' do
|
76
|
+
gaku_delete :destroy, id: exam_session
|
77
|
+
flash_destroyed?
|
78
|
+
end
|
79
|
+
|
80
|
+
it 'redirect' do
|
81
|
+
gaku_delete :destroy, id: exam_session
|
82
|
+
redirect_to? gaku.exams_path
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
context 'js' do
|
89
|
+
|
90
|
+
describe 'XHR #new' do
|
91
|
+
before { gaku_js_get :new }
|
92
|
+
|
93
|
+
it { should respond_with 200 }
|
94
|
+
it('assigns @exam_session') { expect(assigns(:exam_session)).to be_a_new(Gaku::ExamSession) }
|
95
|
+
it('renders the :new template') { template? :new }
|
96
|
+
end
|
97
|
+
|
98
|
+
describe 'POST #create' do
|
99
|
+
context 'with valid attributes' do
|
100
|
+
let(:valid_js_create) do
|
101
|
+
exam
|
102
|
+
gaku_js_post :create, exam_session: build(:exam_session, exam_id: exam.id).attributes.symbolize_keys
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'creates new exam_session' do
|
106
|
+
expect do
|
107
|
+
valid_js_create
|
108
|
+
end.to change(Gaku::ExamSession, :count).by(1)
|
109
|
+
end
|
110
|
+
|
111
|
+
it 'renders flash' do
|
112
|
+
valid_js_create
|
113
|
+
flash_created?
|
114
|
+
end
|
115
|
+
|
116
|
+
it 'increments @count' do
|
117
|
+
valid_js_create
|
118
|
+
expect(assigns(:count)).to eq 1
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
context 'with invalid attributes' do
|
123
|
+
let(:invalid_js_create) do
|
124
|
+
gaku_js_post :create, exam_session: attributes_for(:invalid_exam_session)
|
125
|
+
end
|
126
|
+
|
127
|
+
it 'does not save the new exam_session' do
|
128
|
+
expect do
|
129
|
+
invalid_js_create
|
130
|
+
end.to_not change(Gaku::ExamSession, :count)
|
131
|
+
end
|
132
|
+
|
133
|
+
it 're-renders the new method' do
|
134
|
+
invalid_js_create
|
135
|
+
template? :create
|
136
|
+
end
|
137
|
+
|
138
|
+
it "doesn't increment @count" do
|
139
|
+
invalid_js_create
|
140
|
+
expect(assigns(:count)).to eq 0
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|
147
|
+
end
|
@@ -22,7 +22,6 @@ describe Gaku::ExamsController do
|
|
22
22
|
it('renders :index template') { template? :index }
|
23
23
|
end
|
24
24
|
|
25
|
-
|
26
25
|
describe 'PATCH #update' do
|
27
26
|
context 'with valid attributes' do
|
28
27
|
before do
|
@@ -147,7 +146,6 @@ describe Gaku::ExamsController do
|
|
147
146
|
end
|
148
147
|
end
|
149
148
|
|
150
|
-
|
151
149
|
end
|
152
150
|
end
|
153
151
|
|
@@ -16,63 +16,43 @@ describe Gaku::ExtracurricularActivitiesController do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
it { should respond_with 200 }
|
19
|
-
|
19
|
+
|
20
|
+
it('assigns @extracurricular_activitys') do
|
21
|
+
expect(assigns(:extracurricular_activities)).to eq [extracurricular_activity]
|
22
|
+
end
|
23
|
+
|
20
24
|
it('assigns @count') { expect(assigns(:count)).to eq 1 }
|
21
25
|
it('renders :index template') { template? :index }
|
22
26
|
end
|
23
27
|
|
24
|
-
|
25
28
|
describe 'GET #edit' do
|
26
29
|
before { gaku_get :edit, id: extracurricular_activity }
|
27
30
|
|
28
31
|
it { should respond_with 200 }
|
29
|
-
it('assigns @extracurricular_activity') { expect(assigns(:extracurricular_activity)).to eq extracurricular_activity }
|
30
|
-
it('renders the :edit template') { template? :edit }
|
31
|
-
end
|
32
|
-
|
33
|
-
describe 'PATCH #update' do
|
34
|
-
context 'with valid attributes' do
|
35
|
-
before do
|
36
|
-
gaku_patch :update, id: extracurricular_activity, extracurricular_activity: attributes_for(:extracurricular_activity, name: 'mobifon')
|
37
|
-
end
|
38
32
|
|
39
|
-
|
40
|
-
|
41
|
-
it('sets flash') { flash_updated? }
|
42
|
-
it "changes extracurricular_activity's attributes" do
|
43
|
-
extracurricular_activity.reload
|
44
|
-
expect(extracurricular_activity.name).to eq 'mobifon'
|
45
|
-
end
|
33
|
+
it('assigns @extracurricular_activity') do
|
34
|
+
expect(assigns(:extracurricular_activity)).to eq extracurricular_activity
|
46
35
|
end
|
47
36
|
|
48
|
-
|
49
|
-
before do
|
50
|
-
gaku_patch :update, id: extracurricular_activity, extracurricular_activity: attributes_for(:invalid_extracurricular_activity, name: '')
|
51
|
-
end
|
52
|
-
|
53
|
-
it { should respond_with 200 }
|
54
|
-
it('assigns @extracurricular_activity') { expect(assigns(:extracurricular_activity)).to eq extracurricular_activity }
|
55
|
-
|
56
|
-
it "does not change extracurricular_activity's attributes" do
|
57
|
-
extracurricular_activity.reload
|
58
|
-
expect(extracurricular_activity.name).not_to eq ''
|
59
|
-
end
|
60
|
-
end
|
37
|
+
it('renders the :edit template') { template? :edit }
|
61
38
|
end
|
62
|
-
|
63
39
|
end
|
64
40
|
|
65
41
|
context 'js' do
|
66
42
|
|
67
|
-
describe 'XHR #new' do
|
43
|
+
describe 'XHR GET #new' do
|
68
44
|
before { gaku_js_get :new }
|
69
45
|
|
70
46
|
it { should respond_with 200 }
|
71
|
-
|
47
|
+
|
48
|
+
it('assigns @extracurricular_activity') do
|
49
|
+
expect(assigns(:extracurricular_activity)).to be_a_new(Gaku::ExtracurricularActivity)
|
50
|
+
end
|
51
|
+
|
72
52
|
it('renders the :new template') { template? :new }
|
73
53
|
end
|
74
54
|
|
75
|
-
describe 'POST #create' do
|
55
|
+
describe 'XHR POST #create' do
|
76
56
|
context 'with valid attributes' do
|
77
57
|
let(:valid_js_create) do
|
78
58
|
gaku_js_post :create, extracurricular_activity: attributes_for(:extracurricular_activity)
|
@@ -118,6 +98,57 @@ describe Gaku::ExtracurricularActivitiesController do
|
|
118
98
|
end
|
119
99
|
end
|
120
100
|
|
101
|
+
describe 'XHR GET #edit' do
|
102
|
+
before { gaku_js_get :edit, id: extracurricular_activity }
|
103
|
+
|
104
|
+
it { should respond_with 200 }
|
105
|
+
|
106
|
+
it('assigns @extracurricular_activity') do
|
107
|
+
expect(assigns(:extracurricular_activity)).to eq extracurricular_activity
|
108
|
+
end
|
109
|
+
|
110
|
+
it('renders the :edit template') { template? :edit }
|
111
|
+
end
|
112
|
+
|
113
|
+
describe 'XHR PATCH #update' do
|
114
|
+
context 'with valid attributes' do
|
115
|
+
before do
|
116
|
+
gaku_js_patch :update, id: extracurricular_activity,
|
117
|
+
extracurricular_activity: attributes_for(:extracurricular_activity, name: 'mobifon')
|
118
|
+
end
|
119
|
+
|
120
|
+
it { should respond_with 200 }
|
121
|
+
|
122
|
+
it('assigns @extracurricular_activity') do
|
123
|
+
expect(assigns(:extracurricular_activity)).to eq extracurricular_activity
|
124
|
+
end
|
125
|
+
|
126
|
+
it('sets flash') { flash_updated? }
|
127
|
+
it "changes extracurricular_activity's attributes" do
|
128
|
+
extracurricular_activity.reload
|
129
|
+
expect(extracurricular_activity.name).to eq 'mobifon'
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
context 'with invalid attributes' do
|
134
|
+
before do
|
135
|
+
gaku_js_patch :update, id: extracurricular_activity,
|
136
|
+
extracurricular_activity: attributes_for(:invalid_extracurricular_activity, name: '')
|
137
|
+
end
|
138
|
+
|
139
|
+
it { should respond_with 200 }
|
140
|
+
|
141
|
+
it('assigns @extracurricular_activity') do
|
142
|
+
expect(assigns(:extracurricular_activity)).to eq extracurricular_activity
|
143
|
+
end
|
144
|
+
|
145
|
+
it "does not change extracurricular_activity's attributes" do
|
146
|
+
extracurricular_activity.reload
|
147
|
+
expect(extracurricular_activity.name).not_to eq ''
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
121
152
|
describe 'XHR DELETE #destroy' do
|
122
153
|
it 'deletes the extracurricular_activity' do
|
123
154
|
extracurricular_activity
|