Commit Graph

173 Commits

Author SHA1 Message Date
Kyle McCormick
558d2eb52c refactor: centralize learning MFE URL-building logic (#26689)
In preparation for switching LMS/Studio over
from serving legacy courseware URLs in certain
places (for example, resume_course_url) to serving
learning micro-frontend URLs.

TNL-7796
2021-02-24 08:50:15 -05:00
Awais Qureshi
07b182b3be BOM-2335
Apply pylint-amnesty.
2021-02-04 16:37:41 +05:00
Carla Duarte
d97b058c5d AA-568: fix start course bug 2021-01-27 15:29:21 -05:00
Carla Duarte
99163bdf2c AA-131: Allow anonymous users through course home MFE 2020-12-16 12:58:33 -05:00
alangsto
1def252129 adding course waffle for proctoring info panel (#25803)
updated for feedback
2020-12-08 13:05:57 -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
sarina
b8bd4f6310 DEPR-48 Remove CourseTalk integration & Course Reviews functionality 2020-11-17 13:11:54 -05:00
Michael Terry
40fbef4af2 AA-289: rewrite how course updates behave when dismissed
Previously, dismissing one course update would disable all future
updates. But that feels a bit limiting.

Instead, these are the new rules:
- If the newest update has not been dismissed yet, it gets displayed.
- If the newest update has been dismissed, we display nothing.
- Editing the newest update will cause it to be displayed again.
- New updates get displayed, even if previous updates were dismissed.

This commit includes a light refactoring and addition of some utility
methods to help manage the above.

It also notes that the learning MFE does not use the "latest_update"
waffle option, which controls the labeling of the update message.
2020-11-12 09:39:15 -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
Dillon Dumesnil
8bb88df35f Revert "AA-51: Adds in 'Up next' banner to course home" 2020-10-23 11:05:27 -07: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
5949c17dda [BD-10] Remove uses bootstrap method (#24535) 2020-07-28 08:57:42 -04:00
morenol
68d1c7f78c [BD-10] Remove _uses_pattern_library property from EdxFragmentViews (#24536) 2020-07-27 12:01:40 -04:00
Dillon Dumesnil
de8ef23d24 Merge pull request #24595 from edx/ddumesnil/aa-234
AA-234: Switch link in dates widget if Course Home MFE is active
2020-07-24 08:30:43 -07:00
Dillon Dumesnil
39b66dcdbb AA-234: Switch link in dates widget if Course Home MFE is active 2020-07-24 07:54:21 -07:00
David Ormsbee
96ea413a07 Make Blocks API and Dates mobile views non-atomic.
These are expensive, read-only web requests. Unfortunately,
middleware adds writes, and we currently run with view-level
transactions enabled by default. Holding those long transactions
open has caused extra load on the database and been our largest
sources of django.db.utils:OperationError exceptions.

This has been particularly noticeable as we start deploying the
new Courseware MFE, which uses the BlocksInCourseView more
frequently.
2020-07-22 17:10:11 -04:00
Dillon Dumesnil
be346499da AA-219: Dates Tab behavior improvements
This switches the Dates Tab to be an enrolled tab allowing only
enrolled learners to view. Additionally, it will now redirect
logged out learners to the login page if they hit the Dates Tab directly.
2020-07-10 07:08:07 -07:00
Aura Milena Alba
6026a98e11 Remove pattern library in course_home.py (#24157)
[BD-10] [DEPR-83][DEPR-81] Remove pattern library in course_home.py
2020-07-07 11:23:22 -04:00
Adam Butterworth
4ebe6a8458 Merge pull request #24111 from eduNEXT/ama/DEPR-79
[BD-10] [DEPR-79] Remove pattern library of mobile/course-dates-fragment.html
2020-06-18 09:15:43 -04:00
Adam Butterworth
98dd03a638 Merge pull request #24077 from eduNEXT/ama/DEPR-78/DEPR-82
[BD-10] [DEPR-78][DEPR-82] Remove pattern library of latest-update-fragment.html and welcome-message-fragment.html
2020-06-18 09:15:20 -04:00
Adam Butterworth
0768acbf40 Remove pattern library of course_experience/course-outline-fragment.html (#24044) 2020-06-18 09:14:38 -04:00
morenol
41543edd93 Remove course_experience.use_bootstrap waffle flag (#24028)
[BD-10] [DEPR-83]
2020-06-17 13:26:51 -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
Dillon Dumesnil
304b000b1b Merge pull request #24134 from edx/ddumesnil/dates-widget-enhancement-AA-103
AA-103: Dates widget enhancements
2020-06-08 06:21:44 -07:00
Aura Milena Alba
b7a838c34b Remove pattern library of course_experience/course-updates-fragment.html. (#24062) 2020-06-05 09:54:03 -04:00
Dillon Dumesnil
f32c51383b AA-103: Dates widget enhancements
Reducing dates widget to one assignment. Adding link to dates
page in the dates widget
2020-06-04 12:48:00 -06: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
Aura M. Alba
2a79db8dce Remove pattern library of mobile/course-dates-fragment.html 2020-06-01 12:02:42 -05:00
Aura M. Alba
0ad20bd5b9 Remove pattern library of course_experience/latest-update-fragment.html 2020-05-29 11:52:44 -05: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
Carla Duarte
6fd6605eed Remove Shorten Welcome Message flag
Removed use of the 'shorten_welcome_message' waffle flag

AA-108
2020-05-08 15:25:59 -04:00
Dillon Dumesnil
10759a9046 Merge pull request #23819 from edx/ddumesnil/more-date-pills-aa-99
AA-99: Adding in new date pills for the dates tab
2020-05-06 06:12:50 -07:00
Simon Chen
262574b815 Move all the upgrade display logic into courseware.utils 2020-05-05 17:54:22 -04:00
Dillon Dumesnil
858154a7d6 AA-99: Adding in new date pills for the dates tab 2020-05-04 07:24:01 -07:00
Simon Chen
34d4d162f7 MST-108 Add masquerading fix to the upgrade message display 2020-05-01 16:54:43 -04:00
David Joy
7a400e2917 Factoring redirects out of check_course_access so it can be used with courseware_api (#23651)
TNL-7053

The courseware_api view will use check_course_access - which now returns AccessResponse objects, and all other uses of check_course_access will now use check_course_access_with_redirect, which is a drop-in replacement for the original check_course_access implementation.

We also added a few new helpers to access_utils:

- check_public_access is a replacement for allow_public_access, which now returns AccessResponse objects
 - check_enrollment checks if the learner is enrolled, and uses check_public_access to account for COURSE_ENABLE_UNENROLLED_ACCESS_FLAG
- check_survey checks whether there is a required survey that the learner must complete prior to accessing the course.

There are two new kinds of AccessError subclasses:

- SurveyRequiredAccessError
- EnrollmentRequiredAccessError
2020-04-15 10:29:24 -04:00
Nicholas D'Alfonso
396050703e AA-97 mobile reset message
- remove code for displaying banner in mobile dates fragment
- replace button with link to web app in reset dates banner on
  the mobile problem template
- adjust spacing of reset dates button in banner when button wraps
  on smaller screen
2020-04-09 12:55:26 -04:00
Michael Terry
7a71356cd2 Cut off long course welcome messages
If a course welcome message is very long, cut it off with an
ellipsis and show a Show More button to reveal the full thing.

AA-46
2020-04-07 10:49:40 -04:00