How do UC's calculate gpa for repeated courses

I know that both grades remain on the transcript. But, will they include both grades while calculating gpa. If the student takes the same UC approved honors course at a different school, and gets an A, will it replace the D got at the original school in gpa calculation. Or, will both grades be used for calculating gpa?

No, they will use the repeat grade in the UC calculation.

Thank you Gumbymom for the prompt reply. I thought that it had to be at the same school.

According to the UC application, to replace the D with the repeat grade, it has to be the exact same class. Does not specify if it has to be the same school.