Commit Graph

180 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
Shimul Chowdhury
e339cc1b07 Add Unit & Nested blocks to breadcrumbs
hide links that has no url

Hide sequence nav in nested pages

Improve doc
2021-01-15 18:49:01 +06:00
Farhaan Bukhsh
4c61ba28bc Added the condition for the first template to be blank assessment.
Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
2020-12-07 14:36:03 -03:00
Farhaan Bukhsh
9c434cc8b2 Changed the order of the button
Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
2020-12-07 14:36:02 -03:00
Farhaan Bukhsh
4ad50ef5d9 Adding proper indentation for pep8
Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
2020-12-07 14:36:01 -03:00
Farhaan Bukhsh
95a219f395 Added improved comments
Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
2020-12-07 14:36:01 -03:00
Farhaan Bukhsh
48595cd38d Added tests for ORA button
Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
2020-12-07 14:36:00 -03:00
Farhaan Bukhsh
30632f87cc Added Open response button to the component tray
Author needs to have a quick access to ORA menu in order
to get proceed with assesment design. This introduces ORA
button to the tray.

Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
2020-12-07 14:36:00 -03: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
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Dave St.Germain
95abce3830 Fixed the studio breadcrumbs to show the current chapter/section name. 2020-03-10 14:29:56 -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
Dave St.Germain
3e73ba3879 TNL-6929:
Improves navigation within Studio for Learning Sequences, speeding up authors who want to see how a learner progresses through content without needing to jump over to the LMS.

This adds a dropdown section navigator to the breadcrumbs on the unit page and copies the sequence navigator from LMS to the studio unit page.
2019-11-07 09:13:00 -05:00
Dave St.Germain
ea3232feac TNL-6920 Component Editor Efficiency Improvements
* Enlarges component modal for easier editing
* Allows display name to be edited in place
* Improves markdown button labeling
* Moves markdown cheatsheet to the edit modal, for quick reference
2019-09-26 09:34:14 -04: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
Gavin Sidebottom
3dad2be55d Refactored XBlockAside rendering and added support for student view 2018-12-11 12:27:03 +05:00
Jeremy Bowman
68902a2f3f TE-2689 Remove useless pylint suppressions part 3 2018-08-16 09:57:01 -04:00
Tyler Hallada
d31249ba20 Studio-frontend in-context image selection modal
Open edit image modal via a custom signal

Send img tag attributes in open signal

Send natural image dimensions if no attr specified

Add new modal button in addition to old button

Also load built CSS when waffle switch on

Swap out TinyMCE toolbar button on waffle switch

Pass LANGUAGE_CODE from Django to template to studio-frontend

Define request.LANGUAGE_CODE in test_container_page.py
2018-04-04 15:48:36 -04:00
Jeff LaJoie
1c90220462 EDUCATOR-434: Extends Course Outline Unit settings to allow Group Access configuration 2017-07-19 14:17:38 -04:00
Andy Armstrong
ebb04ca396 Reorder Studio imports using isort 2017-05-30 17:00:50 -04:00
noraiz-anwar
074900632a ORAs and Drag and Drop not supported in libraries, remove both from problem types in studio 2017-04-20 18:27:13 +05:00
muhammad-ammar
c7dc83c378 Move modal show course outline with breadcrumb
TNL-6060
2017-03-01 19:25:57 +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
cahrens
d4cc7b8ffd Support level support for Studio xblock creation.
TNL-4670
2016-07-21 15:44:59 -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
Ned Batchelder
2e1238b83e Remove unused imports 2016-04-08 11:23:05 -04:00
John Eskew
df261cd5d6 Remove all request.REQUEST usages - replace with request.GET and/or
request.POST to eliminate Django deprecation messages.
2016-02-22 09:54:26 -05:00
Ehtesham
b9c8b3308d [TNL-3962] moving DEPRECATED_ADVANCED_COMPONENT_TYPES to dJango admin 2016-02-08 17:26:49 +05:00
Piotr Mitros
6b6248b44a Minor cleanup of Studio settings: removing extra indirection, and advanced components list 2016-01-15 11:21:52 -05:00
Sarina Canelake
27cb3080c2 Remove final CMS references to 'peergrading' and 'combinedopenended' 2015-12-11 15:07:10 -05:00
Ned Batchelder
f5d0f3ff55 Remove useless pylint suppressions 2015-11-22 07:41:19 -05:00
Robert Raposa
3682fac832 Add json escaping to Studio
Make escaping for json simpler and more consistent in Mako templates
- add escape_json_dumps to escape and json.dumps
- add escape_js_str to escape javascript string
- refactor Studio to use escape_json_dumps in Mako templates

TNL-2646: Escape json.dumps
2015-11-04 13:34:42 -05:00
Robert Raposa
0964bf280f Remove unused method subsection_handler
Removing this particular call to json.dumps was done by removing
the complete method subsection_handler which is no longer
used.  The template edit_subsection.html had already been removed.

TNL-2646 Escape json
2015-11-04 13:34:42 -05:00
Adam
2735b2b5bb Revert "Decorated instructor dashboard with sudo_required." 2015-07-17 12:11:38 -04:00
Waheed Ahmed
bc052db1ee Added DjangoSudo functionality for instructor dashboard and course team page 2015-07-16 11:14:11 +05:00
muhammad-ammar
5a8b158900 Visual change to new Hints and Feedback problem types
TNL-2619
2015-07-13 12:18:25 +05:00
Nick Parlante
98730f3141 Fix hint-problem tab bug TNL-2542
Revert the removal of hint templates.
Move the 'tab' attribute in the new-problem yaml
files out one level, out of the 'metadata' section.
2015-06-26 09:22:04 -07:00
Nick Parlante
77f3069655 Extended Feedback and Hints for Problems
Extends the common capa response types (string, numeric, multiple
choice, checkbox, dropdown) with feedback and hint
capabilities. "Feedback" refers to feedback shown to the student when
they check the problem, looking at their specific answer. "Hints"
refers to a Hint button in LMS which the student can click at any time
to see hints for that problem. The implementation extends the markdown
syntax to include feedback and hints. There are new Feedback-and-Hint
specific templates in Studio when the author clicks to add a new
problem.
2015-06-17 16:25:04 -07:00
Andy Armstrong
1689004189 Create a common paginated list view
TNL-2384

Refactored Studio's PagingView to use RequireJS Text and moved it
to common so that it can also be used by LMS.
2015-06-15 13:51:09 -04:00
David Baumgold
2159d34128 Added a simple XBlockMixin for courseware licenses
This allows course authors to choose between two difference licenses for their
course content: All Rights Reserved, or Creative Commons. In the backend, XBlocks
that wish to allow custom licenses need only inherit from LicenseMixin, which
adds a `license` field as a string.

License information is displayed in the Studio editor view, and just below the
rendered XBlock in the LMS. In addition, if the course block itself has a custom
license set, this license will display just below the main body of the page
on courseware pages.

This entire feature is gated behind the LICENSING feature flag.
2015-05-18 14:34:28 -04:00
Sarina Canelake
40dc37dd0f Merge pull request #7563 from louyihua/translation_fix
Ignore pylint error 7610 (translation-of-non-string) on where it is intended
2015-04-03 08:47:36 -04:00
louyihua
0d0d1a0ccd Ignore pylint error 7610 (translation-of-non-string) on where it is intended to do
As some i18n features need ```ugettext``` or its shorcut ```_``` to be called on a non-string-literal, so the pylint check of ```translation-of-non-string``` should be explicitly disabled in such situations.
2015-04-03 11:59:53 +08:00
Awais Jibran
e5d250bf50 Fixed invalid usage key errors which previously throw 500.
TNL-473
2015-04-01 16:13:30 +05:00
Jonathan Piacenti
568acb56b0 Library setting for show/hide children previews + client-side code to toggle it. 2015-03-18 08:59:58 -05:00
Daniel Friedman
e622e63c7b Catch PluginMissingError when generating component templates 2015-02-26 13:46:28 -05:00
stv
69695a8f12 Fix Pylint: W0107(unnecessary-pass) 2015-02-19 19:56:52 -08:00