fix a couple little regressions

Change-Id: Ib630cecd8f5a05cdc37783e59553e786fa9873ea
Reviewed-on: https://gerrit.instructure.com/11322
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
This commit is contained in:
Jon Jensen 2012-06-05 15:06:36 -06:00
parent 7427406c56
commit bae0ce910a
3 changed files with 10 additions and 3 deletions

View File

@ -392,10 +392,10 @@ class Group < ActiveRecord::Base
{ :id => TAB_DISCUSSIONS, :label => t("#group.tabs.discussions", "Discussions"), :css_class => 'discussions', :href => :group_discussion_topics_path },
{ :id => TAB_COLLECTIONS, :label => t("#group.tabs.collections", "Collections"), :css_class => 'collections', :href => :group_collections_path },
{ :id => TAB_CHAT, :label => t("#group.tabs.chat", "Chat"), :css_class => 'chat', :href => :group_chat_path },
{ :id => TAB_FILES, :label => t("#group.tabs.files", "Files"), :css_class => 'files', :href => :group_files_path },
{ :id => TAB_PROFILE, :label => t('#tabs.profile', 'Profile'), :css_class => 'profile', :href => :group_profile_path },
]
available_tabs << { :id => TAB_FILES, :label => t("#group.tabs.files", "Files"), :css_class => 'files', :href => :group_files_path } if context_type == 'Course'
available_tabs << { :id => TAB_CONFERENCES, :label => t('#tabs.conferences', "Conferences"), :css_class => 'conferences', :href => :group_conferences_path } if user && self.grants_right?(user, nil, :read)
available_tabs << { :id => TAB_SETTINGS, :label => t('#tabs.settings', 'Settings'), :css_class => 'settings', :href => :edit_group_path } if user && grants_right?(user, nil, :manage)
available_tabs

View File

@ -66,6 +66,7 @@ module TextHelper
# insert placeholders for the links we're going to generate, before we go and escape all the html
links = []
placeholder_blocks = []
message ||= ''
message = message.gsub(AUTO_LINKIFY_REGEX) do |match|
placeholder_blocks << if match == AUTO_LINKIFY_PLACEHOLDER
AUTO_LINKIFY_PLACEHOLDER

View File

@ -488,9 +488,12 @@ describe Group do
Group::TAB_PAGES,
Group::TAB_PEOPLE,
Group::TAB_DISCUSSIONS,
Group::TAB_COLLECTIONS,
Group::TAB_CHAT,
Group::TAB_FILES,
Group::TAB_CONFERENCES
Group::TAB_PROFILE,
Group::TAB_CONFERENCES,
Group::TAB_SETTINGS
]
end
@ -501,9 +504,12 @@ describe Group do
Group::TAB_PAGES,
Group::TAB_PEOPLE,
Group::TAB_DISCUSSIONS,
Group::TAB_COLLECTIONS,
Group::TAB_CHAT,
Group::TAB_FILES,
Group::TAB_CONFERENCES
Group::TAB_PROFILE,
Group::TAB_CONFERENCES,
Group::TAB_SETTINGS
]
end