Commit Graph

107 Commits

Author SHA1 Message Date
Usama Sadiq
82406e970a reafctor: ran pyupgrade on lms/djangoapps/courseware (#26739) 2021-03-12 14:43:44 +05:00
Usman Khalid
dd96a2aa72 Convert Course, Section and Sequence XModules to XBlocks. (#25965) 2021-03-02 10:29:33 -05:00
Aarif
0112339b20 replaced unittest assertions pytest assertions (#26543) 2021-02-19 11:58:27 +05:00
Jawayria
03e6a874d0 Applied pylint-amnesty to courseware 2021-02-03 21:56:24 +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
Michael Terry
3030efec78 AA-177: Add masquerading for course home MFE
- Looks at masquerading config for dates, outline, metadata, and
  celebration APIs in course_home_api / courseware_api.
- Consolidates and cleans up places we check whether masquerading
  gives us full access to a course.
2020-06-29 12:37:47 -04: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
Matthew Piatetsky
bd76a71019 delete old holdback code 2019-11-07 09:51:39 -05:00
Ned Batchelder
58828da55b Fix patches to use proper courseware imports 2019-09-26 10:53:55 -04:00
Ned Batchelder
efba6e45e8 Finally import courseware properly everywhere to get rid of a warning 2019-09-26 09:40:15 -04:00
alangsto
4a1346b068 INCR-265 Run python-modernize on lms/djangoapps/courseware/management and lms/djangoapps/courseware/tests (#20716)
* updated files according to INCR-265

* fixed docstring and line-length problems from quality test

* Revert "fixed docstring and line-length problems from quality test"

This reverts commit d050f55a4ecfaa38f46b80ec4bb85ff399a79a8c.

* fixed errors reported in quality report

* had error, fixed it

* reversed change

* fixed over/under indentation, and added line to import.py that Ned had suggested

* tried disabling pylint for this line

* testing new email

* testing email in different window

* re-added symlink and docstring
2019-05-31 14:07:18 -04:00
Michael Youngstrom
3221c2b91f Remove lms pytest shards 2019-02-12 11:03:46 -05:00
Matthew Piatetsky
1396ca9173 Ignore enrollment date for FBE when masquerading 2018-12-26 20:29:44 -05:00
Matthew Piatetsky
14a899a65d REVE-104 & REVE-108: Ensure Course Roles' Access 2018-12-07 16:39:09 -05:00
Calen Pennington
bced52b728 Merge pull request #19334 from cpennington/enabled-as-of-datetime
Enabled as of datetime
2018-11-30 15:09:11 -05:00
Calen Pennington
31047260cc Switch ContentTypeGatingConfig.enabled_as_of and CourseDurationLimitConfig.enabled_as_of to datetimes 2018-11-30 10:02:53 -05:00
Matthew Piatetsky
08301a484e Ensure staff users do not see expiration banner 2018-11-29 09:45:49 -05:00
Alex Dusenbery
44101d656d Pick a better ordering field for CourseEnrollmentPagination in grades API. 2018-11-27 12:39:12 -05:00
Bill Filler
7b684106ba Don't allow audit-only courses to expire 2018-11-26 14:28:50 -05:00
Calen Pennington
0cb48dfe1c Add StackedConfigurationModels for managing content_type_gating and course_duration_limits 2018-11-21 12:18:10 -05:00
Matthew Piatetsky
9037999bd2 add content gating waffle flag 2018-10-22 20:49:08 -04:00
Matthew Piatetsky
3e87cb7c7d fix expired message on dashboard and some of the tests 2018-10-17 09:20:45 -04:00
Jeremy Bowman
4e8668d3be TE-2524 Stop using nose.plugins - LMS 2 2018-08-01 13:54:06 -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
Stuart Young
1fd2167144 rebalance python unittests onto new shards 2018-05-03 11:16:05 -04:00
Jeremy Bowman
103c723c6d PLAT-1801 Preserve new user login behavior under Django 1.10+ 2017-12-05 10:20:25 -05:00
bmedx
5fbbf4979a Tag LMS Unit 1 tests that fail in Django 1.11 2017-11-22 15:46:45 -05:00
Jeremy Bowman
fd6af6b05e ddt usage cleanup 2017-09-05 17:25:51 -04:00
cahrens
6f71706b17 Remove SlashSeparatedCourseKey from tests. 2017-08-07 14:49:30 -04:00
Diana Huang
c338b751f2 Consolidate access checks for prereqs and surveys. 2017-07-24 11:42:39 -04:00
Andy Armstrong
aeecf34387 Enable conditional pre-start-date access to courses
LEARNER-1854
2017-07-14 14:00:48 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -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
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
noraiz-anwar
d78d52e132 Add masquerading feature for preview mode 2017-05-03 18:50:50 +05:00
cahrens
dbae1e397d Add ability to set visibility by enrollment track.
TNL-6744
2017-04-05 11:05:31 -04:00
cahrens
e5035746bf Introduce EnrollmentTrackUserPartition.
TNL-6674
2017-03-30 12:24:48 -04:00
cahrens
a6776f6973 Always check group access when masquerading.
TNL-6050
2017-01-19 14:47:10 -05:00
Jillian Vogel
8493ff6028 Checks access using the CCX course key,
instead of using the base course key (which does not contain the CCX info).
This removes the need for special checking of CCXKey/CCXLocator types, and just
treats them like normal CourseKeys.

This fix allows users with a Staff role on a CCX course to view CCX courses in Insights.
2016-12-22 08:37:49 +10:30
Sanford Student
fc943ff539 moving milestones check to access.py and upgrading milestones version 2016-08-04 14:47:15 -04:00
Calen Pennington
bc20a37c2b Simplify how shards are selected in CI 2016-08-03 16:23:02 -04:00
Ned Batchelder
8b1978ba6c Fix unused-import errors 2016-08-03 12:44:41 -04:00
Nimisha Asthagiri
a1a5a0fcb9 Enable Milestones in LMS Tests 2016-07-27 14:56:24 -04:00
Calen Pennington
57f7271b0b Use the Django TestClient for courseware unit tests, so that middleware is cleaned up properly 2016-06-08 16:43:30 -04:00
Nimisha Asthagiri
c6954902e3 Create courseware/views folder 2016-05-03 09:02:45 -04:00
Ben Patterson
b9558a90f1 Create a 3rd explicit shard for unit tests.
More accurately, this creates a 4th shard because the
last shard is always the default.
2016-04-28 10:09:32 -04:00
muzaffaryousaf
e572eafaa4 Staff should be able to masquerade when previewing content.
TNL-4291
2016-03-31 19:12:16 +05:00