Commit Graph

18842 Commits

Author SHA1 Message Date
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
Azan Bin Zahid
6ab28aab54 PROD-2302 2021-03-24 18:13:36 +05:00
Azan Bin Zahid
1e65f7c23b PROD-2303 2021-03-24 18:13:36 +05:00
Usama Sadiq
3e6b3e41f8 refactor: remove unused imports (#27084) 2021-03-24 17:55:04 +05:00
Awais Jibran
49296005db Adding some minor changes to logs (#27127) 2021-03-24 17:25:04 +05:00
Azan Bin Zahid
b5e9c300f8 Merge pull request #27104 from edx/azan/PROD-2204
disbale xsslint
2021-03-24 13:00:25 +05:00
edX cache uploader bot
b2150cf52e Updating Bokchoy testing database cache (#27116) 2021-03-24 12:51:23 +05:00
stvn
a0003016b2 Merge PR #26750 colin-fredericks/jsinput-allow-downloads
* Commits:
  feat(jsinput): Allow JSInput problems to create downloads
2021-03-23 10:20:57 -07:00
Awais Jibran
0e4571a5e5 Do not monitor if asset file is not present (#27106) 2021-03-23 01:26:46 +05:00
Azan Bin Zahid
ca6914c1f2 fix: move xss-lint disable comment to correct place 2021-03-22 21:20:26 +05:00
Ahtisham Shahid
da30f24108 Fixed Html escaping in course name in API (#27103)
* Fixed Html escaping in course name in API
2021-03-22 19:52:34 +05:00
Awais Jibran
2ec17309d0 Code Refactor (#27101) 2021-03-22 16:07:06 +05:00
Awais Jibran
5f773d326d Add missing import logs. (#27066) 2021-03-22 15:28:13 +05:00
Sarina Canelake
2342f04447 Merge pull request #26435 from open-craft/shimulch/bb-3624-upstream
Fix missing email context values and pass site configuration to better multi-site customization
2021-03-19 08:42:38 -04:00
Awais Qureshi
51e719b15a Merge pull request #27075 from edx/fixing-unused-imports
refactor: remove unused imports.
2021-03-19 16:19:40 +05:00
Awais Qureshi
9c30125e69 Merge pull request #27054 from edx/third-party-auth-3
Pyupgrade in common/djangoapps/third-party-modes part3
2021-03-19 16:14:49 +05:00
Awais Qureshi
68c0153dbe Merge pull request #27053 from edx/third-party-auth-2
Pyupgrade in common/djangoapps/third-party-modes part2
2021-03-19 16:07:59 +05:00
Awais Qureshi
81bab4d01a Pyupgrade in common/djangoapps/third-party-auth/tests. 2021-03-19 15:39:48 +05:00
Awais Qureshi
275e0c7527 refactor: remove unused imports. 2021-03-19 15:30:01 +05:00
Awais Qureshi
683e6f9aba refactor: remove unused imports. 2021-03-19 15:22:03 +05:00
Awais Qureshi
05a5f5954b refactor: remove unused imports. 2021-03-19 10:15:59 +00:00
Awais Qureshi
a2f5a46a68 refactor: Pyupgrade in common/djangoapps/third-party-auth/tests. 2021-03-19 12:40:15 +05:00
Awais Jibran
c377d87c54 Throw an error message if the assertion fails (#27063) 2021-03-19 12:23:26 +05: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
Awais Jibran
dd3a0bd939 Add missing import logs. (#27056) 2021-03-18 19:57:18 +05:00
Awais Qureshi
abf9ce852c Merge pull request #27052 from edx/third-party-auth
Pyupgrade in common/djangoapps/third-party-modes/
2021-03-18 17:13:19 +05:00
Awais Qureshi
4beb498c04 Merge pull request #27051 from edx/course-modes-pyupgrade-3
Pyupgrade in common/djangoapps/coursemodes.
2021-03-18 16:41:36 +05:00