 			]
 		}
 
-studentsRouter.post '/select/:program/:courseId', etabits.jsonMiddleware, (req, res)->
+studentsRouter.post '/select/:program/:courseId', etabits.jsonMiddleware, (req, res, next)->
 	opts= {
 		pid: parseInt(req.svu.program.id),
 		cid: parseInt(req.params.courseId)

	req.studentObject.get 'choose_class', opts, (err, data)-> res.json({success: true})


studentsRouter.get '/explore/:term/:program', (req, res)->
	#console.log data.programsByCode[req.params.program].id
	req.studentObject.get 'progtermcourse', {pid: req.svu.program.id}, (err, data)->
		return next(err) if err


		res.json({success: true, data: data.courses})

studentsRouter.get '/explore/:term/:program/:courseId', (req, res, next)->

	opts = {
		pid: req.svu.program.id
