#NEWLINE# def exam_page( request , course_id , exam_id ) : #NEWLINE# #INDENT# course = Course . objects . get ( id = course_id ) #NEWLINE# teacher = Teacher . objects . get ( user = request . user ) #NEWLINE# exam = Exam . objects . get ( exam_id = exam_id ) #NEWLINE# try : #NEWLINE# #INDENT# mc_questions = MultipleChoiceQuestion . objects . filter ( exam = exam ) . order_by ( 'question_num' ) #NEWLINE# #UNINDENT# except MultipleChoiceQuestion . DoesNotExist : #NEWLINE# #INDENT# mc_questions = None #NEWLINE# #UNINDENT# return render ( request , 'teacher/exam/question_view.html' , { #NEWLINE# #INDENT# 'teacher' : teacher , #NEWLINE# 'course' : course , #NEWLINE# 'exam' : exam , #NEWLINE# 'mc_questions' : mc_questions , #NEWLINE# 'ESSAY_QUESTION_TYPE' : settings . ESSAY_QUESTION_TYPE , #NEWLINE# 'MULTIPLECHOICE_QUESTION_TYPE' : settings . MULTIPLECHOICE_QUESTION_TYPE , #NEWLINE# 'TRUEFALSE_QUESTION_TYPE' : settings . TRUEFALSE_QUESTION_TYPE , #NEWLINE# 'RESPONSE_QUESTION_TYPE' : settings . RESPONSE_QUESTION_TYPE , #NEWLINE# 'user' : request . user , #NEWLINE# 'tab' : 'exam' , #NEWLINE# 'HAS_ADVERTISMENT' : settings . APPLICATION_HAS_ADVERTISMENT , #NEWLINE# 'local_css_urls' : settings . SB_ADMIN_2_CSS_LIBRARY_URLS , #NEWLINE# 'local_js_urls' : settings . SB_ADMIN_2_JS_LIBRARY_URLS , #NEWLINE# #UNINDENT# } )