SACRAMENTO (CBS / AP) — State lawmakers are seeking to bar mandatory school identification cards revealing students’ academic standing.

The state Senate approved the prohibition 34-2 on Monday.

The measure was prompted by two Anaheim high schools that gave students black or gold ID cards and matching notebooks if they did well on standardized tests. Students that did poorly received white cards.

Students with premium cards were entitled to shorter lunch lines and discounts for after-school activities.

Sen. Lou Correa, a Democrat from Anaheim who carried the bill, says students and parents complained that the incentive program was “embarrassing and demoralizing.”

AB1166 bans color-coding ID cards based on grades or test scores, but says students can voluntarily wear insignia or emblems honoring their academic achievements.

The bill returns to the Assembly for a final vote.

(Copyright 2012 by CBS San Francisco. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)