Commit Graph

4136 Commits

Author SHA1 Message Date
Bianca Severino
54505b82c4 Merge pull request #26436 from edx/bseverino/proctoring-check-fix
[MST-645] Account for no enrollment in courseware rules
2021-02-08 13:39:40 -05:00
Bianca Severino
4fb36709a5 Account for no enrollment in courseware rules 2021-02-08 13:12:52 -05:00
Carla Duarte
8d2d78dc61 AA-650: block deprecated keys from course home MFE 2021-02-08 13:00:36 -05:00
Usama Sadiq
90666a6231 Merge pull request #26311 from edx/usamasadiq/bom-2305-pylint-amnesty
Applied pylint-amnesty
2021-02-08 18:23:34 +05:00
usamasadiq
7bbde8f0f5 Applied pylint-amnesty 2021-02-08 13:00:22 +05:00
Matthew Piatetsky
b91f720b7e Merge pull request #26293 from edx/AA-613
[AA-613] Return content type gate for staff users when masquerading as the Learner in Audit or Learner in Limited Access Roles
2021-02-05 09:18:34 -05:00
Matthew Piatetsky
ae7d0a1ed8 Return content type gate for staff users when masquerading as the Learner in Audit or Learner in Limited Access Roles
This is necessary to display the content type gate in the UI
AA-613
2021-02-04 17:34:16 -05:00
Jawayria
03e6a874d0 Applied pylint-amnesty to courseware 2021-02-03 21:56:24 +05:00
M. Zulqarnain
feaf5011c8 BOM-2287 : Pylint amnesty in teams,tests,survey and verify_student (#26305)
* lint amnesty in teams,tests,survey and verify_student
2021-02-03 18:15:03 +05:00
jawad khan
957f3ab8a5 LEARNER-8191 - Added first_component_block_id in dates api (#26319)
* LEARNER-8191
Added first_componnet_block_id in dates api
2021-02-03 13:53:21 +05:00
Bianca Severino
902ab02357 Send proctoring requirements email when enrolled in relevant course mode 2021-02-01 09:44:30 -05:00
Matthew Piatetsky
84fb4679c9 Add contains_content_type_gated_content attribute to display items in the Sequence Metadata API. This attribute is used to display the content type gating paywall in frontend-app-learning.
Also, refactor existing timed exam code that checks for content_type_gated_content in a sequence to make it try with the new code
AA-613
2021-01-28 12:00:53 -05:00
Manjinder Singh
2723e0e2bd [ARCHBOM-1645] Modifying anonymous_id_for_user() to handly SECRET_KEY rotation (#26162)
These changes were initially made to make it easier to do SECRET_KEY rotations.  Along the way, we found it made sense to refractor the code as well.

Changes made:
- changed get_to_create to create because now the code should only get to this block when a write is necessary
- added a lookup for anonymous_user_id. This is to return an existing anonymous_user_id rather than calculating. This will mitigate the results of SECRET_KEY rotation.
- Added monitoring to help us make better decisions: should we not sue SECRET_KEY, performance considerations...
- put old function behind toggle in case something goes wrong in production with new code
- refractoring function structure for better understanding
2021-01-27 07:23:19 -05:00
Michael Roytman
0912b44254 Merge pull request #26147 from edx/mroytman/MST-545-pass-proctoring-improvements-toggle-edx-proctoring
pass value of EXAM_RESUME_PROCTORING_IMPROVEMENTS feature toggle to ed…
2021-01-25 12:21:55 -05:00
Carla Duarte
878f9a3064 AA-568: dates widget styling 2021-01-25 10:51:20 -05:00
Michael Roytman
71cc2e18e5 pass value of EXAM_RESUME_PROCTORING_IMPROVEMENTS feature toggle to edx-proctoring Javascript via the student-proctored-exam-container div 2021-01-25 09:59:44 -05:00
Kyle McCormick
9d317c5c52 Fix patch of deprecated course_modes import path
The correct path is `common.djangoapps.course_modes...`
2021-01-21 10:49:47 -05:00
Kshitij Sobti
6769a280a9 Added a new LTI-based course tab, and LtiDiscussion tab
This PR lays the groundwork for a an LTI tab that can embed any LTI1.1-based
tool as an course tab. It also adds another tab based on this LTI Tab that
offers special support for embedding LTI-based discussion tools in a course
tab. If enabled this will replace the existing discussion tab.
2021-01-20 16:24:55 +05:30
Ned Batchelder
91d0c43cc8 Slightly clearer (#26060)
Without to_locale, it's not a locale anymore, so don't call it that.
2021-01-13 13:34:30 -05:00
Mahyar Damavand
e66ff41194 Change data-language format to ISO639-1 (#25278) 2021-01-13 12:07:59 -05:00
David Ormsbee
098e047fce Merge pull request #25987 from edx/ormsbee/tnl-7636-xblock-access
Check sequence-level gating in render_xblock (TNL-7636)
2021-01-13 09:35:56 -05:00
David Ormsbee
5f94a082ce Check sequence-level gating in render_xblock (TNL-7636).
There is certain gating logic around pre-reqs, timed exams, etc.
that happen at the SequenceModule level, and should be respected
when rendering descendant XBlocks (like individual problems) that
are in that Sequence. Rather than do a risky refactoring, I'm
keeping that logic where it is and having the render_xblock view
climb up through the ancestor list to call the SequenceModule for
that gating information.

We do _not_ check all descendants (so cousin leaf nodes in the
sequence) for cotent-type-based restrictions because sequences can
become very large (esp. when content libraries are used), and there
is a performance overhead.

If the enclosing sequence is gated in some way, we redirect to the
render_xblock view for that sequence, where hopefully some useful
messaging will be available. This is a stopgap. That redirect
should never happen because we should never be calling the leaf
XBlock for a sequence that is restricted in the MFE. But if somehow
we get there anyway, either by bug or by intrepid user fiddling,
it's better to redirect somewhere that an error _might_ be surfaced
rather than just failing.

This will actually be a little overzealous and lock things down
that should be made visible later. If there's a timed exam and the
exam is completed, it should be the case that content is visible
(just read-only). This commit will block the content before the exam
starts (this is right), open the content while the exam is live
(this is right), but make the content unavailable after the exam
period has finished (this is wrong).

But I am going to go forward with this even knowing it's wrong
because:

1. The render_xblock endpoint should never currently be used in
   timed exams in an intentional way. Neither the mobile experience
   nor the courseware MFE support it.
2. This fix will address security concerns for creative access
   patterns, even if it goes too far.
3. We're going to need to do a lot of work to address both pluggable
   access permissions handling and special exams in the courseware
   MFE, and a better implementation can be done then.
4. I've had multiple failed attempts to get this to work without
   breaking things on and off over the course of weeks, and this
   is a relatively low risk way of doing it that doesn't involve
   a major refactoring (though the bill for that will come due
   when we bring timed exams to the MFE).
2021-01-12 12:57:22 -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
Usman Khalid
9e38b17202 Convert ErrorModule and NonStaffErrorModule to XBlocks. (#25570) 2021-01-07 10:51:33 -05:00
Dillon Dumesnil
e17e691d54 AA-501: Use hidden blocks to determine past due status
Blocks that were hidden by access checks would not be used when
calculating past due status for a unit. This adds in a check to
still look at those blocks, but will maintain not rendering them
when being accessed via the MFE
2021-01-06 14:11:03 +00:00
Igor Degtiarov
acbefd1079 Extend appropriate proctoring exam modes if provider allows it. (#25927)
The honor enrollment mode is widely used in OpenEdx installations,
and recently it was not allowed for proctoring exam, but very anticipated.

Current PR makes it possible to start the proctoring exam in the honor enrollment
mode in case the provider is configured in that way.
2021-01-05 13:20:35 -05:00
Kyle McCormick
54d5f7f394 Course Blocks API: Fix handling of incorrectly-cased course keys (#25911)
Commit 7f59688 attempted to solve this using
`CourseOverview.course_exists`, but that check is case-
insensitive. This commit instead does a small refactor
to `lms.djangoapps.courseware.get_course` so that we can
handle a failed course lookup without broadly catching
a `ValueError`.
2020-12-18 11:26:29 -05:00
Robert Raposa
de16529ab6 Merge pull request #25885 from regisb/regisb/fix-deprecated-waffle-usage
[BD-21] Fix deprecated waffle usage
2020-12-17 12:41:40 -05:00
Carla Duarte
3fb3f913b5 Merge pull request #25661 from edx/ciduarte/AA-131
AA-131: Allow anonymous users through course home MFE
2020-12-16 15:49:20 -05:00
Dillon Dumesnil
e1517223b9 Fixes for Shift deadlines during masquerade in Learning MFE
The change to masquerade in the courseware view allows the proper
viewing of the xblock from the perspective of the masqueraded user.
In this case, it allows a staff user masquerading as a learner to see
their shift dates calls to action inside the MFE (the old view already
had this set up). The second change allows the staff user masquerading
to reset the schedule of the learner being masqueraded via the CTAs
2020-12-16 19:13:33 +00:00
Carla Duarte
99163bdf2c AA-131: Allow anonymous users through course home MFE 2020-12-16 12:58:33 -05:00
Régis Behmo
f29e415353 Fix deprecated usage of WaffleFlag.namespaced_flag_name
As of edx-toggles==1.2.0, the `WaffleFlag.namespaced_flag_name`
attribute is deprecated in favour of `WaffleFlag.name`.
2020-12-15 12:28:57 +01:00
Michael Terry
eef72b5ab7 TNL-7185: Send data, not rendered HTML to the learning MFE
Specifically, send data versions of course_expired_message and
offer_html.

The rendered HTML is still being sent for now, until the learning
MFE is updated to consume the data objects.
2020-12-14 13:41:03 -05:00
Kyle McCormick
643fbe82a0 Downgrade REDIRECT_TO_COURSEWARE_MICROFRONTEND to CourseWaffleFlag (#25815)
The toggle was previously an ExperimentWaffleFlag,
which allows stable A/B testing but increases the toggle's
complexity. Since we do not plan an doing any more A/B
tests as part of the MFE rollout, we can 'downgrade' this
toggle to a CourseWaffleFlag, which still allows us to do
phased rollout and course-run-specific overrides.
2020-12-09 13:48:47 -05: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
Régis Behmo
a16cd71046 Start waffle namespace deprecation
By explicitly importing the legacy namespace classes, we make it clear
that we are using soon-to-be-deprecated classes. We will then be able to
start removing the legacy classes, one module at a time.
2020-12-03 16:06:14 +01:00
Awais Jibran
f43c6732d1 Merge pull request #25623 from edx/branding/aj/course-dates-links
Update Course Date Links
2020-12-02 01:21:14 +05:00
Michael Terry
181cb70149 Merge pull request #25670 from edx/mikix/as-user-timezone
AA-459: Respect user's timezone in access-expiration message
2020-12-01 09:13:45 -05:00
Simon Chen
00ad36839d MST-542 Roll out Accounts MFE IDV workflow (#25613)
* MST-542 remove the IDV redirect to Account MFE waffle flag to permanently redirect learners to new IDV workflow. This completes the rollout process on edx-platform
2020-12-01 09:08:12 -05:00
Awais Jibran
f8436a0ab8 Update Course Date Links to be buttons 2020-11-30 17:09:03 +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
0x29a
c83a505635 Replace 'multi_db = True' with 'databases = {alias for alias in connections}'
Check this ticket for details: https://code.djangoproject.com/ticket/29513
2020-11-19 14:06:51 +01:00
sarina
b8bd4f6310 DEPR-48 Remove CourseTalk integration & Course Reviews functionality 2020-11-17 13:11:54 -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
Manjinder Singh
c74b623948 Fixing code-annotations (#25539)
* Fixing code-annotations
2020-11-06 12:52:08 -05:00
Kyle McCormick
d1a775d3cd Use full names for lms.djangoapps imports (#25401)
* Use full LMS imports paths in LMS settings and urls modules
* Use full LMS import paths in Studio settings and urls modules
* Import from lms.djangoapps.badges instead of badges
* Import from lms.djangoapps.branding instead of branding
* Import from lms.djangoapps.bulk_email instead of bulk_email
* Import from lms.djangoapps.bulk_enroll instead of bulk_enroll
* Import from lms.djangoapps.ccx instead of ccx
* Import from lms.djangoapps.course_api instead of course_api
* Import from lms.djangoapps.course_blocks instead of course_blocks
* Import from lms.djangoapps.course_wiki instead of course_wiki
* Import from lms.djangoapps.courseware instead of courseware
* Import from lms.djangoapps.dashboard instead of dashboard
* Import from lms.djangoapps.discussion import discussion
* Import from lms.djangoapps.email_marketing instead of email_marketing
* Import from lms.djangoapps.experiments instead of experiments
* Import from lms.djangoapps.gating instead of gating
* Import from lms.djangoapps.grades instead of grades
* Import from lms.djangoapps.instructor_analytics instead of instructor_analytics
* Import form lms.djangoapps.lms_xblock instead of lms_xblock
* Import from lms.djangoapps.lti_provider instead of lti_provider
* Import from lms.djangoapps.mobile_api instead of mobile_api
* Import from lms.djangoapps.rss_proxy instead of rss_proxy
* Import from lms.djangoapps.static_template_view instead of static_template_view
* Import from lms.djangoapps.survey instead of survey
* Import from lms.djangoapps.verify_student instead of verify_student
* Stop suppressing EdxPlatformDeprecatedImportWarnings
2020-11-04 08:48:33 -05:00
Sarina Canelake
18059c20e7 Merge pull request #25505 from edx/sarina/gender-neutral-language
Change gendered language to gender-neutral 'they/them/their'
2020-11-03 16:16:59 -05:00
Régis Behmo
b70042435a Deprecate waffle_utils.testutils.override* functions
These functions should from now on be imported from
edx_toggles.toggles.testutils.
2020-11-03 19:25:37 +01:00
Régis Behmo
4586002956 Import waffle classes from edx_toggles instead of waffle_utils
Those classes were ported to edx_toggles. The imports remain in
waffle_utils.__init__ for backward compatibility.
2020-11-03 19:25:37 +01:00
Régis Behmo
3b127f8c92 Deprecate WaffleSwitch.override* methods
This allows us to get rid of the custom WaffleSwitch and
WaffleSwitchNamespace classes from waffle_utils in favour of
edx_toggles.toggles classes.
2020-11-03 19:25:37 +01:00