def survey_get_series_questions_of_type(question_list, qtype):
 if isinstance(qtype, (list, tuple)):
  types = qtype
 else:
  types = qtype
 questions = []
 for question in question_list:
  if (question['type'] in types):
   questions.append(question)
  elif ((question['type'] == 'Link') or (question['type'] == 'GridChild')):
   widget_obj = survey_getWidgetFromQuestion(question['qstn_id'])
   if (widget_obj.getParentType() in types):
    question['name'] = widget_obj.fullName()
    questions.append(question)
 return questions

def survey_get_series_questions_of_type ( question_list , qtype ) : if isinstance ( qtype , ( list , tuple ) ) : types = qtype else : types = qtype questions = [ ] for question in question_list : if ( question [ 'type' ] in types ) : questions . append ( question ) elif ( ( question [ 'type' ] == 'Link' ) or ( question [ 'type' ] == 'GridChild' ) ) : widget_obj = survey_getWidgetFromQuestion ( question [ 'qstn_id' ] ) if ( widget_obj . getParentType ( ) in types ) : question [ 'name' ] = widget_obj . fullName ( ) questions . append ( question ) return questions
get questions of a particular question type .