Commit Graph

358 Commits

Author SHA1 Message Date
Jawayria
707f940770 Refactor: Removed unused imports
Removed unused imports from lms/djangoapps/{course_wiki, coursewarehistoryextended, discussion}
2021-04-07 12:54:21 +05: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
a7b75e5014 feat: mark forum response notifications transactional
The user opts into them when making a post / through the forums UI.
They are not truly a marketing email or similar.
2021-03-16 08:50:40 -04:00
Michael Terry
4aacedc604 fix: don't duplicate text in forum notification email 2021-03-15 15:29:01 -04: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
Arslan Ashraf
c2ca03ba94 Add annotation for ALLOW_HIDING_DISCUSSION_TAB feature flag 2021-03-10 16:32:56 +05:00
Matjaz Gregoric
6204e5bcec Fix URL in forum notification post.
urljoin('my.domain.com', '/my/path') returns '/my/path'. We have to make
sure to use the full base url (starting with http(s)://) and not just
the site's domain.
2021-03-08 08:32:13 +01:00
Usman Khalid
dd96a2aa72 Convert Course, Section and Sequence XModules to XBlocks. (#25965) 2021-03-02 10:29:33 -05:00
Awais Jibran
fa44c24796 refactor: use q objects when fetching user using an identifier 2021-02-24 15:09:21 +05:00
Awais Jibran
950633a9df refactor: use q objects when fetching user using an identifier #26683 2021-02-24 12:05:38 +05:00
usamasadiq
96f0915b0f Fixed new pylint warnings.
use generator in any/all()
disable not-callable warnings
disable no-member warnings
Suppressed smaller pylint warnings
Pin edx-proctoring==3.5.0
2021-02-22 16:36:53 +05:00
edX requirements bot
f33f12bbea BOM-2358 : Pyupgrade in dashboard, debug, discussion apps (#26529)
* Python code cleanup by the cleanup-python-code Jenkins job.

This pull request was generated by the cleanup-python-code Jenkins job, which ran
```
cd lms/djangoapps/dashboard; find . -type f -name '*.py' | while read fname; do sed -i 's/  # lint-amnesty, pylint: disable=super-with-arguments//; s/  # lint-amnesty, pylint: disable=import-error, wrong-import-order//; s/  # lint-amnesty, pylint: disable=wrong-import-order//' "$fname"; done; find . -type f -name '*.py' | while read fname; do pyupgrade --exit-zero-even-if-changed --py3-plus --py36-plus --py38-plus "$fname"; done; isort --recursive .
```

The following packages were installed:
`pyupgrade,isort`

* feedback done

Co-authored-by: Zulqarnain <muhammad.zulqarnain@arbisoft.com>
2021-02-22 15:42:21 +05:00
Aarif
a8b9733654 replaced unittest assertions pytest assertions (#26544) 2021-02-19 11:59:44 +05:00
Sarina Canelake
ac999ec1fc Merge pull request #25984 from naeem91/patch-1
Fix PY3 incompatible division
2021-02-18 14:57:38 -05:00
SaadYousaf
50e71479ee [TNL-7729] - Add check to discussion rest API to prevent users in blackout period. 2021-02-16 14:08:56 +05:00
M. Zulqarnain
65cf0db337 BOM-2278 : Pylint amnesty in discussion, dashboard (#26275)
* pylint amnesty in discussion, dashboard
2021-02-03 18:15:14 +05:00
usamasadiq
dbfec8ee3c Remove nonrequired conditions 2021-02-01 16:30:47 +05:00
Ali Akbar
0aa1b8f2bf Merge pull request #214 from edx/IM/security-fixes-5
Incident Management Security Fixes 5
2021-01-29 16:55:08 +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
Ali-D-Akbar
9ca5df8666 PROD-2123 2021-01-20 00:42:36 +05:00
0x29a
c8fc932c45 Preserve js files order for discussions view
Co-authored-by: Shimul Chowdhury <shimul@opencraft.com>
2021-01-15 15:15:08 +01:00
Muhammad Soban Javed
f62b1c417b replaced task decorator with shared_task decorator (#25925) 2021-01-07 19:46:34 +05:00
Naeem Ilyas
62ce0ed7fc Fix incompatible division
While deleting a post, the number of comments are retrieved where API reports wrong number of total pages due to PY3 incompatible division:

response.data["pagination"]
{'previous': None, 'count': 3, 'num_pages': 1.02, 'next': 'http://apros.devstack.lms?ajax=1&page=2'}

Which results in PageNotFoundError:

is_thread)):
  File "/edx/src/discussion-edx-platform-extensions/social_engagement/engagement.py", line 382, in _get_paginated_results
    has_next = response.data["pagination"]["next"]
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/discussion/rest_api/views.py", line 526, in retrieve
    form.cleaned_data["requested_fields"],
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/discussion/rest_api/api.py", line 1074, in get_response_comments
    raise PageNotFoundError("Page not found (No results on this page).")
openedx.core.lib.exceptions.PageNotFoundError: Page not found (No results on this page).
2021-01-05 20:13:09 +05:00
Muhammad Soban Javed
bd601cf3a6 Update celery routing for celery 4+ (#25567)
* Update celery routing

- Used routing function instead of class
- Move task queues dictionary to Django settings
- Removed routing_key parameter
- Refactored routing for singleton celery instantiation

Co-authored-by: Awais Qureshi <awais.qureshi@arbisoft.com>
2020-12-16 13:40:47 +05:00
David Ormsbee
a333a71411 Format blackout dates to match rest of Discussions API.
Technically, both "2020-10-20T23:59:00Z" and "2020-10-20T23:59:00+00:00"
are ISO-8601 compliant, though the latter is preferred. The Discussions
API uses the "Z" notation for almost all its dates, except for the
course blackout dates (those times when students aren't allowed to post
anything because it would threaten exam integrity). That's because the
blackout dates are manually formatted using datetime.isoformat().

As best as I can tell, we've always passed back the "+00:00" for the
blackout dates. But at some point, this broke the expectations of the
mobile apps, which expect the "+Z" format, like the rest of the API.
This commit changes the blackout dates to be returned in +Z format when
the blackout datetimes are specified by the user in UTC (which is almost
always the case–I suspect the mobile clients would break if the dates
were specified in other timezones anyhow).
2020-11-23 10:30:12 -05:00
Robert Raposa
8eef18710d set code_owner for celery tasks
ARCHBOM-1260

Co-authored-by: Tim McCormack <tmccormack@edx.org>
2020-11-17 15:33:33 -05:00
Awais Qureshi
7201edb11d Revert "Update routing config" (#25536)" (#25549)" (#25553)" (#25561)
This reverts commit db4c3b1210.
2020-11-11 00:13:47 +05:00
Awais Qureshi
db4c3b1210 Revert "Revert ""Update routing config" (#25536)" (#25549)" (#25553)
This reverts commit c1fe3c3a93.
2020-11-10 23:23:09 +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
Muhammad Soban Javed
c1fe3c3a93 Revert ""Update routing config" (#25536)" (#25549)
This reverts commit 39a22734c1.
2020-11-09 23:43:47 +05:00
Awais Qureshi
39a22734c1 "Update routing config" (#25536)
* Revert "Revert "Update routing config"

* Removed settings from lms/celery.py and cms/celery.py

* Moved settings import from top-level to function's scopes

Co-authored-by: Soban Javed <iamsobanjaved@gmail.com>
2020-11-09 19:06:55 +05:00
Manjinder Singh
c74b623948 Fixing code-annotations (#25539)
* Fixing code-annotations
2020-11-06 12:52:08 -05:00
Muhammad Soban Javed
5a2ea1f954 Revert "Update routing config" 2020-11-06 02:05:48 +05:00
Muhammad Soban Javed
bfa8f71f33 Update routing config #25419 2020-11-06 01:00:29 +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
f414fad0cc Change gendered language to gender-neutral 'they/them/their' 2020-11-02 18:23:13 -05:00
Soban Javed
3206d9cb9a Update celery routing
- Used routing function istead of class
- Move task queues to Djano settings
- Removed routing_key parameter
2020-11-02 15:03:53 +05:00
Jeremy Bowman
efc04e3399 Remove notifier_api app DEPR-111 (#25464)
Part of the notifier service deprecation (DEPR-106).

Also removed pdfminer from the package uninstall list, since we no longer install the package it conflicts with either.
2020-10-29 11:17:23 -04:00
Saleem Latif
43d0a67fa1 Request for field to specify locale in Django enterprise accounts 2020-10-20 17:56:22 +05:00
Zainab Amir
9130c28091 Suppress PII from discussion/forum (#25298) 2020-10-08 19:02:41 +05:00
Calen Pennington
4a120a9e26 Fix failures caused by removing lms/djangoapps from sys.path 2020-09-23 10:05:37 -04:00
Régis Behmo
a4ba4ae45e Clarify many feature toggle annotations across all applications 2020-09-16 15:20:43 +02:00
Régis Behmo
7d93715880 Rename toggle_expiration_date to toggle_target_removal_date
This is part of the changes brought by code-annotations==0.7.0
2020-09-16 15:19:16 +02:00
Régis Behmo
98a13d6a7e Remove deprecated toggle_status annotation
This annotation is deprecated since code-annotations==0.7.0
2020-09-16 15:19:15 +02:00
Régis Behmo
ab0e21455a Get rid of the toggle_category annotation, now deprecated
Since code-annotations==0.7.0, this annotation is not used anymore.
2020-09-16 15:16:13 +02:00
Régis Behmo
7dc460d50a Wrap toggle annotation lines with multiline comments
This takes advantage of the new multiline annotation format with
single-line comment prefix, from code-annotations.
2020-09-16 15:16:12 +02:00
David Ormsbee
a23cfda6f4 Merge pull request #21402 from open-craft/paulo/disable_discussion_cache
Disable caching in forum home
2020-08-20 13:07:43 -04:00
Manjinder Singh
c76ed6ae45 Extracting plugin app from edx-platform (#24678)
* Moving plugins infrastructure to edx-django-utils
This PR extracts the code that enables plugins in edx-platform and puts it in edx-django-utils. This is done to allow other IDAS to add plugin functionality.
2020-08-12 07:48:53 -04:00
Paulo Viadanna
708f32bf65 Disable caching in discussion home 2020-08-07 15:52:00 -03:00