Commit Graph

12848 Commits

Author SHA1 Message Date
Dmitry Viskov
209ddc700d Difficulty selectbox in Studio (based on new XBlockAside functionality). Include:
- adaptation asides to be imported from the XML
- updating SplitMongo to handle XBlockAsides (CRUD operations)
- updating Studio to handle XBlockAsides handler calls
- updating xblock/core.js to properly init XBlockAsides JavaScript
2016-03-02 03:37:13 +03:00
Renzo Lucioni
d481768571 Merge pull request #11691 from edx/jeskew/shared_modulestore_test_case_conversion
WIP: Lots of Python unittest speedups
2016-03-01 16:50:27 -05:00
John Eskew
80ac3fcca2 Remove the concept of having more than one course export format tagged. 2016-03-01 12:59:59 -05:00
Muddasser
aaa3d972c6 Merge pull request #11707 from edx/muddasser/bokchoy-test_accepting_redirects
Check both url and title for the presence of code
2016-03-01 19:56:37 +05:00
Bill DeRusha
8b28790050 Merge pull request #11699 from edx/bderusha/django-bug-fix-mp
Monkey patch django.db.models.options for faster cache expiry
2016-03-01 09:25:01 -05:00
Ben Patterson
acae281f82 Merge pull request #11677 from edx/benp/tnl-4151-fix2
Ensuring page is loaded belongs in the page object.
2016-03-01 08:56:37 -05:00
clrux
650c95f9c3 Merge pull request #11501 from edx/clrux/ac-328-uxpl
AC-328 adding UXPL classnames to headings
2016-03-01 07:23:07 -05:00
Muddasser
724058a5ad Check both url and title for the presence of code 2016-03-01 16:03:25 +05:00
John Eskew
b777530dac Add SharedModuleStoreTestCase.setUpClassAndTestData() context manager
for use when a test class has a setUpTestData() method which uses
variables set up in the setUpClass() method.
Change base teams API test class to use the context manager.
2016-02-29 18:02:57 -05:00
Bill DeRusha
bec6971ae2 Monkey patch django.db.models.options for faster cache expiry 2016-02-29 17:37:17 -05:00
Chris Rodriguez
c619e1ec6b Adding UXPL classnames to headings 2016-02-29 15:43:17 -05:00
Kevin Falcone
b4ac588ce1 Update reset-test-db.sh for bok-choy
This now correctly migrates and dumps files for both databases.

Run lettuce migrations for both databases
2016-02-29 13:59:29 -05:00
Kevin Falcone
6f9a3911e5 Implement a BaseStudentModuleHistory
This abstract class contains most of the fields (aside from the id and
foreign key to StudentModule that the subclasses need to manage).  It
also provides a get_history method that abstracts searching across
multiple backends.

Move router code to openedx/core
We need to use it from cms and lms.
Ensure aws_migrate can be used for migrating both the lms and cms.

Handle queries directed to student_module_history vs default and the
extra queries generated by Django 1.8 (SAVEPOINTS, etc).

Additionally, flag testing classes as multi_db so that Django will
flush the non-default database between unit tests.

Further decouple the foreignkey relation between csm and csmhe

When calling StudentModule().delete() Django will try to delete CSMHE
objects, but naively does so in the database, not by consulting the
database router.

Instead, we disable django cascading deletes and listen for post_delete
signals and clean up CSMHE by hand.

Add feature flags for CSMHE
One to turn it on/off so we can control the deploy.
The other will control whether or not we read from two database tables
or one when searching.

Update tests to explicitly use this get_history method rather than
looking directly into StudentModuleHistory or
StudentModuleHistoryExtended.

Inform lettuce to avoid the coursewarehistoryextended app

Otherwise it fails when it can't find features/ in that app.

Add Pg support, this is not tested automatically.
2016-02-29 13:59:27 -05:00
Calen Pennington
dd90c55602 Create a new CSMHExtended table to hold our new data
This is a clone (copy) of CSMH's declaration and methods with an added
id of UnsignedBigInAutoField

We should be able to delete the save_history code, but needs testing.

Add error logging when capa failures happen

Put StudentModuleHistory into its own database

Bump out the primary key on CSMHE

This gives us a gap to backfill as needed.
Since the new table's pk is an unsigned bigint, even for people who don't
consolidate CSMH into CSMHE, the lost rows are unlikely to matter.

Remove StudentModuleHistory cleaner
2016-02-29 13:58:39 -05:00
Renzo Lucioni
e0407893ff Merge pull request #11603 from edx/usman/migrations-setup
Update migrations setup during Python unit tests
2016-02-29 13:54:30 -05:00
Ben Patterson
9e4f14f1be Revert "Registration: don't require terms of service if checkbox is hidden" 2016-02-29 12:08:09 -05:00
Usman Khalid
2586f09d7a Add option to disable migrations when running tests
By default, migrations are applied as they always have been. Exporting DISABLE_MIGRATIONS=1 or passing --disable-migrations to Paver commands will create tables directly from apps' models.
2016-02-29 11:47:32 -05:00
Omar Khan
23a0a6d41a Merge pull request #11644 from open-craft/omar/hide-tos
Registration: don't require terms of service if checkbox is hidden
2016-02-29 23:15:56 +07:00
Muddasser
bc2914eef4 Merge pull request #11655 from edx/muddasser-chrome-bokchoy-test_can_add_remove_allowance
Test should wait for ajax calls to finish before checking the changes
2016-02-29 18:46:08 +05:00
raeeschachar
f09e9f020c Merge pull request #11672 from edx/raees/chrome-bokchoy-test-cancelling-redirects
Fixed test_cancelling_redirects failing on Chrome
2016-02-29 11:28:25 +05:00
Ben Patterson
18e1aaa320 Ensuring page is loaded belongs in the page object.
TNL-4151 had previously been fixed to avoid a flaky condition; however,
that only passed the flaky condition to a later point in the
test. The proper fix is to ensure the page has loaded. Putting the
definition in this method will mean that the page will wait
to load with other functions, such as `DashboardPage.visit()`.
2016-02-27 12:37:20 -05:00
Ben Patterson
953014cfb2 Merge pull request #11604 from edx/benp/lettuce-browser
Dev user should be able to specify LETTUCE_BROWSER.
2016-02-27 09:14:11 -05:00
Carol Tong
049fbb18fd Merge pull request #11668 from edx/carol/DOC-2703
DOC-2703: replace instances of “courseware” in Advanced Settings help
2016-02-26 17:33:33 -05:00
David Ormsbee
13682e4694 Cache edxmako request context computation.
When capa problem rendering was moved to happen inline on courseware
page loads, we started executing many more Mako templates on sequences
with large numbers of thse problems. To help offset this, we're caching
the context generation (it showed up as the easiest piece of low
hanging fruit on profiles of the courseware index page).

[PERF-261]
2016-02-26 16:15:07 -05:00
David Ormsbee
9984bbc29a Make Capa problems do initial load without AJAX.
Before this commit, calling the student_view on a capa problem would
cause it to render an empty placeholder <div>, wait for the
DOMContentLoaded event to be fired, and then make AJAX requests to the
the problem_get handlers to retrieve the HTML it needed to render the
actual problems. This can significantly increase the end user load
times for pages, particularly when there are many problems in a
vertical.

This commit takes a very conservative approach and has the server side
add the rendered HTML into a new data-content attribute on the <div>
enclosing the problem. When Capa's JS initialization runs, it grabs
from that data-content attribute rather than reaching over the network
for an AJAX request.

I had attempted to make it somewhat smarter and push the rendered
problem straight into the document instead of relying on the
data-content attribute. This was faster, and should be our long term
goal. However, it caused odd bugs, particularly around MathJAX
rendering, and I never quite tracked the issue down. I'm still going
forward with these changes because it's significantly better than the
current situation that students have to deal with, and we can make the
JS more performant in a future iteration.

[PERF-261]
2016-02-26 16:15:07 -05:00
Carol Tong
cc0c577884 Replace instances of courseware in Advanced Settings help with "course" 2016-02-26 15:20:29 -05:00
Matt Drayer
890d1bfd66 Merge pull request #11505 from eduNEXT/fmo/condition_microsite_enable_pre
Use has_configuration_set() during microsite initialization
2016-02-26 14:26:26 -05:00
Felipe Montoya
2c7ddb1d15 Delegating the conditional to the has_configuration_Set method, which is overriden by the database backend, so the enable_pre_startup works well for both backends.
Adding tests

Fix quality issues
2016-02-26 12:11:44 -05:00
Braden MacDonald
cfa7cd3d87 Revert "Pass DOM element, not jQuery object to XBlock initialisation." 2016-02-26 09:06:13 -08:00
raeeschachar
b4cbc66d96 Fixed test_cancelling_redirects failing on Chrome 2016-02-26 21:12:32 +05:00
Ben Patterson
34e41449c7 Clean up based on feedback. 2016-02-26 09:26:04 -05:00
Ben Patterson
9513107857 Dev user should be able to specify LETTUCE_BROWSER. 2016-02-26 09:26:03 -05:00
Eric Fischer
97ac2845c1 Fix for LoginFailure.MultipleObjectsReturned in is_user_locked_out (replay)
The get_or_create function is vulnerable to race conditions in MySQL, which can
cause the model LoginFailure to, in some cases, have more than one row for the
same user, breaking the login for that user.

Addinf functionality to expect and clean the error by deleting extra rows (by
oldest lockout date), leaving just one entry and allowing the user to login.

Replayed and squashed by @efischer19, initially commited by @laq
2016-02-25 12:03:28 -05:00
John Eskew
e3ddb02cc7 Merge pull request #11586 from edx/jeskew/remove_all_request_dot_request
Remove all request.REQUEST usages.
2016-02-25 08:23:12 -05:00
Muddasser
1e8163e283 Test should wait for ajax calls to finish before checking the changes 2016-02-25 12:43:08 +05:00
Michael Frey
860dd1bd5a Merge pull request #11651 from edx/release
Release
2016-02-24 16:15:16 -05:00
Adam Palay
c63dcf0dfe render mathjax in svg by default (TNL-4145)
mathjax preview should be inline by default
2016-02-24 12:51:30 -05:00
Adam Palay
2cb48742b2 mark discussion deletion test as flaky 2016-02-24 12:51:09 -05:00
Michael Frey
f1ebee433f Only allow ecommerce checkout if user is also activated 2016-02-24 11:23:40 -05:00
Omar Khan
e461374973 Registration: don't require terms of service if checkbox is hidden 2016-02-24 16:18:32 +07:00
Awais Jibran
d114be732f Merge pull request #11514 from attiyaIshaque/ai/tnl4067-auto-register-course
User automatically registered to course.
2016-02-24 11:24:58 +05:00
Adam Palay
aaaba4708d add timeout to lettuce test to reduce flakiness 2016-02-23 12:40:49 -05:00
Michael Frey
90146d9ae0 Only allow ecommerce checkout if user is also activated 2016-02-23 10:11:14 -05:00
Ben Patterson
1ba360d987 Merge pull request #11629 from edx/benp/TNL-4151-flaky-test
Flag test as flaky. See TNL-4151.
2016-02-23 10:05:33 -05:00
Christine Lytwynec
0f66d852c2 Merge pull request #11581 from edx/clytwynec/ac-327
Sequence navigation tooltip mechanism updated
2016-02-23 09:28:32 -05:00
Your Name
b1751e70c3 User automatically registered to course. 2016-02-23 19:07:19 +05:00
Ben Patterson
a11ca6cd91 Merge pull request #11618 from edx/benp/library-test-flaky-fix
Ensure test waits for the library list to populate before continuing.
2016-02-23 08:51:22 -05:00
Ben Patterson
de45c0d36d Flag test as flaky. See TNL-4151. 2016-02-23 08:20:06 -05:00
Toby Lawrence
acf6c1d609 Merge pull request #11523 from edx/perf/speed-up-slow-user-role-ops
Don't blow away the role cache when updating.
2016-02-23 06:55:00 -05:00
Bound3R
b0b977ba7f missing change the url path to the sass variable 2016-02-22 15:30:53 -05:00