Question about UC requirements

<p>I know that UCs require you to pass classes with a C or higher and that a foreign language is required for 2 years. What if I got a D in spanish for the 2nd semester of my Spanish II class, but took spanish 3 AP and passed that class with ease. Would that still count as 2 years of a foreign language?</p>