Commit Graph

81 Commits

Author SHA1 Message Date
Agrendalath
e571693455 Support EXCLUDED blocks in Block Completion Transformer
For now only the discussion blocks were supported. If we had a custom XBlock that specified `completion_mode = XBlockCompletionMode.EXCLUDED`, then it could never be marked as completed on the course outline page, despite being marked as such inside the learning sequence.
2021-03-22 16:21:43 +01:00
Usama Sadiq
afa102e125 refactor: ran pyupgrade on lms/djangoapps/course_api (#26735) 2021-03-09 12:54:42 +05:00
Aarif
a332aac1f6 replaced unittest assertions pytest assertions (#26541) 2021-02-19 12:27:11 +05:00
Jawayria
959aed9841 Resolved pep8 issues 2021-02-04 14:07:47 +05:00
Jawayria
e9b167e1fd Applied pylint-amnesty to course_api 2021-02-04 13:22:45 +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
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
Michael Terry
6d0ecaab47 Only mark blocks 'complete' if their completion is 1.0
This is how the rest of our code seems to treat it, let's be
consistent.

This is an attempt to fix AA-292.
2020-08-14 11:39:18 -04:00
Nizar Mahmoud
c0b6260c3e Adds Custom Extra Fields to Course Blocks API through LMS Settings 2020-08-06 21:27:31 +03:00
Dillon Dumesnil
35549f56ba AA-220: Making Library Content an Aggregator CompletionMode
This change will prevent Library Content from being marked as
complete on view and the corresponding version bump to
edx-completion contains code that will start looking at the
children of the library content for completeness.
2020-07-01 17:33:54 -04:00
Robert Raposa
624012e11c remove ENABLE_VIDEO_URL_REWRITE
The temporary waffle flag ENABLE_VIDEO_URL_REWRITE is no
longer needed, becaues the rollout is complete.
See https://openedx.atlassian.net/browse/PROD-62

ARCHBOM-1304
2020-06-23 11:19:32 -04:00
Dillon Dumesnil
39d45eee42 Moving SUPPORTED_FIELDS for transformers into serializers
It is only referenced inside of the serializers so we can just
define it there
2020-05-14 13:12:43 -07:00
Dillon Dumesnil
4d4b93c6ed AA-159: Improving performance of get_course_assignments
We saw an increase in response time with recent changes to the logic
behind get_course_assignments. This effort works to better access
the information we need in order to improve performance.
Namely, this is done by using the course_blocks_api
2020-05-14 13:12:25 -07:00
Dillon Dumesnil
858154a7d6 AA-99: Adding in new date pills for the dates tab 2020-05-04 07:24:01 -07:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -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
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
DawoudSheraz
169349d57e add encoded video key check in video transformer 2019-11-04 12:23:58 +05:00
Braden MacDonald
5fc73468b3 Change completion API to work with any learning context 2019-10-22 14:04:31 -04:00
Calen Pennington
7ceb0e30fa Mark course outline with graded and scored status in the DOM so that we can run optimizely code on them 2019-10-17 12:14:49 -04:00
DawoudSheraz
942c79e606 add video url transformer 2019-09-27 14:26:52 +05:00
Usman Khalid
8dfc8e5fda Convert AboutModule, CourseInfoModule, HtmlModule and StaticTabModule to XBlocks. 2019-07-24 20:19:44 +05:00
Stu Young
cea9390cdc INCR-287 Run python-modernize on lms/djangoapps/course_api/blocks/transformers (#20594)
* run python modernize

* run isort
2019-05-21 11:23:12 -04:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Paulo Viadanna
c4fc4b5df6 Adds CouseModule.course_visibility and XBlock.public_view() for unenrolled users access to courses.
The course_visiblity field can have one of three values:
1. private (default): This keeps the standard access rules.
2. public_outline: Allows unenrolled and anonymous users access to the outline.
3. public: Allows unenrolled and anonymous users access to both outline and
   course content.

When an unenrolled user accesses course content, instead of student_view(),
public_view() is used. A default implementation is provided for XBlocks
which do not implement this view. The public_view() must not have any
functionality which assumes the presence of a valid User and should show
a readonly only interface for the XBlock content.
2018-12-07 22:17:36 +05:00
Awais Jibran
194c6bacb6 Revert "Merge pull request #18720 from open-craft/paulo/anonymous-views"
This reverts commit f9ae594dfe, reversing
changes made to 7c08e50fde.
2018-11-09 22:49:14 +05:00
Paulo Viadanna
e6e0a02e0a Adds CouseModule.course_visibility and XBlock.public_view() for unenrolled users access to courses.
The course_visiblity field can have one of three values:
1. private (default): This keeps the standard access rules.
2. public_outline: Allows unenrolled and anonymous users access to the outline.
3. public: Allows unenrolled and anonymous users access to both outline and
   course content.

When an unenrolled user accesses course content, instead of student_view(),
public_view() is used. A default implementation is provided for XBlocks
which do not implement this view. The public_view() must not have any
functionality which assumes the presence of a valid User and should show
a readonly only interface for the XBlock content.
2018-11-07 16:18:39 +05:00
Jeremy Bowman
4e8668d3be TE-2524 Stop using nose.plugins - LMS 2 2018-08-01 13:54:06 -04:00
Zia Fazal
90633c0956 Merge pull request #17974 from edx/ziafazal/WL-1239
WL-1239: Ability to gate section based on completion percentage
2018-05-30 12:52:43 +05:00
Zia Fazal
53cf5638b6 added radio input fields to pre-requisite selection
Initial changes to gate section based on completion percentage

code refactoring and added evaluation of completion milestone

Fixed broken unit tests and added new tests

Fixed broken tests and quality violations

Fixed Pep8 violation

Fixed eslint quality violations

Test changes as suggested by reviewer

changes after feedbacy from reviewer

Update the docstring with suggested changes

excluding chapter from the blocks

Disallow empty values for min score and min completion

Changes afte feedback from UX/Accessibility

removed blank line
2018-05-30 11:25:59 +05:00
Stuart Young
1fd2167144 rebalance python unittests onto new shards 2018-05-03 11:16:05 -04:00
Amir Qayyum Khan
aa6f88382d Fixed edX block structure api to load override data 2018-02-16 11:10:17 +05:00
Alex Dusenbery
7e51f02884 Get edx-platform working with external completion lib, add integration tests. 2018-02-14 15:54:27 -05:00
Sanford Student
8956739a34 Add the visual indicator to the sequence horizontal nav bar to mark verticals completed
EDUCATOR-2189
2018-02-12 15:26:40 -05:00
Bill Filler
4fe5f3457d Conditionally display gated content in courseware
Display gated sections in course outline, navigation and in the course
when user has met prerequiste condition.

WL-1273, WL-1317
2018-01-18 12:34:19 -05:00
Tomasz Gargas
73f86006f7 Bump READ_VERSION of BlockCompletionTransformer to 1.
Signed-off-by: Tomasz Gargas <tomasz@opencraft.com>
2017-12-13 17:11:36 +01:00
Tomasz Gargas
64c4ae4a7a Add block completion value as optional field in course_blocks.api.
Signed-off-by: Tomasz Gargas <tomasz@opencraft.com>
2017-12-12 14:22:10 +01:00
Ned Batchelder
e23e3a0486 Fix a number of unused-import pylint violations 2017-11-21 19:57:06 -05:00
Jillian Vogel
ae15e69a0a Fixes bug with Course Blocks API student_view_data parameter
Prior to this change, providing any student_view_data querystring would result
in student_view_data returned for all XBlock types.

Updates Course Blocks API tests to verify.
2017-11-01 13:38:54 +10:30
bradmerlin
ab011314ef Add student_view_data to HTML XBlock
to allow the HTML to be downloadable via the Course Blocks API.

Feature flag ENABLE_HTML_XBLOCK_STUDENT_VIEW_DATA must be set to enable this feature.
2017-11-01 13:38:54 +10:30
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Jillian Vogel
6ca8a702ae Mask grades on progress page according to "Show Correctness" setting. 2017-05-31 16:57:38 +02:00
Diana Huang
196d379cc6 Rename MilestonesTransformer.
Add comment explaining why we can't have a separate transformer.
2017-04-13 14:39:38 -04:00
Robert Raposa
0899ac56e3 Fix review comments. 2017-04-13 14:39:38 -04:00
Diana Huang
aafd6a03ce Add 'format' as a requested field. 2017-04-13 14:39:37 -04:00
Diana Huang
9e734442c2 Initial version of new transformer. 2017-04-13 14:38:13 -04:00
Nimisha Asthagiri
cfb032a50c Fix grading for Gated Subsections
TNL-5955
2017-03-15 17:16:20 -04:00
Nimisha Asthagiri
00d466224e Consolidate Block Structure folders
TNL-6518
2017-03-01 21:19:28 -05:00