an obligation, which a student takes upon himself
Agreement that some schools require of students -- normally along the lines of "I promise not to lie, cheat, or steal."
The honor code at the University of Colorado at Boulder exists to secure for students an environment in which all individuals have responsibility for, and are appropriately recognized for, their individual academic and personal achievements.