Calif. teacher with past in porn loses appeal