Commit Graph

62 Commits

Author SHA1 Message Date
Awais Qureshi
07b182b3be BOM-2335
Apply pylint-amnesty.
2021-02-04 16:37:41 +05:00
Régis Behmo
216b99264a Upgrade waffle classes to the new edx-toggles API
Waffle classes no longer have namespaces. All features are moved to the
WaffleFlag/WaffleSwitch classes.

Here we use the edx_toggles.toggles.__future__ API, which is available
in 1.2.0. This means that we don't have to upgrade edx-toggles. We
should remove the __future__ imports as soon as we upgrade to 2.0.0.
2020-12-03 16:40:43 +01:00
Régis Behmo
d13a1fb5f5 Upgrade completion
This is required because edx-platform uses the waffle API from
completion, which itself depends on edx-toggles. So if we change
edx-toggles import paths, we also need to upgrade our usage of
completion here.
2020-12-03 16:06:15 +01: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
Calen Pennington
f9619d6cad Add a pluggable CallToAction service for XBlocks
This also has an initial use case for Personalized Learner Schedules
to add CTAs to capa and vertical blocks to allow users to shift their
course deadlines.
2020-08-06 14:38:26 -04:00
morenol
68d1c7f78c [BD-10] Remove _uses_pattern_library property from EdxFragmentViews (#24536) 2020-07-27 12:01:40 -04:00
Adam Butterworth
0768acbf40 Remove pattern library of course_experience/course-outline-fragment.html (#24044) 2020-06-18 09:14:38 -04:00
Calen Pennington
86e2677f26 Use a standard function to find out if a course has ended 2020-06-11 11:40:56 -04:00
Calen Pennington
1cf46e76d0 Don't compare None to a date when a course doesn't have an end date 2020-06-11 11:40:56 -04:00
Calen Pennington
333c9ccddf Simplify how the course-outline template context is constructed to bring it into parity with other template contexts 2020-06-11 11:40:56 -04:00
Calen Pennington
2b2a6cca23 Never show the dates banner on archived courses 2020-06-11 11:13:55 -04:00
Calen Pennington
c6695e0b6f Only actually reset user schedule if they have missed deadlines and not missed any gated content deadlines 2020-06-10 15:18:53 -04:00
Calen Pennington
15df17034a Only prompt the user to upgrade if they have missed the deadline of gated graded content 2020-06-10 15:18:53 -04:00
Calen Pennington
f9cfbd8593 Revert "Merge pull request #24131 from edx/revert-24085-use-content-type-gating-in-dates-banner"
This reverts commit c3ec8b837a, reversing
changes made to 4252b14927.
2020-06-03 09:57:22 -04:00
Calen Pennington
561cdab7dd Revert "Use content type gating in dates banner" 2020-06-03 09:52:24 -04:00
Calen Pennington
7c4585ebfe Only prompt to upgrade in order to completed graded content (or shift dates) when content_type_gating is enabled 2020-06-02 14:23:28 -04:00
Aura M. Alba
941a93f531 Remove pattern library of course_experience/course-outline-fragment.html 2020-06-01 18:45:45 -05:00
Calen Pennington
6f568d097c Set missed_deadlines in the course outlines template to simplify the logic in the dates_banner.html 2020-06-01 15:48:40 -04:00
Calen Pennington
0c7947c8a2 Pass whether content type gating is enabled for the current user into the dates_banner template 2020-05-28 11:34:05 -04:00
Calen Pennington
34c03bf14a Fix some accidental tuples in the variables passed to the dates_banner 2020-05-27 11:24:10 -04:00
Nicholas D'Alfonso
b454f9be1d AA-151 dates banner on course outline and refactor
- use new dates banner template on course outline page
- remove old banner from main.html
- let dates tab use new dates banner template
- remove dates banner completely from the courseware problem view
  on the web app
- use new banner on the courseware problem view on the mobile app
- update banner util to use get_course_blocks
2020-05-21 13:23:05 -04:00
Nicholas D'Alfonso
ac9d2bfd30 AA-85 mobile reset dates
- render reset dates banner in webview for mobile app.
- improve banner redirect mechanism
2020-04-02 00:37:54 -04:00
Michael Terry
f56a01adbe Reset schedule when mode changes
This way if an audit user upgrades a self paced course to verified,
their schedule will reset to the current time.

AA-60
2020-03-11 11:53:49 -04:00
Calen Pennington
5235fa7bab Respect masquerade status when resetting student schedules 2020-03-10 15:10:01 -04:00
Nicholas D'Alfonso
be3b150621 AA-12 reset self paced due dates
- for self paced courses, if a sequential's due date has passed
  and it is incomplete, allow the user to reset the start_date
  for the related schedule to now, thus shifting all due dates
  for all sequentials within the course by the pre determined
  due date offset.
- add historical table to the Schedule model.
2020-03-04 15:13:46 -05:00
Calen Pennington
f3bce46757 Allow due-dates for self-paced courses in the course outline 2020-02-24 12:43:09 -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
DawoudSheraz
4329168810 add visual check for due dates in self-paced courses 2019-05-16 16:35:42 +05:00
Ana Maria Rodriguez
d2f7acf29c INCR-193
Run python-modernize on openedx/features/course_experience/views and openedx/features/course_experience/tests
2019-04-24 13:52:53 -05:00
Matthew Piatetsky
064f041276 Revert "Revert both" 2019-04-09 11:04:10 -04:00
Matthew Piatetsky
be9eb46364 Revert "handle missing fields on access denied blocks"
This reverts commit 418540b713.
2019-04-08 12:13:30 -04:00
Matthew Piatetsky
418540b713 handle missing fields on access denied blocks 2019-04-03 12:32:35 -04: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
sandroroux
3899b76929 Removes the new course outline waffle flag. 2018-04-13 12:28:14 -04:00
Gregory Martin
62775c891a Delete visual_progress_enabled waffle flag.
https://openedx.atlassian.net/browse/EDUCATOR-2333
2018-04-06 15:07:16 -04:00
attiyaishaque
438ecceb01 Fix due date display format according to set in advanced settings. 2018-04-03 16:03:15 +05:00
Alex Dusenbery
fb7efb7338 EDUCATOR-2582 | Inspect waffle switch model to find completion tracking date start. 2018-03-26 15:58:28 -04:00
Sofiya Semenova
774fe73ca9 Auto-open first unit in course outline if user has no completion data 2018-03-06 10:52:22 -05:00
Sofiya Semenova
ee08019f6e Check that a user enrollment exists in the course outline 2018-02-27 10:26:53 -05:00
Awais Jibran
3ff2488025 Fix course home page bug 2018-02-27 16:47:23 +05:00
Sofiya Semenova
f4ec7cca5f Add visual progress checkmarks to course outline 2018-02-21 12:53:43 -05:00
Simon Chen
db81dfa424 Surface vertical units in the course outline 2018-02-12 14:27:52 -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
John Eskew
0890193d6b PLAT-1408: Import csrf from new path. 2017-10-05 11:12:53 -04:00
Andy Armstrong
aeecf34387 Enable conditional pre-start-date access to courses
LEARNER-1854
2017-07-14 14:00:48 -04:00
Nimisha Asthagiri
3bbeb75c58 Planning Prompts experiment: check content availability date 2017-06-13 17:32:56 -04:00
Calen Pennington
39048048da Add comments around In-course verification prompt throwaway code 2017-06-13 15:18:46 -04:00