HC sets July 31 deadline for govt on beach safety measures