Commit Graph

58 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
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
Ayub khan
e9b3d8e8ec INCR-333 python3 compatibility 2019-07-09 14:19:16 +05:00
cclauss
c0c935b685 Old style exceptions --> new style for Python 3 2019-02-19 13:09:23 +01:00
Matthew Piatetsky
7df30938c4 fix unicode strings in cms/ 2019-02-04 13:01:51 -05:00
Clinton Blackburn
3a005c492f Disabled anonymous access for tabs that require enrollment 2017-11-14 08:00:16 -05:00
Andy Armstrong
ebb04ca396 Reorder Studio imports using isort 2017-05-30 17:00:50 -04:00
Ayub khan
986209669d Revert "SUST-35 Implementation of course_key_from_string_or_404 to return course_key or raise a 404" 2016-04-28 15:50:17 +05:00
Ayub-khan
d8464dbfb0 -changed method name from "from_string_or_404" to "course_key_from_string_or_404".
-Updated method "course_key_from_string_or_404" to raise message too.
-Wrote tests for "course_key_from_string_or_404" when exception message is given.
-Modified existing methods to use "ddt.data".
-Used Splunk logs to find exectly where we were getting "Invalid Key Error"
-Updated Views where we were getting "Invalid Key Error" in splunk logs.
-Wrote tests for those View End points where we were getting "Invalid Key Error"
2016-04-14 15:57:39 +05:00
Sarina Canelake
ba8fd1c21d Eliminate instances of unused-import Pylint violation 2015-07-13 17:33:25 -04:00
Diana Huang
cddd387beb Merge pull request #8367 from edx/diana/merge-course-view-and-tab
Refactor and merge CourseViewType and CourseTab.
2015-06-08 16:08:27 -04:00
Diana Huang
7461a2fd37 Refactor and merge CourseViewType and CourseTab.
TNL-2321
2015-06-08 15:18:39 -04:00
Sarina Canelake
e53b9c83d9 Use Django 1.4 @ensure_csrf_cookie method PLAT-664 2015-06-06 08:48:36 -04:00
Diana Huang
dae137feaa Convert all tabs to the new plugin framework. 2015-06-02 15:05:16 -04:00
Andy Armstrong
94e1c42314 Add extensible course view types for edX platform 2015-06-02 13:12:40 -04:00
Brandon DeRosier
046e295322 Change has_course_access definition and doc string
- has_course_access renamed to has_course_author_access for clarity
- Changed doc string to clearly state that it determines whether or not
  a user has write access to a course
2014-12-02 22:08:58 -05:00
Brandon DeRosier
bdc64a7c70 Moved has_course_access from CMS to student.auth (common) 2014-12-02 19:36:38 -05:00
stv
5677b143db Fix PEP8: W391 blank line at end of file 2014-11-10 11:00:18 -08:00
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08: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
a9213509c3 Enable Mixed Modulestore STUD-1540
Refactor get_parent_locations STUD-1663
2014-06-26 18:00:11 -04:00
Calen Pennington
cfcbdc0145 Move to OpaqueKey implementations from the external library
[LMS-2757]
2014-05-29 17:03:35 -04: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
Nimisha Asthagiri
1bd6792a08 Support for "View Live" on Pages page.
Settings for ENABLE_STUDENT_NOTES and ENABLE_TEXTBOOK in CMS.
Do not display empty collection tabs.
Updated Changelog.
2014-03-28 05:41:32 -04:00
Nimisha Asthagiri
d865e9096e Add the ability to reorder Pages and hide the Wiki page. 2014-03-28 05:39:03 -04:00
Nimisha Asthagiri
e86b4a12dc Changes for viewing built-in tabs in studio
Changed "Status Page" -> "Page".

UX:
    support for displaying built-in tabs
    restored drag and drop on Studio Pages
    additional styling for fixed state on Studio Pages
    add a new page action added to bottom of Studio Pages

Dev
    changes for viewing tabs in studio,
    refactored the tab code,
    decoupled the code from django layer.
    is_hideable flag on tabs
    get_discussion method is needed to continue to support
external_discussion links for now since used by 6.00x course.
    override the __eq__ operator to support comparing with
dict-type tabs.

Test
    moved test code to common,
    added acceptance test for built-in pages
    added additional unit tests for tabs.
    changed test_split_modulestore test to support serializing objects
that are fields in a Course.

Env:
    updated environment configuration settings so they are
    consistent for both cms and lms.
2014-03-21 13:58:01 -04:00
cahrens
fc1e8fae2e Remove unused imports. 2014-02-10 16:08:59 -05:00
Don Mitchell
b8ea7f3c43 update_item and other refactorings continued 2014-02-05 10:24:24 -05:00
Don Mitchell
c601b75675 MixedModulestore wraps most getters, update_item, delete_item
with code to translate between addressing schemes based on app
and persistence layer addressing scheme specification.

STUD-1206
2014-02-05 09:34:30 -05:00
Sarina Canelake
f88c108527 i18n xmodule/course_module.py
LMS-1747
2014-01-23 15:05:05 -05:00
Don Mitchell
3ebac80778 Replace authz fns with roles.py ones
STUD-1006
2014-01-14 17:04:44 -05:00
Don Mitchell
b7368ef69a Change course_id to package_id
on new Locators to make it clear that they have a different syntax
than Location.course_id altho they represent the same info.
2013-12-20 16:16:50 -05:00
Don Mitchell
b776590226 Rename BlockUsageLocator's block_id field from usage_id
usage_id implies self-sufficiency. The block_id is relative to its structure.
2013-12-17 12:15:32 -05:00
David Baumgold
28f22393bf whitespace-only changes 2013-12-10 11:45:49 -05:00
David Baumgold
8eff442752 mitxmako => edxmako 2013-12-03 14:15:09 -05:00
cahrens
1b2be30c45 Convert tabs to RESTful URL.
STUD-850
2013-11-21 10:19:43 -05:00
cahrens
e7c06e3ab1 Change preview view method to use RESTful URL.
STUD-848
2013-11-19 16:56:24 -05:00
cahrens
569c86de74 Code review feedback. 2013-11-14 17:09:24 -05:00
cahrens
a170c6f4e7 Change save_item and create_item to RESTful URL.
Part of STUD-847.
2013-11-14 11:03:31 -05:00
cahrens
16766a5ee9 Change delete_item to RESTful URL.
Part of STUD-847.
2013-11-06 13:49:24 -05:00
Don Mitchell
80c83f0b88 Merge pull request #1508 from edx/dhm/expect_json
Change expect_json to put parsed json in new attr
2013-10-29 14:02:32 -07:00
Don Mitchell
45453fae61 Change expect_json to put parsed json in new attr 2013-10-29 16:13:58 -04:00
Olivier Marquez
453e8f50fc Update tabs.py 2013-10-29 10:01:02 -04:00
cahrens
70cb24a37f Delete unused static-pages.html. 2013-10-09 15:06:58 -04:00
Nick Parlante
0ed1ee917e Create edit_course_tabs management command
Just works on the tabs list in mongo, nothing
deeper than that.
Added implementation functions in tabs.py,
providing a first step for some future
GUI editor.
2013-10-01 10:49:51 -07:00
David Baumgold
248793c127 Fix some pylint issues 2013-07-31 15:42:11 -04:00
Diana Huang
3f9431e8cf Provide implicit saves for XBlocks and XModules.
Update existing tests and provide new ones to test new paradigm.
2013-07-18 16:37:34 -04:00
David Baumgold
a6f349dab9 Studio i18n 2013-07-12 16:25:39 -04:00