openedx / openedx/openedx-platform
[Test failure] <TC_LEARNER_45>: <Incorrect error message displays incase of Clicking on Submit button on courses screen without adding answers>
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
Release
Teak
Expected behavior
Error message should be simple like "Answer Field is required Please answer first"
Actual behavior
Incorrect error message displays incase of Clicking on Submit button on courses screen without adding answers
Steps to reproduce
Log in to Dashboard
via these credentials:
salman.tariq@arbisoft.com
Sqa@12345
Select the Admin course and go to this
( https://apps.teak.demo.edly.io/learning/course/course-v1:OpenedX+DemoX+DemoCourse/block-v1:OpenedX+DemoX+DemoCourse+type@sequential+block@6ba8902b2179452dad8a55e342882fd3/block-v1:OpenedX+DemoX+DemoCourse+type@vertical+block@95db45421ebf4c0ebbc33679904ec239)
Now Click on submit button below to answer without adding answers
then following message displays:
`Staff debug info: Traceback (most recent call last): File "/openedx/edx-platform/xmodule/capa/responsetypes.py", line 3271, in get_score safe_exec.safe_exec(File
"/opt/pyenv/versions/3.11.8/lib/python3.11/contextlib.py", line 81, in inner return func(*args, **kwds) ^^^^^^^^^^^^ File "/openedx/edx-platform/xmodule/capa/safe_exec/safe_exec.py", line 291, in safe_exec raise exception codejail.safe_exec.SafeExecException: Couldn't execute jailed code: stdout: b", stderr: b'Traceback (most recent call last):\n File "/tmp/codejail-9zfbnqf7/jailed_code", line 19, in \n exec(code, g_dict)\n File "", line 101, in \nTypeError: '<' not supported between instances of 'NoneType' and 'float'\n' with status code: 1. For more information check Codejail Service logs. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/openedx/edx-platform/xmodule/capa_block.py", line 1839, in submit_problem correct_map = self.Icp.grade_answers (answers) ^^^^^ ^^^^ File "/openedx/edx-platform/xmodule/capa/capa_problem.py", line 456, in grade_answers new_cmap = self.get_grade_from_current_answers(answers) File "/openedx/edx-platform/xmodule/capa/capa_problem.py", line 525, in get_grade_from_current_answers results = responder.evaluate_answers(self.student_answers, oldcmap)
^^^^^^^^^^^^ File
"/openedx/edx-platform/xmodule/capa/responsetypes.py", line 305, in evaluate_answers new_cmap = self.get_score (student_answers) ^^^^^^^^ File "/openedx/edx-platform/xmodule/capa/responsetypes.py", line 3285, in get_score raise ResponseError(msg) # lint-amnesty, pylint: disable=raise-missing-from ^^^^^^^^ xmodule.capa.responsetypes. Response Error: Error in evaluating SchematicResponse. The error was: Couldn't execute jailed code: stdout: b", stderr: b'Traceback (most recent call last):\n File "/tmp/codejail-9zfbnqf7/jailed_code", line 19, in \n exec(code, g_dict)\n File "", line 101, in \nTypeError: '<' not supported between instances of 'NoneType' and 'float'\n' with status code: 1. For more information check Codejail Service logs.
`
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the failing submit flow and the traceback paths in xmodule/capa/responsetypes.py, xmodule/capa/capa_block.py, and xmodule/capa/capa_problem.py; inspect how empty answers reach SchematicResponse evaluation. Use the reported course scenario to reproduce the failure. Done means submitting without answers produces the simple required-answer message instead of staff debug output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100