Commit Graph

1176 Commits

Author SHA1 Message Date
Usama Sadiq
588f11b100 refactor: apply lint-amnesty to pylint violations 2021-04-27 14:43:31 +05:00
Kyle McCormick
b0d41f6ebb refactor: simplify ProblemBlock inheritance hierarchy (#27363)
Previously, ProblemBlock's implementation was split between
CapaMixin/CapaFields (in capa_base.py) and ProblemBlock
(in capa_module.py), the former being the base classes of the
latter. The split existed for a historical reason:
as a former XModule, ProblemBlock was once split
between CapaDescriptor (author-facing) and CapaModule
(learner-facing). Since ProblemBlock has been converted
to being a pure XBlock, the division between the base
classes and the block class are no longer necessary
nor semantically helpful.

docs: Flesh out ProblemBlock's docstring a bit.
2021-04-22 12:44:15 -04:00
Usama Sadiq
2b55959a8e refactor: apply lint-amnesty on existing violations 2021-04-20 23:51:31 +05:00
stvn
f646971c74 refactor: Move OrgInstructorFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
31bc741410 refactor: Move OrgStaffFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
ffcfc05a61 refactor: Move BetaTesterFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
22fb1ec124 refactor: Move InstructorFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
2fa36fb0cf refactor: Move StaffFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
5dd8302d8b refactor: Move GlobalStaffFactory helper to common/ 2021-04-14 07:26:39 -07:00
stvn
7d33d0d1e9 Merge PR #27289 refactor/lms-to-core/get-course-by-id
* Commits:
  refactor: Import a single function, not the whole module
  refactor: Move get_course_by_id helper from LMS to core
2021-04-14 07:08:19 -07:00
Dillon Dumesnil
3a89ed4275 Merge pull request #27262 from edx/ddumesnil/switch-relative-dates-to-course-waffle-aa-677
refactor: AA-677: Switch relative dates to CourseWaffleFlag
2021-04-14 06:17:08 -07:00
Awais Qureshi
6b6e87e797 refactor: upgrading factory-boy. 2021-04-14 15:17:32 +05:00
stvn
43698fff0a refactor: Move get_course_by_id helper from LMS to core
This helper is used by the LMS, CMS, _and_ `openedx.core`,
so let's move it to `openedx.core` to reduce import complexity.

The following files no longer import from LMS:
- cms/djangoapps/contentstore/management/commands/edit_course_tabs.py
- lms/djangoapps/ccx/migrations/0006_set_display_name_as_override.py
- openedx/core/djangoapps/ccxcon/api.py
- openedx/core/djangoapps/verified_track_content/models.py
- openedx/features/course_experience/plugins.py

Note: The LTI XBlock has a dependency on this import path (!?);
a fix can be found here [1].

- [1] https://github.com/edx/xblock-lti-consumer/pull/154
2021-04-13 23:25:48 -07:00
Jawayria
953f1fa05c Merge pull request #26615 from edx/jawayria/bom-2408-7
BOM-2408: Removed unused imports from openedx/core/{djangolib, lib} a…
2021-04-12 14:45:52 +05:00
Bianca Severino
83ceefc4c5 Merge pull request #27244 from edx/bseverino/proctoring-info-masquerade
[MST-738] Pass username into CourseHomeMetadataView
2021-04-09 10:44:04 -04:00
Dillon Dumesnil
c9197d3cfc refactor: AA-677: Switch relative dates to CourseWaffleFlag
We have been bucketing all users into the relative dates experiment
since May 18, 2020. We no longer need to keep this as an
ExperimentWaffleFlag and can convert to a CourseWaffleFlag (so it
continues to support exemptions).
2021-04-08 10:12:54 -04:00
Kyle McCormick
19ba691e33 refactor: clean up some courseware URL handling docs & tests
Based on Julia's code review.
2021-04-07 10:24:58 -04:00
Kyle McCormick
a69567b18b feat: default staff to courseware MFE if active (via jump_to)
The /jump_to/ LMS endpoint is used in a number of places
to direct users to courseware. It currently only redirects to
Legacy courseware URLs, which then conditionally may
redirect to the Learning MFE.

Two issues with this:
1. Performance Impact: In most cases, going to Legacy first
   is just an extra redirect.
2. Confusion for Privileged Users: Neither course nor global
   staff are auto-redirected from the Legacy experience to the
   MFE. Thus, these priviliged users confusingly never see the
   MFE by default; they must always manually click into it.

This commit makes it so that /jump_to/ directs
users to whatever the default courseware experience is
for them. For staff of courses active in the new experience,
this will impact (at a minimum) the "View Live"
links in Studio, all links on the old and new LMS
course outline, and the "Resume" links on the course
dashboard. Learners should see no difference other than
a performance improvement when following courseware links
from the LMS.

This also adds an optional 'experience=[legacy|new]'
query param to /jump_to/, allowing us to specifically
generate Legacy courseware URLs for the
"View in Legacy Experience" tool.

TNL-7796
2021-04-07 10:24:58 -04:00
Muhammad Ammar
9d7e804236 Merge pull request #27255 from edx/ammar/update-cache-key-for-dsc
update cache key for DSC
2021-04-07 15:27:42 +05:00
Zaman Afzal
194f29ca55 ENT4134 Add the support for multiple IDPs (#27073)
* ENT4134 Add the support for multiple IDPs
2021-04-06 23:27:20 +05:00
muhammad-ammar
3929d098b6 update cache key for dsc 2021-04-06 17:34:42 +05:00
Jawayria
4cdf466215 refactor: Removed unused imports
Removed unused imports from openedx/core/{djangolib, lib} and openedx/{tests, features}
2021-04-06 17:24:04 +05:00
Bianca Severino
8cee215c01 feat: pass username into CourseHomeMetadataView
Passes the request username into the course home metadata view so that
masquerade functionality can be used with the proctoring info panel.
2021-04-05 15:15:05 -04:00
Robert Raposa
8ef8b35a54 docs: update toggle docs
A variety of updates were made to improve the toggle documentation:
* Added comments to help ensure that the waffle(), waffle_switches(),
  waffle_flags() anti-pattern won't be contagious (copied).
* Some minor toggle_description updates.
* Removed empty toggle_target_removal_date annotations for
  non-temporary toggles.
* Removed empty optional toggle_warnings annotations.
* Removed empty optional toggle_tickets annotations.
* Removed deprecated toggle_category, toggle_status,
  and toggle_expiration_date annotations.
* Fixed some indents, use cases, and implementations.

ARCHBOM-1721
2021-04-01 21:58:29 -04:00
Michael Terry
5d9e7e9fe5 fix: don't count hierarchy blocks as complete for assignments
When considering whether a subsection is complete as an assignment,
skip any "hierarchy" types (sequential, vertical, etc) that don't
have children. If the user can't see the content, don't risk
marking it as complete.

AA-726
2021-03-29 16:06:11 -04:00
Agrendalath
e571693455 Support EXCLUDED blocks in Block Completion Transformer
For now only the discussion blocks were supported. If we had a custom XBlock that specified `completion_mode = XBlockCompletionMode.EXCLUDED`, then it could never be marked as completed on the course outline page, despite being marked as such inside the learning sequence.
2021-03-22 16:21:43 +01:00
Agrendalath
5a27b5df39 Calculate completion for custom blocks on the Course Outline page
This adds support for displaying completion on the course outline page, to remove the discrepancies between this view and the learning sequence. It also simplifies course outline page by reusing existing APIs for determining completion state and finding the "Resume block"'s target.
2021-03-22 16:21:32 +01:00
Usama Sadiq
aa618c460c refactor: remove unused-imports (#27083) 2021-03-19 22:42:14 +05:00
Awais Qureshi
05a5f5954b refactor: remove unused imports. 2021-03-19 10:15:59 +00:00
Awais Qureshi
a872383a70 Merge pull request #26939 from edx/content_type_gating-2
pyupgrade in content-type-gating
2021-03-17 17:33:21 +05:00
Awais Qureshi
6214f2deca Merge pull request #26940 from edx/course-bookmarks
pyupgrade in course-bookmarks, course-duration
2021-03-17 16:45:58 +05:00
Awais Qureshi
2e9bb7b961 Merge pull request #26954 from edx/learner-profile
pyupgrade in leaner-profile, lti-course-tab, personalized-learner
2021-03-16 17:33:17 +05:00
Awais Qureshi
b68566cbed Merge pull request #26951 from edx/pyupgrade-course_search
pyupgrade in course-search and discount.
2021-03-16 16:18:05 +05:00
Awais Qureshi
8ee4bd2f92 Merge pull request #26887 from edx/BOM-2442
pyupgrade in announcements.
2021-03-16 15:26:38 +05:00
Awais Qureshi
52a92d2b40 Pyupgrade in announcements. 2021-03-16 14:21:46 +05:00
Awais Qureshi
81eadbd2ae BOM-2442
pyupgrade in discount app.
2021-03-12 12:41:07 +05:00
Awais Qureshi
b5a6580ecc BOM-2442
pyupgrade in enterprise-support.
2021-03-12 12:39:48 +05:00
Awais Qureshi
4fca4db826 BOM-2442
pyupgrade in learner-profile
2021-03-12 12:37:13 +05:00
Awais Qureshi
e92bdc5dce BOM-2442
pyupgrade in course-bookmarks, course-duration
2021-03-11 15:00:33 +05:00
Awais Qureshi
ace90d5345 BOM-2442
pyupgrade in leaner-profile, lti-course-tab, personalized-learner
2021-03-11 14:57:20 +05:00
Awais Qureshi
d24f79a264 BOM-2442
pyupgrade in enterprise_support
2021-03-11 14:54:23 +05:00
Awais Qureshi
e40d259a09 BOM-2442
pyupgrade in course-search and discount.
2021-03-11 14:49:15 +05:00
Awais Qureshi
967897d517 BOM-2442
pyupgrade in course-bookmarks, course-duration
2021-03-11 14:28:17 +05:00
Braden MacDonald
f99c42fb0c Merge pull request #26667 from BbrSofiane/bbrsofiane/tsd-relative_course_dates
[TSD] Annotate relative_dates waffle flag
2021-03-10 21:38:45 -08:00
Awais Qureshi
805e10a5ac BOM-2442
pyupgrade in course-bookmarks, course-duration
2021-03-10 18:35:45 +05:00
Awais Qureshi
66bd34743c BOM-2442
pyupgrade in content-type-gating
2021-03-10 18:31:46 +05:00
Awais Qureshi
ba4708edd0 Merge pull request #26888 from edx/BOM-2442-calendar-sync
pyupgrade in calendar-sync.
2021-03-10 15:58:31 +05:00
Kyle McCormick
9b37e7d0fe refactor: centralize checks for canonical courseware experience & URL (#26815)
Centralize the logic for choosing between
MFE and Legacy-frontend courseware within
three new functions:
* courseware_mfe_is_active
* courseware_mfe_is_visible
* courseware_legacy_is_visible

This allows us to create another new function:
* get_courseware_url
which can be called anywhere in LMS/Studio
to get the canonical URL to courseware
content (whether it be MFE or Legacy).

In future commits we we begin using
get_courseware_url throughout the platform.

TNL-7796
2021-03-08 15:24:16 -05:00
Awais Qureshi
6b4bed37a3 BOM-2442
pyupgrade in calendar-sync.
2021-03-08 13:24:16 +05:00
Awais Qureshi
d0ed3ee942 BOM-2442
pyupgrade in calendar-sync.
2021-03-08 13:13:52 +05:00