Commit Graph

70 Commits

Author SHA1 Message Date
M. Zulqarnain
65f79ef9b3 BOM-2365 : pyupgrade on static_templates, staticbook and support apps (#26699)
*pyupgrade on static_templates, staticbook and support apps

This reverts commit 1ec2e797a1.

* Apply suggestions from code review

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-02-25 14:37:09 +05:00
Cory Lee
1ec2e797a1 Revert "pyupgrade on static_templates, staticbook and support apps (#26646)" (#26685)
This reverts commit a235425ac3.
2021-02-23 13:01:16 -05:00
M. Zulqarnain
a235425ac3 pyupgrade on static_templates, staticbook and support apps (#26646) 2021-02-23 12:35:53 +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
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
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
Stu Young
6dc70a6758 incr-310 (#20615)
* run python modernize

* run isort

* Add oauth2_handler module docstring.
2019-05-16 14:42:22 -04:00
Matthew Piatetsky
764319d3e0 fix unicode strings in lms/ part 2 2019-02-13 10:35:56 -05:00
Ned Batchelder
3353e7425e Remove unused imports 2018-11-03 16:07:05 -04:00
noraiz-anwar
0e005c4dd8 exempt pdf view from xframe_options:deny 2018-08-07 16:33:21 +05:00
lduarte1991
a9b61c06d3 Remove the annotations feature introduced by Harvard.
There are other annotations features still in the platform but this one
is the one that works with an annotations server that was specialized
and not generally used by most instances of the platform.

The initial PR to remove this was made by 'lduarte1991' and can be found
here: https://github.com/edx/edx-platform/pull/17299

The work done based on the squashed commits:
removed advanced modules config for annotations
remove module files and config for annotations
remove js and css files related to annotations, under ova folders
removed js and css annotator file configs for cms and lms
remove template html files for annotations
removed annotations options from static html book
Added back some files that were originally marked "for OVA" but others used as per acceptance tests
Added back css file configs incorrectly marked as ova
Remove annotation related advanced settings from test.
Correct hls require.js pathing.
2018-07-16 16:55:08 -04:00
cahrens
819a56fee3 Remove usages of deprecated SlashSeparatedCourseKey. 2017-08-14 11:01:00 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Kyle Boots
2c9cdb731b Fix Malformed Staticbook url 2016-10-12 10:11:49 -04:00
Attiya Ishaque
99e717fb11 Fix list index out of range in Textbook's chapters. TNL-3848 2016-03-02 10:30:44 +05:00
tlindaliu
e0840d2d43 MA-849: Change has_access return type
New classes for the return type, and changes to the has_access function and tests to make them compatible.
2015-07-19 20:42:29 -04:00
stv
500499b678 Fix PEP8: E231 missing whitespace after '[:,]' 2014-11-10 19:31:05 -08:00
stv
cf9308144d Fix PEP8: E302 expected 2 blank lines, found 1 2014-11-10 11:00:11 -08:00
Usman Khalid
548b01ab7c Disable http range requests in pdf.js.
A bug in pdf.js or Chrome is causing pdf books to not load.

TNL-488
2014-10-01 18:12:30 +05:00
Usman Khalid
d36e00d4a5 Pass storage_url and token values as parameters to StudentNotes init.
LMS-2848
2014-06-23 16:38:02 +05:00
Calen Pennington
cfcbdc0145 Move to OpaqueKey implementations from the external library
[LMS-2757]
2014-05-29 17:03:35 -04:00
Calen Pennington
155ffe37ca Merge remote-tracking branch 'edx/master' into opaque-keys-merge-master
Conflicts:
	cms/djangoapps/contentstore/views/item.py
	cms/djangoapps/contentstore/views/tests/test_container.py
	cms/djangoapps/contentstore/views/tests/test_tabs.py
	common/lib/xmodule/xmodule/modulestore/mongo/draft.py
	lms/djangoapps/certificates/management/commands/gen_cert_report.py
	lms/djangoapps/certificates/queue.py
	lms/djangoapps/certificates/views.py
	lms/djangoapps/courseware/module_render.py
	lms/djangoapps/courseware/tests/test_module_render.py
	lms/djangoapps/instructor/views/api.py
	lms/djangoapps/instructor/views/instructor_dashboard.py
	lms/djangoapps/instructor/views/legacy.py
	lms/djangoapps/shoppingcart/tests/test_models.py
	lms/djangoapps/verify_student/views.py
2014-05-09 15:29:32 -04:00
Calen Pennington
cd746bf8e5 Make course ids and usage ids opaque to LMS and Studio [partial commit]
This commit adds the non-courseware lms/djangoapps and lms/lib.

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-08 12:09:23 -04:00
Dave St.Germain
14f2f67c78 Set the page in the correct place. 2014-04-28 17:01:03 -04:00
Carson Gee
6136ed2e13 Switch PDF Textbooks to use portable URLs 2014-04-16 13:05:25 -04:00
Dave St.Germain
1cf2696289 Added analytics event logging to PDF book viewer 2014-04-14 17:55:53 -04:00
Dave St.Germain
b0a7443570 updated pdf viewer 2014-03-20 17:00:41 -04:00
daniel cebrian
7e2652b5a8 annotation tools
First set of fixes from the pull request

This does not include some of the testing files. The textannotation and
videoannotation test files are not ready. waiting for an answer on the
issue.

Deleted token line in api.py and added test for token generator

Added notes_spec.coffee

remove spec file

fixed minor error with the test

fixes some quality errors

fixed unit test

fixed unit test

added advanced module

Added notes_spec.coffee

remove spec file

Quality and  Testing Coverage

1. in test_textannotation.py I already check for line 75 as it states
in the diff in line 43, same with test_videoanntotation
2. Like you said, exceptions cannot be checked for
firebase_token_generator.py. The version of python that is active on
the edx server is 2.7 or higher, but the code is there for correctness.
Error checking works the same way.
3. I added a test for student/views/.py within tests and deleted the
unused secret assignment.
4. test_token_generator.py is now its own file

Added Secret Token data input

fixed token generator

Annotation Tools in Place

The purpose of this pull request is to install two major modules: (1) a
module to annotate text and (2) a module to annotate video. In either
case an instructor can declare them in advanced settings under
advanced_modules and input content (HTML in text, mp4 or YouTube videos
for video). Students will be able to highlight portions and add their
comments as well as reply to each other. There needs to be a storage
server set up per course as well as a secret token to talk with said
storage.

Changes:
1. Added test to check for the creation of a token in tests.py (along
with the rest of the tests for student/view.py)
2. Removed items in cms pertaining to annotation as this will only be
possible in the lms
3. Added more comments to firebase_token_generator.py, the test files,
students/views.py
4. Added some internationalization stuff to textannotation.html and
videoannotation.html. I need some help with doing it in javascript, but
the html is covered.

incorporated lib for traslate

fixed quality errors

fixed my notes with catch token

Text and Video Annotation Modules - First Iteration

The following code-change is the first iteration of the modules for
text and video annotation.

Installing Modules:
1. Under “Advanced Settings”, add “textannotation” and
“videoannotation” to the list of advanced_modules.
2. Add link to an external storage for annotations under
“annotation_storage_url”
3. Add the secret token for talking with said storage under
“annotation_token_secret”

Using Modules
1. When creating  new unit, you can find Text and Video annotation
modules under “Advanced” component
2. Make sure you have either Text or Video in one unit, but not both.
3. Annotations are only allowed on Live/Public version and not Studio.

Added missing templates and fixed more of the quality errors

Fixed annotator not existing issue in cmd and tried to find the get_html() from the annotation module class to the descriptor

Added a space after # in comments

Fixed issue with an empty Module and token links

Added licenses and fixed vis naming scheme and location.
2014-01-27 13:47:58 -05:00
David Baumgold
8eff442752 mitxmako => edxmako 2013-12-03 14:15:09 -05:00
Chris Dodge
5298f54f4c fix tests 2013-08-15 22:58:02 -04:00
Chris Dodge
cff93d324b WIP 2013-08-15 22:58:02 -04:00
Ned Batchelder
4ff2de69e7 Pylint fixes 2013-07-02 11:36:47 -04:00
Ned Batchelder
25d0f4d500 Remove unused URL /book-shifted/ 2013-07-02 11:36:47 -04:00
Ned Batchelder
6c3563cc1a Simple refactoring and reformatting of the view code. 2013-07-02 11:36:47 -04:00
Ned Batchelder
61b53713d2 Remove unused imports from lms, as detected by pylint. 2013-06-19 16:56:34 -04:00
Arthur Barrett
4070e019e4 modified the html static book to only enable annotator.js when notes are enabled for the course 2013-05-06 19:29:44 -04:00
Arthur Barrett
04e75485ba merged master branch into feature/abarrett/lms-notes-app. resolved conflicts in lms/envs/common.py and lms/templates/static_htmlbook.html. 2013-05-06 13:40:38 -04:00
Brian Wilson
2d9deaf38c remove code for supporting anchor_id on html textbooks, since it doesn't work 2013-04-12 11:53:06 -04:00
Brian Wilson
123cfa333f add documentation for HTML textbook 2013-04-11 16:42:14 -04:00
Arthur Barrett
7784a29e61 add simple notes view 2013-03-26 14:47:12 -04:00
Arthur Barrett
7120998938 refactoring notes js 2013-03-21 17:18:45 -04:00
Calen Pennington
324d286f9b Don't reference .metadata for data_dir 2013-03-13 12:47:05 -04:00
Calen Pennington
2113541632 Merge remote-tracking branch 'origin/master' into feature/alex/poll-merged
Conflicts:
	.ruby-version
	cms/djangoapps/contentstore/tests/test_contentstore.py
	cms/djangoapps/models/settings/course_metadata.py
	common/lib/xmodule/xmodule/course_module.py
	common/lib/xmodule/xmodule/modulestore/tests/factories.py
2013-03-12 07:23:28 -04:00
Brian Wilson
2199ae673b add checks that book_index is in range 2013-03-11 11:10:08 -04:00
Brian Wilson
bed7dbdb6b fix plumbing for anchors and chapters. 2013-03-08 18:25:33 -05:00
Calen Pennington
cec3475c9d Remove references to .definition and .metadata in modules 2013-03-06 18:07:56 -05:00
Brian Wilson
b5ab766092 initial framework for htmlbook 2013-03-06 17:57:33 -05:00
Brian Wilson
dde2cd0bd0 get chapter links to start working 2013-02-25 16:52:32 -05:00
Brian Wilson
fa00ea442e add first pass at multi-chapter support. 2013-02-25 01:26:34 -05:00