California Elections Code §2025.
A person does not gain or lose a domicile solely by reason of his or her presence or absence from a place while employed in the service of the United States or of this state, nor while engaged in navigation, nor while a student of any institution of learning, nor while kept in an almshouse, asylum or prison. This section shall not be construed to prevent a student at an institution of learning from qualifying as an elector in the locality where he or she domiciles while attending that institution, when in fact the student has abandoned his or her former domicile.
If the student has not "abandoned" the former domicile, they are not qualified to vote in the location where they are attending school in California.
"Abandonment" has a very specific meaning under the law. From LectLaw.com:
ABANDONMENT - The intent and subsequent actions of a tenant that indicate that the tenant has given up the leased premises. Examples include an empty apartment, a return of keys, and utilities turned off.
What cannot happen is for them to have their residency changed against their will.