Commit Graph

68 Commits

Author SHA1 Message Date
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Giovanni Cimolin da Silva
ba4de2f933 Upgrade pymongo and fix issues
This commit upgrades the version of pymongo from 2.x to 3.x, removing usages to deprecated functions usage and fixing tests where necessary.

This version of pymongo supports MongoDB 2.x all the way up to 4.2, and this ensures that the platform will be able to run on a supported MongoDB version in the next release.
2019-12-09 15:43:56 -03:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
aarif
2e7349b04e python 3 fixes
removed pdb statement

quality fixes

quality fixes

test fixes

quality fixes

python 3 fixes

removed pdb statement

quality fixes

quality fixes

test fixes

quality fixes
2019-09-04 16:02:29 +05:00
aarif
61800c619f replaced StringIO imports with import from six
replaced cStringIO and StringIO imports with import from six

fixed StringIO imports

fixed StringIO imports

fixed XSS python-wrap warning
2019-08-08 00:09:16 +05:00
David Ormsbee
99aa4bfd88 Merge pull request #20099 from stvstnfrd/sysadmin/datatable
Cleanup datatable code in sysadmin user tab
2019-05-24 15:42:23 -04:00
Stu Young
c7f6ff14da incr-277 (#20582)
* run python modernize

* run isort

* remove escape import
2019-05-16 13:21:51 -04:00
David Ormsbee
0de369a4e3 Merge pull request #20095 from stvstnfrd/sysadmin/version
Remove unused version from footer
2019-04-25 10:23:42 -04:00
stv
06602b1922 Cleanup datatable code in sysadmin user tab
There is no significant impact to this change;
it's just some general cleanup that I made while cleaning up this file..

We don't need to store these as instance variables,
since we never use them as such.
And since we've already factored out the remaining code from this
initialization method, we can drop it entirely.
2019-04-02 10:21:07 -07:00
David Ormsbee
e712be7892 Merge pull request #20094 from stvstnfrd/sysadmin/user-courses
Remove course listing from user tab of sysadmin
2019-04-01 17:45:26 -04:00
stv
21f79de92f Cache courses list on sysadmin courses page
We were performing this lookup multiple times in the POST handler;
this should increase speed and memory use, which has been problematic
with this feature.
2019-03-29 14:57:04 -07:00
stv
f7b7963193 Remove unused version from footer
I'm not seeing this value ever initialized in `settings`,
or referenced anywhere else in platform, for that matter..
2019-03-29 10:38:18 -07:00
stv
f165f52d88 Remove course listing from user tab of sysadmin
I'm admittedly unclear why we decided to include a listing of _courses_
in the _users_ tab, when this listing is already available via the
_courses_ tab, which is where you'd expect to find it.

Particularly problematic here is the impact this has on page loads..
For instances with a large number of courses [1], pulling and rendering
adds a nontrivial amount of overhead and leads to longer load times.

In our case, this often leads to a page timeout. Since this is the main
landing page for the sysadmin dashboard, it presents the appearance that
the entire dashboard has crashed. In not being able to access the main
page, you can't access any of the other tabs via navigation, unless you
manually enter the URL :\

[1] ~750 courses, in one example
2019-03-29 10:06:19 -07:00
Mike Dikan
2c149ca6be Removing the Deprecated the 'external_auth' package in favor of 'third_party_auth' which is the current recommendation. 2019-03-02 16:06:46 -05:00
stv
25be88932c Handle out-of-memory exception on Sysadmin Courses
We've been running into OoM issues with this functionality while
executing on one of our smaller application servers.
- Sometimes this manifests by preventing the entire page from loading
  (exception during the GET).
- At others, it occurs using the `Delete course from site` functionality
  by breaking during the POST handler. This case is particularly
  frustrating because the course actually is deleted, but looks like it
  may not have been. Internally, this is because the 500 error occurs
  _after_ the course has been successfully deleted, though this is
  opaque to the end-user.

While this doesn't address the underlying memory issue,
it does at least allow the app to recover gracefully.
2019-02-27 11:21:53 -08:00
Matthew Piatetsky
6e81c84d8b fix unicode strings in lms/ part 1 2019-02-05 15:15:02 -05:00
Feanil Patel
4e13a1c2dd Revert "upgrade gunicorn 19.0 and make upgrade"
This reverts commit f6c215ae5b.
2018-10-31 15:01:00 -04:00
nadeemshahzad
f6c215ae5b upgrade gunicorn 19.0 and make upgrade 2018-10-30 10:42:58 +00:00
Amir Qayyum Khan
9124933925 Fixed issue where git logs aren't functioning
Use the course key as the primary key for storing coure import logs in
mongo, instead of the deprecated course key (this only applies to
courses imported via git_import.py).

No effort is made to migrate existing logs, since they are ephemeral.
2018-10-02 21:01:20 +05:00
Squirrel18
4f12be0894 Files changed by modernize and new gitignore type file. 2018-06-25 17:27:51 -05:00
Eric Fischer
b1316290dc Merge pull request #17738 from caesar2164/encode-sysadmin-staffing-profile-name-upstream
Encodes staff profile names as they can be unicode
2018-05-08 13:59:34 -04:00
Bill DeRusha
d1ed33ac23 Update and refactor random password generator 2018-04-13 14:17:21 -04:00
Giulio Gratta
0ffe133f68 Encodes staff profile names as they can be unicode 2018-03-20 14:28:16 -07:00
Jeremy Bowman
d3d6272d8f PLAT-1873 to_deprecated_string() cleanup part 1 2018-01-08 13:51:42 -05:00
cahrens
819a56fee3 Remove usages of deprecated SlashSeparatedCourseKey. 2017-08-14 11:01:00 -04:00
George Song
32deb6a66a Merge pull request #15258 from mreyk/teltek/bugfix/sysadmin-csv-download
Fix sysadmin csv download as unicode
2017-06-26 06:41:39 -07:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
mrey
c0b9603074 Fix sysadmin csv download as unicode 2017-06-07 15:41:37 +02:00
Nimisha Asthagiri
fd49f88e08 Moves external_auth from common to openedx/core. 2016-10-07 12:34:22 -04:00
Juanan Pereira
d92e37337a Change fix following pullrequestreview-619682 2016-09-19 22:40:48 +02:00
Juanan Pereira
8ad9bf4ff5 Avoid to use an unsupported '/' operand between two unicode strings 2016-09-15 23:15:41 +02:00
Ned Batchelder
8b1978ba6c Fix unused-import errors 2016-08-03 12:44:41 -04:00
Calen Pennington
cb2ac42426 Use separate git repos for separate TestCases 2016-05-16 13:29:16 -04:00
John Eskew
8a9845c26e Remove ModuleStoreEnum.Type.xml 2016-04-12 11:53:51 -04:00
John Eskew
f6cdcdf52c Remove sysadmin feature to import course from git into XML modulestore. 2016-03-01 11:00:25 -05:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -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
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
Sarina Canelake
39d3537410 Pylint logging-format-interpolation: Convert logging calls to use %s formatting 2015-07-13 17:33:29 -04:00
cewing
cb431ccb24 MIT CCX: Use CCX Keys: further revisions in response to code review
only require ccx-keys once

get_current_ccx will now expect a CourseKey instance as its argument, and will raise a value error if this expectation is not met.

document reason for local import

add special methods to pass attribute setting and deletion through to the wrapped modulestore

add __setattr__ and __delattr__ per code review, update __init__ to work with new methods

style change per code review

clean up context manager usage as recommended by code review

remove unused code and imports

convert modulestore type tests to use the `get_modulestore_type` api, remove unused imports

code quality: add docstrings

increase coverage for utils tests

fix bug found in testing.

increase test coverage on modulestore wrapper

code quality fixes

code-quality: ignore import error, but mark site for future consideration
2015-06-12 11:20:30 -07:00
cewing
ef4836503f MIT CCX: Use CCX Keys - responses to code review
remove references to middleware that were missed previously

use key apis rather than local implementation of key conversion.  remove local implementationa

remove spurious test for attribute

fix test setUp to avoid unneeded flattening

code quality fixes

add security check ensuring that the coach is coach for *this* CCX.

prevent ccx/deprecated course id problems

1.  do not allow ccx objects to be created if the course id is deprecated
2.  filter out any ccx memberships that involve deprecated course ids (in case there are bad ccxs in the database)

Fix test failures and errors arising from incorrect code path execution

Create context manager to handle unwrapping and restoring ccx values for the modulestore wrapper, employ it throughout modulestore wrapper implementation
2015-06-12 00:01:24 -07:00
Sarina Canelake
e53b9c83d9 Use Django 1.4 @ensure_csrf_cookie method PLAT-664 2015-06-06 08:48:36 -04:00
Sarina Canelake
1fb580e3ef Merge pull request #6938 from mitocw/bdero/gitlog-pagination
Add pagination to sysadmin dashboard Git import logs
2015-02-18 10:04:22 -05:00
Brandon DeRosier
367dc2573b Test multi-page gitlogs 2015-02-18 01:58:53 -05:00
Brandon DeRosier
805e2d6381 Add gitlog pagination with django Paginator 2015-02-09 17:49:56 -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
Carson Gee
7347e3bd4a Add missing sysadmin dashboard unicode cast 2015-01-27 11:22:45 -05:00
David Baumgold
36e77c7463 Fixing pep8 issues 2014-12-11 13:04:49 -05:00
Nimisha Asthagiri
f5abef88c2 LMS-2947 remove get_error_courses in Split.
LMS-2950 move delete_course to Mongo.
2014-07-09 21:10:12 -04:00
Nimisha Asthagiri
eecff6e0aa ModulestoreEnum class. 2014-06-27 14:37:35 -04:00