There appears to still be enough of the original pupal cell to allow for proper molting to the pupal stage, and later, eclosion. Just carefully take the pre-pupa out, lightly brush any loose substrate out of the cell (being careful not to damage it any further) and then place the pre-pupa back in, in its original orientation (with the head-end facing the same direction as it naturally was). Leave the cell open, without any covering, but place the entire cell and some surrounding substrate into a plastic box with minimal ventilation - just enough to allow for some passage of air, but not enough to allow the substrate to dry out.