def survey_getMatrix(title,
                     logo,
                     layout,
                     widgetList,
                     secondaryMatrix,
                     langDict,
                     showSectionLabels=True,
                     layoutBlocks=None):

    matrix = survey_DataMatrix()
    if secondaryMatrix:
        secondaryMatrix = survey_DataMatrix()
    else:
        secondaryMatrix = None
    matrix.fixedWidthRepr = True
    if layoutBlocks == None:
        addMethod = survey_DataMatrixBuilder.addData
    else:
        addMethod = survey_DataMatrixBuilder.addArea
    builder = survey_DataMatrixBuilder(matrix,
                                       layoutBlocks,
                                       widgetList,
                                       secondaryMatrix = secondaryMatrix,
                                       langDict = langDict,
                                       addMethod=addMethod
                                       )
    row = 2
    for (section, rules) in layout:
        col = 0
        if showSectionLabels:
            row += 1
            (row, nextCol) = matrix.addCell(row,
                                            col,
                                            section,
                                            ["styleHeader"],
                                            len(section)
                                            )
        (row, col) = builder.processRule(rules, row, col, matrix)
    row = 0
    col = 0
    logoWidth = 0
    if logo != None:
        logoWidth = 6
        (nextRow, col) = matrix.addCell(row, col, "", [], logoWidth - 1, 1)
    titleWidth = max(len(title), matrix.lastCol - logoWidth)
    (row, col) = matrix.addCell(row, col, title, ["styleTitle"], titleWidth, 1)
    if layoutBlocks != None:
        maxCol = col
        for block in layoutBlocks.contains:
            if block.endPosn[1] > maxCol:
                maxCol = block.endPosn[1]
        layoutBlocks.setPosn((0, 0), (row, maxCol))
    matrix.boxRange(0, 0, matrix.lastRow + 1, matrix.lastCol, 2)
    if secondaryMatrix:
        return (matrix, secondaryMatrix)
    else:
        return matrix

# =============================================================================
# Question Types
# @todo: get rid of the wrapper functions!
#
Dump all remotes data to keep files
dataset/ETHPy150Open sahana/eden/modules/s3db/survey.py/survey_getMatrix--crossover with--dataset/ETHPy150Open ioflo/ioflo/ioflo/aio/proto/stacking.py/KeepStack.dumpRemotes