Commit Graph

30876 Commits

Author SHA1 Message Date
David Ormsbee
8718dc13ca Cache SplitMongo course structures in memcached.
This is primarily to reduce load on MongoDB, where we've lately
had performance problems that we suspect are caused by very
large course structures being evicted from MongoDB's cache. This
may potentially give us a path to better performance as well,
but that's not the goal of this commit.

Surprisingly, LZ4 seemed to actually run more slowly than zlib
for this. Possibly because of some overhead in the Python
bindings? GZip was also surprisingly slow given that it uses
zlib underneath (something like 5x slower).

Use separate cache backend for caching structures.

Abstract out course structure cache.

add datadog metrics for compressed course structure sizes

Since we're using a different cache background, we don't need to have a cache prefix

Use dummy cache backend for tests.

Fallback to default cache if course_structure_cache doesn't exist.
2015-06-22 23:21:19 -04:00
Andy Armstrong
18f69f3b35 Merge pull request #8536 from edx/diana/handle-hidden-tabs
Ensure that is_hidden does not affect equality checks.
2015-06-16 17:04:04 -04:00
Diana Huang
72a0d19531 Ensure that is_hidden does not affect equality checks. 2015-06-16 15:46:23 -04:00
Adam
5ceea7a0a9 Merge pull request #8512 from edx/merge-release-into-master
Merge release into master
2015-06-12 17:13:02 -04:00
Adam Palay
b199a72c62 Merge remote-tracking branch 'origin/release' into merge-release-into-master
Conflicts:
	cms/djangoapps/contentstore/views/course.py
2015-06-12 16:22:06 -04:00
Calen Pennington
83fce4d61f Merge pull request #8395 from jazkarta/ccx-custom-ids
MIT CCX: Use CCX Keys
2015-06-12 16:19:12 -04:00
Adam
21e338f743 Merge pull request #8506 from edx/diana/fix-tab-duplication
Prevent duplication of tabs with different names.
2015-06-12 16:16:35 -04:00
Ben Patterson
b4c4e818d7 Merge pull request #8493 from edx/benp/allow-for-flaky-jun2015
Make addCleanup idempotent.
2015-06-12 15:03:59 -04:00
Sarina Canelake
8af8d257c9 Merge pull request #8508 from edx/sarina/20150612-update-translations
Update translations (autogenerated message)
2015-06-12 15:03:30 -04:00
Sarina Canelake
e0dbb0758c Update translations (autogenerated message) 2015-06-12 14:56:59 -04:00
cewing
cb431ccb24 MIT CCX: Use CCX Keys: further revisions in response to code review
only require ccx-keys once

get_current_ccx will now expect a CourseKey instance as its argument, and will raise a value error if this expectation is not met.

document reason for local import

add special methods to pass attribute setting and deletion through to the wrapped modulestore

add __setattr__ and __delattr__ per code review, update __init__ to work with new methods

style change per code review

clean up context manager usage as recommended by code review

remove unused code and imports

convert modulestore type tests to use the `get_modulestore_type` api, remove unused imports

code quality: add docstrings

increase coverage for utils tests

fix bug found in testing.

increase test coverage on modulestore wrapper

code quality fixes

code-quality: ignore import error, but mark site for future consideration
2015-06-12 11:20:30 -07:00
Diana Huang
a41d9a5491 Prevent duplication of tabs with different names. 2015-06-12 13:39:51 -04:00
Will Daly
7a3c1f04dd Merge pull request #8502 from edx/alasdair/ECOM-1724-footer-a11y-update
ECOM-1724 a11y footer updates
2015-06-12 13:22:11 -04:00
Calen Pennington
c1ace04483 Merge pull request #8391 from edx/alawibaba/plat5892
First draft.
2015-06-12 12:39:38 -04:00
Calen Pennington
b9f5eef4ae Log an exception before swallowing it in a KeyValueMultiSaveError 2015-06-12 12:37:49 -04:00
Calen Pennington
0f6ef44476 Don't pass in a user object to DjangoUserStateClient 2015-06-12 12:37:49 -04:00
Ali Mohammad
69772ef20e Convert access to StudentModuleHistory to use the UserStateClient API. 2015-06-12 12:37:34 -04:00
Ben Patterson
4b6e2f4880 Merge pull request #8471 from edx/benp/flaky-cms-component-jun2015
Fix flaky lettuce test. TNL-1452
2015-06-12 12:28:38 -04:00
Usman Khalid
eb81e52dc4 Merge pull request #8477 from edx/usman/plat676-bulk_operations-2
In bulk_operations() exit, emit signals at the end.
2015-06-12 21:08:24 +05:00
Will Daly
2fd68dc983 ECOM-1724 a11y footer updates
* Add action text to social media links.
* Make the alt text for mobile links more descriptive.
2015-06-12 11:34:39 -04:00
Nimisha Asthagiri
1a15bd7bed Merge pull request #8209 from edx/mobile/xblock-support
Course Blocks + Navigation API (feature flagged) for Mobile
2015-06-12 11:25:23 -04:00
David Ormsbee
3ec2206410 Merge pull request #8501 from mcgachey/lti-auth-fix
[LTI Provider] Basic LTI authentication
2015-06-12 11:11:32 -04:00
Renzo Lucioni
d61cee95a8 Merge pull request #8500 from edx/renzo/commerce-cleanup
Avoid POSTing unnecessary payment processor parameter
2015-06-12 11:09:59 -04:00
Renzo Lucioni
3de0af1616 Merge pull request #8498 from edx/release
Release
2015-06-12 11:09:16 -04:00
Ben Patterson
d96b581485 Fix flaky lettuce test. TNL-1452 2015-06-12 10:32:28 -04:00
Ben Patterson
04e764d13d Make addCleanup idempotent.
Sometimes this file does not exist depending on when a test failed. Remove it gracefully.
2015-06-12 10:28:06 -04:00
Phil McGachey
c3106bc4bd This change cleans up the work in progress request at #8176
This is an initial authentication implementation that allows LTI users to
log in transparently to edX. The behavior is driven by pilot users at
Harvard; this was the most requested feature.

The patch creates a new database model that maps users' LTI identifiers
to newly-created edX accounts. If an LTI launch comes in with a user_id
field that is not in the database, a new edX account is created with a
random user name and password. This account is then stored in the
database, so that it is permanently associated with the LTI user ID.

This patch takes a simplistic approach to session management. If a user
is logged in with a different account when they perform an LTI launch,
they will be logged out and then re-logged in using their LTI account.

In order to keep the patch simple, I have split out some refactoring
that needs to be done into a separate branch that I'll post once this
has been merged. Since we no longer redirect to the login page, we don't
need to maintain two separate LTI endpoints (one for the LTI launch and
one for authenticated users), or deal with the session management that
requires. There are also multiple fetches of the LtiConsumer object
(one in the view, one in the signature validation) that the later
patch will consolidate into one.

This branch fixes the previous conflicts with the test refactoring
carried out in PR 8240.
2015-06-12 10:21:48 -04:00
Waheed Ahmed
36d321c4e3 Merge pull request #8496 from edx/waheed/plat674-improve-test-with-ddt
Specified number of mongo and split calls in xblock outline handler test with ddt.
2015-06-12 19:14:41 +05:00
Shrhawk
04eff80065 Merge pull request #8495 from edx/shr/bug/tnl-2122-fix-show-enable-import-from-youtube-transcript-button
add name param check_transcripts
2015-06-12 19:07:41 +05:00
Jim Abramson
79a63bbe0f Merge pull request #8488 from edx/patch/2015-06-11
Patch/2015 06 11
2015-06-12 09:38:51 -04:00
Nimisha Asthagiri
89ea8b31c6 MA-725 responsive_ui indication on responsive xBlocks. 2015-06-12 09:27:21 -04:00
Nimisha Asthagiri
4921ec48c8 MA-792 Course Blocks and Navigation API (user-specific) 2015-06-12 09:27:20 -04:00
Nimisha Asthagiri
037ef3be77 Video module support for student_view_json. 2015-06-12 09:27:17 -04:00
Nimisha Asthagiri
65e330e8b5 Make RequestCache reusable 2015-06-12 09:27:16 -04:00
Waheed Ahmed
4323109cad Specified number of mongo and split calls in xblock outline handler test with ddt.
PLAT-674
2015-06-12 17:17:59 +05:00
Syed Hassan Raza
c9778a5f57 add name param check_transcripts 2015-06-12 16:34:45 +05:00
zubair-arbi
f73b68d6f1 Merge pull request #8382 from edx/zub/story/ecom-1591-studio-display-credit-eligibility-table
show credit eligibility requirements in studio
2015-06-12 15:41:58 +05:00
zubair-arbi
3204c8b3fe show credit eligibility requirements in studio
ECOM-1591
2015-06-12 13:19:57 +05:00
cewing
ef4836503f MIT CCX: Use CCX Keys - responses to code review
remove references to middleware that were missed previously

use key apis rather than local implementation of key conversion.  remove local implementationa

remove spurious test for attribute

fix test setUp to avoid unneeded flattening

code quality fixes

add security check ensuring that the coach is coach for *this* CCX.

prevent ccx/deprecated course id problems

1.  do not allow ccx objects to be created if the course id is deprecated
2.  filter out any ccx memberships that involve deprecated course ids (in case there are bad ccxs in the database)

Fix test failures and errors arising from incorrect code path execution

Create context manager to handle unwrapping and restoring ccx values for the modulestore wrapper, employ it throughout modulestore wrapper implementation
2015-06-12 00:01:24 -07:00
cewing
6a0c9aee9d MIT CCX: Use CCX Keys
Implement the use of CCX opaque keys throughout the ccx code base

include the new custom ccx id package in the github checkouts list

update the coach dashboard wrapper to get CCX information from the incoming course_id, if possible

update function signatures for all view functions to expect CCX as passed by the dashboard wrapper (default to None), remove calls to get_ccx_for_coach as the ccx is passed in.

update reverse calls in python view code to use a CCXLocator for the URL instead of a CourseLocator

use CCXLocator where necessary

use course id to find ccx, instead of thread local

remove unused method and related tests

use course id for getting ccx

provide course id to the get_current_ccx method

ensure the course id passed in is a CourseKey instance of some type whether it starts out as a string or not

use the provided block to figure out what the course_id should be, then get the ccx for that

redirect to ccx dashboard using coach ccx if no ccx is passed in

update student dashboard listing for ccx to build an appropriate url from a CCXLocator, not from the course locator.

refactor building the ccx locator so we don't have to do it repeatedly

begin test refactoring after ccx_keys introduction

Ensure that when access checking happens, the course_locator form of a ccx locator is used.  This ensures that the access check happens against the course and it is not necesarry to duplicate the entire access control structure for the course.

pick up api change in ccx-keys

create and conditionally use a wrapper for the mixed modulestore returned by xmodule.modulestore.django.modulestore

the wrapper will strip and restore ccx values from CourseKey and UsageKey objects

fix return values on a few methods

remove unused symbol

pull updated ccx-keys package

set course_id on the caching descriptor system to avoid api incompatibilities in some subsystems

use ccx.course instead of self.course

fix get method to find course keys from blocks that are not themselves keys but have a location attribute (which will be a key)

if an item coming out of the db has children, restore the ccx to them as well

if the block passed in has a CCX key, unwrap that before we try to look up the override, otherwise it will never be found.

pick up a change in the ccx keys package that allows for stripping CCX identity from a usage key

begin writing tests to cover this modulestore wrapper

remove the switch_pocs view, the url pattern for it, and the tests that covered it

remove the ccx context and the middleware responsible for setting the current CCX.  These are no longer needed

all dashboard views should raise 404 if a ccx is not provided by the coach_dashboard decorator

code quality

prevent errors resulting from trying to `get` a ccx based on non-unique criteria.

remove obsolete usage of ACTIVE_CCX_KEY

fix setUp method for grading tests to properly create grades for the ccx rather than for the course.

clean up reverse calls

code quality

adding docstrings to clarify purpose of this patch

fix bug in getting ccx for coach

fix grading views to properly fetch a ccx-ified course so that grades for that version will be calculated

fix small errors in modulestore implementation

fix errant merge marker

update call to get_current_ccx after key refactoring merged with tab changes
2015-06-12 00:01:24 -07:00
Sarina Canelake
233aba74a3 Merge pull request #8222 from Stanford-Online/giulio/font-awesome-icon-names
BUGFIX: CCX Font Awesome icon name fixes
2015-06-12 00:02:36 -04:00
Ben Patterson
32ab544b77 Merge pull request #8494 from edx/revert-8347-mcgachey-lti-authentication
Revert "[LTI Provider] Basic LTI authentication"
2015-06-11 21:12:05 -04:00
Ben Patterson
f8f2e2121a Revert "[LTI Provider] Basic LTI authentication" 2015-06-11 21:06:02 -04:00
David Ormsbee
fb491bf265 Merge pull request #8347 from mcgachey/mcgachey-lti-authentication
[LTI Provider] Basic LTI authentication
2015-06-11 19:51:57 -04:00
Renzo Lucioni
2db79556bd Avoid POSTing unnecessary payment processor parameter 2015-06-11 18:24:25 -04:00
Will Daly
9d60b0e07a Merge pull request #8444 from edx/will/credit-provider-part-two
Credit provider integration Python API (Part 2 of 3)
2015-06-11 17:38:42 -04:00
Kelketek
a61b9106ef Merge pull request #8312 from open-craft/kelketek/fix-flaky-lib-test
(SOL-618) Fix for flaky library users studio test
2015-06-11 15:25:35 -05:00
Christopher Lee
203e512d4e Merge pull request #8487 from edx/clee/discussion-api-delete-comment-rebased
Clee/discussion api delete comment rebased
2015-06-11 16:01:28 -04:00
Usman Khalid
5ab2e86988 In bulk_operations() exit, emit signals at the end.
PLAT-676
2015-06-11 23:57:48 +05:00
christopher lee
205c735865 Added comment deletion in the discussion API 2015-06-11 14:09:02 -04:00