Commit Graph

58 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
Michael Terry
1482755bbd Show discount deadline in a timezone-aware way
Also, fix it and the access expiration deadline to not hardcode
the date presentation in an American way.
2021-01-08 13:56:18 -05:00
Michael Terry
e8d9a254bd AA-459: Respect user's timezone in access-expiration message
Before, it would just always use UTC.
2020-11-24 12:02:19 -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
Diane Kaplan
0b2a9c7010 [REV-1205] Add ecommerce event tracking to FBE (feature based enrollment) upsell links (#24528) 2020-07-23 11:40:22 -04: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
stvn
5bf38f5416 Convert masquerade view to class-based 2020-05-19 13:55:37 -07:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
Dillon Dumesnil
fe91d63a0b Show relevant dates in course dates sidebar
This includes (at least) upcoming assignments, FBE access
expiration, and course end date.

AA-4
2020-02-18 08:42:15 -05:00
Dillon Dumesnil
00fe1495b4 Revert commits for AA-4 2020-02-10 12:10:59 -05:00
Dillon Dumesnil
23486a560d Show relevant dates in course dates sidebar
This includes (at least) upcoming assignments, FBE access
expiration, and course end date.

AA-4
2020-02-06 16:01:46 -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
Awais Qureshi
9ed328879e BOM-861
Dictionaries are being rendered into the HTML but in different order between python2 and python3.
The function parses and sorts the dictionary so that we get ordered data that can be compared in tests cases.
2019-10-08 12:45:01 +05: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
Jeremy Bowman
f9929f32b5 Update quality threshold counts (#20681) 2019-05-24 08:27:54 -04:00
Matthew Piatetsky
85f0720c50 fix broken FBE banner dates in firefox 2019-05-16 09:33:24 -04:00
Matthew Piatetsky
444799fb0e fix unicode strings in openedx/ part 2 2019-02-15 10:15:51 -05:00
Troy Sankey
10afe5e52f Additionally logout from a settings list of extra logout URIs
Currently, the LMS logout endpoint should iframe in the logout pages of
all the IDAs you were logged into. In short, this was made possible with
DOP because keeping track of the logout URIs and leaving a trail of
evidence in the user cookies was part of what we added in our fork of
DOP.  In the case of DOT, we don't have time or desire to fork DOT to
mirror this behavior, so our stop-gap solution is to log out the user
from a list of logout URIs in settings.
2019-02-12 19:44:41 -05:00
Matthew Piatetsky
b37bc75bb4 Revert "Revert "change banner date localization to use dateutilfactory""
This reverts commit 08cb56664b.
2019-02-04 12:42:27 -05:00
Matthew Piatetsky
08cb56664b Revert "change banner date localization to use dateutilfactory" 2019-01-20 18:27:03 -05:00
Matthew Piatetsky
f870f7c635 change banner date localization to use dateutilfactory 2019-01-15 03:30:53 -05:00
Calen Pennington
8b014e1fef Add a test of the FBE Upgrade banner
REV-656
2019-01-07 13:11:35 -05:00
Matthew Piatetsky
e0b5e5cb97 write tests for when verified mode expires 2018-12-21 09:57:33 -05:00
Matthew Piatetsky
947410463a localize datetime for banner 2018-12-18 14:52:05 -05:00
Matthew Piatetsky
eaa07082ed update messaging 2018-12-13 01:15:48 -05:00
Matthew Piatetsky
67e9ae5581 Fix content gating a11y issues 2018-12-03 23:26:47 -05:00
Matthew Piatetsky
6cc4fb34be add expiration banner 2018-11-08 17:27:12 -05:00
Diana Huang
deb8bd47d9 Switch existing tests to use the newer endpoint. 2018-09-27 13:33:42 -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
669aa13ad6 PLAT-1873 to_deprecated_string() cleanup part 2 2018-01-08 17:26:55 -05:00
Andy Armstrong
a815003b3b Handle anonymous and unenrolled users on the new course home page
LEARNER-1696
2017-07-10 17:52:28 -04:00
Andy Armstrong
79acb5c5be Reorder LMS imports using isort 2017-06-11 21:48:06 -04:00
Saleem Latif
30eba50b79 Success Message for Account Activation for logged in users 2017-05-19 20:42:40 +05: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
J. Cliff Dyer
9366c43a83 Fix issues with RequestFactory used as Request.
* Centralize creation of quick request objects.
* Isolate caches to individual tests to prevent test ordering
  dependencies.

TNL-5811
2016-11-07 10:51:04 -05:00
Nimisha Asthagiri
aa000c1a3d Support for rescoring a problem only if the new score is higher
TNL-5046
2016-10-20 15:08:54 -04:00
Nimisha Asthagiri
2b8441a072 Update Course Catalog to use CourseOverview 2015-12-10 20:37:50 -05:00
Kyle McCormick
5b630a7704 MA-779 Make has_access work on CourseOverview objects 2015-07-08 12:05:38 -04:00
christopher lee
5cef287c5d MA-635 Block Mobile Content for unfulfilled milestones
Previously, the mobile api did not check for pre-requisite courses
or entrance exams. This change checks for these milestones and then
returns course content accordingly.
2015-05-15 09:39:54 -04:00
stv
056faa1814 Fix Pylint: W0201: attribute-defined-outside-init
LoginEnrollmentTestCase.setup_user: Attribute 'user' defined outside __init__
2014-11-24 20:48:05 -05:00
stv
b215d771b7 Fix PEP8: E128 continuation line under-indented
for visual indent
2014-11-24 20:46:50 -05:00
Julia Hansbrough
6b061ad23b Response to CR 2014-09-24 21:20:49 +00:00
David Baumgold
e99a14eb3f Merge pull request #4654 from edx/db/kill-check-for-code
Replace `check_for_get_code` with `assert_request_status_code`
2014-08-07 08:28:50 -04:00
Usman Khalid
9599c31aa0 Catch InvalidKeyError in static_tab view.
LMS-11189
2014-08-07 15:41:07 +05:00
David Baumgold
5457775cfe Replace check_for_get_code with assert_request_status_code
More flexible, uses the word "assert", method instead of function
2014-08-05 13:36:49 -04:00