Reshaping/Restructuring Data

Hi all,

I'm currently working with a fairly large data set (a sample of which I have attached) and was hoping to conduct some item analysis on binary responses - correct/incorrect.

The current data set is in long format and I'm having some issue restructuring into long format, as the items are mapped onto certain blocks (a total of which there are 10), but not every respondent will see the same question, so when I do restructure the data by block, it becomes staggered (sample of my attempt also attached for reference).

As you can see from the second workbook that I have attempted to restructure, there are far too many "NA's" or missing data. I'm trying to figure out a way to restructure the data so that I can conduct a proper item analysis in wide format without losing those data points for items.

Any guidance/help would be greatly appreciated!


Long Format Sample

Wide Restructure Attempt