Commit Graph

47 Commits

Author SHA1 Message Date
M. Zulqarnain
41e5403f4e BOM-2369 (D): pyupgrade on contentstore/views (#26767)
* pyupgrade on contentstore/views

* Apply suggestions from code review

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-03-05 14:55:14 +05:00
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +05:00
Kyle McCormick
151bd13666 Use full names for common.djangoapps imports; warn when using old style (#25477)
* Generate common/djangoapps import shims for LMS
* Generate common/djangoapps import shims for Studio
* Stop appending project root to sys.path
* Stop appending common/djangoapps to sys.path
* Import from common.djangoapps.course_action_state instead of course_action_state
* Import from common.djangoapps.course_modes instead of course_modes
* Import from common.djangoapps.database_fixups instead of database_fixups
* Import from common.djangoapps.edxmako instead of edxmako
* Import from common.djangoapps.entitlements instead of entitlements
* Import from common.djangoapps.pipline_mako instead of pipeline_mako
* Import from common.djangoapps.static_replace instead of static_replace
* Import from common.djangoapps.student instead of student
* Import from common.djangoapps.terrain instead of terrain
* Import from common.djangoapps.third_party_auth instead of third_party_auth
* Import from common.djangoapps.track instead of track
* Import from common.djangoapps.util instead of util
* Import from common.djangoapps.xblock_django instead of xblock_django
* Add empty common/djangoapps/__init__.py to fix pytest collection
* Fix pylint formatting violations
* Exclude import_shims/ directory tree from linting
2020-11-10 07:02:01 -05:00
Régis Behmo
4586002956 Import waffle classes from edx_toggles instead of waffle_utils
Those classes were ported to edx_toggles. The imports remain in
waffle_utils.__init__ for backward compatibility.
2020-11-03 19:25:37 +01:00
Régis Behmo
87b5463d42 Use SettingDictToggle to document ENTRANCE_EXAMS 2020-10-29 11:11:02 +01:00
Kyle McCormick
a3deb6e317 Sort imports in cms/
Command: `isort --recursive cms/`
2020-10-19 09:34:31 -04:00
Kyle McCormick
538dbf696b Import CMS code using fully qualified module names
or, using proper the proper Python 3 relative imports
(e.g., 'from .views import x') which are standard and
unambiguous.
2020-10-19 09:34:31 -04:00
DawoudSheraz
12f2e6eb2b remove percentage field from VEM pipeline config model 2020-08-07 10:25:52 +05:00
Zainab Amir
0b80987ba0 Add vem_enabled_courses_percentage (#24294)
Add a field to VEM config model that will decide the percentage of
courses allowed to go to VEM pipeline. The courses that don't meet the
criteria will go to VEDA.

PROD-1722
2020-06-26 14:30:42 +05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
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
arbisoft
bcf1e781e2 BOM-349
Fixing python3
2019-08-29 23:26:41 +05:00
arbisoft
9b87cb0172 BOM-85
he builtin basestring abstract type was removed. Use str instead.
2019-08-09 22:08:57 +05:00
Diana Huang
6572d99e76 Remove all references to datadog from our code. 2019-01-08 15:41:24 -05:00
Jeremy Bowman
68902a2f3f TE-2689 Remove useless pylint suppressions part 3 2018-08-16 09:57:01 -04:00
Jeremy Bowman
113e8dde61 PLAT-1885 Stop using deprecated BlockUsageLocator properties 2018-01-12 16:40:21 -05:00
Jeremy Bowman
fdc50c3aa8 PLAT-1419 Make edxmako a proper template backend 2017-12-01 17:01:52 -05:00
Andy Armstrong
ebb04ca396 Reorder Studio imports using isort 2017-05-30 17:00:50 -04:00
Ned Batchelder
8b1978ba6c Fix unused-import errors 2016-08-03 12:44:41 -04:00
cahrens
1fa4319140 Delete old cruft from 2012/2013. 2016-06-07 13:34:31 -04:00
Zia Fazal
9bb6f6e88d use a generic function check if entrance_exam is enabled or not 2015-10-22 16:45:19 +05:00
Chris Dodge
3748119961 Integrate timed and proctored exam authoring into Studio 2015-07-23 14:43:17 -04:00
Diana Huang
7461a2fd37 Refactor and merge CourseViewType and CourseTab.
TNL-2321
2015-06-08 15:18:39 -04:00
Diana Huang
dae137feaa Convert all tabs to the new plugin framework. 2015-06-02 15:05:16 -04:00
Matt Drayer
c6ecf2551e Fix for SOL-475 (double exam grader bug)
- Remove grader(s) upon deletion of existing entrance exam
- Remove grader(s) upon addition of new entrance exam
2015-04-28 12:49:03 -04:00
louyihua
297d94a38b Make some strings i18n 2015-04-07 12:56:03 +08:00
John Eskew
34adb256a6 Add datadog counters everywhere a "VS[compat]" comment exists.
Conflicts:
	common/lib/xmodule/xmodule/xml_module.py
2015-03-26 16:18:15 -04:00
Jesse Zoldak
26afdf768c Revert "To support UNICODE xblock.location" 2015-03-16 10:15:41 -04:00
Jason Zhu
ef257fb50b To support UNICODE xblock.location
When people use unicode course org name(e.g Chinese) ,urllib.quote cannot format unicode char like:

```shell
>>> import urllib
>>> loc = 'i4x://创联/7302478/chapter/4ab413b41ad9447db41668bed03f149f'
>>> urllib.quote(loc)
'i4x%3A//%E5%88%9B%E8%81%94/7302478/chapter/4ab413b41ad9447db41668bed03f149f'
>>> urllib.quote(unicode(loc))
Traceback (most recent call last):
  File "<console>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 6: ordinal not in range(128)
>>>
```
so I open this pull
2015-03-03 20:27:54 +08:00
Matt Drayer
1c839cc09d Addressed several outstanding issues related to initial entrance exams feature delivery 2015-01-28 23:56:32 -05:00
Braden MacDonald
3e0f08ebc2 Studio support for creating and editing libraries (PR 6046)
SOL-1, SOL-2, SOL-3
2015-01-12 13:37:50 +03:00
Tim Babych
d7f75778dd Pass parent_xblock to xblock_studio_url to avoid unnecessary calls to get_parent_xblock. 2014-08-07 12:27:26 -04:00
Andy Armstrong
f061bbc08b Backbone version of the course outline page
STUD-1726
2014-08-07 12:16:20 -04:00
cahrens
d6475f4558 New publishing controls on unit page (continued)
STUD-1707
2014-08-07 12:16:18 -04:00
Andy Armstrong
b1eccdf2d4 Replace unit page with the container page.
STUD-1754
2014-08-07 12:16:17 -04:00
Nimisha Asthagiri
a9213509c3 Enable Mixed Modulestore STUD-1540
Refactor get_parent_locations STUD-1663
2014-06-26 18:00:11 -04:00
Calen Pennington
cd862b3253 Merge remote-tracking branch 'edx/master' into opaque-keys
Conflicts:
	cms/djangoapps/contentstore/tests/test_contentstore.py
	cms/djangoapps/contentstore/views/component.py
	cms/djangoapps/contentstore/views/item.py
	cms/djangoapps/contentstore/views/preview.py
	cms/djangoapps/contentstore/views/tests/test_container.py
	cms/static/js/spec/views/unit_spec.js
	cms/static/js/utils/module.js
	cms/templates/container.html
	cms/templates/studio_vertical_wrapper.html
	cms/templates/studio_xblock_wrapper.html
	common/djangoapps/student/views.py
	lms/templates/notes.html
	lms/templates/textannotation.html
	lms/templates/videoannotation.html
2014-05-22 10:52:00 -04:00
zubair-arbi
72d9a91f1d Merge pull request #3766 from edx/zub/bugfix/std1616-editdraft
create draft request gets already created version if it exists
2014-05-22 18:18:56 +05:00
Andy Armstrong
541d20ef83 Allow creation of components on container page
This commit implements STUD-1490, allowing creation of components
on the container page. It also enables the delete and duplicate
buttons now that new content can be created that would benefit.

Note that it also creates shared functionality for adding components,
and refactors the unit page to use it too.
2014-05-21 15:40:31 -04:00
zubair-arbi
6d0e2b215c update _xmodule_recurse method 2014-05-21 18:31:19 +05:00
zubair-arbi
6bdf984e8d update _xmodule_recurse to ignore some exception 2014-05-21 16:36:55 +05:00
Calen Pennington
0d88379eeb Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit adds all of cms.

These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).

For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.

Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>

[LMS-2370]
2014-05-07 12:56:43 -04:00
Andy Armstrong
a6aae729b7 Address the next round of review comments. 2014-04-09 10:32:13 -04:00
Andy Armstrong
ad27107343 Support making drafts of nested xblocks 2014-03-12 19:33:52 +00:00
Andy Armstrong
fcc0231d4d Add new container page that can display nested xblocks
This is the changes for STUD-1244, which introduces the ability for Studio to display
arbitrarily nested xblocks. In this change, a new container page is introduced which can
display nested xblocks. In particular, the xblock type of 'vertical' is special cased
to be shown inline as a collapsible section. The unit page is mostly unchanged, except
that container xblock's are shown as a link to their container page, rather than being
shown inline.
2014-02-27 14:53:05 -05:00
David Baumgold
8eff442752 mitxmako => edxmako 2013-12-03 14:15:09 -05:00
Ned Batchelder
25a027475d Rename contentstore/views/requests to helpers
This has caused confusion, since this file gets imported when trying to
import the requests library.  And besides, how was this file about
requests in the first place?  Helpers is a much better name.
2013-10-15 15:53:48 -04:00