def survey_getAllQuestionsForComplete(complete_id):
 table = current.s3db.survey_complete
 row = current.db((table.id == complete_id)).select(table.series_id, limitby=(0, 1)).first()
 series_id = row.series_id
 questions = survey_getAllQuestionsForSeries(series_id)
 return (questions, series_id)

def survey_getAllQuestionsForComplete ( complete_id ) : table = current . s3db . survey_complete row = current . db ( ( table . id == complete_id ) ) . select ( table . series_id , limitby = ( 0 , 1 ) ) . first ( ) series_id = row . series_id questions = survey_getAllQuestionsForSeries ( series_id ) return ( questions , series_id )
function to return a tuple of the list of questions and series_id for the given completed_id the questions are returned in to order of their position in the template .