Skip to content

Commit

Permalink
Merge pull request #14398 from code-dot-org/staging
Browse files Browse the repository at this point in the history
DTT (Staging > Test)
  • Loading branch information
ashercodeorg committed Apr 14, 2017
2 parents 7d2fbba + a24053b commit fdb4664
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 89 deletions.
25 changes: 0 additions & 25 deletions bin/cron/admin_progress

This file was deleted.

16 changes: 0 additions & 16 deletions dashboard/app/controllers/admin_reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,6 @@ def pd_progress
end
end

def admin_progress
SeamlessDatabasePool.use_persistent_read_connection do
stats = Properties.get(:admin_progress)
if stats.present?
@user_count = stats['user_count']
@levels_attempted = stats['levels_attempted']
@levels_attempted.default = 0
@levels_passed = stats['levels_passed']
@levels_passed.default = 0

@all_script_levels = Script.twenty_hour_script.script_levels.includes({level: :game})
@stage_map = @all_script_levels.group_by {|sl| sl.level.game}
end
end
end

# Use callbacks to share common setup or constraints between actions.
def set_script
@script = Script.get_from_cache(params[:script_id]) if params[:script_id]
Expand Down
38 changes: 0 additions & 38 deletions dashboard/app/views/admin_reports/admin_progress.html.haml

This file was deleted.

3 changes: 0 additions & 3 deletions dashboard/app/views/admin_reports/directory.html.haml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
%h1 Directory of Admin Dashboards

%h3 Code Studio Progress
= link_to admin_progress_path do
Admin Progress
%br
= link_to level_completions_path do
Level Completion
%br
Expand Down
1 change: 0 additions & 1 deletion dashboard/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ module OPS
get '/admin/levels', to: 'admin_reports#level_completions', as: 'level_completions'
get '/admin/level_answers(.:format)', to: 'admin_reports#level_answers', as: 'level_answers'
get '/admin/pd_progress(/:script)', to: 'admin_reports#pd_progress', as: 'pd_progress'
get '/admin/progress', to: 'admin_reports#admin_progress', as: 'admin_progress'
get '/admin/debug', to: 'admin_reports#debug'

# internal search tools
Expand Down
6 changes: 0 additions & 6 deletions dashboard/test/controllers/admin_reports_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,10 @@ class AdminReportsControllerTest < ActionController::TestCase
sign_in create(:admin)
end

generate_admin_only_tests_for :admin_progress
generate_admin_only_tests_for :debug
generate_admin_only_tests_for :directory
generate_admin_only_tests_for :level_answers

test 'should get admin progress page' do
get :admin_progress
assert_select 'h1', 'Admin progress'
end

test 'pd_progress should return 404 for unfound script' do
get :pd_progress, params: {script: 'bogus-nonexistent-script-name'}
assert_response :not_found
Expand Down

0 comments on commit fdb4664

Please sign in to comment.