Units/GPA calculation question

<p>So, I took a 5-unit math class at a UC and didn't pass. Then I took its ASSIST-equivalent at community college and got a 'B'. Then I retook the original class at the UC and got a C+. </p>

<p>My question:
Since these classes are 'equivalents' and cover much of the same material, do I get units for both? AND, do BOTH grades factor into my GPA, or just one of them?</p>