def template_summary():
 tablename = 'survey_template'
 s3db[tablename]
 s3db.survey_complete
 crud_strings = s3.crud_strings[tablename]
 def postp(r, output):
  if r.interactive:
   if (len(get_vars) > 0):
    (dummy, template_id) = get_vars.viewing.split('.')
   else:
    template_id = r.id
   form = s3db.survey_build_template_summary(template_id)
   output['items'] = form
   output['sortby'] = [[0, 'asc']]
   output['title'] = crud_strings.title_analysis_summary
   output['subtitle'] = crud_strings.subtitle_analysis_summary
  return output
 s3.postp = postp
 s3db.configure(tablename, listadd=False, deletable=False)
 output = s3_rest_controller('survey', 'template', method='list', rheader=s3db.survey_template_rheader)
 s3.actions = None
 return output

def template_summary ( ) : tablename = 'survey_template' s3db [ tablename ] s3db . survey_complete crud_strings = s3 . crud_strings [ tablename ] def postp ( r , output ) : if r . interactive : if ( len ( get_vars ) > 0 ) : ( dummy , template_id ) = get_vars . viewing . split ( '.' ) else : template_id = r . id form = s3db . survey_build_template_summary ( template_id ) output [ 'items' ] = form output [ 'sortby' ] = [ [ 0 , 'asc' ] ] output [ 'title' ] = crud_strings . title_analysis_summary output [ 'subtitle' ] = crud_strings . subtitle_analysis_summary return output s3 . postp = postp s3db . configure ( tablename , listadd = False , deletable = False ) output = s3_rest_controller ( 'survey' , 'template' , method = 'list' , rheader = s3db . survey_template_rheader ) s3 . actions = None return output
show section-wise summary of questions of a template .