diff --git a/app/coffeescripts/calendar/EventDataSource.js b/app/coffeescripts/calendar/EventDataSource.js
index f42d0bb37d3..c1313457bf2 100644
--- a/app/coffeescripts/calendar/EventDataSource.js
+++ b/app/coffeescripts/calendar/EventDataSource.js
@@ -495,7 +495,7 @@ export default class EventDataSource {
if (ENV.STUDENT_PLANNER_ENABLED) {
eventDataSources.push(['/api/v1/planner_notes', params])
}
- if (ENV.PLANNER_ENABLED) {
+ if (ENV.CALENDAR && ENV.CALENDAR.MANAGE_CONTEXTS) {
const [admin_contexts, student_contexts] = _.partition(
params.context_codes,
cc => ENV.CALENDAR.MANAGE_CONTEXTS.indexOf(cc) >= 0
diff --git a/app/coffeescripts/collections/WikiPageCollection.js b/app/coffeescripts/collections/WikiPageCollection.js
index 0ae438dc129..4a36fb2237d 100644
--- a/app/coffeescripts/collections/WikiPageCollection.js
+++ b/app/coffeescripts/collections/WikiPageCollection.js
@@ -25,9 +25,9 @@ export default class WikiPageCollection extends PaginatedCollection {
this.sortOrders = {
title: 'asc',
created_at: 'desc',
- updated_at: 'desc'
+ updated_at: 'desc',
+ todo_date: 'desc'
}
- if (ENV.STUDENT_PLANNER_ENABLED) this.sortOrders.todo_date = 'desc'
this.setSortField('title')
// remove the front_page indicator on all other models when one is set
diff --git a/app/coffeescripts/views/DiscussionTopics/EditView.coffee b/app/coffeescripts/views/DiscussionTopics/EditView.coffee
index 815d31d7533..b65ab0e3325 100644
--- a/app/coffeescripts/views/DiscussionTopics/EditView.coffee
+++ b/app/coffeescripts/views/DiscussionTopics/EditView.coffee
@@ -208,7 +208,7 @@ export default class EditView extends ValidatedFormView
this
afterRender: =>
- @renderStudentTodoAtDate() if ENV.STUDENT_PLANNER_ENABLED && @$todoDateInput.length
+ @renderStudentTodoAtDate() if @$todoDateInput.length
[context, context_id] = ENV.context_asset_string.split("_")
if context == 'course'
@AssignmentExternalTools = AssignmentExternalTools.attach(
@@ -315,7 +315,7 @@ export default class EditView extends ValidatedFormView
data.only_graders_can_rate = false unless data.allow_rating is '1'
data.sort_by_rating = false unless data.allow_rating is '1'
data.allow_todo_date = '0' if data.assignment?.set_assignment is '1'
- data.todo_date = @studentTodoAtDateValue if ENV.STUDENT_PLANNER_ENABLED
+ data.todo_date = @studentTodoAtDateValue
data.todo_date = null unless data.allow_todo_date is '1'
if @groupCategorySelector && !ENV?.IS_LARGE_ROSTER
diff --git a/app/coffeescripts/views/wiki/WikiPageIndexView.js b/app/coffeescripts/views/wiki/WikiPageIndexView.js
index be36f17c040..d2e7b787cdb 100644
--- a/app/coffeescripts/views/wiki/WikiPageIndexView.js
+++ b/app/coffeescripts/views/wiki/WikiPageIndexView.js
@@ -313,9 +313,6 @@ export default class WikiPageIndexView extends PaginatedCollectionView {
}
collectionHasTodoDate() {
- if (!ENV.STUDENT_PLANNER_ENABLED) {
- return false
- }
return !!this.collection.find(m => m.has('todo_date'))
}
diff --git a/app/controllers/assignments_controller.rb b/app/controllers/assignments_controller.rb
index 06b82333b9a..2109bc670d7 100644
--- a/app/controllers/assignments_controller.rb
+++ b/app/controllers/assignments_controller.rb
@@ -464,8 +464,6 @@ class AssignmentsController < ApplicationController
hash = {
CONTEXT_ACTION_SOURCE: :syllabus,
- # don't check for student enrollments because we want this to show for the teacher as well
- STUDENT_PLANNER_ENABLED: @domain_root_account&.feature_enabled?(:student_planner)
}
append_sis_data(hash)
js_env(hash)
diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index aed5ae2f819..e79804b4af6 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -2000,8 +2000,6 @@ class CoursesController < ApplicationController
@course_home_view ||= default_view
js_env({
- # don't check for student enrollments because we want to show course items on the teacher's syllabus
- STUDENT_PLANNER_ENABLED: @domain_root_account&.feature_enabled?(:student_planner),
COURSE: {
id: @context.id.to_s,
pages_url: polymorphic_url([@context, :wiki_pages]),
diff --git a/app/controllers/discussion_topics_controller.rb b/app/controllers/discussion_topics_controller.rb
index d6db49c6f24..78989436b80 100644
--- a/app/controllers/discussion_topics_controller.rb
+++ b/app/controllers/discussion_topics_controller.rb
@@ -562,9 +562,7 @@ class DiscussionTopicsController < ApplicationController
if post_to_sis && @topic.new_record?
js_hash[:POST_TO_SIS_DEFAULT] = @context.account.sis_default_grade_export[:value]
end
- if @context.root_account.feature_enabled?(:student_planner)
- js_hash[:STUDENT_PLANNER_ENABLED] = @context.grants_any_right?(@current_user, session, :manage_content)
- end
+ js_hash[:STUDENT_PLANNER_ENABLED] = @context.grants_any_right?(@current_user, session, :manage_content)
if @topic.is_section_specific && @context.is_a?(Course)
selected_section_ids = @topic.discussion_topic_section_visibilities.pluck(:course_section_id)
@@ -1203,7 +1201,7 @@ class DiscussionTopicsController < ApplicationController
process_group_parameters(discussion_topic_hash)
process_pin_parameters(discussion_topic_hash)
- process_todo_parameters(discussion_topic_hash)
+ process_todo_parameters()
if @errors.present?
render :json => {errors: @errors}, :status => :bad_request
@@ -1268,11 +1266,7 @@ class DiscussionTopicsController < ApplicationController
end
end
- def process_todo_parameters(discussion_topic_hash)
- unless @topic.context.root_account.feature_enabled?(:student_planner)
- discussion_topic_hash.delete(:todo_date)
- return
- end
+ def process_todo_parameters
remove_assign = ['false', false, '0'].include?(params.dig(:assignment, :set_assignment))
if params[:assignment] && !remove_assign && !params[:todo_date]
@topic.todo_date = nil
diff --git a/app/controllers/planner_controller.rb b/app/controllers/planner_controller.rb
index 84feb5edc5b..8388b0612cd 100644
--- a/app/controllers/planner_controller.rb
+++ b/app/controllers/planner_controller.rb
@@ -25,7 +25,6 @@ class PlannerController < ApplicationController
before_action :require_user, unless: :public_access?
before_action :set_user
- before_action :require_planner_enabled
before_action :set_date_range
before_action :set_params, only: [:index]
diff --git a/app/controllers/planner_notes_controller.rb b/app/controllers/planner_notes_controller.rb
index 2f8b119629f..ac2d18999bc 100644
--- a/app/controllers/planner_notes_controller.rb
+++ b/app/controllers/planner_notes_controller.rb
@@ -90,7 +90,6 @@ class PlannerNotesController < ApplicationController
include Api::V1::PlannerNote
before_action :require_user
- before_action :require_planner_enabled
# @API List planner notes
#
diff --git a/app/controllers/planner_overrides_controller.rb b/app/controllers/planner_overrides_controller.rb
index 6d4f9d34b59..180dd9e71f1 100644
--- a/app/controllers/planner_overrides_controller.rb
+++ b/app/controllers/planner_overrides_controller.rb
@@ -89,7 +89,6 @@ class PlannerOverridesController < ApplicationController
include Api::V1::PlannerOverride
before_action :require_user
- before_action :require_planner_enabled
# @API List planner overrides
#
diff --git a/app/controllers/wiki_pages_api_controller.rb b/app/controllers/wiki_pages_api_controller.rb
index 50cf5a6b0a0..8aa3879423b 100644
--- a/app/controllers/wiki_pages_api_controller.rb
+++ b/app/controllers/wiki_pages_api_controller.rb
@@ -661,7 +661,7 @@ class WikiPagesApiController < ApplicationController
def assign_todo_date
return if params.dig(:wiki_page, :student_todo_at).nil? && params.dig(:wiki_page, :student_planner_checkbox).nil?
- if @context.root_account.feature_enabled?(:student_planner) && @page.context.grants_any_right?(@current_user, session, :manage_content)
+ if @page.context.grants_any_right?(@current_user, session, :manage_content)
@page.todo_date = params.dig(:wiki_page, :student_todo_at) if params.dig(:wiki_page, :student_todo_at)
# Only clear out if the checkbox is explicitly specified in the request
if params[:wiki_page].key?("student_planner_checkbox") &&
diff --git a/app/controllers/wiki_pages_controller.rb b/app/controllers/wiki_pages_controller.rb
index 8bb80a85d66..e8db4f04eca 100644
--- a/app/controllers/wiki_pages_controller.rb
+++ b/app/controllers/wiki_pages_controller.rb
@@ -168,8 +168,7 @@ class WikiPagesController < ApplicationController
:wiki_page_menu_tools => external_tools_display_hashes(:wiki_page_menu),
:wiki_index_menu_tools => wiki_index_menu_tools,
:DISPLAY_SHOW_ALL_LINK => tab_enabled?(context.class::TAB_PAGES, {no_render: true}),
- :STUDENT_PLANNER_ENABLED => context.root_account.feature_enabled?(:student_planner),
- :CAN_SET_TODO_DATE => context.root_account.feature_enabled?(:student_planner) && context.grants_right?(@current_user, session, :manage_content),
+ :CAN_SET_TODO_DATE => context.grants_right?(@current_user, session, :manage_content),
:IMMERSIVE_READER_ENABLED => context.account&.feature_enabled?(:immersive_reader_wiki_pages),
:GRANULAR_PERMISSIONS_WIKI_PAGES => context.root_account.feature_enabled?(:granular_permissions_wiki_pages),
}
diff --git a/app/helpers/accounts_helper.rb b/app/helpers/accounts_helper.rb
index 0bdd36c6a9d..bc70f5f1eac 100644
--- a/app/helpers/accounts_helper.rb
+++ b/app/helpers/accounts_helper.rb
@@ -51,6 +51,7 @@ module AccountsHelper
[
[I18n.t('Card View'), 'cards'],
[I18n.t('Recent Activity'), 'activity'],
- ].tap { |opts| opts << [I18n.t('List View'), 'planner'] if account.root_account.feature_enabled?(:student_planner)}
+ [I18n.t('List View'), 'planner']
+ ]
end
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a5378c0f166..13adc2e6953 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1056,8 +1056,7 @@ module ApplicationHelper
end
def planner_enabled?
- !!(@current_user && @domain_root_account&.feature_enabled?(:student_planner) &&
- @current_user.has_student_enrollment?)
+ !!(@current_user&.has_student_enrollment?)
end
def will_paginate(collection, options = {})
diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb
index 92e5eabb38d..979f9496ce6 100644
--- a/app/helpers/dashboard_helper.rb
+++ b/app/helpers/dashboard_helper.rb
@@ -20,7 +20,6 @@ module DashboardHelper
def user_dashboard_view
dashboard_view = @current_user&.dashboard_view
dashboard_view = 'activity' if @current_user&.preferences&.dig(:recent_activity_dashboard) && !@current_user.preferences[:dashboard_view]
- dashboard_view = 'cards' if dashboard_view == 'planner' && !@current_user.account.feature_enabled?(:student_planner)
dashboard_view
end
diff --git a/app/jsx/bundles/syllabus.js b/app/jsx/bundles/syllabus.js
index 4d64c5f24f9..678b35df7ec 100644
--- a/app/jsx/bundles/syllabus.js
+++ b/app/jsx/bundles/syllabus.js
@@ -42,9 +42,7 @@ if (ENV.current_user_id) {
)
}
-if (ENV.STUDENT_PLANNER_ENABLED) {
- collections.push(new SyllabusPlannerCollection([ENV.context_asset_string]))
-}
+collections.push(new SyllabusPlannerCollection([ENV.context_asset_string]))
// Perform a fetch on each collection
// The fetch continues fetching until no next link is returned
diff --git a/app/models/account.rb b/app/models/account.rb
index 5c5d967f56f..498d07b2c9a 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -1876,7 +1876,7 @@ class Account < ActiveRecord::Base
# Different views are available depending on feature flags
def dashboard_views
- ['activity', 'cards'].tap {|views| views << 'planner' if root_account.feature_enabled?(:student_planner)}
+ ['activity', 'cards', 'planner']
end
# Getter/Setter for default_dashboard_view account setting
diff --git a/app/views/calendars/show.html.erb b/app/views/calendars/show.html.erb
index f4bfd724f2c..22095acf444 100644
--- a/app/views/calendars/show.html.erb
+++ b/app/views/calendars/show.html.erb
@@ -31,8 +31,7 @@
:CONFERENCES_ENABLED => Account.site_admin.feature_enabled?(:calendar_conferences)
}
js_env({
- :STUDENT_PLANNER_ENABLED => @domain_root_account&.feature_enabled?(:student_planner) && @current_user.has_student_enrollment?,
- :PLANNER_ENABLED => @domain_root_account&.feature_enabled?(:student_planner)
+ :STUDENT_PLANNER_ENABLED => @current_user.has_student_enrollment?,
})
js_bundle :calendar2
diff --git a/app/views/courses/_to_do_list.html.erb b/app/views/courses/_to_do_list.html.erb
index 4e13655faba..18cf0a34754 100644
--- a/app/views/courses/_to_do_list.html.erb
+++ b/app/views/courses/_to_do_list.html.erb
@@ -25,7 +25,7 @@
# BTW if you add a new thing here, it probably needs adding to the /users/self/todo API
show_legacy_todo_list ||= false
%>
-<% if !show_legacy_todo_list && @domain_root_account&.feature_enabled?(:student_planner) %>
+<% if !show_legacy_todo_list %>
<% else
cache_opts = (contexts.present? ? {} : { :expires_in => 3.minutes })
diff --git a/app/views/jst/wiki/WikiPage.handlebars b/app/views/jst/wiki/WikiPage.handlebars
index a4487cc4a0e..d0a590a1a2c 100644
--- a/app/views/jst/wiki/WikiPage.handlebars
+++ b/app/views/jst/wiki/WikiPage.handlebars
@@ -78,10 +78,8 @@
{{title}}
- {{#if ENV.STUDENT_PLANNER_ENABLED}}
- {{#if todo_date}}
-
{{#t "wiki.todo_date"}}To-Do Date:{{/t}} {{tDateToString todo_date "date_at_time"}}
- {{/if}}
+ {{#if todo_date}}
+
{{#t "wiki.todo_date"}}To-Do Date:{{/t}} {{tDateToString todo_date "date_at_time"}}
{{/if}}
{{#if locked_for_user}}
diff --git a/config/feature_flags/00_standard.yml b/config/feature_flags/00_standard.yml
index 9120d47b3f3..c5028a316bb 100644
--- a/config/feature_flags/00_standard.yml
+++ b/config/feature_flags/00_standard.yml
@@ -296,12 +296,6 @@ new_user_tutorial:
description: Provide tutorial information for new users in a flyout tray.
applies_to: RootAccount
root_opt_in: true
-student_planner:
- state: 'on'
- display_name: To Do List Dashboard
- description: Provides users with a To Do List Dashboard option.
- applies_to: RootAccount
- root_opt_in: true
rubric_criterion_range:
state: allowed
display_name: Rubric Criterion Range
diff --git a/lib/api/v1/discussion_topics.rb b/lib/api/v1/discussion_topics.rb
index e5a245dcd7c..01d209e092f 100644
--- a/lib/api/v1/discussion_topics.rb
+++ b/lib/api/v1/discussion_topics.rb
@@ -131,9 +131,7 @@ module Api::V1::DiscussionTopics
json[:sections] = sections_json(topic.course_sections, user, session, section_includes)
end
- if topic.context.root_account.feature_enabled?(:student_planner)
- json[:todo_date] = topic.todo_date
- end
+ json[:todo_date] = topic.todo_date
if opts[:root_topic_fields] && opts[:root_topic_fields].length > 0
# If this is called from discussion_topics_api_json then we already
diff --git a/lib/api/v1/wiki_page.rb b/lib/api/v1/wiki_page.rb
index e05acb73313..fc5a0a485b1 100644
--- a/lib/api/v1/wiki_page.rb
+++ b/lib/api/v1/wiki_page.rb
@@ -36,9 +36,7 @@ module Api::V1::WikiPage
hash['hide_from_students'] = !hash['published'] # deprecated, but still here for now
hash['front_page'] = wiki_page.is_front_page?
hash['html_url'] = polymorphic_url([wiki_page.context, wiki_page])
- if wiki_page.context.root_account.feature_enabled?(:student_planner)
- hash['todo_date'] = wiki_page.todo_date
- end
+ hash['todo_date'] = wiki_page.todo_date
hash['updated_at'] = wiki_page.revised_at
if opts[:include_assignment] && wiki_page.for_assignment?
diff --git a/lib/planner_api_helper.rb b/lib/planner_api_helper.rb
index a46a9e6eb57..5af889c5986 100644
--- a/lib/planner_api_helper.rb
+++ b/lib/planner_api_helper.rb
@@ -49,10 +49,6 @@ module PlannerApiHelper
end
end
- def require_planner_enabled
- render json: { message: "Feature disabled" }, status: :forbidden unless @domain_root_account.feature_enabled?(:student_planner)
- end
-
def sync_module_requirement_done(item, user, complete)
return unless item.is_a?(ContextModuleItem)
doneable = mark_doneable_tag(item)
diff --git a/spec/apis/v1/discussion_topics_api_spec.rb b/spec/apis/v1/discussion_topics_api_spec.rb
index baa019d388d..e5b7b5a0d25 100644
--- a/spec/apis/v1/discussion_topics_api_spec.rb
+++ b/spec/apis/v1/discussion_topics_api_spec.rb
@@ -269,7 +269,6 @@ describe DiscussionTopicsController, type: :request do
end
it "should create a topic with all the bells and whistles" do
- @course.root_account.enable_feature!(:student_planner)
post_at = 1.month.from_now
lock_at = 2.months.from_now
todo_date = 1.day.from_now.change(sec: 0)
diff --git a/spec/apis/v1/pages_api_spec.rb b/spec/apis/v1/pages_api_spec.rb
index de2989eb5c1..c584f622cf2 100644
--- a/spec/apis/v1/pages_api_spec.rb
+++ b/spec/apis/v1/pages_api_spec.rb
@@ -214,8 +214,6 @@ describe "Pages API", type: :request do
end
context 'planner feature enabled' do
- before(:once) { @course.root_account.enable_feature!(:student_planner) }
-
it 'should create a page with a todo_date' do
todo_date = Time.zone.local(2008, 9, 1, 12, 0, 0)
json = api_call(:post, "/api/v1/courses/#{@course.id}/pages",
@@ -699,12 +697,11 @@ describe "Pages API", type: :request do
end
it 'should not crash updating front page if the wiki_page param is not available with student planner enabled' do
- @course.root_account.enable_feature!(:student_planner)
- response = api_call(:put, "/api/v1/courses/#{@course.id}/front_page",
- { :controller => 'wiki_pages_api', :action => 'update_front_page', :format => 'json', :course_id => @course.to_param,
- :url => @hidden_page.url },
- {}, {},
- {:expected_status => 200})
+ api_call(:put, "/api/v1/courses/#{@course.id}/front_page",
+ { :controller => 'wiki_pages_api', :action => 'update_front_page', :format => 'json', :course_id => @course.to_param,
+ :url => @hidden_page.url },
+ {}, {},
+ {:expected_status => 200})
end
it "should set as front page", priority:"3", test_id: 126813 do
diff --git a/spec/contracts/service_consumers/api/provider_states_for_consumer.rb b/spec/contracts/service_consumers/api/provider_states_for_consumer.rb
index 8e060e1e224..f2b414c1e1c 100644
--- a/spec/contracts/service_consumers/api/provider_states_for_consumer.rb
+++ b/spec/contracts/service_consumers/api/provider_states_for_consumer.rb
@@ -98,11 +98,6 @@ module Pact::Canvas
seed_users(opts)
@mobile_courses = seed_mobile
enable_default_developer_key!
- enable_features
- end
-
- def enable_features
- @account.enable_feature!(:student_planner)
end
def seed_course
diff --git a/spec/controllers/accounts_controller_spec.rb b/spec/controllers/accounts_controller_spec.rb
index 7d254a0a7e9..72947cd488b 100644
--- a/spec/controllers/accounts_controller_spec.rb
+++ b/spec/controllers/accounts_controller_spec.rb
@@ -470,7 +470,6 @@ describe AccountsController do
it "should overwrite account users' existing dashboard_view if specified" do
account_with_admin_logged_in
@subaccount = @account.sub_accounts.create!
- @account.enable_feature! :student_planner
@account.save!
course_with_teacher(:account => @subaccount, :active_all => true)
diff --git a/spec/controllers/discussion_topics_controller_spec.rb b/spec/controllers/discussion_topics_controller_spec.rb
index 15739bc58b9..99716042923 100644
--- a/spec/controllers/discussion_topics_controller_spec.rb
+++ b/spec/controllers/discussion_topics_controller_spec.rb
@@ -978,26 +978,10 @@ describe DiscussionTopicsController do
end
context 'student planner' do
- before do
- @course.root_account.enable_feature!(:student_planner)
- end
-
before :each do
course_topic
end
- it 'js_env STUDENT_PLANNER_ENABLED is true for teachers' do
- user_session(@teacher)
- get :edit, params: {course_id: @course.id, id: @topic.id}
- expect(assigns[:js_env][:STUDENT_PLANNER_ENABLED]).to be true
- end
-
- it 'js_env STUDENT_PLANNER_ENABLED is false for students' do
- user_session(@student)
- get :edit, params: {course_id: @course.id, id: @topic.id}
- expect(assigns[:js_env][:STUDENT_PLANNER_ENABLED]).to be false
- end
-
it 'should create a topic with a todo date' do
user_session(@teacher)
todo_date = 1.day.from_now.in_time_zone('America/New_York')
diff --git a/spec/controllers/planner_controller_spec.rb b/spec/controllers/planner_controller_spec.rb
index ff5e3076368..d58452f7da5 100644
--- a/spec/controllers/planner_controller_spec.rb
+++ b/spec/controllers/planner_controller_spec.rb
@@ -48,7 +48,6 @@ describe PlannerController do
context "as student" do
before :each do
user_session(@student)
- @course.root_account.enable_feature!(:student_planner)
end
describe "GET #index" do
diff --git a/spec/controllers/planner_notes_controller_spec.rb b/spec/controllers/planner_notes_controller_spec.rb
index 47dd38fe705..5f6cbafe5c8 100644
--- a/spec/controllers/planner_notes_controller_spec.rb
+++ b/spec/controllers/planner_notes_controller_spec.rb
@@ -42,11 +42,6 @@ describe PlannerNotesController do
end
context "authenticated" do
- before :once do
- @course_1.root_account.enable_feature!(:student_planner)
- @course_2.root_account.enable_feature!(:student_planner)
- end
-
context "as student" do
before :each do
user_session(@student)
diff --git a/spec/controllers/planner_overrides_controller_spec.rb b/spec/controllers/planner_overrides_controller_spec.rb
index 1da9e394648..ceb90b792df 100644
--- a/spec/controllers/planner_overrides_controller_spec.rb
+++ b/spec/controllers/planner_overrides_controller_spec.rb
@@ -55,7 +55,6 @@ describe PlannerOverridesController do
context "as student" do
before :each do
user_session(@student)
- @course.root_account.enable_feature!(:student_planner)
end
describe "GET #index" do
diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb
index 704d18dca26..fc935164ec2 100644
--- a/spec/controllers/users_controller_spec.rb
+++ b/spec/controllers/users_controller_spec.rb
@@ -2184,7 +2184,6 @@ describe UsersController do
context "with student planner feature enabled" do
before(:once) do
@account = Account.default
- @account.enable_feature! :student_planner
end
it "sets ENV.STUDENT_PLANNER_ENABLED to false when user has no student enrollments" do
diff --git a/spec/controllers/wiki_pages_controller_spec.rb b/spec/controllers/wiki_pages_controller_spec.rb
index 2e3613b010c..6dc4dabb5cd 100644
--- a/spec/controllers/wiki_pages_controller_spec.rb
+++ b/spec/controllers/wiki_pages_controller_spec.rb
@@ -74,39 +74,6 @@ describe WikiPagesController do
end
end
- describe "student planner" do
- before :once do
- course_with_teacher(active_all: true)
- @page = @course.wiki_pages.create!(title: "plan for planning the planner's planned plan... plan", body: "")
- end
-
- before do
- user_session @teacher
- end
-
- context "feature enabled" do
- before :once do
- @course.root_account.enable_feature! :student_planner
- end
-
- describe "GET 'index" do
- it "should render" do
- get 'index', params: {course_id: @course.id}
- expect(response).to be_successful
- expect(controller.js_env[:STUDENT_PLANNER_ENABLED]).to be_truthy
- end
- end
-
- describe "GET 'show" do
- it "should render" do
- get 'show', params: {course_id: @course.id, id: @page.url}
- expect(response).to be_successful
- expect(controller.js_env[:STUDENT_PLANNER_ENABLED]).to be_truthy
- end
- end
- end
- end
-
describe ':granular_permissions_wiki_pages in js_env' do
before do
course_with_teacher(active_all: true)
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index f725f292100..89fae638fab 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -694,7 +694,6 @@ describe ApplicationHelper do
context "with planner enabled" do
before(:each) do
@account = Account.default
- @account.enable_feature! :student_planner
end
it "returns the list of groups the user belongs to" do
@@ -742,10 +741,6 @@ describe ApplicationHelper do
end
context "with student_planner feature flag enabled" do
- before(:each) do
- @domain_root_account.enable_feature! :student_planner
- end
-
it "returns false when a user has no student enrollments" do
course_with_teacher(:active_all => true)
@current_user = @user
diff --git a/spec/helpers/dashboard_helper_spec.rb b/spec/helpers/dashboard_helper_spec.rb
index 62f7c45efad..9e3f8e08c31 100644
--- a/spec/helpers/dashboard_helper_spec.rb
+++ b/spec/helpers/dashboard_helper_spec.rb
@@ -50,7 +50,6 @@ describe DashboardHelper do
end
it "should return 'planner' if set" do
- @course.root_account.enable_feature!(:student_planner)
@current_user.dashboard_view = 'planner'
@current_user.save!
expect(user_dashboard_view).to eq 'planner'
diff --git a/spec/lib/api/v1/assignment_spec.rb b/spec/lib/api/v1/assignment_spec.rb
index 7529202d3b5..cbf89c82f38 100644
--- a/spec/lib/api/v1/assignment_spec.rb
+++ b/spec/lib/api/v1/assignment_spec.rb
@@ -73,7 +73,6 @@ describe "Api::V1::Assignment" do
end
it "includes an associated planner override when flag is passed" do
- assignment.context.root_account.enable_feature!(:student_planner)
po = planner_override_model(user: user, plannable: assignment)
json = api.assignment_json(assignment, user, session,
{include_planner_override: true})
diff --git a/spec/lib/api/v1/planner_item_spec.rb b/spec/lib/api/v1/planner_item_spec.rb
index 785ab18c860..da80574f9bf 100644
--- a/spec/lib/api/v1/planner_item_spec.rb
+++ b/spec/lib/api/v1/planner_item_spec.rb
@@ -29,7 +29,6 @@ describe Api::V1::PlannerItem do
before :once do
course_factory active_all: true
- @course.root_account.enable_feature!(:student_planner)
teacher_in_course active_all: true
@reviewer = student_in_course(course: @course, active_all: true).user
diff --git a/spec/lib/api/v1/planner_override_spec.rb b/spec/lib/api/v1/planner_override_spec.rb
index 315d6a19d4b..a74f49466d9 100644
--- a/spec/lib/api/v1/planner_override_spec.rb
+++ b/spec/lib/api/v1/planner_override_spec.rb
@@ -24,8 +24,6 @@ describe Api::V1::PlannerOverride do
before :once do
course_factory active_all: true
- @course.root_account.enable_feature!(:student_planner)
-
student_in_course active_all: true
end
diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb
index 8bfe3e30c59..cf381f339d2 100644
--- a/spec/models/account_spec.rb
+++ b/spec/models/account_spec.rb
@@ -1805,7 +1805,6 @@ describe Account do
end
it "should add or overwrite all account users' dashboard_view preference" do
- @account.enable_feature!(:student_planner)
@account.default_dashboard_view = 'planner'
@account.save!
@account.reload
diff --git a/spec/selenium/calendar/calendar2_event_create_spec.rb b/spec/selenium/calendar/calendar2_event_create_spec.rb
index d1778e8d5f3..d6fb373cde2 100644
--- a/spec/selenium/calendar/calendar2_event_create_spec.rb
+++ b/spec/selenium/calendar/calendar2_event_create_spec.rb
@@ -211,7 +211,6 @@ describe "calendar2" do
context "to-do dates" do
before :once do
- Account.default.enable_feature!(:student_planner)
@course = Course.create!(name: "Course 1")
@course.offer!
@student1 = User.create!(name: 'Student 1')
diff --git a/spec/selenium/calendar/calendar2_with_planner_notes_spec.rb b/spec/selenium/calendar/calendar2_with_planner_notes_spec.rb
index 71bf82264c8..b88c1036d6a 100644
--- a/spec/selenium/calendar/calendar2_with_planner_notes_spec.rb
+++ b/spec/selenium/calendar/calendar2_with_planner_notes_spec.rb
@@ -23,7 +23,6 @@ describe "calendar2" do
include Calendar2Common
before(:once) do
- Account.default.enable_feature!(:student_planner)
course_with_teacher(active_all: true, new_user: true)
@student1 = User.create!(name: 'Student 1')
@course.enroll_student(@student1).accept!
diff --git a/spec/selenium/dashboard/planner/student_planner_assignments_spec.rb b/spec/selenium/dashboard/planner/student_planner_assignments_spec.rb
index 083c7e4034d..8b177b3f7a4 100644
--- a/spec/selenium/dashboard/planner/student_planner_assignments_spec.rb
+++ b/spec/selenium/dashboard/planner/student_planner_assignments_spec.rb
@@ -23,7 +23,6 @@ describe "student planner" do
include PlannerPageObject
before :once do
- Account.default.enable_feature!(:student_planner)
course_with_teacher(active_all: true, new_user: true, course_name: "Planner Course")
@student1 = User.create!(name: 'Student 1')
@course.enroll_student(@student1).accept!
diff --git a/spec/selenium/dashboard/planner/student_planner_graded_ungraded_discussion_spec.rb b/spec/selenium/dashboard/planner/student_planner_graded_ungraded_discussion_spec.rb
index 8ab9bfa023d..15736ca5ce8 100644
--- a/spec/selenium/dashboard/planner/student_planner_graded_ungraded_discussion_spec.rb
+++ b/spec/selenium/dashboard/planner/student_planner_graded_ungraded_discussion_spec.rb
@@ -23,7 +23,6 @@ describe "student planner" do
include PlannerPageObject
before :once do
- Account.default.enable_feature!(:student_planner)
course_with_teacher(active_all: true, new_user: true, course_name: "Planner Course")
@student1 = User.create!(name: 'Student First')
@course.enroll_student(@student1).accept!
diff --git a/spec/selenium/dashboard/planner/student_planner_spec.rb b/spec/selenium/dashboard/planner/student_planner_spec.rb
index c3066e8588f..c9c9369921e 100644
--- a/spec/selenium/dashboard/planner/student_planner_spec.rb
+++ b/spec/selenium/dashboard/planner/student_planner_spec.rb
@@ -25,7 +25,6 @@ describe "student planner" do
include PlannerPageObject
before :once do
- Account.default.enable_feature!(:student_planner)
course_with_teacher(active_all: true, new_user: true, user_name: 'PlannerTeacher', course_name: 'Planner Course')
@student1 = User.create!(name: 'Student 1')
@course.enroll_student(@student1).accept!
diff --git a/spec/selenium/dashboard/planner/teacher_planner_spec.rb b/spec/selenium/dashboard/planner/teacher_planner_spec.rb
index c84f0741fb0..e85b0e89e0b 100644
--- a/spec/selenium/dashboard/planner/teacher_planner_spec.rb
+++ b/spec/selenium/dashboard/planner/teacher_planner_spec.rb
@@ -23,7 +23,6 @@ describe "teacher planner" do
include PlannerPageObject
before :once do
- Account.default.enable_feature!(:student_planner)
course_with_teacher(active_all: true, new_user: true, user_name: 'PlannerTeacher', course_name: 'Planner Course')
@student1 = User.create!(name: 'Student 1')
@course.enroll_student(@student1).accept!