Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup unused valid_courses #16357

Merged
merged 1 commit into from
Jul 12, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ import SectionsPage from '@cdo/apps/templates/teacherDashboard/SectionsPage';
* page load
* @param {string} data.studiourlprefix
* @param {string[]} data.valid_login_types
* @param {string[]} data.valid_Grades
* @param {object[]} data.valid_courses
* @param {string[]} data.valid_grades
* @param {object[]} data.valid_scripts
*/
export function renderSectionsPage(data) {
Expand Down
4 changes: 4 additions & 0 deletions pegasus/helpers/section_api_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ def self.valid_scripts(user_id = nil)
@@course_cache = {}
# Mimic the behavior of valid_scripts, but return courses instead. Also simpler
# in that we don't have to worry about hidden courses.
# This is now only used to check to see if we have a valid_course_id when assigning
# a course to a section. This code could be simplified, as all we really want
# now is a list of course_ids. However, because we'd ultimately like this to
# all live in dashboard, I'm leaving this in its unsimplified form for now.
# @return AssignableInfo[]
def self.valid_courses
course_cache_key = I18n.locale.to_s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ title: <%= I18n.t('dashboard_landing_title').inspect %>
- data[:studiourlprefix] = CDO.studio_url
- data[:i18n] = i18n
- data[:valid_scripts] = DashboardSection::valid_scripts(request.user_id)
- data[:valid_courses] = DashboardSection::valid_courses()
- data[:valid_login_types] = DashboardSection::valid_login_types
- data[:valid_grades] = DashboardSection::valid_grades
- data[:hoc_assign_warning] = Gatekeeper.allows('hoc_assign_warning', default: false)
Expand Down