Commit Graph

3988 Commits

Author SHA1 Message Date
Usama Sadiq
aa618c460c refactor: remove unused-imports (#27083) 2021-03-19 22:42:14 +05:00
Régis Behmo
78c152975b refactor: migrate toggle state report to edx_toggles
The toggle state report could not be shared with other IDAs. Here we make use
of the newly available report from edx_toggles, and customize it to add data
from WaffleFlagCourseOverrideModel.
2021-03-19 17:14:14 +01:00
Régis Behmo
ae7d4994bf fix: deprecated waffle switch usage in test method 2021-03-19 17:08:57 +01:00
Shimul Chowdhury
e942f12adc Add missing context platform_name and contact_mailing_address. And pass
site configuration to email context.
2021-03-19 10:05:49 +06:00
Feanil Patel
1d99bb2eb3 Merge pull request #27062 from edx/feanil/more_logging
fix: Add more info in warning log messages.
2021-03-18 12:33:44 -04:00
Feanil Patel
416407fd73 fix: Add more info in warning log messages.
If this happens, it's usefule to know what main view code was being
targetd so that we can more easily investigate what might have caused
this issue.

Add a new custom attribute 'safe_sessions.user_mismatch' to find
requests that had this issue in our monitoring system.
2021-03-18 11:33:08 -04:00
Waheed Ahmed
4af767e0fb Fix finish auth url for MFE
Currently extra query params are not being handled in get TPAContextView,
Fixed using already available get_next_url_for_login_page().

VAN-415
2021-03-18 19:19:14 +05:00
Usama Sadiq
afc0a6b770 refactor: Ran pyupgrade on openedx/core/djangoapps/enrollments (#26912)
Co-authored-by: Muhammad Soban Javed <58461728+iamsobanjaved@users.noreply.github.com>

Co-authored-by: Muhammad Soban Javed <58461728+iamsobanjaved@users.noreply.github.com>
2021-03-18 18:38:20 +05:00
Usama Sadiq
918c44e499 refactor: Ran pyupgrade on openedx/core/djangoapps/embargo (#26911) 2021-03-18 18:38:09 +05:00
Usama Sadiq
8ca33082ff refactor: Ran pyupgrade on openedx/core/djangoapps/django_comment_common (#26910) 2021-03-18 18:37:59 +05:00
Usama Sadiq
5b9978029e refactor: ran pyupgrade on openedx/core/djangoapps (#26909)
Ran pyupgrade on {debug, demographics, discussions}.
2021-03-18 18:37:31 +05:00
Nizar Mahmoud
5f7dbc2d45 docs: updates ticket annotations for block structure settings and toggles
Updates the annotations for the block structure settings and toggles based on a [discussion] that was held on the pull request that annotated those same settings and toggles.

It also adds the DEPR tickets that were promised earlier in the annotations.
For future reference, there's also a [forum thread] to discuss the DEPR tickets titled.

[discussion]: https://github.com/edx/edx-platform/pull/26175#issuecomment-800632485

[forum thread]: https://discuss.openedx.org/t/deprecation-removal-several-block-structure-caching-settings-depr-143-depr-144-depr-145-depr-146/4288?u=nizar
2021-03-18 13:05:32 +03:00
Zainab Amir
3cdbb5b36a Track total time it takes users to register (#27020)
Added a new property in edx.bi.user.account.registered event to
track total time it took the user to register.

VAN-413
2021-03-18 13:02:12 +05:00
M. Zulqarnain
5d2b0e8346 refactor: pyupgrade in content_libraries and contentserver apps (#26892) 2021-03-17 17:28:23 +05:00
M. Zulqarnain
6266caf143 refactor: pyupgrade in openedx/content app (#26891) 2021-03-17 17:28:06 +05:00
M. Zulqarnain
0d86ebb361 refactor: pyupgrade in openedx/content app (#26890) 2021-03-17 17:27:48 +05:00
Jawayria
b578dba357 Merge pull request #26599 from edx/jawayria/bom-2408-2
BOM-2408: Removed unused imports from openedx/core/djangoapps/content
2021-03-17 16:54:20 +05:00
Matt Tuchfarber
698de6d0fb Merge pull request #27030 from edx/tuchfarber/remove_cert_date_waffle
Enable course cert sync for all courses
2021-03-16 15:18:10 -04:00
Matt Tuchfarber
ed8604534c (feat) Enable course cert sync for all courses
Removes waffle flag restriction for syncing certificate available dates
to the credentials service.
2021-03-16 14:31:11 -04:00
Stu Young
5107aa41e9 DENG-803: add traits to segment context for enrollment activated events (#26842)
add traits to segment context for enrollment activated events
2021-03-16 14:28:22 -04:00
David Ormsbee
82ca05392e fix: Fix proctored exam display in learning_sequences admin.
I had the wrong attribute before this commit, and Django Admin let
me get away with it because it doesn't explode when you try to grab
relations that aren't there–it just quietly returns None in some of
those cases.
2021-03-16 09:50:28 -04:00
Matt Tuchfarber
30d59f2fcc Merge pull request #26991 from edx/tuchfarber/fix_transaction_bug
feat: Pass date in cert date update signal
2021-03-16 08:01:27 -04:00
Jawayria
ac74263098 BOM-2408: Removed unused imports from openedx/core/djangoapps/content 2021-03-16 16:39:04 +05:00
Usama Sadiq
55661b441d refactor: ran pyupgrade on openedx/core/djangoapps/credit (#26848) 2021-03-16 15:16:31 +05:00
Usama Sadiq
369885002d refactor: ran pyupgrade on openedx apps (#26846)
Ran pyupgrade on openedx/core/djangoapps/{coursegraph, courseware_api, crawlers}
2021-03-16 15:15:35 +05:00
M. Zulqarnain
0ca2295e8f refactor: pyupgrade in passowrd_policy (#26950) 2021-03-16 14:37:15 +05:00
M. Zulqarnain
dfe6f21e4a refactor: pyupgrade in monkey_patch, oauth_dispatch, olx_rest_api (#26917) 2021-03-16 14:37:08 +05:00
Usama Sadiq
cf10b29a3e refactor: ran pyupgrade on openedx/core/djangoapps/dark_lang (#26849) 2021-03-16 14:30:46 +05:00
M. Zulqarnain
c8902bed58 refactor: pyupgrade in heartbeat, lang_pref, models (#26916) 2021-03-16 14:15:01 +05:00
M. Zulqarnain
e9239e5972 refactor: pyupgrade in common_views, config_model_utils (#26915) 2021-03-16 14:14:46 +05:00
Awais Qureshi
26ff8b2bb9 Merge pull request #27002 from edx/fixing-test
BOM-2453
2021-03-16 12:08:29 +05:00
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
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
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
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
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