Commit Graph

5629 Commits

Author SHA1 Message Date
Awais Qureshi
863a70c6fa BOM-2453
tests are failings and complaining related objects doest not exists in User table. Create object in test setup to fix it.
In another fix article id was giving integrity error.
Fixing task test.
2021-03-15 23:47:57 +05:00
Ben Holt
e93f035876 feat: exposed 'Date' header so clients can compute accurate relative time (#26979) REV-2126
Exposed the Date header so clients can accurately compute times relative to the dates returned by the API; browser time is notoriously unreliable for this, especially for a Learner-facing countdown call-to-action based on the access expiration date. (REV-2126)

Using the Date header for this allows the client to make use of information that is already sent, does not require additional calls nor modifying the API, and could be generalized to more or all our APIs without modifying them.
2021-03-15 14:43:00 -04:00
David Ormsbee
51811f0c5e Merge pull request #26987 from edx/ormsbee/tnl-8057-malformed-structures
Improved error handling in Course Outline generation.
2021-03-15 10:11:57 -04:00
M. Zulqarnain
8ec2699269 refactor: pyupgrade in openedx ccxcon and certificates (#26852) 2021-03-15 18:30:06 +05:00
M. Zulqarnain
94f14c6b3d refactor: pyupgrade on bookmarks, cache_tools, catalog (#26783) 2021-03-15 18:29:40 +05:00
Usama Sadiq
7108562c87 refactor: ran pyupgrade on openedx/core/djangoapps/credentials (#26847) 2021-03-15 18:09:56 +05:00
David Ormsbee
3a552c4fdf feat: Outline error handling and admin improvements.
* Introduces the idea of content errors into the learning_sequences
  public API, accessible using get_content_errors().
* Makes course outline generation much more resilient to unusual
  structures (e.g. Section -> Unit with no Sequence in between),
  with the understanding that anything that doesn't conform to the
  standard structure will simply be skipped.
* Improves the Django Admin for learning_sequences to display
  content errors and improve sequence data browsing within a course.
* Switches the main table viewed in the Django admin from
  LearningContext to CourseContext, which is appropriate since only
  course runs generate outlines.

This was done as part of TNL-8057, with the end goal of making
course outline generation resilient enough to switch over apps
to using the learning_sequences outline API. The types of course
structure errors that this PR addresses cause display issues even
in the current Outline Page experience, but would break the outline
generation for learning_sequences altogether.

The approach for error messages here is very generic, to keep
modulestore concepts from seeping into learning_sequences (which is
not aware of the modulestore/contentstore). We may need to address
this later, with a more normalized content error data model.

While the Django admin page is backwards compatible with the old
versions of the models, we should run the backfill_course_outlines
management command after deploying this change, to get the full
benefits.
2021-03-15 01:31:36 -04:00
Matt Tuchfarber
a82489db8e fix tests 2021-03-12 14:59:44 -05:00
Matt Tuchfarber
7dd4a2b6fd fix: Pass date in cert date update signal
Because the available date update to the CourseOverview happens inside a
view's signal and we have atomic requests on, the read that was
happening inside the task happened *before* the write was commited to
the database. To avoid the unknown bugs that would come from disabling
atomic transactions for that view (since it's large), this passes the
date we want down through the signals and tasks so we can skip the DB
read at the end.
2021-03-12 13:57:50 -05:00
Kyle McCormick
f50a2138e4 fix: masquerading as a role in MFE should not require enrollment (#26975)
The Learning MFE had a bug where instructors selecting
'View As: Audit' would find themselves redirected to the
'Enroll Now' page. This was because the Courseware API,
 which powers the MFE, checked courseware access *after*
setting up masquerading--so, instead of checking whether
the instructor had access to view the course, we checked
whether some arbitrary un-enrolled learner would have
access to the course (the answer is generally No).

We fix this by doing what the Legacy courseware index
does: calculate courseware access *before* setting up
masquerading.

TNL-7989
2021-03-12 12:13:45 -05:00
Michael Terry
c697acec2b Merge pull request #26927 from edx/mikix/ace-braze
feat: update to edx-ace 1.0.0
2021-03-12 11:05:30 -05:00
Michael Terry
570a869bd3 feat: update to edx-ace 1.0.0
The new version switches how you specify recipients, to use
lms_user_id instead of usernames.

AA-489
2021-03-12 10:25:54 -05:00
David Ormsbee
bebcbef3dd Merge pull request #26973 from open-craft/symbolist/convert-to-xblock
[BD-04] Create CustomTagTemplateBlock, convert TranslateCustomTagDescriptor to XBlock and remove RawDescriptor
2021-03-12 09:17:59 -05:00
Awais Qureshi
05504e25c5 Merge pull request #26952 from edx/pyupgrade-effort-esi
pyupgrade in enterprise_support
2021-03-12 17:28:22 +05:00
Usama Sadiq
46b5f5c24a refactor: ran pyupgrade on openedx/core/djangoapps (#26845)
upgraded course_date_signals & course_groups apps.
2021-03-12 16:44:43 +05:00
Usama Sadiq
32a4c70bef refactor: ran pyugprade on openedx/core/djangoapps/cors_csrf (#26844) 2021-03-12 16:35:43 +05:00
M. Zulqarnain
6286de8bd1 refactor: pyupgrade on ace_common, api_admin, auth_exchange (#26782) 2021-03-12 14:15:03 +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
Carla Duarte
dbf2b86f25 Merge pull request #26928 from edx/ciduarte/hack
AA-671: Course Home MFE Progress Tab API cleanup
2021-03-11 16:09:48 -05:00
Carla Duarte
99f73312b8 Progress Tab 2021-03-11 15:43:58 -05:00
Usman Khalid
23d1e5b654 Remove unused RawDescriptor and EmptyDataRawDescriptor. 2021-03-11 22:20:33 +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
stvn
435f2a3f79 Merge PR #26718 bd03/api/init
* Commits:
  feat: Add discussions API endpoint [BD-03]
  docs: Add ADR for DiscussionsConfiguration HTTP API [BD-03]
2021-03-11 00:17:16 -08: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
Matt Tuchfarber
09bb25bbcd exp: Add logging to course cert availability date
I believe there to be a race condition here that only manifests in a
non-devstack environment. Adding some logging to better diagnose.
2021-03-10 17:01:45 -05:00
David Ormsbee
8aa056e230 perf: Instrument all learning_sequences API calls.
This will make it possible to make a New Relic dashboard for the
learning_sequences API calls that tracks call performance across
different transactions (by querying Spans). Our goal would be to
offer SLAs around 99th percentile performance.

Course IDs and User ID metrics are also added, so that we can see
outliers in Span reporting, for later investigation.
2021-03-10 10:19:30 -05:00
Syed Muhammad Dawoud Sheraz Ali
4d58626fd4 fix: allow inactive users to submit support tickets (#26933) 2021-03-10 19:43:49 +05: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
stvn
054f4ac828 feat: Add discussions API endpoint [BD-03] 2021-03-10 01:01:53 -08:00
stvn
747a049420 docs: Add ADR for DiscussionsConfiguration HTTP API [BD-03] 2021-03-10 01:01:16 -08:00
Adeel Khan
725cd3f083 Fix button/title text for;
1) Account activation email.
2) Password reset email.
3) Password reset success.

VAN-272
2021-03-10 00:47:49 +05:00
David Ormsbee
f5b74fcf31 feat: Backfill and Django Admin for Learning Sequence Outline
* Adds the backfill_course_outlines management command to contentstore
* Adds a read-only Django admin interface to learning_sequences for the
  support team and debugging.
* Adds two new functions to the learning_sequences public API:
  key_supports_outlines and get_course_keys_with_outlines

The learning_sequences app isn't supposed to know about contentstore or
modulestore, as it's intended to be extracted out of edx-platform in the
long term. Therefore, the backfill_course_outlines command is in
contentstore, and not learning_sequences.

This work was tracked in TNL-7983, but it also fixes a bug where we were
trying to generate course outlines for libraries (TNL-7981).

All Open edX instances upgrading to Lilac should run the
backfill_course_outlines command as part of their upgrade process.
2021-03-09 09:05:57 -05:00
David Ormsbee
6a00878f59 fix: learning_sequences missing courses now return 404 (not 500)
We weren't properly catching the CourseOutlineData.DoesNotExist error
before this commit. TNL-7979
2021-03-09 09:05:57 -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
Felipe Montoya
72fba562f8 Merge pull request #26477 from eduNEXT/MJG/Change_max_uername_len
feat: Changed username max_length to the specified by django
2021-03-08 15:15:49 -05:00
Kyle McCormick
bcb48525ac refactor: clean up unused ERROR_ON_DEPRECATED_EDX_PLATFORM_IMPORTS (#26900)
The setting overrides should've been cleaned up in a previous
commit, but I missed them. This change is a no-op.
2021-03-08 15:01:12 -05:00
Raul Gallegos
e1614b5324 fix: revert back the bundle_draft_files cache key (#26897)
Changes the LMS/Studio bundle cache key,
thus invalidating all 47hr-TTL entries
in favor of new 50min-TTL entries.

TNL-7771
2021-03-08 12:34:51 -05:00
Zainab Amir
a39befb548 VAN-113: Add error code for registration workflow (#26821) 2021-03-08 18:09:26 +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
Awais Qureshi
32601c1a39 BOM-2442
pyupgrade in announcements.
2021-03-08 12:58:04 +05:00
Kyle McCormick
9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00