Extending the problem component


I’ve been browsing through the docs but haven’t found a clear guide on how I could extend the functionality for the problem component, specifically the multiple choice single answer.
The basic functionality relates to the hint and feedback component but I want to see how it actually works before trying to implement my own problem component.

So my main questions are:

  • Is there any guide on how to extend the problem/component?
  • If this component is not an XBlock could someone point out any reference to other component that is an XBlock that deals with similar logic?

Thanks for any help you can provide.

You could check out problem-builder, which might have the functionality you’re looking for.

Is there some specific functionality that’s missing from the problem component that’s driving you to build your own?

Thanks Kshitij for your answer,

I’m trying to build a problem with multiple choice single answer and show feedback in multiple ways, video, pdfs, plain text. This feedback is dynamically generated meaning it depends on the question and the answers selected so far, think of it as adaptive feedback.

If there is any other way to achieve without building my own XBlock please let me know.

Thanks again!

I think you should definitely take a look at problem-builder in that case. I’m not entirely certain if that will solve your problem (I am not entirely certain what you mean by “dynamically generated” here). With problem-builder you have step builder which allows you to create a more complex series of questions with a final review step that has feedback bases on correct/incorrect answers. It may or may not be what you mean by adaptive feedback, but is probably worth a look.

i think you can handle it by flow-control-xblock depending on the users answer show him deffrent content you’d like.