Move publishing action to xblock handler.