Example #1
0
 def _deployed_content(self):
     if self.deployed_content is not None:
         return self.deployed_content
     legacy_names = self._reversion_version is not None
     if legacy_names:
         return to_xlsform_structure(self.version_content,
                                     deprecated_autoname=True)
     else:
         return to_xlsform_structure(self.version_content,
                                     move_autonames=True)
Example #2
0
 def valid_content(self, request, uid):
     asset = self.get_object()
     return Response({
         'kind': 'asset.valid_content',
         'uid': asset.uid,
         'data': to_xlsform_structure(asset.content),
     })
def convert_survey(surv, choices=[], sheets={}):
    sheets.update({
        'survey': surv
        })
    if len(choices) > 0:
        sheets.update({
            'choices': choices
        })
    return to_xlsform_structure(sheets)
Example #4
0
def convert_survey(surv, choices=[], sheets={}):
    sheets.update({'survey': surv})
    if len(choices) > 0:
        sheets.update({'choices': choices})
    return to_xlsform_structure(sheets)