A California federal judge barred the Trump administration on Thursday from detaining foreign students who had their electronic F-1 student visa records terminated, and from imposing any additional adverse legal consequences on affected international students across the country.