Grade-changing student avoids felony trial