Federal judge rules students have no right to civics education while warning of peril to democracy