set collaborations tab as active when page is accessed
fixes CNVS-17721 test plan: - go to /plugins and enable a collaboration tool (i used etherpad with dummy settings for this test) - go to a course - if the collaborations tab doesn't show up, you might have to clear a cache, which can be done by going to the course settings, tab navigation, and hitting save - click on the collaborations tab - it should be highlighted as "active" in the tab list - it should have a navigation crumb in the top bar Change-Id: I9441ee278dd416ef2fc6ff3ac2586199fba5c1af Reviewed-on: https://gerrit.instructure.com/46453 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Matthew Wheeler <mwheeler@instructure.com> QA-Review: Sean Lewis <slewis@instructure.com> Product-Review: Simon Williams <simon@instructure.com>
This commit is contained in:
parent
d634a48950
commit
650633744e
|
@ -55,12 +55,16 @@ class CollaborationsController < ApplicationController
|
|||
before_filter :require_collaborations_configured
|
||||
before_filter :reject_student_view_student
|
||||
|
||||
before_filter { |c| c.active_tab = "collaborations" }
|
||||
|
||||
include Api::V1::Collaborator
|
||||
|
||||
def index
|
||||
return unless authorized_action(@context, @current_user, :read) &&
|
||||
tab_enabled?(@context.class::TAB_COLLABORATIONS)
|
||||
|
||||
add_crumb(t('#crumbs.collaborations', "Collaborations"), polymorphic_path([@context, :collaborations]))
|
||||
|
||||
@collaborations = @context.collaborations.active
|
||||
log_asset_access("collaborations:#{@context.asset_string}", "collaborations", "other")
|
||||
|
||||
|
|
Loading…
Reference in New Issue