Commit Graph

18878 Commits

Author SHA1 Message Date
Usama Sadiq
588f11b100 refactor: apply lint-amnesty to pylint violations 2021-04-27 14:43:31 +05:00
Dillon Dumesnil
2330150193 Merge pull request #27406 from edx/ddumesnil/fix-staff-access-aa-646
fix: AA-646: Fix is_staff_user check to check for course staff
2021-04-26 10:56:25 -07:00
Julia Eskew
4462ed37b2 Revert "update login api" (#27416)
This PR might be causing e2e tests to fail. Reverting and merging without waiting on tests.
2021-04-26 10:07:36 -04:00
Dillon Dumesnil
8c18242ecb fix: AA-646: Fix is_staff_user check to check for course staff
It was checking for global staff, but really only needed to check
for course staff. This corrects the check.
2021-04-23 10:24:53 -04:00
uzairr
5103f59df9 upgrade login api
Modify the existing login api in a way that
it will allow the user to login via username as well.
currently it is only allowing email to log the user in.

VAN-445
2021-04-23 17:21:18 +05:00
Kyle McCormick
b0d41f6ebb refactor: simplify ProblemBlock inheritance hierarchy (#27363)
Previously, ProblemBlock's implementation was split between
CapaMixin/CapaFields (in capa_base.py) and ProblemBlock
(in capa_module.py), the former being the base classes of the
latter. The split existed for a historical reason:
as a former XModule, ProblemBlock was once split
between CapaDescriptor (author-facing) and CapaModule
(learner-facing). Since ProblemBlock has been converted
to being a pure XBlock, the division between the base
classes and the block class are no longer necessary
nor semantically helpful.

docs: Flesh out ProblemBlock's docstring a bit.
2021-04-22 12:44:15 -04:00
edX Transifex Bot
55b1375c7c geoip2: update maxmind geolite country database 2021-04-21 17:11:09 -04:00
Ali Akbar
025fb5ed66 Merge pull request #228 from edx/aakbar/xss-security-fixes
Fix XSS for numerous files
2021-04-22 01:16:47 +05:00
Julia Eskew
efa13ff1d2 fix: TNL-8233: Change exception raised at problem creation failure from generic exception to LoncapaProblemError. (#27361)
Raising this specific exception will cause the failure to be handled more gracefully by problem rescoring code.
2021-04-21 16:13:23 -04:00
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
Ali-D-Akbar
643d5211ca refactor: fix xss PROD-2305 2021-04-16 14:09:16 +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