If the minor has been placed in the 24-hour school by order of the county superintendent or superintendent of schools of the district, as the case may be, the parent or guardian with whose consent the minor was placed in the school, upon application to the county superintendent or superintendent of schools, as the case may be, who placed him therein, may secure the release of the minor and his restoration to the care, custody, and control of the parent or guardian. The county superintendent or superintendent of the district, as the case may be, shall require a written report from the principal of the 24-hour school, giving the progress of the child and the advisability of the release of the child from the 24-hour school. If the report indicates that the minor is in need of further care and treatment and that his release would be detrimental to his own welfare or the welfare of others, the county superintendent or superintendent of the district, as the case may be, may report the minor to the juvenile court or other proper court for action.