def template_read():
 if (len(get_vars) > 0):
  (dummy, template_id) = get_vars.viewing.split('.')
 else:
  template_id = request.args[0]
 def postp(r, output):
  if r.interactive:
   template_id = r.id
   form = s3db.survey_buildQuestionnaireFromTemplate(template_id)
   output['items'] = None
   output['form'] = None
   output['item'] = form
   output['title'] = s3.crud_strings['survey_template'].title_question_details
   return output
 s3.postp = postp
 s3db.configure('survey_template', listadd=False, editable=False, deletable=False)
 r = s3_request('survey', 'template', args=[template_id])
 output = r(method='read', rheader=s3db.survey_template_rheader)
 return output

def template_read ( ) : if ( len ( get_vars ) > 0 ) : ( dummy , template_id ) = get_vars . viewing . split ( '.' ) else : template_id = request . args [ 0 ] def postp ( r , output ) : if r . interactive : template_id = r . id form = s3db . survey_buildQuestionnaireFromTemplate ( template_id ) output [ 'items' ] = None output [ 'form' ] = None output [ 'item' ] = form output [ 'title' ] = s3 . crud_strings [ 'survey_template' ] . title_question_details return output s3 . postp = postp s3db . configure ( 'survey_template' , listadd = False , editable = False , deletable = False ) r = s3_request ( 'survey' , 'template' , args = [ template_id ] ) output = r ( method = 'read' , rheader = s3db . survey_template_rheader ) return output
show the details of all the questions of a particular template .