Commit Graph

3250 Commits

Author SHA1 Message Date
Renzo Lucioni
863782d021 Merge pull request #12991 from edx/renzo/run-marketing-urls
Use course run marketing URLs from the catalog service on program detail page
2016-07-15 17:55:01 -04:00
Renzo Lucioni
a43c507a00 Use course run marketing URLs from the catalog service on program detail page
Part of ECOM-4566.
2016-07-15 16:12:10 -04:00
Awais Jibran
07467a5b68 Merge pull request #12989 from edx/aj/add-logging-for-allow-donation
Adding logging if course_id is not found in enrolled course modes.
2016-07-14 15:03:08 +05:00
Awais Jibran
dba8a51f59 Adding logging if course_id is not found in enrolled course modes. 2016-07-14 12:59:38 +05:00
Toby Lawrence
8ab62b5b99 [PERF-351] Account for settings.STATIC_URL in XBlock resource URLs when
rewriting them.

In PERF-341, we adjusted the static_replace middleware to try and
exclude static XBlock resource URLs from being interpreted as the marker
URLs used to signify course assets in course content.  Since they both
started with /static, this could, and did, cause issues where linking
directly to the assets of an XBlock within, say, one of its templates,
would lead to that link being rewritten and ultimately being incorrect.
The fix attempted to see if the link started with the prefix that all
static XBlock resource URLs start, and if so, it returned them
unmodified.

We incorrectly assumed that our testing captured all cases, and since
we're here, we know that this was wrong.  We weren't accounting for cases
when the URLs being generated had the STATIC_URL configuration value
prefixed -- https://example.com/static/xblock/.... -- and so our direct
check of seeing if such a URL started with "/static/xblock" would always
fail, leading to the erroneous rewriting and nonsensical output.

This fix checks if the link either starts with the prefix OR if it
starts with the STATIC_URL value and contains the prefix overall.  There
is a small overlap between the STATIC_URL and the prefix we check for,
so an inconsistency could arise down the line if we changed our
STATIC_URL to use a difference base directory, but our tests will at
least catch the issue now.
2016-07-12 22:33:11 -04:00
sanfordstudent
d13e456959 Merge pull request #12939 from edx/sstudent/TNL-4924
moving milestones/gating check to access.py
2016-07-11 16:21:53 -04:00
Douglas Hall
c38f2373c7 Add recipient key to Zendesk ticket creation API request payload 2016-07-11 14:56:44 -04:00
Sanford Student
5db58c0038 moving milestones check to access.py 2016-07-11 14:32:52 -04:00
Toby Lawrence
54fa8aebbc Merge pull request #12959 from edx/PERF-346
[PERF-346] Add a second version component to versioned course asset URLs
2016-07-11 09:32:09 -04:00
Toby Lawrence
f15533dc8f [PERF-346] Add a second version component to versioned course asset URLs
This version component reflects the "version" of the StaticContent
objects which we cache server-side.  If the layout of those objects
changes between releases, errors occur when loading them from cache.

By using a separate version value, which can be incremented on its own
after a change has been made to the StaticContent class, we can avoid
loading older cached content and in turn take advantage of these changes
faster, without needing to intervene operationally.
2016-07-10 19:20:20 -04:00
Christina Roberts
b6b792826c Merge pull request #12864 from edx/christina/disable-xblocks
Move disabling of XBlocks to new XBlockConfiguration model
2016-07-08 15:05:17 -04:00
Chris Rodriguez
4cf0e19af2 AC-520 fixing section ignores 2016-07-06 15:01:44 -04:00
cahrens
8980d1ab2d Switch disabling of XBlocks to XBlockConfiguration.
Also allows dynamic updates.
TNL-4668
2016-07-06 11:04:53 -04:00
Toby Lawrence
bc990d5d75 Merge pull request #12911 from edx/PERF-344
[PERF-344] Add versioning of cached course assets to allow graceful cache invalidation
2016-07-05 19:34:27 -04:00
Toby Lawrence
4e22affb24 [PERF-344] Add versioning of cached course assets to allow graceful cache invalidation
When releasing the versioned assets work, we stumbled on a problem with old pickled
versions of the StaticContent objects residing in cache, which triggered a bug in the
code. Not wanting to blow away all cached items, we ended up having to revert and add
in some backwards-compatible helper code to ease the transition.

With this, we'll now utilize the version argument that Django's caching interface
allows, in conjunction with a constant value that can be modified when breaking changes
are being made, to let us gracefully ignore older cached course assets.
2016-07-05 15:15:47 -04:00
Kevin Kim
0bf8fc4b44 Converts the dates on the dashboard, sidebar navigation, and important course dates to user specified time zone. 2016-07-05 17:45:13 +00:00
Matt Drayer
68312bdd2d Revert "Revert "saleem-latif/WL-328: Multi-Site Comprehensive Theming""
2. Update COMPREHNSIVE_THEME_DIR to COMPREHENSIVE_THEME_DIRS
3. Update paver commands to support multi theme dirs
4. Updating template loaders
5. Add ENABLE_COMPREHENSIVE_THEMING flag to enable or disable theming via settings
6. Update tests
7. Add backward compatibility for COMPREHEHNSIVE_THEME_DIR
2016-06-30 15:19:51 +05:00
Kevin Kim
d0be769f1d Merge pull request #12667 from edx/kkim/tz_pref_AS
Time Zone in Account Settings
2016-06-28 13:10:10 -04:00
PaulWattenberger
aa078dfda2 Pwattenberger/sailthru enroll (#12816)
* Partial changes for purchase tracking

* Continued changes for purchase tracking

* Clean up code quality issues

* Clean up code quality issues

* Responses to code review

* Fix code quality flaged issues

* Fix code quality flaged issues

* Fix code quality flaged issues

* Fix problem processing sailthru_content cookie
2016-06-28 11:13:21 -04:00
Kevin Kim
059985b9ec Added time zone field to user account settings, currently hidden behind a feature flag. 2016-06-28 14:33:56 +00:00
Tasawer Nawaz
e46764f5fc Merge pull request #12820 from edx/tasawer/bugfix/ecom-1730-make-student-enrollment-more-robust
Make user enrollment more robust
2016-06-28 12:47:23 +05:00
Sylvia Pearce
ce3da57546 Merge pull request #12783 from edx/sylvia/DOC-2361
Account registration and activation text string revisions
2016-06-27 15:01:36 -04:00
Sylvia Pearce
8b1f28d317 Account registration and activation text string revisions 2016-06-27 13:32:53 -04:00
Tasawer
3a984d3ca2 Make user enrollment more robust
ECOM-1730
2016-06-27 14:51:09 +00:00
Awais Jibran
4f10552add Merge pull request #12834 from edx/aj/ecom4775-change-bulk-enroll-mgm-cmd
Fix `bulk_change_enrollment` command to emit event
2016-06-27 17:33:18 +05:00
Awais Jibran
4267666711 Fix bulk_change_enrollment command to emit event
ECOM-4775
2016-06-27 11:43:01 +05:00
Douglas Hall
56055cc47e Merge branch 'release' into douglashall/merge_patch_2016_06_22_to_master 2016-06-24 11:07:43 -04:00
Toby Lawrence
959c97d74a Merge pull request #12821 from edx/PERF-341
[PERF-341] Don't rewrite XBlock resource URLs.
2016-06-23 15:33:07 -04:00
Toby Lawrence
faaa30c02d [PERF-341] Fix up to not rewrite XBlock resource URLs.
For XBlocks that used their static.public resources in the rendered
output -- for example, a link to a bundled image -- those URLs would be
treated as course assets using the '/static/' prefix trick, and thus,
rewritten.  These rewritten URLs don't work because they aren't course
assets.

When course content authors are creating their courses, we provide them
a special shorthand way of writing URLs that reference assets they have
uploaded to the course. If they uploaded a file called my-lil-pony.mp4,
and they wanted to provide a link to it when users view the course, they
would use /static/my-lil-pony.mp4. This special prefix -- /static/ --
signals to the static_replace middleware that it's a course asset and we
should write /static/my-lil-pony.mp4 to a URL that properly references
the asset based on the course ID, and things like the configured asset
CDN, etc.

Thus, the URL /static/my-lil-pony.mp4 gets turned into something like:

/assets/courseware/<md5hash>/asset-v1:edX+Demo+2016T1+type@asset+block/my-lil-pony.mp4

when viewed in the courseware.

Now, we also serve actual static assets from a prefix of /static/. This
is stuff like our JavaScript and CSS, and the JS/CSS/etc of
XBlocks/XModules. These paths look like:

/static/js/lms-main_vendor.46d6a8c02600.js

or

/static/xblock/resources/xmodule.vertical_block/public/js/vertical_student_view.43727a907769.js

Normally, these paths are caught by nginx, before they reach the LMS,
and are served straight from the filesystem. However, if you were to
have one of these paths in your course content, the static_replace
middleware would see the /static/ at the front and immediately think
it's a course asset, and would dutifully rewrite the URL to something
like:

/assets/courseware/<md5hash>/asset-v1:edX+Demo+2016T1+type@asset+block/static_xblock_resources_xmodule.vertical_block_public_js_vertical_student_view.43727a907769.js

which is not a course asset, and so it will always fail to load.

Long story short, I changed the static_replace middleware to
specifically check to see if the path being matched starts with
/static/xblock/, and if so, it keeps the original instead of rewriting
it.
2016-06-23 14:47:02 -04:00
Toby Lawrence
4795067ab1 Cautiously grab the content digest. 2016-06-23 13:42:00 -04:00
Toby Lawrence
bb29ad5f30 Revert "Revert "[PERF-325] Add versioned course asset URLs when canonicalizing asset paths.""
This reverts commit 9967b6fd58.
2016-06-23 13:27:15 -04:00
Christina Roberts
5b187d6f05 Merge pull request #12726 from edx/christina/deserialize_config_models
ConfigurationModel deserializer and management command
2016-06-23 08:45:14 -04:00
cahrens
0a6406e863 Add ConfigurationModel deserializer and management command.
TNL-4781, TNL-4782
2016-06-22 20:37:02 -04:00
Kevin Falcone
2c41d79c6d Merge pull request #12827 from edx/release
Release -> Master after revert
2016-06-22 15:37:27 -04:00
Douglas Hall
51d8580982 Fix default from email lookups 2016-06-22 13:54:57 -04:00
Michael Frey
ad45681a53 mjfrey/micro-settings-merge: Override base dictionary keys with microsite configuration keys
* mattdrayer: Add helpers.get_value test
* mattdrayer: Change to simpler implementation, per @douglashall
* mattdrayer: Address quality violations and test failures
2016-06-22 13:54:56 -04:00
Kevin Falcone
9967b6fd58 Revert "[PERF-325] Add versioned course asset URLs when canonicalizing asset paths."
We're seeing errors in NR from objects read out of the cache lacking the
'StaticContent' object has no attribute 'content_digest'
File "/edx/app/edxapp/edx-platform/common/djangoapps/contentserver/middleware.py",
    line 70, in process_request

This reverts commit 849ebc5f22.
2016-06-22 12:11:35 -04:00
mdinino
0a7c534d56 Merge pull request #12824 from edx/release
Release
2016-06-22 11:31:34 -04:00
Michael Frey
6efc461fb6 mjfrey/micro-settings-merge: Override base dictionary keys with microsite configuration keys
* mattdrayer: Add helpers.get_value test
* mattdrayer: Change to simpler implementation, per @douglashall
* mattdrayer: Address quality violations and test failures
2016-06-21 23:28:36 -04:00
Clinton Blackburn
03095643c6 Exposed admin for LogoutViewConfiguration
ECOM-4610
2016-06-21 14:13:16 -04:00
Renzo Lucioni
10ad29f33c Merge pull request #12757 from edx/renzo/link-to-detail
Link program listing cards to detail pages
2016-06-21 09:37:02 -04:00
Douglas Hall
132d576e97 Merge pull request #12799 from edx/ibrahimahmed443/override-language-selector
allow SHOW_LANGUAGE_SELECTOR to be overridden by MICROSITE_CONFIGURATION
2016-06-21 05:36:33 -04:00
Renzo Lucioni
9cd7c93223 Link program listing cards to detail pages
When program detail pages are enabled, cards on the listing page will link to their respective detail pages. Includes extensive cleanup of program listing tests. ECOM-4227.
2016-06-20 16:34:57 -04:00
Kyle Crawshaw
47401742a9 Added 'unusable_password' argument to 'manage_user' management command 2016-06-20 11:30:56 -04:00
Ibrahim
ee70ea99fc allow SHOW_LANGUAGE_SELECTOR to be overridden by MICROSITE_CONFIGURATION 2016-06-20 17:15:08 +05:00
Andy Armstrong
df399de186 Merge pull request #12781 from eduNEXT/fmo/coffee_to_js_tabs
Converting views/tabs.coffee in the cms to js
2016-06-17 12:56:49 -07:00
Ibrahim
603546a04a replace references to settings.PLATFORM_NAME in edx-platform with theme overrides 2016-06-17 18:33:19 +05:00
Felipe Montoya
43ea4e21bb Converting views/tabs.coffee in the cms to js
Linting the compiled file
2016-06-16 18:35:34 -07:00
David Ormsbee
5f1595910d Merge pull request #12784 from edx/release
Release to Master (2016-06-16 hotfix)
2016-06-16 18:50:18 -04:00
David Ormsbee
255267d42c Create forums config model for adjusting connection timeouts. 2016-06-16 13:50:13 -04:00