Skip to content

Commit 34ad4e7

Browse files
authored
Merge pull request #2304 from openstax/remove_stats
Removed stats subsystem, controller, routes and table
2 parents a55ea1d + f6f05b3 commit 34ad4e7

18 files changed

+6
-323
lines changed

app/controllers/api/v1/stats_controller.rb

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/subsystems/stats/calculate.rb

Lines changed: 0 additions & 30 deletions
This file was deleted.

app/subsystems/stats/calculations/assignments.rb

Lines changed: 0 additions & 18 deletions
This file was deleted.

app/subsystems/stats/calculations/courses.rb

Lines changed: 0 additions & 30 deletions
This file was deleted.

app/subsystems/stats/calculations/exercises.rb

Lines changed: 0 additions & 43 deletions
This file was deleted.

app/subsystems/stats/calculations/highlights.rb

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/subsystems/stats/calculations/users.rb

Lines changed: 0 additions & 26 deletions
This file was deleted.

app/subsystems/stats/generate.rb

Lines changed: 0 additions & 28 deletions
This file was deleted.

app/subsystems/stats/models/interval.rb

Lines changed: 0 additions & 21 deletions
This file was deleted.

config/routes.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@
199199
end
200200
end
201201

202-
get :stats, controller: :stats
203-
204202
match :'*all', controller: :api, action: :options, via: :options
205203
end # end of API scope
206204

@@ -361,12 +359,6 @@
361359

362360
resources :jobs, only: [ :index, :show ]
363361

364-
namespace :stats do
365-
get :courses
366-
get :excluded_exercises
367-
get :concept_coach
368-
end
369-
370362
resources :tags, only: [ :index, :show ]
371363
end
372364

db/background_migrate/20191121182525_add_practice_stats.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

db/background_migrate/20191205182525_generate_stats.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ def up
55
"coalesce(jsonb_array_length(response_validation->'attempts'), 0)",
66
name: :tasked_exercise_nudges_index
77
add_index :tasks_tasked_exercises, :updated_at
8-
# then generate the stats
9-
Stats::Generate.call
108
end
119

1210
def down

db/background_migrate/20200131153226_generate_new_stats.rb

Lines changed: 0 additions & 6 deletions
This file was deleted.

db/migrate/20191121214125_add_practice_stats.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

db/migrate/20200131153214_new_stats.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class RemoveStats < ActiveRecord::Migration[5.2]
2+
def change
3+
drop_table :stats_intervals
4+
end
5+
end

db/schema.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema.define(version: 2021_03_31_164251) do
13+
ActiveRecord::Schema.define(version: 2021_04_19_211921) do
1414

1515
create_sequence "active_storage_attachments_id_seq"
1616
create_sequence "active_storage_blobs_id_seq"
@@ -69,7 +69,6 @@
6969
create_sequence "school_district_schools_id_seq"
7070
create_sequence "settings_id_seq"
7171
create_sequence "short_code_short_codes_id_seq"
72-
create_sequence "stats_intervals_id_seq"
7372
create_sequence "tasks_assistants_id_seq"
7473
create_sequence "tasks_concept_coach_tasks_id_seq"
7574
create_sequence "tasks_course_assistants_id_seq"
@@ -887,12 +886,6 @@
887886
t.index ["code"], name: "index_short_code_short_codes_on_code", unique: true
888887
end
889888

890-
create_table "stats_intervals", force: :cascade do |t|
891-
t.jsonb "stats", default: {}, null: false
892-
t.datetime "starts_at", null: false
893-
t.datetime "ends_at", null: false
894-
end
895-
896889
create_table "tasks_assistants", id: :serial, force: :cascade do |t|
897890
t.string "name", null: false
898891
t.string "code_class_name", null: false

spec/subsystems/stats/calculate_spec.rb

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)