Commit Graph

18868 Commits

Author SHA1 Message Date
Zaman Afzal
0d7245d346 Removed the waffle switch ENABLE_MULTIPLE_SSO_ACCOUNTS_ASSOCIATION_TO_SAML_USER (#27379) 2021-04-21 13:14:15 +05:00
Usama Sadiq
2b55959a8e refactor: apply lint-amnesty on existing violations 2021-04-20 23:51:31 +05:00
Awais Jibran
62c8805e3e Refactor + Tests: Course Import Feature (#27369)
* Code Refactoring
This PR bumps code coverage by adding unit tests & clean up some code for improving code quality and maintainability.
2021-04-19 23:49:42 +05:00
Ali Akbar
9e8684cc72 Merge pull request #27367 from edx/aakbar/xss-disable-2
Refactor: disable xsslint for numerous files
2021-04-19 15:51:30 +05:00
Saad Yousaf
bb3be323f0 [TNL-8235] - Fix breaking code by updating the exception when load_file fails. (#27368)
Co-authored-by: SaadYousaf <saadyousaf@A006-00314.local>
2021-04-19 13:30:14 +05:00
Ali-D-Akbar
d84251de3b refactor: disable xsslint: PROD-2307 2021-04-19 12:21:43 +05:00
Ali-D-Akbar
e8f548fa9c refactor: disable xsslint: PROD-2309 2021-04-19 12:21:43 +05:00
Ahtisham Shahid
b73c0f0a90 Refactored InvalidProctoringProvider exception code (#27366) 2021-04-19 11:54:58 +05:00
Ali-D-Akbar
5631d695a4 refactor: disable xsslint: PROD-2308 2021-04-16 17:13:05 +05:00
Ali-D-Akbar
30b8edc0ac refactor: disable xsslint: PROD-2306 2021-04-16 17:13:05 +05:00
Ahtisham Shahid
58231c4262 Moved Import error messages to single place (#27331) 2021-04-15 12:25:04 +05:00
Diane Kaplan
3152c14192 fix: hide gated content message for library content questions (learning MFE only) (#27277) 2021-04-14 14:11:21 -04:00
stvn
970980f25a style: Alphabetize some imports 2021-04-14 07:38:55 -07:00
stvn
a3a58533a8 docs: Add and cleanup comments 2021-04-14 07:38:55 -07:00
stvn
1b3d915af7 refactor: Move RequestFactoryNoCsrf helper to common/ 2021-04-14 07:26:39 -07: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
8869a30bcd refactor: Move UserFactory 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
David Ormsbee
99c759f887 Revert "perf: avoid invoking codejail for problem response report" (#27310)
This reverts commit 35b2780658.
2021-04-12 17:17:31 -04:00
Sarina Canelake
2bdb05438d Merge pull request #26860 from open-craft/giantas/bb-3825-fix-new-post-indicator-in-discussion-xblock
[BB-3825] Fix:  Hide new post indicator on thread open
2021-04-12 14:47:10 -04:00
edX cache uploader bot
bb3bf5c15e Updating Bokchoy testing database cache (#27298) 2021-04-12 22:35:40 +05:00
Paul Aswa
b62478c365 fix: hide new post indicator on thread open
This fixes the removal of the new post indicator in the Discussion XBlock once a thread has been opened.
2021-04-12 19:29:44 +02:00
David Ormsbee
35b2780658 perf: avoid invoking codejail for problem response report
We don't need to execute instuctor code for the problem response
report because we're grabbing existing student state and scores.
Running codejail is expensive, slow, and risks report failures if
there is CPU intensive instructor code that is run at times when
the servers are already heavily loaded (and things start timing
out). This came up in TNL-8183 (and many others).
2021-04-07 11:11:07 -04:00
Piotr Surowiec
bc1e9afe4b feat: allow overriding unit icons (#21433)
This:
1. Introduces a new override using the `pluggable_override` decorator.
It is now possible to specify a custom way of getting XBlock's icon
by defining `GET_UNIT_ICON_IMPL` in settings.
2. Introduces a way to add custom `XBLOCK_MIXINS` by defining
`XBLOCK_EXTRA_MIXINS` in settings. This allows, e.g. to add
new fields to XBlocks.
2021-04-07 09:42:12 -04:00
Ahtisham Shahid
f3a62b5f89 Error message for proctor exam show to user (#27238)
* Error message for proctor exam visible to user

* Created exception class for Invalid Proctor settings
2021-04-07 10:46:19 +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
edX cache uploader bot
9106174b5a Updating Bokchoy testing database cache 2021-04-06 12:19:47 +05:00
stvn
716b84d9df Merge PR #27202 fix/capa/empty-option-text
* Commits:
  fix: Allow capa_problem optioninput option with empty text
  refactor: Refactor capa_problem optioninput option text handling
2021-04-05 13:27:22 -07:00
Christie Rice
1181fb343e feat!: Remove allow_certificate checks from course certificates (#27206)
DEPR-140 MICROBA-985
2021-04-05 14:00:07 -04:00
Robert Raposa
96be45f1bd Merge pull request #27222 from edx/robrap/ARCHBOM-1721-toggle-doc-cleanup
ARCHBOM-1721: docs: update toggle docs
2021-04-05 10:47:55 -04:00
Awais Jibran
bc8e21d340 Address comments in the doc (#27240) 2021-04-05 17:06:36 +05:00
stvn
21dce731f9 fix: Allow capa_problem optioninput option with empty text
This fixes TNL-7973 [1].

Background
----------

> An alert was sent out because a malformed capa problem caused block
> transformers to fail to run.

> This specific error/alert was triggered when an optionresponse problem
> lacked text. The authoring-based fix is to edit the offending
> option-response problem to remove the empty option.

> Expected behavior: We should be able to keep the error local to the
> ProblemBlock and not blow up the whole course publish block
> transformer collection process.

> This is a really easy error for authors to make, and the consequences
> to them (one problem doesn’t work) are disproportionate to the
> consequences [...] (alerting triggered).

- [1] https://openedx.atlassian.net/browse/TNL-7973
2021-04-02 14:36:20 -07:00
David Ormsbee
d2389fb7fb fix: Don't break export when transcript is Latin-1 encoded.
Video SJSON transcripts are supposed to be UTF-8 encoded, but SJSON
is an ad hoc thing we made up to make it easier to build the
transcripts viewer in the VideoBlock, and it's not well specified.
Prior to this commit, if you had an SJSON file with Latin-1 encoded
text outside the standard ASCII range (e.g. û), then we'd error out
while trying to export it.

This was blocking an effort to export some Old Mongo courses (TNL-8007).
2021-04-02 13:33:16 -04:00
Ben Holt
ec3c31eb05 feat: added another 'Date' expose-headers for outline api clients (#27221)
Exposed the Date header on the outline api so clients can accurately compute times relative to the dates returned by the API; this was previously done with the course API (#26979)

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-04-02 10:37:19 -04:00
AsadAzam
c4da6c1fe4 Display import errors to user (#27147)
* Display import errors to user

* Refactored

* Refactored

* Refactored

* Fixed quality

* Fixed quality

* Refactored code

* Fixed message

* Refactored code
2021-04-02 18:53:39 +05:00
Azan Bin Zahid
2136cde713 Merge pull request #226 from edx/im-security-13
Incident Management Security Fix 13
2021-04-02 12:30:04 +05:00
Nizar Mahmoud
4cb4be6afe feat: associates user by email for oauth when tpa is required
This change associates users signing in using oauth providers when tpa is required, verifying that only a single database user is associated with the email.

For more information as to why this was added in a separate pipeline, check edx-platform#25935.
2021-04-02 11:32:58 +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
edX cache uploader bot
c4a905352a Updating Bokchoy testing database cache (#27214) 2021-04-01 18:05:19 +05:00
stvn
9afa58f963 refactor: Refactor capa_problem optioninput option text handling
to make it easier to add/remove parsing/processing logic
(in pending commits).
2021-03-31 09:58:29 -07:00
jawad khan
5025a3ffd9 feat!: remove "Text Me the App" page from web app because of security concern
Someone at edx was able to quickly send a few texts to himself using the tool.
Each text came from a different number and there was no message about the ability to unsubscribe or stop.
This could potentially be used to spam users as well as potentially result in charges to edX for high volume.

page url https://courses.edx.org/text-me-the-app
LEARNER-8286
2021-03-30 23:38:24 +05:00
Awais Jibran
529a805c0c Fixing dates serialization in course import (#27137) 2021-03-29 13:43:01 +05:00
Feanil Patel
68bd33f310 Merge pull request #27138 from edx/feanil/add_request_user_change_logging
feat: Add more detailed request user change logging.
2021-03-25 14:01:52 -04:00
Feanil Patel
4f9fe59731 test: Fix date tests that rely on user preference.
The function under test by the StrftimeLocalizedHtmlTest checks the
timezone in the user preferences of the user making the request.  If we
don't explicitly set a request here, it will simply use the last Request
that `crum` cached in the thread local cache.  This broke now
that we sometimes set the crum request.user to an invalid user in other
tests.

This change ensures that we have a valid request for these tests as a
part of the setup of this test class.
2021-03-25 13:18:07 -04:00
Waheed Ahmed
f8de211e17 Fix redirection on SSO auth complete.
Since we are handling the MFE redirection in login_and_registration_form()
we don't need to handle it here. It's redirecting the enterprise users to
MFE instead of FE which is currently handled in login_and_registration_form()
view.

VAN-425
2021-03-25 22:16:34 +05:00
Zainab Amir
8cc5f13daf Add rate limit to registration endpoint (#27060)
Currently the registration endpoint has no rate limit. Added a new ratelimit
variable to support the change, it's value is set to 60/7d.

VAN-302
2021-03-25 16:28:30 +05:00