Can't get scorable xblock in Progress page: Ironwood

I’ve been trying to get an XBlock to be scorable (and added to the Progress page) and haven’t been able to get it to work.

I’ve tried the following:

  • created an xblock with the xblock sdk
  • subclassed ScorableXBlockMixin
  • implemented all the required methods
  • tried only setting has_score = True and weight = 3.0
  • added a max_score method

The XBlock is properly installed and works in both studio and the LMS.

I’ve walked through the code starting on the progress page. I’ve found where it’s testing if the block has the has_score attribute or not in CreateSubsectionGrade._compute_block_score here . When I drop into pdb or log the block.fields property, the has_score attribute is always False. Additionally, there is no weight property which I have also implemented on the xblock.

I’ve looked at the LTI Consumer XBlock and it seemingly only has a has_score attribute, max_score method and weight attribute and when I add that component and make it graded, it soon shows up in the progress page.

The other very strange thing is that if I open up a shell and get the xblock via the modulestore using it’s UsageKey, the properties are all there as expected.

I’ve tried to track it down through the BlockStructure elements to try and see how the fields are being set, but haven’t been able to figure it out yet.

Might anyone else have any insight into this?