Former student accused of rape avoids jail