<%! from django.utils.translation import ungettext %>
<div class="rubric">
    % for i in range(len(categories)):
        <% category = categories[i] %>
        <span class="rubric-category">${category['description']}</span>
        <ul class="rubric-list">
        % for j in range(len(category['options'])):
            <% option = category['options'][j] %>
            <%
                points_earned_msg = ungettext(
                    "{num} point: {explanatory_text}",
                    "{num} points: {explanatory_text}",
                    option['points']
                ).format(
                    num=option['points'],
                    explanatory_text=option['text'],
                )
            %>
            %if len(category['options'][j]['grader_types'])>0:
                <li class="rubric-list-item">
            %else:
                <li class="rubric-list-item rubric-info-item">
            %endif
                <div class="rubric-label">
                    %if len(category['options'][j]['grader_types'])>0:
                        %if correct[i]==1:
                            <label class="choicegroup_correct wrapper-score-selection"></label>
                        %elif correct[i]==.5:
                            <label class="choicegroup_partialcorrect wrapper-score-selection"></label>
                        %else:
                            <label class="choicegroup_incorrect wrapper-score-selection"></label>
                        %endif

                            <span class="wrappable"> ${points_earned_msg}</span>
                        </label>
                    %else:
                        <label class="rubric-elements-info">
                            <span class="wrapper-score-selection"> </span>
                            <span class="wrappable"> ${points_earned_msg}</span>
                        </label>
                    %endif
                </div>
            </li>
        % endfor
        </ul>
    % endfor
</div>

