(self)
return [
            [
                'study',  # The first "sheet" is the study details. It has only one row.
                [list(study_details.keys()), list(study_details.values())]
            ],
            [
                'subjects',
                [self.subject_headers()] + list(self.export_rows)
            ]
        ]
Returns a multi-dimensional list formatted as export_from_tables would expect. It includes all context
        (study data and subjects) required to render an ODM document.
Returns a multi-dimensional list formatted as export_from_tables would expect. It includes all context
        (study data and subjects) required to render an ODM document.
Returns a multi - dimensional list formatted as export_from_tables would expect . It includes all context ( study data and subjects ) required to render an ODM document .
def export_table(self):
        """
        Returns a multi-dimensional list formatted as export_from_tables would expect. It includes all context
        (study data and subjects) required to render an ODM document.
        """
        tz = get_timezone_for_user(None, self.domain)
        now = datetime.now(tz)
        file_oid = now.strftime('CommCare_%Y%m%d%H%M%S%z')
        utc_offset = now.strftime('%z')
        with_colon = ':'.join((utc_offset[:-2], utc_offset[-2:]))  # Change UTC offset from "+0200" to "+02:00"
        study_details = {
            'file_oid': file_oid,
            'file_description': 'Data imported from CommCare',
            'creation_datetime': now.strftime('%Y-%m-%dT%H:%M:%S') + with_colon,
            'study_name': get_study_constant(self.domain, 'study_name'),
            'study_description': get_study_constant(self.domain, 'study_description'),
            'protocol_name': get_study_constant(self.domain, 'protocol_name'),
            'study_oid': get_study_constant(self.domain, 'study_oid'),
            'audit_logs': AUDIT_LOGS,
            # The template accepts XML strings in params "study_xml" and
            # "admin_data_xml" which come from the study metadata.
            'study_xml': get_study_constant(self.domain, 'study_xml'),
            'admin_data_xml': get_study_constant(self.domain, 'admin_data_xml'),
            'domain': self.domain,
        }
        return [
            [
                'study',  # The first "sheet" is the study details. It has only one row.
                [list(study_details.keys()), list(study_details.values())]
            ],
            [
                'subjects',
                [self.subject_headers()] + list(self.export_rows)
            ]
        ]
def export_table ( self ) : tz = get_timezone_for_user ( None , self . domain ) now = datetime . now ( tz ) file_oid = now . strftime ( 'CommCare_%Y%m%d%H%M%S%z' ) utc_offset = now . strftime ( '%z' ) with_colon = ':' . join ( ( utc_offset [ : - 2 ] , utc_offset [ - 2 : ] ) ) # Change UTC offset from "+0200" to "+02:00" study_details = { 'file_oid' : file_oid , 'file_description' : 'Data imported from CommCare' , 'creation_datetime' : now . strftime ( '%Y-%m-%dT%H:%M:%S' ) + with_colon , 'study_name' : get_study_constant ( self . domain , 'study_name' ) , 'study_description' : get_study_constant ( self . domain , 'study_description' ) , 'protocol_name' : get_study_constant ( self . domain , 'protocol_name' ) , 'study_oid' : get_study_constant ( self . domain , 'study_oid' ) , 'audit_logs' : AUDIT_LOGS , # The template accepts XML strings in params "study_xml" and # "admin_data_xml" which come from the study metadata. 'study_xml' : get_study_constant ( self . domain , 'study_xml' ) , 'admin_data_xml' : get_study_constant ( self . domain , 'admin_data_xml' ) , 'domain' : self . domain , } return [ [ 'study' , # The first "sheet" is the study details. It has only one row. [ list ( study_details . keys ( ) ) , list ( study_details . values ( ) ) ] ] , [ 'subjects' , [ self . subject_headers ( ) ] + list ( self . export_rows ) ] ]