def buildTableFromCompletedList(data_source):
 headers = data_source[0]
 items = data_source[2:]
 table = TABLE(_id='completed_list', _class='dataTable display')
 hr = TR()
 for title in headers:
  hr.append(TH(title))
 header = THEAD(hr)
 body = TBODY()
 for row in items:
  tr = TR()
  for answer in row:
   tr.append(TD(answer))
  body.append(tr)
 table.append(header)
 table.append(body)
 current.response.s3.no_sspag = True
 attr = S3DataTable.getConfigData()
 form = S3DataTable.htmlConfig(table, 'completed_list', [[0, 'asc']], '', None, **attr)
 return form

def buildTableFromCompletedList ( data_source ) : headers = data_source [ 0 ] items = data_source [ 2 : ] table = TABLE ( _id = 'completed_list' , _class = 'dataTable display' ) hr = TR ( ) for title in headers : hr . append ( TH ( title ) ) header = THEAD ( hr ) body = TBODY ( ) for row in items : tr = TR ( ) for answer in row : tr . append ( TD ( answer ) ) body . append ( tr ) table . append ( header ) table . append ( body ) current . response . s3 . no_sspag = True attr = S3DataTable . getConfigData ( ) form = S3DataTable . htmlConfig ( table , 'completed_list' , [ [ 0 , 'asc' ] ] , '' , None , ** attr ) return form
build a table to display completed list .