Commit Graph

215 Commits

Author SHA1 Message Date
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
stv
b9ed4b6561 Fix Pylint: E1305(too-many-format-args) 2015-03-13 20:20:04 -07: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
Ned Batchelder
fb595c89f3 Fix a number of incorrect translation string uses
These were found by the new pylint checker I wrote! :)
2015-02-02 22:38:27 -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
ba102b4a66 fix quality violation 2015-01-12 13:52:15 -05:00
Don Mitchell
2bf3966716 Add a fix_not_found command to get rid
of dangling children references to blocks.
TNL-1141
2015-01-12 10:42:52 -05: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
John Eskew
94ea35d3be Export modulestore-stored asset metadata as XML to exported course.
Import asset metadata XML into modulestore.
Optimize importing many items of asset metadata by avoiding multiple
round-trips to MongoDB.
2014-12-16 15:42:38 -05:00
Christine Lytwynec
b9668acb32 fix git_export tests 2014-12-12 15:06:49 -05:00
stv
16afc89b9b Fix PEP8: E241 multiple spaces after ',' 2014-11-10 19:31:09 -08:00