From 52bc2aa07076ae64ca143b072c9db5ff83de2da2 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Thu, 15 May 2014 16:35:05 -0400 Subject: [PATCH 01/16] Added rst version of cognitive load page --- .../developers/source/cognitive_load.rst | 179 ++++++++++++++++++ docs/en_us/developers/source/index.rst | 1 + 2 files changed, 180 insertions(+) create mode 100644 docs/en_us/developers/source/cognitive_load.rst diff --git a/docs/en_us/developers/source/cognitive_load.rst b/docs/en_us/developers/source/cognitive_load.rst new file mode 100644 index 0000000000..dc05304fed --- /dev/null +++ b/docs/en_us/developers/source/cognitive_load.rst @@ -0,0 +1,179 @@ +************** +Cognitive Load +************** + +This is a checklist of all of the things that we expect a developer to consider +as they are building new or modifying existing functionality. + +Operational Impact +================== + +* Are there new points in the system that require operational monitoring? + + * External system that you now depend on (Mathworks, SoftwareSecure, + CyberSource, etc...) + * New reliance on disk space? + * New stand process (workers? elastic search?) that need to always be available? + * A new queue that needs to be monitored for dequeueing + * Bulk Email --> Amazon SES, Inbound queues, etc... + * Are important feature metrics sent to datadog and is there a + dashboard to monitor them? + +* Am I building a feature that will have impact to the performance of the system? + + * Deep Search + * Grade Downloads + +* Are reasonable log messages being written out for debugging purposes? +* Will this new feature easily startup in the Vagrant image? +* Do we have documentation for how to startup this feature if it has any + new startup requirements? +* Are there any special directories/file system permissions that need to be set? +* Will this have any impact to the CDN related technologies? +* Are we pushing any extra manual burden on the Operations team to have to + provision anything new when new courses launch? when new schools start? etc.... +* Has the feature been tested using a production configuration with vagrant? + +See also: :doc:`deploy-new-service` + +Documentation/Training/Support +============================== + +* Is there appropriate documentation in the context of the product for + this feature? If not, how can we get it to folks? + + * For Studio much of the documentation is in the product. + +* Is this feature big enough that we need to have a session with stake holders + to introduce this feature BEFORE we release it? (PMs, Support, etc...) + + * Paid Certificates + +* Do I have to give some more information to the Escalation Team + so that this can be supported? +* Did you add an entry to CHANGELOG? +* Did you write/edit docstrings for all of your modules, classes, and functions? + +Development +=========== + +* Did you consider a reasonable upgrade path? +* Is this a feature that we need to slowly roll out to different audiences? + + * Bulk Email + +* Have you considered exposing an appropriate amount of configuration options + in case something happens? +* Have you considered a simple way to "disable" this feature if something is broken? + + * Centralized Logging + +* Will this feature require any security provisioning? + + * Which roles use this feature? Does it make sense to ensure that only those + roles can see this feature? + * Assets in the Studio Library + +* Did you ensure that any new libraries are added to appropriate provisioning + scripts and have been checked by OSCM for license appropriateness? +* Is there an open source alternative? +* Are we locked down to any proprietary technologies? (AWS, ...) +* Did you consider making APIs so that others can change the implementation if applicable? +* Did you consider Internationalization (I18N) and Localization (L10N)? +* Did you consider Accessibility (A11y)? +* Will your code work properly in workers? +* Have you considered the large-scale modularity of the code? For example, + xmodule and xblock should not use Django features directly. + +Testing +======= + +* Did you make sure that you tried boundary conditions? +* Did you try unicode input/data? + + * The name of the person in paid certifactes + * The name of the person in bulk email + * The body of the text in bulk email + * etc + +* Did you try funny characters in the input/data? (~!@#$%^&*()';/.,<>, etc...) +* Have you done performance testing on this feature? Do you know how much + performance is good enough? +* Did you ensure that your functionality works across all supported browsers? +* Do you have the right hooks in your HTML to ensure that the views are automatable? +* Are you ready if this feature has 10x the expected usage? +* What happens if an external service does not respond or responds with + a significant delay? +* What are possible failure modes? Do your unit tests exercise these code paths? +* Does this change affect templates and/or JavaScript? If so, are there + Selenium tests for the affected page(s)? Have you tested the affected + page(s) in a sandbox? + +Analytics +========= + +* Are learning analytics events being recorded in an appropriate way? + + * Do your events use a descriptive and uniquely enough event type and + namespace? + * Did you ensure that you capture enough information for the researchers + to benefit from this event information? + * Is it possible to reconstruct the state of your module from the history + of its events? + * Has this new event been documented so that folks downstream know how + to interpret it? + * Are you increasing the amount of logging in any major way? + +* Are you sending appropriate/enough information to MixPanel, + Google Analytics, Segment IO? + +Collaboration +============= +* Are there are other teams that would benefit from knowing about this feature? + + * Forums/LMS - email + +* Does this feature require a special broadcast to external teams as well? + (Stanford, Google, Berkley, etc...) + +Open Source +=========== +* Can we get help from the community on this feature? +* Does the community know enough about this? + +UX/Design/Front End Development +=============================== +* Did you make sure that the feature is going to pass + Accessibility requirements (still TBD)? +* Did you make sure any system/instructional text is I18N ready? +* Did you ensure that basic functionality works across all supported browsers? +* Did you plan for the feature's UI to degrade gracefully (or be + progressively enhanced) based on browser capability? +* Did you review the page/view under all browser/agent conditions - + viewport sizes, images off, css off? +* Did you write any HTML with ideal page/view semantics in mind? +* When writing HTML, did you adhere to standards/conventions around class/id names? +* When writing Sass, did you follow OOCSS/SMACSS philosophy ([1]_, [2]_, [3]_), + variable/extend organization and naming conventions, and UI abstraction conventions? +* When writing Sass, did you document any new variables, + extend-based classes, or mixins? +* When writing/adding JavaScript, did you consider the asset pipeline + and page load timeline? +* When writing JavaScript, did you note what code is for prototyping vs. production? +* When adding new templates, views, assets (Sass, images, plugins/libraries), + did you follow existing naming and file architecture conventions? +* When adding new templates, views, assets (Sass, images, plugins/libraries), + did you add any needed documentation? +* Did you use templates and good Sass architecture to keep DRY? +* Did we document any aspects about the feature (flow, purpose, intent) + that we or other teams will need to know going forward? + +.. [1] http://smacss.com/ +.. [2] http://thesassway.com/intermediate/avoid-nested-selectors-for-more-modular-css +.. [3] http://ianstormtaylor.com/oocss-plus-sass-is-the-best-way-to-css/ + +edX.org Specific +================ + +* Ensure that you have not broken import/export? +* Ensure that you have not broken video player? (Lyla video) diff --git a/docs/en_us/developers/source/index.rst b/docs/en_us/developers/source/index.rst index a2ef6f6b23..ef16acbc89 100644 --- a/docs/en_us/developers/source/index.rst +++ b/docs/en_us/developers/source/index.rst @@ -23,6 +23,7 @@ Contents: analytics.rst process/index testing/index + cognitive_load APIs ----- From 138bd78e934a8e099985399fc99e36fcee8e6564 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Thu, 15 May 2014 16:44:53 -0400 Subject: [PATCH 02/16] add So You Want to Deploy a New Service --- .../developers/source/deploy-new-service.rst | 133 ++++++++++++++++++ docs/en_us/developers/source/index.rst | 1 + 2 files changed, 134 insertions(+) create mode 100644 docs/en_us/developers/source/deploy-new-service.rst diff --git a/docs/en_us/developers/source/deploy-new-service.rst b/docs/en_us/developers/source/deploy-new-service.rst new file mode 100644 index 0000000000..c63ac6ab62 --- /dev/null +++ b/docs/en_us/developers/source/deploy-new-service.rst @@ -0,0 +1,133 @@ +*********************************** +So You Want to Deploy a New Service +*********************************** + +Intro +===== + +This page is a work-in-progress aimed at capturing all the details needed to +deploy a new service in the edX environment. + +Considerations +============== + +What Does Your Service Do +------------------------- +Understanding how your service works and what it does helps Ops support +the service in production. + +Sizing and Resource Profile +--------------------------- +What class of machine does your service require. What resources are most +likely to be bottlenecks for your service, CPU, memory, bandwidth, something else? + +Customers +--------- +Who will be consuming your service? What is the anticipated initial usage? +What factors will cause usage to grow? How many users can your service support? + +Code +---- +What repository or repositories does your service require. +Will your service be deployed from a non-public repo? + +Ideally your service should follow the same release management process as the LMS. +This is documented in the wiki, so please ensure you understand that process in depth. + +Was the service code reviewed? + +Settings +-------- +How does your service read in environment specific settings? Were all +hard-coded references to values that should be settings, e.g., database URLs +and credentials, message queue endpoints, etc., found and resolved during +code review? + +License +------- +Is the license included in the repo? + +How does your service run +------------------------- +Is it HTTP based? Does it run periodically? Both? + +Persistence +----------- +Ops will need to know the following things: + +* What persistence needs does you service have + + * Will it connect to an existing database? + * Will it connect to Mongo + +* What are the least permissive permissions your service needs to do its job. + +Logging +------- + +It's important that your application logging in built out to provide sufficient +feedback for problem determination as well as ensuring that it is operating as +desired. It's also important that your service log using our deployment +standards, i.e., logs vi syslog in deployment environments and utilizes the +standard log format for syslog. Can the logs be consumed by Splunk? They +should not be if they contain data discussed in the Data Security section below. + +Metrics +------- +What are the key metrics for your application? Concurrent users? +Transactions per second? Ideally you should create a DataDog view that +captures the key metrics for your service and provided an instant gauge of +overally service health. + +Messaging +--------- +Does your service need to access a message queue. + +Email +----- +Does your service need to send email + +Access to Other Service +----------------------- +Does your service need access to other service either within or +outside of the edX environment. Some example might be, the comment service, +the LMS, YouTube, s3 buckets, etc. + +Service Monitoring +------------------ +Your service should have a facility for remote monitoring that has the +following characteristics: + +* It should exercise all the components that your service requires to run successfully. +* It should be necessary and sufficient for ensuring your service is healthy. +* It should be secure. +* It should not open your service to DDOS attacks. + +Fault Tolerance and Scalability +------------------------------- +How can your application be deployed to ensure that it is fault tolerant +and scalable? + +Network Access +-------------- +From where should your service be accessible. + +Data Security +------------- +Will your application be storing or handling data in any of the +following categories: + +* Personally Identifiable Information in General, e.g., user's email addresses. +* Tracking log data +* edX confidential data + +Testing +------- +Has your service been load tested? What there the details of the test. +What determinations can we make regarding when we will need to scale if usage +trend upward? How can ops exercise your service in order to tests end-to-end +integration. We love no-op-able tasks. + +Additional Requirements +----------------------- +Anything else we should know about. diff --git a/docs/en_us/developers/source/index.rst b/docs/en_us/developers/source/index.rst index ef16acbc89..23a6e5d26d 100644 --- a/docs/en_us/developers/source/index.rst +++ b/docs/en_us/developers/source/index.rst @@ -24,6 +24,7 @@ Contents: process/index testing/index cognitive_load + deploy-new-service APIs ----- From adf6df224edff01f17a595ae08edecdb6031eb5a Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Fri, 16 May 2014 09:28:05 -0400 Subject: [PATCH 03/16] address review comments from @nedbat --- docs/en_us/developers/source/cognitive_load.rst | 16 +++++++++------- .../developers/source/deploy-new-service.rst | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/en_us/developers/source/cognitive_load.rst b/docs/en_us/developers/source/cognitive_load.rst index dc05304fed..e37e087881 100644 --- a/docs/en_us/developers/source/cognitive_load.rst +++ b/docs/en_us/developers/source/cognitive_load.rst @@ -1,6 +1,6 @@ -************** -Cognitive Load -************** +******************* +Code Considerations +******************* This is a checklist of all of the things that we expect a developer to consider as they are building new or modifying existing functionality. @@ -20,13 +20,16 @@ Operational Impact dashboard to monitor them? * Am I building a feature that will have impact to the performance of the system? + Keep in mind that Open edX needs to support hundreds of thousands if not + millions of students, so be careful that you code will work well when the + numbers get large. * Deep Search * Grade Downloads * Are reasonable log messages being written out for debugging purposes? -* Will this new feature easily startup in the Vagrant image? -* Do we have documentation for how to startup this feature if it has any +* Will this new feature easily start up in the Vagrant image? +* Do we have documentation for how to start up this feature if it has any new startup requirements? * Are there any special directories/file system permissions that need to be set? * Will this have any impact to the CDN related technologies? @@ -44,7 +47,7 @@ Documentation/Training/Support * For Studio much of the documentation is in the product. -* Is this feature big enough that we need to have a session with stake holders +* Is this feature big enough that we need to have a session with stakeholders to introduce this feature BEFORE we release it? (PMs, Support, etc...) * Paid Certificates @@ -134,7 +137,6 @@ Collaboration * Forums/LMS - email * Does this feature require a special broadcast to external teams as well? - (Stanford, Google, Berkley, etc...) Open Source =========== diff --git a/docs/en_us/developers/source/deploy-new-service.rst b/docs/en_us/developers/source/deploy-new-service.rst index c63ac6ab62..7cab9d0cd3 100644 --- a/docs/en_us/developers/source/deploy-new-service.rst +++ b/docs/en_us/developers/source/deploy-new-service.rst @@ -68,7 +68,7 @@ Logging It's important that your application logging in built out to provide sufficient feedback for problem determination as well as ensuring that it is operating as desired. It's also important that your service log using our deployment -standards, i.e., logs vi syslog in deployment environments and utilizes the +standards, i.e., logs vs syslog in deployment environments and utilizes the standard log format for syslog. Can the logs be consumed by Splunk? They should not be if they contain data discussed in the Data Security section below. From 867ea2b6374def11547c8e76234c3ba26f126c18 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Fri, 16 May 2014 09:28:50 -0400 Subject: [PATCH 04/16] renamed cognitive_load.rst to code-considerations.rst --- .../source/{cognitive_load.rst => code-considerations.rst} | 0 docs/en_us/developers/source/index.rst | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename docs/en_us/developers/source/{cognitive_load.rst => code-considerations.rst} (100%) diff --git a/docs/en_us/developers/source/cognitive_load.rst b/docs/en_us/developers/source/code-considerations.rst similarity index 100% rename from docs/en_us/developers/source/cognitive_load.rst rename to docs/en_us/developers/source/code-considerations.rst diff --git a/docs/en_us/developers/source/index.rst b/docs/en_us/developers/source/index.rst index 23a6e5d26d..ea852221a3 100644 --- a/docs/en_us/developers/source/index.rst +++ b/docs/en_us/developers/source/index.rst @@ -23,7 +23,7 @@ Contents: analytics.rst process/index testing/index - cognitive_load + code-considerations deploy-new-service APIs From 8afe315ce43fcb0487cccebf255ce3dc81782a66 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Fri, 16 May 2014 13:59:21 -0400 Subject: [PATCH 05/16] link to code considerations page from contributor doc --- docs/en_us/developers/source/process/contributor.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/en_us/developers/source/process/contributor.rst b/docs/en_us/developers/source/process/contributor.rst index 271dd8215d..fe7730337b 100644 --- a/docs/en_us/developers/source/process/contributor.rst +++ b/docs/en_us/developers/source/process/contributor.rst @@ -100,6 +100,7 @@ Further Information For futher information on the pull request requirements, please see the following links: +* :doc:`../code-considerations` * :doc:`../testing` * :doc:`../testing/jenkins` * :doc:`../testing/code-coverage` From 42e8e3068e9e73b731dbb0493549afce3c5248bf Mon Sep 17 00:00:00 2001 From: Chris Rossi Date: Tue, 6 May 2014 11:41:57 -0400 Subject: [PATCH 06/16] Use local storage instead of S3 for uploads in devstack. --- cms/envs/devstack.py | 4 ++++ lms/envs/devstack.py | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index 6118eb3018..357ff7cd0d 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -4,6 +4,10 @@ Specific overrides to the base prod settings to make development easier. from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import +# Don't use S3 in devstack, fall back to filesystem +del DEFAULT_FILE_STORAGE +MEDIA_ROOT = "/edx/app/edxapp/media" + DEBUG = True USE_I18N = True TEMPLATE_DEBUG = DEBUG diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index 3722efd6ae..9fe16128ca 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -4,6 +4,11 @@ Specific overrides to the base prod settings to make development easier. from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import +# Don't use S3 in devstack, fall back to filesystem +del DEFAULT_FILE_STORAGE +MEDIA_ROOT = "/edx/app/edxapp/media" + + DEBUG = True USE_I18N = True TEMPLATE_DEBUG = True From db8b33d04d808a66e5b884fd72b2252dfc304985 Mon Sep 17 00:00:00 2001 From: Chris Rossi Date: Fri, 16 May 2014 10:33:13 -0400 Subject: [PATCH 07/16] Use path already created by ansible. --- cms/envs/devstack.py | 2 +- lms/envs/devstack.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index 357ff7cd0d..6dc95c1925 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -6,7 +6,7 @@ from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import # Don't use S3 in devstack, fall back to filesystem del DEFAULT_FILE_STORAGE -MEDIA_ROOT = "/edx/app/edxapp/media" +MEDIA_ROOT = "/edx/var/edxapp/uploads" DEBUG = True USE_I18N = True diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index 9fe16128ca..7d7aabfe0d 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -6,7 +6,7 @@ from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import # Don't use S3 in devstack, fall back to filesystem del DEFAULT_FILE_STORAGE -MEDIA_ROOT = "/edx/app/edxapp/media" +MEDIA_ROOT = "/edx/var/edxapp/uploads" DEBUG = True From b7440a51e8c86581f29947e5f1d36c3eb4f653ff Mon Sep 17 00:00:00 2001 From: Nimisha Asthagiri Date: Tue, 6 May 2014 11:54:46 -0400 Subject: [PATCH 08/16] Dev support for context-sensitive help. --- .../contentstore/context_processors.py | 43 ++++++++++++++----- cms/templates/base.html | 3 +- cms/templates/edit-tabs.html | 1 + cms/templates/textbooks.html | 1 + cms/templates/widgets/header.html | 13 +++++- docs/config.ini | 31 ++++++++++++- 6 files changed, 78 insertions(+), 14 deletions(-) diff --git a/cms/djangoapps/contentstore/context_processors.py b/cms/djangoapps/contentstore/context_processors.py index 66ba685661..076b06bde1 100644 --- a/cms/djangoapps/contentstore/context_processors.py +++ b/cms/djangoapps/contentstore/context_processors.py @@ -1,4 +1,5 @@ import ConfigParser +from locale import getlocale from django.conf import settings config_file = open(settings.REPO_ROOT / "docs" / "config.ini") @@ -6,15 +7,37 @@ config = ConfigParser.ConfigParser() config.readfp(config_file) -def doc_url(request): - # in the future, we will detect the locale; for now, we will - # hardcode en_us, since we only have English documentation - locale = "en_us" +def doc_url(request=None): - def get_doc_url(token): - try: - return config.get(locale, token) - except ConfigParser.NoOptionError: - return config.get(locale, "default") + def get_online_help_info(page_token): - return {"doc_url": get_doc_url} + def get_config_value(section_name, key, default_key="default"): + try: + return config.get(section_name, key) + except (ConfigParser.NoOptionError, AttributeError): + return config.get(section_name, default_key) + + def get_page_path(page_token): + return get_config_value("pages", page_token) + + def get_langage_path(request): + language_code = settings.LANGUAGE_CODE + return get_config_value("locales", language_code) + + def get_url(base_option): + return "{base_url}/{language}/{version}/{page_path}".format( + base_url=config.get("server_settings", base_option), + language=language_dir, + version=config.get("server_settings", "version"), + page_path=page_path, + ) + + language_dir = get_langage_path(request) + page_path = get_page_path(page_token) + + return { + "doc_url": get_url("base_url"), + "pdf_url": get_url("base_pdf"), + } + + return {'get_online_help_info': get_online_help_info} diff --git a/cms/templates/base.html b/cms/templates/base.html index 93a3ec4ff7..75b94fe32e 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -264,7 +264,8 @@
- <%include file="widgets/header.html" /> + <% online_help_token = self.online_help_token() if hasattr(self, 'online_help_token') else None %> + <%include file="widgets/header.html" args="online_help_token=online_help_token" />
diff --git a/cms/templates/edit-tabs.html b/cms/templates/edit-tabs.html index 2c0c964508..76ae27e268 100644 --- a/cms/templates/edit-tabs.html +++ b/cms/templates/edit-tabs.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "pages" %> <%namespace name='static' file='static_content.html'/> <%! from django.utils.translation import ugettext as _ diff --git a/cms/templates/textbooks.html b/cms/templates/textbooks.html index 09267faef5..12c40ef6cd 100644 --- a/cms/templates/textbooks.html +++ b/cms/templates/textbooks.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "textbooks" %> <%namespace name='static' file='static_content.html'/> <%! import json %> <%! from django.utils.translation import ugettext as _ %> diff --git a/cms/templates/widgets/header.html b/cms/templates/widgets/header.html index f27d5b9ea9..0e87a63c48 100644 --- a/cms/templates/widgets/header.html +++ b/cms/templates/widgets/header.html @@ -3,7 +3,9 @@ from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from xmodule.modulestore.django import loc_mapper + from contentstore.context_processors import doc_url %> +<%page args="online_help_token"/>
diff --git a/docs/config.ini b/docs/config.ini index 6337e350de..a0b0050327 100644 --- a/docs/config.ini +++ b/docs/config.ini @@ -1,2 +1,29 @@ -[en_us] -default=default +# below are the server-wide settings for documentation +[server_settings] +base_url = http://edx.readthedocs.org/projects/edx-partner-course-staff +base_pdf = https://media.readthedocs.org/pdf/edx-partner-course-staff +version = latest + +# below are the sub-paths to the documentation for the various pages +[pages] +default = index.html +home = getting_started/get_started.html +courses = building_course/creating_new_course.html +outline = creating_content/organizing_course.html +updates = creating_content/handouts_updates.html +pages = creating_content/pages.html +files = creating_content/course_files.html +textbooks = creating_content/textbooks.html +schedule = building_course/setting_up_student_view.html +grading = building_course/establish_grading_policy.html +team = building_course/creating_new_course.html#add-course-team-members +advanced = index.html +checklist = building_course/creating_new_course.html#use-the-course-checklist +import = building_course/export_import_course.html +export = building_course/export_import_course.html + +# below are the language directory names for the different locales +[locales] +default = en +en = en +en_us = en From 8fcbdaed03a044b27524ae6a75bb2bb38676a547 Mon Sep 17 00:00:00 2001 From: Mark Hoeber Date: Tue, 13 May 2014 13:41:19 -0400 Subject: [PATCH 09/16] Update of all templates Changed help button to link and removed drop-down items --- cms/templates/asset_index.html | 1 + cms/templates/checklists.html | 1 + cms/templates/course_info.html | 1 + cms/templates/export.html | 1 + cms/templates/import.html | 1 + cms/templates/index.html | 2 +- cms/templates/manage_users.html | 1 + cms/templates/overview.html | 1 + cms/templates/settings.html | 1 + cms/templates/settings_advanced.html | 1 + cms/templates/settings_graders.html | 1 + cms/templates/textbooks.html | 4 ++++ cms/templates/widgets/header.html | 25 +++---------------------- docs/config.ini | 1 - 14 files changed, 18 insertions(+), 24 deletions(-) diff --git a/cms/templates/asset_index.html b/cms/templates/asset_index.html index 3cb6b34a07..04f6cef0bb 100644 --- a/cms/templates/asset_index.html +++ b/cms/templates/asset_index.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "files" %> <%! from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ diff --git a/cms/templates/checklists.html b/cms/templates/checklists.html index 90f77683d8..ad75fe3518 100644 --- a/cms/templates/checklists.html +++ b/cms/templates/checklists.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "checklist" %> <%! from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ diff --git a/cms/templates/course_info.html b/cms/templates/course_info.html index 8cddb8a8c5..7a44f142e3 100644 --- a/cms/templates/course_info.html +++ b/cms/templates/course_info.html @@ -2,6 +2,7 @@ from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "updates" %> <%namespace name='static' file='static_content.html'/> diff --git a/cms/templates/export.html b/cms/templates/export.html index 2a19a13af4..7af1661459 100644 --- a/cms/templates/export.html +++ b/cms/templates/export.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "export" %> <%namespace name='static' file='static_content.html'/> <%! diff --git a/cms/templates/import.html b/cms/templates/import.html index 2c4fdd17d6..af5987f08e 100644 --- a/cms/templates/import.html +++ b/cms/templates/import.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "import" %> <%namespace name='static' file='static_content.html'/> <%! from django.utils.translation import ugettext as _ diff --git a/cms/templates/index.html b/cms/templates/index.html index 4c5a7518a8..9664805a46 100644 --- a/cms/templates/index.html +++ b/cms/templates/index.html @@ -1,7 +1,7 @@ <%! from django.utils.translation import ugettext as _ %> <%inherit file="base.html" /> - +<%def name="online_help_token()"><% return "home" %> <%block name="title">${_("My Courses")} <%block name="bodyclass">is-signedin index view-dashboard diff --git a/cms/templates/manage_users.html b/cms/templates/manage_users.html index bac136ab04..95e5ee1bc5 100644 --- a/cms/templates/manage_users.html +++ b/cms/templates/manage_users.html @@ -4,6 +4,7 @@ <%! from student.roles import CourseInstructorRole %> <%! from xmodule.modulestore.django import loc_mapper %> <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "team" %> <%block name="title">${_("Course Team Settings")} <%block name="bodyclass">is-signedin course users view-team diff --git a/cms/templates/overview.html b/cms/templates/overview.html index 7e9fa5f8c5..9cf0ced5ec 100644 --- a/cms/templates/overview.html +++ b/cms/templates/overview.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "outline" %> <%! import logging from util.date_utils import get_default_time_display diff --git a/cms/templates/settings.html b/cms/templates/settings.html index 0cc770adfa..b0fd4be65c 100644 --- a/cms/templates/settings.html +++ b/cms/templates/settings.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "schedule" %> <%block name="title">${_("Schedule & Details Settings")} <%block name="bodyclass">is-signedin course schedule view-settings feature-upload diff --git a/cms/templates/settings_advanced.html b/cms/templates/settings_advanced.html index 30bdec161c..eff03f86cc 100644 --- a/cms/templates/settings_advanced.html +++ b/cms/templates/settings_advanced.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "advanced" %> <%namespace name='static' file='static_content.html'/> <%! from django.utils.translation import ugettext as _ diff --git a/cms/templates/settings_graders.html b/cms/templates/settings_graders.html index a892dca473..1c50c88146 100644 --- a/cms/templates/settings_graders.html +++ b/cms/templates/settings_graders.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "grading" %> <%block name="title">${_("Grading Settings")} <%block name="bodyclass">is-signedin course grading view-settings diff --git a/cms/templates/textbooks.html b/cms/templates/textbooks.html index 12c40ef6cd..b444c28ae8 100644 --- a/cms/templates/textbooks.html +++ b/cms/templates/textbooks.html @@ -75,6 +75,10 @@ require(["js/models/section", "js/collections/textbook", "js/views/list_textbook

${_("What if my book isn't divided into chapters?")}

${_("If your textbook doesn't have individual chapters, you can upload the entire text as a single chapter and enter a name of your choice in the Chapter Name field.")}

+ <% + help_doc_urls = get_online_help_info(online_help_token) + %> +

Read More

diff --git a/cms/templates/widgets/header.html b/cms/templates/widgets/header.html index 0e87a63c48..d9f9c1bf87 100644 --- a/cms/templates/widgets/header.html +++ b/cms/templates/widgets/header.html @@ -129,30 +129,11 @@ help_doc_urls = get_online_help_info(online_help_token) %> + +
diff --git a/docs/config.ini b/docs/config.ini index 4fb795ada6..634e88e8f1 100644 --- a/docs/config.ini +++ b/docs/config.ini @@ -1,10 +1,18 @@ # below are the server-wide settings for documentation -[server_settings] -base_url = http://edx.readthedocs.org/projects/edx-partner-course-staff -base_pdf = https://media.readthedocs.org/pdf/edx-partner-course-staff +[help_settings] +url_base = http://edx.readthedocs.org/projects/edx-partner-course-staff version = latest + +# below are the pdf settings for the pdf file +[pdf_settings] +pdf_base = https://media.readthedocs.org/pdf/edx-partner-course-staff +pdf_file = edx-partner-course-staff.pdf + + # below are the sub-paths to the documentation for the various pages +# NOTE: If any of these page settings change, then their corresponding test should be updated +# in edx-platform/cms/djangoapps/contentstore/features/help.feature [pages] default = index.html home = getting_started/get_started.html @@ -21,6 +29,7 @@ checklist = building_course/creating_new_course.html#use-the-course-checklist import = building_course/export_import_course.html export = building_course/export_import_course.html + # below are the language directory names for the different locales [locales] default = en From 27ff0db57bfea68bf67a13e908b30df6d0f5c4f3 Mon Sep 17 00:00:00 2001 From: Mark Hoeber Date: Wed, 14 May 2014 16:29:30 -0400 Subject: [PATCH 11/16] Added new context sensitive link and updated text Sock template changes --- .../contentstore/features/help.feature | 6 ++++ cms/templates/edit_subsection.html | 1 + cms/templates/index.html | 13 +++++--- cms/templates/textbooks.html | 2 +- cms/templates/unit.html | 1 + cms/templates/widgets/header.html | 3 -- cms/templates/widgets/sock.html | 31 +++++++++++-------- docs/config.ini | 9 +++--- 8 files changed, 40 insertions(+), 26 deletions(-) diff --git a/cms/djangoapps/contentstore/features/help.feature b/cms/djangoapps/contentstore/features/help.feature index 7904fdafc2..c829647565 100644 --- a/cms/djangoapps/contentstore/features/help.feature +++ b/cms/djangoapps/contentstore/features/help.feature @@ -14,6 +14,12 @@ Feature: CMS.Help And I click the course link in My Courses Then I should see online help for "organizing_course" + And I click a subsection in the outline + Then I should see the online help for "subsection" + + And I click a unit + Then I should see the online help for "unit" + And I go to the course updates page Then I should see online help for "updates" diff --git a/cms/templates/edit_subsection.html b/cms/templates/edit_subsection.html index 4103c0752b..161ffac8d4 100644 --- a/cms/templates/edit_subsection.html +++ b/cms/templates/edit_subsection.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "subsection" %> <%! import logging from util.date_utils import get_default_time_display, almost_same_datetime diff --git a/cms/templates/index.html b/cms/templates/index.html index 9664805a46..fba662735d 100644 --- a/cms/templates/index.html +++ b/cms/templates/index.html @@ -275,18 +275,21 @@ require(["domReady!", "jquery", "jquery.form", "js/index"], function(doc, $) { % endif - + <% + help_doc_urls = get_online_help_info(online_help_token()) + %> diff --git a/cms/templates/unit.html b/cms/templates/unit.html index 921e1af0a1..c9bf7707d5 100644 --- a/cms/templates/unit.html +++ b/cms/templates/unit.html @@ -1,4 +1,5 @@ <%inherit file="base.html" /> +<%def name="online_help_token()"><% return "unit" %> <%! from django.core.urlresolvers import reverse from contentstore.views.helpers import EDITING_TEMPLATES diff --git a/cms/templates/widgets/header.html b/cms/templates/widgets/header.html index d9f9c1bf87..1d97df3916 100644 --- a/cms/templates/widgets/header.html +++ b/cms/templates/widgets/header.html @@ -128,9 +128,6 @@ <% help_doc_urls = get_online_help_info(online_help_token) %> - - -