fixed the coursename substring function. should be chopping off the string in the view, not in request