Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,5 @@ SALESFORCE_CONNECT_USER=postgres
SCRATCH_ASSET_CONFIG_BASE_URL=https://example.com/config/
SCRATCH_ASSET_IMPORT_BASE_URL=https://example.com/assets/

# Pardot Form Handler endpoint for subscription forwarding
PARDOT_SUBSCRIPTION_URL=

# Cloudflare Turnstile bot protection. This is a test key that always passes.
# Others are available for testing purposes at
# https://developers.cloudflare.com/turnstile/troubleshooting/testing/.
CLOUDFLARE_TURNSTILE_SECRET_KEY=1x0000000000000000000000000000000AA

HOSTNAME=localhost
LEARNER_EXPERIENCE_TESTS_DISPATCH_TOKEN=changeme
10 changes: 7 additions & 3 deletions app/controllers/api/schools_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,14 @@ def create_params
)
end

# School settings that owners can change (e.g. Feature controls in Classroom).
# To add one, add a column to `schools`, permit it here, expose it in `api/schools/_school.json.jbuilder`
# and add an entry to `featureControls.ts` in editor-standalone.
def update_params
params.expect(
school: %i[scratch_enabled]
)
school_params = params[:school]
return {} unless school_params.is_a?(ActionController::Parameters)

school_params.permit
end
end
end
90 changes: 0 additions & 90 deletions app/controllers/api/subscriptions_controller.rb

This file was deleted.

2 changes: 2 additions & 0 deletions app/models/school.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

class School < ApplicationRecord
self.ignored_columns += [:creator_id]
# This is a temporary measure to allow the scratch_enabled column to be removed from the database without breaking the application.
self.ignored_columns += [:scratch_enabled]

has_many :classes, class_name: :SchoolClass, inverse_of: :school, dependent: :destroy
has_many :lessons, dependent: :nullify
Expand Down
120 changes: 0 additions & 120 deletions app/services/subscriptions/pardot_form_handler_submitter.rb

This file was deleted.

50 changes: 0 additions & 50 deletions app/services/subscriptions/turnstile_verifier.rb

This file was deleted.

3 changes: 1 addition & 2 deletions app/views/api/schools/_school.json.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ json.call(
:country_code,
:verified_at,
:created_at,
:updated_at,
:scratch_enabled
:updated_at
)

include_roles = local_assigns.fetch(:roles, false)
Expand Down
4 changes: 0 additions & 4 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ class Application < Rails::Application
].compact
config.active_record.encryption.key_derivation_salt = ENV.fetch('ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT')

config.x.subscriptions.pardot_form_handler_url = ENV.fetch('PARDOT_SUBSCRIPTION_URL', '')

config.x.cloudflare_turnstile.secret_key = ENV.fetch('CLOUDFLARE_TURNSTILE_SECRET_KEY', nil)
config.x.cloudflare_turnstile.enabled = ENV['CLOUDFLARE_TURNSTILE_SECRET_KEY'].present?
config.x.experience_cs.service_api_key = ENV.fetch('EXPERIENCE_CS_API_KEY', nil)

if ENV['RAILS_LOG_TO_STDOUT'].present?
Expand Down
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
resources :features, only: %i[index]

resources :profile_auth_check, only: %i[index]
resources :subscriptions, only: %i[create]

get '/join/:join_code', to: 'join#show'
post '/join/:join_code', to: 'join#create'
Expand Down
1 change: 0 additions & 1 deletion lib/tasks/for_education.rake
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ namespace :for_education do

school = create_school(owner_id, TEST_SCHOOL)
verify_school(school)
school.update!(scratch_enabled: true)
assign_a_teacher(teacher_id, school)

school_class = create_school_class(owner_id, school)
Expand Down
1 change: 0 additions & 1 deletion lib/tasks/test_seeds.rake
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ namespace :test_seeds do
school = create_school(creator_id, TEST_SCHOOL)

verify_school(school)
school.update!(scratch_enabled: true)

school.school_email_domains.build(domain: 'example.com').save!

Expand Down
2 changes: 1 addition & 1 deletion spec/features/my_school/showing_my_school_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
school_json = school.to_json(only: %i[
id name website reference address_line_1 address_line_2 municipality administrative_area postal_code country_code code verified_at created_at updated_at district_name district_nces_id school_roll_number
])
expected_data = JSON.parse(school_json, symbolize_names: true).merge(roles: ['owner'], import_in_progress: school.import_in_progress?, auto_join_enabled: school.auto_join_enabled?, scratch_enabled: false)
expected_data = JSON.parse(school_json, symbolize_names: true).merge(roles: ['owner'], import_in_progress: school.import_in_progress?, auto_join_enabled: school.auto_join_enabled?)

get('/api/school', headers:)
data = JSON.parse(response.body, symbolize_names: true)
Expand Down
Loading
Loading