mitodl / edx-platform

The Open edX platform, the software that powers edX!
http://open.edx.org/
GNU Affero General Public License v3.0
6 stars 1 forks source link

add validation to capa problem authoring markdown #265

Closed HamzaIbnFarooq closed 3 years ago

HamzaIbnFarooq commented 3 years ago

Related Issue

https://github.com/mitodl/edx-platform/pull/239 https://github.com/mitodl/edx-platform/pull/240

What this PR does

It adds validation to CAPA problems and shows a notification to the course author regarding the issue, along with fixing old response report generation issues by providing a default value for the problems having no text values for answer options.

How to test this PR

To understand the purpose of this PR, follow the below steps to reproduce the issue:

1) Create a Checkbox Problem on studio 2) Don't put any text against one of the options image 3) Through LMS select that option with no text 4) Go to Data Download under Instructor tab 5) Under the Reports section, select the Problem and press Create a report of problem responses The error will be generated.

Now use the current PR and go through the same process, and you will see that the editor will not allow saving such content and mentions an error message instead.

Screenshots

image

HamzaIbnFarooq commented 3 years ago

@ziafazal I merged https://github.com/mitodl/edx-platform/pull/264 into the current PR and added some tests as well. Kindly have a final look before I create an upstream PR.

HamzaIbnFarooq commented 3 years ago

@pdpinch I have created an upstream PR related to this feature: https://github.com/edx/edx-platform/pull/27858

HamzaIbnFarooq commented 3 years ago

The upstream PR https://github.com/edx/edx-platform/pull/27858 has been merged so closing this internal PR as well