Exemplo n.º 1
0
def get_question_row(formset, total):
    field_name = common.get_matrix_value(formset.matrix_id)
    partial_question = [
        'Q',
        'F ',
        field_name,
        1,
        formset.question,
        '',
        'en',
        '',
        common.get_mandatory(formset),
        '',
    ]
    full_question = partial_question + common.get_missing(partial_question, total)
    full_question.append(formset.get_dependencies())
    return full_question
Exemplo n.º 2
0
def get_question_row(formset, total):
    field_name = common.get_matrix_value(formset.matrix_id)
    partial_question = [
        'Q',
        ';',
        field_name,
        1,
        formset.question,
        formset.help_text,
        'en',
        '',
        common.get_mandatory(formset),
        '',
    ]
    full_question = partial_question + common.get_missing(partial_question, total)
    custom_fields = (
        ('same_default', 1),
    )
    full_question = common.update_row(full_question, custom_fields)
    return full_question