Commit Graph

13498 Commits

Author SHA1 Message Date
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
Ayub khan
be7be407cb Merge pull request #11478 from Ayub-Khan/ayubkhan/ECOM-3603
Fixed progress exception for credit courses
2016-03-02 01:10:17 +05:00
Renzo Lucioni
b02d1c1205 Merge pull request #11721 from edx/renzo/comment-client-test-speedup
Speed up comment client tests
2016-03-01 14:51:02 -05:00
Renzo Lucioni
1f0e61baa9 Speed up comment client tests
Also accelerates forums UnicodeTestCases
2016-03-01 14:41:52 -05:00
Kevin Falcone
327cdafccf Merge pull request #11715 from edx/jibsheet/aws_migrate-ignore-read-replica
Don't hardcode student_module_history
2016-03-01 13:12:54 -05:00
John Eskew
7bde238b3f Merge pull request #11711 from edx/jeskew/more_unittest_speedup
Use SharedModuleStoreTestCase in the courseware navigation tests for speedup.
2016-03-01 12:50:53 -05:00
Renzo Lucioni
cd84a9e77e Merge pull request #11714 from edx/renzo/sysadmin-xml
Whittling away at XML modulestore code
2016-03-01 12:47:00 -05:00
Bill DeRusha
95007a83b1 Merge pull request #11713 from edx/bderusha/git-add-speedup
Add SharedModuleTestCase to git_import tests
2016-03-01 12:13:51 -05:00
Kevin Falcone
72b4cf377b Don't hardcode student_module_history
aws_migrate may be used on boxes where that DB does not yet exist.
2016-03-01 11:56:11 -05:00
John Eskew
72ce55c8a2 Convert to SharedModuleStoreTestCase 2016-03-01 11:09:18 -05:00
Renzo Lucioni
32a29f4f26 Convert SysadminBaseTestCase to SharedModuleStoreTestCase 2016-03-01 11:02:01 -05:00
John Eskew
f6cdcdf52c Remove sysadmin feature to import course from git into XML modulestore. 2016-03-01 11:00:25 -05:00
Bill DeRusha
d8404ba477 Add SharedModuleTestCase to git_import tests 2016-03-01 10:54:54 -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
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
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
John Eskew
65e26e3ec2 Move user/admin model creation to class level.
Wrap whole test with several publish/unpublish in same bulk_op.
2016-02-29 17:20:08 -05:00
Chris Rodriguez
c619e1ec6b Adding UXPL classnames to headings 2016-02-29 15:43:17 -05:00
John Eskew
14ad8cd78f SharedModuleStoreTestCase conversion for speedup. 2016-02-29 14:41:17 -05:00
John Eskew
bd4cc57bad Convert to SharedModuleStoreTestCase 2016-02-29 14:04:24 -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
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
Ayub-khan
4b81f0bb3c Fix progress exception for credit courses and add unit test. 2016-02-29 15:42:20 +05:00
Awais Jibran
03585a4842 Merge pull request #11657 from edx/aj/ECOM3688-add-log-in-cert-gen
Improve logging in certification generation
2016-02-29 14:47:34 +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
Peter Pinch
3be2737f5b Merge pull request #11356 from mitocw/gdm_ccx_course_modules_#170
Added extra field to CCX model for Course Models
2016-02-25 13:45:15 -05:00
sanfordstudent
c518543cbd Merge pull request #11602 from edx/sstudent/MA-1919
MA-1919 making mobile handout links accommodate jump to id's and cour…
2016-02-25 11:07:58 -05:00
Giovanni Di Milia
0c637cdca9 Added extra field to CCX model for Course Models
REST APIs modified
2016-02-25 10:27:39 -05:00
Sanford Student
75a26b62b5 MA-1919 making mobile handout links accommodate jump to id's and course links 2016-02-25 10:20:13 -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
Awais Jibran
d18f3f6c98 Improve logging in cert gen.
ECOM-3688
2016-02-25 14:57:31 +05:00
M. Rehan
db5fe13070 Merge pull request #11624 from edx/mrehan/topic-not-found-tnl-4136
TNL-4136 fix topic detail endpoint's url to support alphanumeric and period characters in topic ID
2016-02-25 13:13:26 +05:00
Brian Beggs
0251e8e15a Merge pull request #11545 from mitocw/feature/aq/support_mutiple_instances_ccx_mitocw#175
Allow multiple instances of ccx
2016-02-24 21:22:29 -05:00
Ned Batchelder
71e0ce7a0b Merge pull request #11652 from edx/ned/yaml-safe-load
Use yaml.safe_load, since we have no need for the greater power of .load
2016-02-24 20:06:43 -05:00
Michael Frey
860dd1bd5a Merge pull request #11651 from edx/release
Release
2016-02-24 16:15:16 -05:00
Ned Batchelder
a9ab395d43 Use yaml.safe_load, since we have no need for the greater power of .load 2016-02-24 15:36:04 -05:00
Ned Batchelder
ca4729c221 Merge pull request #11650 from edx/ned/update-translations
Update translations (autogenerated message)
2016-02-24 14:32:43 -05:00
sanfordstudent
a7d6b13b7e Merge pull request #11637 from edx/sstudent/MA-1038-permanent-fix
MA-1038
2016-02-24 14:01:03 -05:00
Ned Batchelder
d8fbdafd90 Update translations (autogenerated message) 2016-02-24 17:59:51 +00: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
Michael Frey
f1ebee433f Only allow ecommerce checkout if user is also activated 2016-02-24 11:23:40 -05:00
Michael Katz
fd065c9e8c Merge pull request #11643 from edx/release
Release 2016-02-24
2016-02-24 11:16:16 -05:00
Giovanni Di Milia
7683eadcaf Modified permission classes for CCX REST APIs
Modified how the per object permissions are enforced in the CCX REST APIs
2016-02-24 08:40:07 -05:00
Bill DeRusha
85df4eee4c Merge pull request #11630 from edx/bderusha/soft-sec-id
Do not send initial verification photo_id if new photo_id provided
2016-02-23 14:47:29 -05:00
Sanford Student
3313b755fa MA-1038 2016-02-23 14:20:51 -05:00
Bill DeRusha
beacf3c93a Only return unexpired initial verifications. 2016-02-23 13:38:48 -05:00