#NEWLINE# def get_questions( domain , app_id , xmlns ) : #NEWLINE# #INDENT# if ( not app_id ) : #NEWLINE# #INDENT# raise QuestionListNotFound ( _ ( 'This form is not associated with an app' ) ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# app = get_app ( domain , form ) #NEWLINE# #UNINDENT# except Http404 : #NEWLINE# #INDENT# raise QuestionListNotFound ( _ ( 'No app could be found' ) ) #NEWLINE# #UNINDENT# if ( not isinstance ( app , Application ) ) : #NEWLINE# #INDENT# raise QuestionListNotFound ( _ ( 'Remote apps are not supported' ) ) #NEWLINE# #UNINDENT# form = app . get_form_by_xmlns ( xmlns ) #NEWLINE# if ( not form ) : #NEWLINE# #INDENT# if ( xmlns == 'http://code.javarosa.org/devicereport' ) : #NEWLINE# #INDENT# raise QuestionListNotFound ( _ ( 'This is a Device Report' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise QuestionListNotFound ( _ ( 'We could not find the question list associated with this form' ) ) #NEWLINE# #UNINDENT# #UNINDENT# return get_questions_from_xform_node ( form . wrapped_xform ( ) , app . langs )