Commit Graph

146 Commits

Author SHA1 Message Date
Jansen Kantor
2379f1ca26 fix: Stop rendering Visibility and Move buttons on libraries 2
* Revert "Revert "fix: Stop rendering Visibility and Move buttons on libraries (#26885)" (#27113)"

This reverts commit 23443c4376.

* fix: change method of accessing course id
2021-03-24 11:07:43 -04:00
Jansen Kantor
23443c4376 Revert "fix: Stop rendering Visibility and Move buttons on libraries (#26885)" (#27113)
This reverts commit 777bb633c5.
2021-03-23 11:35:14 -04:00
Daniel Francis
777bb633c5 fix: Stop rendering Visibility and Move buttons on libraries (#26885)
We're fixing an error that appears when you click the "edit access"
button on an XBlock in the library page.

Libraries in the "Add library" page shouldn't have the accessibility
config icon. Access settings for libraries are changed at the top, on
Settings > User Access. When clicking the access-button (the cog) on a
Library, an error appears. This is known to happen on koa.master and
open-release/juniper.3.

This happens due to the way XBlocks are rendered; as they get rendered
initially, the previews are unaware of whether they're part of a
library. We can confirm this by refreshing the page, this makes the
button disappear.

This fix removes the cogwheel when the XBlock is part of a library.
This doesn't affect the XBlocks imported to courses because those are
rendered on a Randomized Content XBlock, which does have its access
options.

Authored by: Daniel Francis <daniel.francis@opencraft.com>
2021-03-22 13:39:09 -04:00
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
Usman Khalid
9e38b17202 Convert ErrorModule and NonStaffErrorModule to XBlocks. (#25570) 2021-01-07 10:51:33 -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
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
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
da9c71557b -Remove unicode and use six.text_type 2019-09-02 16:14:02 +05:00
Matthew Piatetsky
7df30938c4 fix unicode strings in cms/ 2019-02-04 13:01:51 -05:00
Ned Batchelder
3353e7425e Remove unused imports 2018-11-03 16:07:05 -04:00
Calen Pennington
41c71505e3 Load all webpack chunks into fragments as correctly-typed resources 2018-09-06 15:47:13 -04:00
noraiz-anwar
45d1ce6d07 setting xframe_options to deny 2018-08-06 15:28:31 +05:00
noraiz-anwar
593c2d1ae8 add python getter in capa system 2018-07-18 18:44:56 +05:00
Calen Pennington
07a15c681f Reapply the XBlock RequireJS -> Webpack changes
This reverts commit 105db2cf59, reversing
changes made to 447457594f.
2018-06-27 22:27:07 -04:00
Eric Fischer
e72549cdbe Revert "Merge pull request #18340 from cpennington/fix-studio-xblock-rendering"
This reverts commit 9a70ca78a5, reversing
changes made to efd5b9abbd.

Hopefully fixes EDUCATOR-3053
2018-06-15 13:18:27 -04:00
Calen Pennington
8b35756699 Fix studio xblock failing renders (due to asset hashing loop) 2018-06-07 15:52:26 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
Jeremy Bowman
f8e5e38cc4 PLAT-1884 Replace deprecated xblock.fragment usage 2018-01-11 14:20:12 -05:00
Sarah Fischmann
eafb79defc Added lang attribute in LMS and Studio; added language col to course_overviews
Added course level lang attribute for LMS

added lang attribute to Studio

fixed error when trying to get language attribute on course that does not exist

simplified code

added lang attribure to more places in LMS, added migration for language attribute in course_overview

fixing contraints in the database for language attribute

added lang attribute to several more places in LMS and Studio

added lang attribute to discussion and custom pages; cleaned up code

fixed issue that was causing test failures

moved lang attribute higher in tree in two places
2017-06-13 14:42:29 -04:00
Christina Roberts
d2653b4b17 Merge pull request #15148 from edx/christina/ed-427-again
Christina/ed 427 again
2017-05-31 15:31:36 -04:00
cahrens
106ac3a136 Change visibility to access.
EDUCATOR-396
2017-05-31 14:10:56 -04:00
Andy Armstrong
ebb04ca396 Reorder Studio imports using isort 2017-05-30 17:00:50 -04:00
John Eskew
3b57542ab0 Revert "Merge pull request #15170 from edx/jeskew/PLAT_1316_partitions_inheritance"
This reverts commit f97f052591, reversing
changes made to 800bcd8e20.
2017-05-30 12:42:54 -04:00
John Eskew
f1369b912e Move LicenseMixin and accompanying code to openedx/core/lib. 2017-05-25 16:17:31 -04:00
John Eskew
76389d8678 Run all files touched in inheritance/partition work through isort. 2017-05-25 13:24:08 -04:00
John Eskew
66f3aa5ccf Move fields.py, inheritance.py, and partitions to openedx/core. 2017-05-25 13:24:08 -04:00
Ned Batchelder
4a568476fd Remove a number of unneeded super()-delegation methods 2017-04-27 14:12:56 -04:00
cahrens
6e416310b9 Show messages about component visibility.
TNL-6746
2017-04-13 11:33:57 -04:00
cahrens
e5035746bf Introduce EnrollmentTrackUserPartition.
TNL-6674
2017-03-30 12:24:48 -04:00
Mushtaq Ali
485ffb1b68 restrict move action 2017-03-01 19:29:59 +05:00
Zia Fazal
9041ed1400 removed statement which updates xblock in preview handler
added test to support changes

moved aside xblock data save logic int component_handler

changes after feedback

fixed typo
2017-03-01 11:45:52 +05:00
Calen Pennington
fd0d69594a Upgrade to the latest version of opaque-keys 2016-12-01 13:04:31 -05:00
Syed Hassan Raza
c41db159f4 Fix empty context KeyError for conditional module 2016-10-11 19:15:06 +05:00
Ned Batchelder
8b1978ba6c Fix unused-import errors 2016-08-03 12:44:41 -04:00
Dmitry Viskov
21bbcc9f35 Connected aside information is included in the emitted event (on check) 2016-05-19 17:37:40 +03:00
John Eskew
b5ab64505a Merge pull request #11331 from CredoReference/invalid-studio-user-permissions
Invalid StudioPermissionsService object in API to show/save xblock settings in CMS
2016-05-03 13:16:43 -04:00
Christina Roberts
2497f0a0eb WIP: xblock pipeline work (#10176)
[PERF-303] Integer XBlocks/XModules into the static asset pipeline.

This PR, based on hackathon work from Christina/Andy, implements a way to discover all installed XBlocks and XModules and to enumerate their public assets, then pulling them in during the collectstatic phase and hashing them.  In turn, the methods for generating URLs to resources will then returned the hashed name for assets, allowing them to be served from nginx/CDNs, and cached heavily.
2016-04-29 10:52:42 -04:00
Dmitry Viskov
bab4428297 Invalid StudioPermissionsService object in API to show/save xblock settings in CMS.
Randomized Content Block editor did not check Studio user's permissions
2016-04-21 19:52:25 +03:00
Matt Drayer
3ed3fea2fb mattdrayer/xblock-translations: Add I18N/L10N support to XBlocks via the runtime
* mattdrayer:  Latest proto code
* mattdrayer:  Add translation.py
* asadiqbal08: Xblock translation ugettext update, remove translation.py
* mattdrayer:  Additional I18N work -- starting to see some translations!
* asadiqbal08: Trying to make xBlock message catalog files path dynamic
* mattdrayer:  Remove unnecessary modifications
* mattdrayer:  Cleaned up implementation
* mattdrayer:  Moved import statement
* asadiqbal08: update as suggested
* asadiqbal08: xblock its own domain
* asadiqbal08: translation: secure none object
* asadiqbal08: pylint
* asadiqbal08: get locale from xblock
* asadiqbal08: update
* mattdrayer:  Determine XBlock locale path within runtime service
* mattdrayer:  Determine module location via the runtime
* mattdrayer:  Remove ModuleI18nService reference
* asadiqbal08: override the service in studio
* asadiqbal08: remove import
* asadiqbal08: update the Modulei18nService
* asadiqbal08: update the Modulei18nService
* mattdrayer:  Remove redundant __class__ reference
* asadiqbal08: update the docstring
* asadiqbal08: tests
* mattdrayer:  Remove specific ugettext override from ModuleI18nService
* mattdrayer:  Move service operation to base class
* mattdrayer:  Address quality violations
* asadiqbal08: Investigating the test failure issue on jenkins and solved
* asadiqbal08: First utilizing the parent class method
* mattdrayer:  Use recommended callable approach
* asadiqbal08: remove unused code
* asadiqbal08: Updated the test to use cms preview module system runtime in order to get i18n service.
* asadiqbal08: Pylint quality
* asadiqbal08: update the service call to check xblock declarations
* asadiqbal08: update doc string
* asadiqbal08: i18n callable test in studio
* asadiqbal08: test lms runtime for modulei18n service
* asadiqbal08: add doc strings
* asadiqbal08: Rename locale and domain to Flask-Babel convention
2016-03-11 09:55:15 -05:00
Dmitry Viskov
209ddc700d Difficulty selectbox in Studio (based on new XBlockAside functionality). Include:
- adaptation asides to be imported from the XML
- updating SplitMongo to handle XBlockAsides (CRUD operations)
- updating Studio to handle XBlockAsides handler calls
- updating xblock/core.js to properly init XBlockAsides JavaScript
2016-03-02 03:37:13 +03:00
Dmitry Viskov
efb86f2169 XBlockAsides Hello world example 2016-01-14 03:19:23 +03: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
Sarina Canelake
ba8fd1c21d Eliminate instances of unused-import Pylint violation 2015-07-13 17:33:25 -04:00
David Baumgold
8fbaa66d33 Make courseware licenses show up in Studio XBlock previews 2015-05-18 14:35:40 -04:00
Ned Batchelder
7c704f3959 Move xmodule_modifiers.py to openedx/core/lib/xblock_utils.py 2015-05-14 16:03:50 -04:00
Adam Palay
afec81b662 prevent overly nesting _field_data (TNL-2050) 2015-05-07 14:05:27 -04:00
Jonathan Piacenti
51905f0cd5 Addressed notes for RCB duplication, removed management buttons from RCB container 2015-04-02 18:26:04 +00:00