Something is very wrong. The Department of Education made you a loan. You did not get any of that money. By billing you directly for the class that you failed, the University of Phoenix is claiming that they did not get any of the loan money either. Either the University of Phoenix got the money or they didn't. If they did, they should have either returned it to the Department of Education or disbursed it to you (and used 1300.00 of it first to cover your tuition). If they did not receive the money or returned it to the Department of Education, the Department of Education should not be going after you for a loan.
You should be contacting the Department of Education and telling them that you never received a loan and that you are in fact being billed by the University of Phoenix for the tuition for the only class you took with them. You should also be calling the University of Phoenix and demanding an explanation as to why the Department of Education believes that you owe them for a $7000.00 loan when you only took one class with them and they are billing you for the tuition for that. You need to demand that they account for all financial aid transactions that happened on your behalf.