Commit Graph

1376 Commits

Author SHA1 Message Date
Eric Herrera
fe6882819a fix: Address more PR comments
Address @felipemonotoya recommendations related to add versioning to safe_exec_remote functions.
2021-10-15 08:19:48 -05:00
Eric Herrera
fc7104cde5 fix: Address PR comments
Address fixes recommended by @timmc-edx.
2021-10-14 08:11:40 -05:00
Eric Herrera
d672d309e8 fix: Improve and fix codejail service integration
Address recommendations and fixes discussed in PR.
Use similar structure to notes app.
Fix errors detected in tests.
2021-10-14 08:11:40 -05:00
Eric Herrera
3a736eefa2 feat: Codejail as external service (optional)
Add codejail service settings (endpoint and feature flag).
Add conditional to allow running codejail using a REST API service when flag is enabled.
2021-10-14 08:11:40 -05:00
Usama Sadiq
78799f25ee fix: Fixed new pylint warnings (#28726) 2021-09-23 17:54:27 +05:00
Awais Qureshi
d6202880ae chore: Removed python_2_unicode_compatible decorator. (#28342)
* chore: Removed python_2_unicode_compatible decorator.
2021-08-03 15:42:14 +05:00
David Ormsbee
1238e5d1b4 perf: add monitoring for get_course and safe_exec (#28241)
This is to help diagnose performance issues around the SequenceMetadata
API, as part of TNL-8330.
2021-07-21 11:19:10 -04:00
Hamza Farooq
0e4d2ff823 fix: adds default texts for missing answer texts in capa problems to fix response report generation
If an author has created a capa problem like an mcqs or something similar without providing answer text to an option and some learner selected that option then the response report generation will fail due to that missing answer text. The current commit will add default text to be substituted and prevents report generation crash.
2021-06-17 15:59:24 +05:00
Usama Sadiq
4f4be6538a BOM-2477: pylint warnings lint-amnesty (#27585) 2021-05-11 17:22:40 +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
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
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
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
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
Kyle McCormick
5557194af1 revert: BOM-2378 (B) : pyupgrade in common/lib (#26943)
Reverts #26731

The code in common/lib/capa/capa/safe_exec needs
to remain Python 3.5-compatible, since edx-sandbox
(ie codejail) is still running Python 3.5.
2021-03-10 15:01:09 -05:00
M. Zulqarnain
8e8420dd46 BOM-2378 (B) : pyupgrade in common/lib (#26731)
* refactor: pyupgrade on common/lib

Co-authored-by: Usama Sadiq <usama.sadiq@arbisoft.com>
2021-03-10 17:56:24 +05:00
Kyle McCormick
9aefd6f986 style: django-not-configured is not a sensible lint-amnesty value (#26862)
django-not-configured is an error raised by pylint (with
the pylint-django plugin) when it's not correctly configured.

We should not be applying lint amnesty for such a violation.
2021-03-05 08:11:58 -05:00
Usman Khalid
7441702ade test: The exception on the pytest ExceptionInfo object can be accessed on the value attribute. 2021-03-03 01:03:36 +05:00
Jawayria
9e31096ec5 Merge pull request #26505 from edx/jawayria/bom-2351-5
BOM-2351: Removed unused imports from common/lib/{capa, safe_lxml, sy…
2021-03-02 13:29:10 +05:00
Colin-Fredericks
623cbf8924 feat(jsinput): Allow JSInput problems to create downloads 2021-02-25 16:45:04 -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
Aarif
cce5c9ef1a replaced unittest assertions pytest assertions (#26530) 2021-02-19 12:25:51 +05:00
Jawayria
4fc7b2f640 BOM-2351: Removed unused imports from common/lib/{capa, safe_lxml, symmath, conftest.py} 2021-02-15 13:21:19 +05:00
usamasadiq
1175838fa5 fix pep8 warnings 2021-02-08 16:08:01 +05:00
usamasadiq
bbc386752f Applied pylint-amnesty 2021-02-04 18:52:10 +05:00
Ali-D-Akbar
3c41404190 PROD-2116 2021-02-01 15:32:27 +05:00
Ali-D-Akbar
752e0b918d PROD-2145 2021-01-20 00:42:34 +05:00
Kyle McCormick
758c2b02a1 Pass course-run-specific resource limits to codejail
The limits can be defined in settings.CODE_JAIL['limits_overrides'],
which is a dict mapping context ids (generally, course run keys)
to overrides to be applied to settings.CODE_JAIL['limits'].

This will allow us to temporarily alter the codejail limits
for certain contexts in order to enable, for example,
a certain course run's tasks to run longer while a large exam's
grades are recomputed.

TNL-7649
2020-11-05 11:53:16 -05:00
Awais Jibran
a113dd2f90 Adding debug logs for CR-2618 2020-08-31 16:50:22 +05:00
Martin Segado
b2a32bbb69 Fix double-wrapped exception in capa/inputtypes.py
(accidentally introduced in 07df64eb8c last year)
2020-08-13 16:01:11 -04:00
Awais Jibran
e2b60e1c97 bug: fix an edge case in capa problem tolerance
PROD-1586
2020-07-20 15:27:47 +05:00
Luis Moreno
1d557616b1 Fix test for python3.8 2020-06-23 10:16:37 -04:00
Aarif
98af9ce418 remove useless-supression warnings 2020-05-01 19:42:15 +05:00
SaadYousaf
9160d4aa9b address deprecation warning for cgi.escape for logs cleanup. 2020-04-15 15:14:00 +05:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Jeremy Bowman
5c40a3729a Stop using deprecated assertions (#23579)
Replace some usage of deprecated assertions with non-deprecated equivalents.
2020-04-02 11:06:37 -04:00
Ahtisham Shahid
ef40efae9b update added workaround for csv error 2020-03-09 17:35:12 +05:00
Ahtisham Shahid
4efcfca34a created logs to capture capa problem errors
Update logs

updated logger
2020-03-05 12:54:04 +05:00
Awais Jibran
44199c3f72 Workaround the error in find_question_label. (#23247)
* Workaround the error in find_question_label.

This is a temporary log, which will give us information and unblock the course team.
PROD-1326

* raise exception after logging it.
2020-03-04 17:55:35 +05:00
Awais Jibran
9032562cbd Fix Error in find_question_label. 2020-02-27 10:55:18 +05:00
Awais Jibran
eaaebc6d93 Merge pull request #169 from edx/aj/sec-fix-capa
SECURITY FIX : Fix CAPA Problems
2020-02-13 13:52:29 +05:00
DawoudSheraz
0b1c7db967 add multiple correct values check for Dropdown problems 2020-02-10 11:36:28 +05:00
Awais Jibran
bcb2038843 Fix CAPA Problems 2020-02-04 17:51:18 +05:00
Feanil Patel
046feb0cf0 Merge pull request #22649 from edx/feanil/fix_pep8
Fix all E303 pep8 errors.
2019-12-30 13:32:26 -05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -05:00
Feanil Patel
2df8b8226b Merge pull request #22643 from edx/feanil/2to3_asserts
Run `2to3 -f asserts . -w` on edx-platform.
2019-12-30 12:13:42 -05:00
Feanil Patel
39d3a7ca17 Fix pep8 issues caused by the fixer. 2019-12-30 11:42:04 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Feanil Patel
70294b0ad2 Run 2to3 -f asserts . -w on edx-platform.
https://docs.python.org/3.5/library/2to3.html#2to3fixer-asserts
2019-12-30 10:22:19 -05:00
Zainab Amir
257c635a68 Fix Targeted Feedback HTML (#22606)
etree.tostring returns bytes instead of string which when converted
back to XML, to be rendered as etree element, presents stray
characters.

PROD-1116
2019-12-30 15:06:02 +05:00