A judge has approved an agreement for President Donald Trump to pay $25 million to settle lawsuits over Trump University.