canvas-lms/app/helpers
Simon Williams 323283c237 sub-account branding; closes #9368
allow sub accounts to include their own global scripts and stylesheets. if
global includes are enabled on the root account, root account administrators
will have an option to enable them for immediate child accounts.  those child
accounts can then choose to enable them for their sub-accounts, and so on down
the chain.

these includes are added to the page in order from highest to lowest account,
so sub-accounts are able to override styles added by their parents.

the logic for which styles to display on which pages is as follows:
- on account pages, include all styles in the chain from this account up to the
  root account.  this ensures that you can always see styles for account
  X without any sub-account overrides on account X's page
- on course/group pages, include all styles in the chain from the account which
  contains that course/group up to the root
- on the dashboard, calendar, user pages, and other pages that don't fall into
  one of the above categories, we find the lowest account that contains all of
  the current user's active classes + groups, and include styles from that
  account up to the root

test plan:
- in a root account, create two sub-accounts, create courses in each of them,
  and create 3 users, one enrolled only in the first course, one only in the
  second course, and one enrolled in both courses.
- enable global includes on the root account (no sub-accounts yet) add files,
  and make sure all three students see them.
- now enable sub-account includes, and add include files to each sub-account
- make sure both users in course 1 see include for sub-account 1
- make sure user 1 sees include for sub-account 1 on her dashboard, but user
  3 does not.

Change-Id: I3d07d4bced39593f3084d5eac6ea3137666e319b
Reviewed-on: https://gerrit.instructure.com/12248
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-07-18 13:57:52 -06:00
..
account_authorization_configs_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
account_notifications_helper.rb account-level notifications 2011-02-16 21:34:05 -07:00
accounts_helper.rb Show term info when you show course name, fixes #6837 2012-05-01 13:04:49 -06:00
announcements_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
application_helper.rb sub-account branding; closes #9368 2012-07-18 13:57:52 -06:00
assessment_questions_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
assignment_groups_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
assignments_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
avatar_helper.rb add multiple students to an observer in the UI, closes #7768 2012-07-16 15:48:27 -06:00
calendars_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
collaborations_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
communication_channels_helper.rb pass host not account domain to context_host refs #6859 2012-04-18 15:09:21 -06:00
conferences_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
content_imports_helper.rb re-add selective course copy options 2012-04-02 17:29:06 -06:00
context_modules_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
conversations_helper.rb add multiple students to an observer in the UI, closes #7768 2012-07-16 15:48:27 -06:00
courses_helper.rb pending_review show as 'submitted' in event list; fixes #7840 2012-04-18 15:02:35 -06:00
discussion_entries_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
discussion_topics_helper.rb don't show discussion responses in stream when not allowed 2011-11-04 12:27:27 -06:00
eportfolio_categories_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
eportfolio_entries_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
eportfolios_helper.rb various i18n fixes/deduplication 2011-07-06 17:29:33 -06:00
errors_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
external_content_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
external_tools_helper.rb basic lti support 2011-03-23 16:58:11 -06:00
facebook_helper.rb update facebook integration to oauth 2 2011-05-10 16:18:23 -06:00
folders_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
getting_started_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
gradebook_uploads_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
gradebooks_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
grading_standards_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
groups_helper.rb group profile page 2012-06-07 02:00:06 -06:00
info_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
outcome_groups_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
outcomes_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
page_comments_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
page_views_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
processors_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
pseudonym_sessions_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
question_banks_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
quiz_groups_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
quiz_questions_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
quiz_submissions_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
quizzes_helper.rb correctly track dropdown answers, fixes #8156 2012-04-25 14:45:19 -06:00
role_overrides_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
rubric_assessments_controller_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
rubric_associations_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
rubrics_controller_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
search_helper.rb add multiple students to an observer in the UI, closes #7768 2012-07-16 15:48:27 -06:00
sections_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
session_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
short_messages_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
sub_accounts_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
submissions_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
tags_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
terms_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
tokens_helper.rb oauth 2 requests via access tokens 2011-06-02 09:15:11 -06:00
topics_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
upload_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
user_notes_helper.rb i18n user_notes 2011-06-22 09:42:41 -06:00
users_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
wiki_page_comments_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
wiki_page_revisions_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
wiki_pages_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00
zip_file_imports_helper.rb Initial commit. 2011-01-31 18:57:29 -07:00