In XBlock api not getting student_view_data

for api:-localhost:18000/api/courses/v1/blocks/block-v1:edX+E2E-101+course+type@problem+block@27cc702cdac7431c9cd51eaf986651ef/?username=staff&depth=all&requested_fields=graded,format,student_view_multi_device,lti_url,due&block_counts=video,problem&student_view_data=problem&block_types_filter=problem,html
my response is as:-
{
“root”: “block-v1:edX+E2E-101+course+type@problem+block@27cc702cdac7431c9cd51eaf986651ef”,
“blocks”: {
“block-v1:edX+E2E-101+course+type@problem+block@27cc702cdac7431c9cd51eaf986651ef”: {
“id”: “block-v1:edX+E2E-101+course+type@problem+block@27cc702cdac7431c9cd51eaf986651ef”,
“block_id”: “27cc702cdac7431c9cd51eaf986651ef”,
“lms_web_url”: “http://localhost:18000/courses/course-v1:edX+E2E-101+course/jump_to/block-v1:edX+E2E-101+course+type@problem+block@27cc702cdac7431c9cd51eaf986651ef”,
“student_view_url”: “http://localhost:18000/xblock/block-v1:edX+E2E-101+course+type@problem+block@27cc702cdac7431c9cd51eaf986651ef”,
“type”: “problem”,
“display_name”: “Question 1”,
“graded”: false,
“student_view_multi_device”: true,
“block_counts”: {
“video”: 0,
“problem”: 1
}
}
}
}

Unfortunately the capa problem XBlock does not currently support student_view_data. It should be working for other types like video or html.

I believe the reason for this is that the capa XBlock has a lot of functionality, so it’s not reasonable to get the data as JSON and re-implement a custom UI. I would recommend just displaying it in an iframe.