def survey_getAllSectionsForSeries(series_id):
 table = current.s3db.survey_series
 row = current.db((table.id == series_id)).select(table.template_id, limitby=(0, 1)).first()
 return survey_getAllSectionsForTemplate(row.template_id)

def survey_getAllSectionsForSeries ( series_id ) : table = current . s3db . survey_series row = current . db ( ( table . id == series_id ) ) . select ( table . template_id , limitby = ( 0 , 1 ) ) . first ( ) return survey_getAllSectionsForTemplate ( row . template_id )
function to return the list of sections for the given series the sections are returned in the order of their position in the template .