I wanted to make a byte-sized contribution but there were no Jira tickets so we decided, thanks to a conversation with @jmbowman through the Open Edx Community #incr (Slack) channel, to collaborate in the elimination of warnings listed in the Warnings Report at https://build.testeng.edx.org/job/edx-platform-python-pipeline-master/warning_5freport_5fall_2ehtml/
This PR contributes to the elimination of deprecation warnings, specifically the one mentioned above and reported in the Warnings Report.
Changed logger.warn to logger.warning in the following files:
lms/djangoapps/experiments/utils.py
lms/djangoapps/lti_provider/outcomes.py
lms/djangoapps/courseware/module_render.py
This warning occurs due to deprecation in python 3.4+: https://docs.python.org/3.5/library/logging.html#logging.Logger.warning
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
* Reenable Learning Sequence MFE redirect tests
TNL-7157 These tests may were the cause of intermittent test failures a couple weeks ago. Here they are reenabled after changing the way ExperimentWaffleFlag is overridden.
* Update is_experiment_on and add ExperimentWaffleFlag override test
* Update test_flags.py
* Add docstring about overrides
* prefer is_experiment_on over _is_enabled
TNL-7157 These tests may were the cause of intermittent test failures a couple weeks ago. Here they are reenabled after changing the way ExperimentWaffleFlag is overridden.
- 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
This looks like the last failing unit test under Django 2.2. One of a series of such failures resulting from Django no longer accepting None as POST data (since you can't really get it from a real request), most of which were already fixed by the Arbisoft team in the last few days.
We're seeing slow commits on production for courseware_studentmodule
updates. Based on the slow queries during those times, we think it
might be because multiple worker processes are trying to update the
same rows from within long-running transactions (since courseware
is relatively slow).
The risk with this is that since the whole view execution is no
longer wrapped in a big implicit transaction, it's possible that
XBlock state will update and things that key off of that (e.g.
completion progress information or pre-req milestones) will fail
in a way that will leave the database in an unplanned-for state,
though this is already the case for those actions that trigger
asynchronous tasks like grades recalculation.
The query counts for the index view test were adjusted down
because save points count towards the total and we're no longer
setting them at the top level around the view as a whole.
- ensure logic for displaying reset dealines banner in courseware
is behind the relative dates waffle flag, only shows if the
course is self paced, and handles the situation where no
sequentials exist.
If the user is not logged in, the ExperimentWaffleFlag code was
raising an exception when trying to send an event to segment.
This is a quick fix to ignore anonymous users.
This is an unused-as-of-yet utility function to generate a bunch
of ics files for a user's course schedule. Will be used as part
of the calendar_sync feature package.
AA-37
The VideoBlock `handle_ajax` is allowing NaN values for speed key
and causing videos to not load. Also added a data migration to fix
the data for learners.
PROD-1148
Create the COURSEWARE_MICROFRONTEND_COURSE_TEAM_PREVIEW
CourseWaffleFlag (courseware.microfrontend_course_team_preview) to
enable us to roll out the new Courseware MFE as a preview to
select course teams without affecting their students. TNL-7117
This commit also fixes an issue where these links are shown in Old
Mongo courses (TNL-7116). Old Mongo is marked for deprecation
(DEPR-58), and is not intended to ever be supported by the new MFE.
Check to make sure that "activate_block_id" is actually a Unit
(VerticalBlock) before using it to build a link to the Courseware
MFE. We were previously sending sequence block keys here, causing
the MFE to render a whole sequence where only a unit was desired.
Fixes TNL-7115
Show a link the courseware MFE to course staff if the
ENABLE_COURSEWARE_MICROFRONTEND feature is enabled and the
REDIRECT_TO_COURSEWARE_MICROFRONTEND CourseWaffleFlag is active
for that course. Previously only global staff could see this link.
This commit also adds ENABLE_COURSEWARE_MICROFRONTEND to
lms/envs/common.py and makes this value True by default on
devstack, since that front end application should soon be part
of devstack: https://github.com/edx/devstack/pull/484
Related to TNL-6982 and TNL-7045.