Commit Graph

83 Commits

Author SHA1 Message Date
Awais Jibran
4bc5ded768 Make studio case-insensitive for course keys for creating courses.
ECOM-4890
2016-08-10 14:34:35 +05:00
Syed Hassan Raza
79df545606 Mongo courses wrong course_key restriction 2016-07-25 14:41:31 +05:00
Brian Wilson
a36aa68fd7 Add new export_olx management command.
This moves the functionality of the 'export_course'  management command from lms/djangoapps/courseware
over to the Studio codebase.  This reflects its use going forward to be run with cms settings, to
export the content of the Studio modulestore instead of the LMS modulestore.  The management
command is used by an analytics workflow to output course content for researchers.
2016-05-26 17:26:59 -04:00
Calen Pennington
853bfe7a36 Add a TestCase mixin for enabling caches in tests
By default, disable all caching in tests, to preserve test independence.
In order to enable caching, inherit from CacheSetupMixin, and specify
which cache configuration is needed.

[EV-32]
2016-05-04 14:51:30 -04:00
Calen Pennington
18e1610043 Remove the create_user argument to setUp.
Instead, use a class attribute to define test behavior. This allows for
easier addition of new mixins over time.
2016-05-04 11:35:55 -04:00
John Eskew
8a9845c26e Remove ModuleStoreEnum.Type.xml 2016-04-12 11:53:51 -04:00
Ned Batchelder
2e1238b83e Remove unused imports 2016-04-08 11:23:05 -04:00
John Eskew
80ac3fcca2 Remove the concept of having more than one course export format tagged. 2016-03-01 12:59:59 -05:00
Feanil Patel
a4006c8604 Add another test and fix existing tests. 2015-12-10 11:12:53 -05:00
Feanil Patel
07f015bb57 Fix the management command. 2015-12-10 08:29:33 -05:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05:00
Kevin Falcone
24d72883b2 Merge pull request #10684 from edx/jibsheet/force_publish-arg-parsing
Jibsheet/force publish arg parsing
2015-11-20 11:00:31 -05:00
Kevin Falcone
149df9b22f Django 1.8 disallows access to args[]
https://docs.djangoproject.com/en/1.8/howto/custom-management-commands/
You need to declare and do proper argument parsing.  --commit is also
more natural than a bare 'commit' on the end of a command.

Switch from calling handle() directly to call_command().
call_command() simulates using the management command so is a better
test of the command line interface.
2015-11-19 21:39:53 -05:00
Kevin Falcone
daf4db8647 Update --commit flag so you don't have to say --commit=commit
With the 1.8 upgrade, we stopped using 'manage.py cms command commit'
and switched to --commit because we no longer directly access args[]
https://docs.djangoproject.com/en/1.8/howto/custom-management-commands/

When this command was updated, it was switched to --commit=commit, but
using store_true allows a much more natural --commit syntax.
2015-11-19 15:26:28 -05:00
Usman Khalid
6cb62f2697 Rebase upgrade Django to v1.8.5
Please note that this is a squshed commit and the work of:
Symbolist, macdiesel, nedbat, doctoryes, muzaffaryousaf and muhammad-ammar
2015-11-10 15:00:19 -05:00
Mushtaq Ali
11741f118f 'force_publish' command for publishing a course forcefully by making the published branch point to the same structure as the draft branch. add force_publish functionality to split courses. 2015-10-01 15:46:37 +05:00
Adam Palay
8aa23de55a add ability to delete published orphans from courses (PLAT-832)
fix quality violations

create child parent mapping to avoid potential performance hit when deleting items
2015-09-17 11:52:19 -04:00
Adam Palay
8834bbad90 delete_item should not delete any child that has a parent we do not intend to delete 2015-09-17 11:52:18 -04:00
Adam Palay
8dd95a8825 add test for fix_not_found
(PLAT-835)
(TNL-844)
2015-09-15 18:03:53 -04:00
Marko Jevtic
080a44b663 (SOL-1105) Requirement for enabling search in devstack 2015-09-04 10:50:40 +00:00
Kevin Falcone
e3c66f55e0 Optimize memory and CPU usage.
The print_out_all_courses() routine consumes a ton of memory (2G and
causes noticable mongo usage spikes).  This actually causes other
processes on production boxes to be memory starved and killed
(such as worker children on edge when this was run recently).

The behavior of this script on production is
* Print several hundred courses
* Ask if you want to delete the one you specified
* print several hundred courses minus one
On a sandbox with 5 courses, you could tell by eye that 1 is gone, but
not in production (or even in stage).

The original PLAT-619 ticket for this suggested printing a course
listing on error, but instead it always printed the course listing.
Even in the error case, hundreds of course ids is confusing and obscures
the error message saying that your course_id is invalid.

You should be getting the course id from the UI or from ./manage.py lms
dump_course_ids, not by searching a list.

Adjusted the test accordingly

Remove get_courses_keys
2015-08-31 11:28:26 -04:00
Ned Batchelder
2a0259095d Change imports from path to use the stablest name.
The old line:

    from path import path

produced pylint errors because of the baroque way that path.py defined
"path".  We tried to get them to change how they defined it, but they
deleted the name instead: https://github.com/jaraco/path.py/issues/102

(Jason then changed his mind, but this is a better way to use path.py,
it avoids the pylint error at least.)
2015-08-27 12:59:25 -04:00
Bill DeRusha
973314de7b Add basic elasticsearch search for teams
TNL-3014

Add tests for search

Add text_search to TeamsListView

Add reindex command line tool for course teams

Add Search Pagination and update comments

Move paginate_search_results to common library
2015-08-24 09:22:06 -04:00
Jesse Zoldak
51f058ad45 Fix library index test 2015-07-24 13:57:52 -04:00
Max Rothman
c97314413b Merge branch 'release' into release-merge-test
Conflicts:
	lms/djangoapps/commerce/urls.py
	lms/djangoapps/commerce/views.py
2015-07-17 17:42:03 -04:00
vkaracic
ff6afaf483 Custom error messages for delete course command
This is a fix for
https://openedx.atlassian.net/browse/PLAT-619
added custom CommandError messages for invalid syntax and
invalid course keys.
2015-07-14 15:28:01 +00:00
Adam Palay
213dc70d1e update to course import (TNL-2270) 2015-07-13 14:17:26 -04:00
vkaracic
87fb431be4 Custom error message for export course command
This is a fix for
https://openedx.atlassian.net/browse/PLAT-324
added custom CommandError messages for invalid course key.
2015-07-09 11:57:53 +00:00
Awais Jibran
3e6670d1a4 PLAT-643
Fixed cms course export
2015-06-09 11:19:46 +05:00
E. Kolpakov
3b348b7d3f Tests for reindex library management command 2015-04-17 12:20:31 +03:00
Ned Batchelder
81d17c516e Fix or remove tearDown methods that don't use super.
Update edx-lint to the version that checks if tearDown uses super.

Convert a number of tearDown methods into addCleanup.

Remove some unneeded tearDown methods: no need to call patch.stopall if
none of them were started with patch.start.
2015-03-17 15:14:52 -04:00
Jonathan Piacenti
8ad4d081fb Added library import and export via .tar.gz'd XML files. 2015-03-10 21:29:29 +00:00
Calen Pennington
6c0982b214 Force GitExportError messages to be unicode objects 2015-02-26 12:31:41 -05:00
cahrens
78a8fd807a If existing course is found on import, make sure dest_course_id is correct.
TNL-1362
2015-02-09 10:00:33 -05:00
cahrens
840b42a9f1 Specify old mongo modulestore.
Testing migration from old mongo to split.
2015-02-09 09:26:06 -05:00
cahrens
29e235213c Update for default store being split.
Note that now 2 courses can be imported where the only difference between them is run.
2015-02-09 09:26:04 -05:00
cahrens
e66e2eda20 Use old mongo store to create courses.
export_courses_to_output_path uses old mongo locator to create directory structure.
2015-02-09 09:26:04 -05:00
cahrens
4e6c532717 Force usage of the old mongo modulestore.
The way that assets are accessed (the usage of _id) seems specific to old mongo and fails with split.
2015-02-09 09:26:04 -05:00
Calen Pennington
03a05fd9d4 Always call super(..).setUp() from setUp 2015-02-04 09:09:14 -05:00
Braden MacDonald
025f046b04 Fix errors with libraries when old mongo is default (first) modulestore 2015-01-21 11:01:52 -08:00
Adam Palay
7837607ca9 only recusively delete modules if all their parents are marked for deletion (PLAT-333)
update '_delete_item' method for draft only modules and update delete_orphans management command

fix test_courseware which fails due to invalid future date
2015-01-05 14:54:17 -05:00
Christine Lytwynec
b9668acb32 fix git_export tests 2014-12-12 15:06:49 -05:00
Carson Gee
3816ac2ab0 Correct unresolved ugettext_lazy error strings in git_export command 2014-11-10 15:23:08 -05:00
muhammad-ammar
fcaa783e43 Unit Test Improvements
TE-489
2014-10-31 11:55:13 +00:00
Don Mitchell
2ac069a6ae Merge pull request #5653 from edx/dhm/PLAT-189
Add command line command to create course in either split or mongo
2014-10-22 09:41:55 -04:00
Don Mitchell
a4d13dc42c Add command line command to create course in either split or mongo
PLAT-189
2014-10-21 16:34:36 -04:00
Don Mitchell
f89a6944de Re-enable the unit tests and fix 2014-10-21 13:14:21 -04:00
Don Mitchell
4ca5012f3c Use split to test views 2014-09-29 11:25:55 -04:00
zubair-arbi
70e5044f47 update export_all_courses management command to count and list all failed export courses 2014-08-05 14:09:02 +05:00
Tim Babych
51a8dc2326 Make test_export_all_courses do not rely on the order in which files are returned by os.walk(). 2014-07-24 19:22:26 +03:00