<form class="choicegroup capa_inputtype" id="inputtype_${id}">
    <div class="indicator_container">
    % if input_type == 'checkbox' or not value:
        % if status == 'unsubmitted' or show_correctness == 'never':
        <span class="unanswered" style="display:inline-block;" id="status_${id}"></span>
        % elif status == 'correct': 
        <span class="correct" id="status_${id}"></span>
        % elif status == 'incorrect':
        <span class="incorrect" id="status_${id}"></span>
        % elif status == 'incomplete':
        <span class="incorrect" id="status_${id}"></span>
        % endif
    % endif
    </div>

    <fieldset>

        % for choice_id, choice_description in choices:
        <label for="input_${id}_${choice_id}"
            % if input_type == 'radio' and ( (isinstance(value, basestring) and (choice_id == value))  or  (not isinstance(value, basestring) and choice_id in value) ):
            <% 
                if status == 'correct':
                    correctness = 'correct'
                elif status == 'incorrect':
                    correctness = 'incorrect'
                else:
                    correctness = None
            %>
            % if correctness and not show_correctness=='never':
            class="choicegroup_${correctness}"
            % endif
            % endif
            >
            <input type="${input_type}" name="input_${id}${name_array_suffix}" id="input_${id}_${choice_id}" value="${choice_id}"
            % if input_type == 'radio' and ( (isinstance(value, basestring) and (choice_id == value))  or  (not isinstance(value, basestring) and choice_id in value) ):
            checked="true" 
            % elif input_type != 'radio' and choice_id in value:
            checked="true"
            % endif

            /> ${choice_description} </label>
        % endfor
        <span id="answer_${id}"></span>
    </fieldset>

    % if show_correctness == "never" and (value or status not in ['unsubmitted']):
    <div class="capa_alert">${submitted_message}</div>
    %endif
</form>
