Two students each face up to a year in jail for a prank that involved hacking into a professor's computer, giving grades to other students and sending pizza, magazine subscriptions and CDs to the professor's home.

Lena Chen, 20, and Jennifer Ngan, 19, face misdemeanor charges of illegally accessing computers. The pair, both students of California State University, Northridge, are scheduled to be arraigned Aug. 21.

An investigation showed the professor's network account had been accessed without her permission and grades were assigned to nearly 300 students, prosecutor Robert Fratianne said.

• Click here to visit FOXNews.com's Cybersecurity Center.

The professor's campus e-mail was being forwarded to an account established by Chen and Ngan, investigators said.

Prosecutors also alleged Chen and Ngan used personal identifying information found on the university system to order food, magazine subscriptions and a shipment of blank CDs to the professor's home. The professor was billed for the purchases but was not required to pay.

The school would not release the professor's name.