Commit Graph

332 Commits

Author SHA1 Message Date
cahrens
819a56fee3 Remove usages of deprecated SlashSeparatedCourseKey. 2017-08-14 11:01:00 -04:00
Christina Roberts
4f5b033c27 Merge pull request #15750 from edx/christina/slash-the-slash
Remove SlashSeparatedCourseKey from tests
2017-08-07 15:53:08 -04:00
cahrens
6f71706b17 Remove SlashSeparatedCourseKey from tests. 2017-08-07 14:49:30 -04:00
Steven Zheng
d04c03e67c Add advanced settings to generate_courses command 2017-08-04 15:28:59 -04:00
Steven Zheng
e340b2431e Add django management command to create course from json 2017-07-10 16:02:20 -04:00
noraiz-anwar
bac223acad Enhance delete_course management command 2017-06-12 17:51:54 +05:00
Andy Armstrong
ebb04ca396 Reorder Studio imports using isort 2017-05-30 17:00:50 -04:00
Ned Batchelder
4a568476fd Remove a number of unneeded super()-delegation methods 2017-04-27 14:12:56 -04:00
Kevin Falcone
2902c3b968 It's always bugged me that the help strings were nonsensical
While here, the one-line docstring also bothered me.
2017-01-04 16:51:34 -05:00
stv
8a27ba05e3 Remove outdated comment
The `commit` argument had already been removed from code [1][2][3],
prompted by the django18 upgrade.

[1] https://github.com/edx/edx-platform/pull/10927
[2] 07f015bb57
[3] a4006c8604
2016-09-20 12:21:52 -07:00
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
Calen Pennington
dffbc69a3c Merge pull request #11329 from cpennington/fix-cert-type-names
Fix the help text for cert_name_short and cert_name_long
2016-02-02 11:19:09 -05:00
Calen Pennington
4191ea0013 Add a management command for cleaning up cert_name_short and cert_name_long 2016-02-01 17:02:14 -05:00
Adam Palay
9981c86718 remove old management commands 2016-01-20 14:11:54 -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
Matt Drayer
1eab25f292 mattdrayer/increment-edx-lint: Bump to v0.2.9 and address pylint/pep8 violations
* Fix paver violations to stablize edx-lint update
* Parens, Line2Long
* Fix missing docstrings
* Fix PEP8 issues
* Address PR feedback (thanks @nedbat!)
2015-10-19 10:11:59 -04: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
Vedran Karačić
f9cb092488 Merge pull request #8852 from edx/vkaracic/PLAT-324
PLAT-324: Custom error message for export course command
2015-07-14 09:15:53 +02:00
Sarina Canelake
8283c07e32 Remove superfluous-parens pylint violations
Skipped 'print' statement violations, as print() is Py3k syntax.
2015-07-13 17:33:28 -04: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
E. Kolpakov
4d3750a526 Pylint fixes 2015-04-15 13:32:32 +03:00
E. Kolpakov
0b2b9fe2e8 Added management command to manually reindex libraries 2015-04-15 13:01:05 +03:00
Ned Batchelder
a84735057d Move common/lib/*.py to openedx/core/lib
This makes these files importable, and puts them into the new best guess
as to where files should live.
2015-03-23 12:40:24 -04: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