<form class="rubric-template" id="inputtype_${id}">
    <h3>Rubric</h3>
    % if view_only and has_score:
    <p>This is the rubric that was used to grade your submission. The highlighted selection matches how the grader feels you performed in each category.</p>
    % elif view_only:
    <p>Use the below rubric to rate this submission.</p>
    % else:
    <p>Select the criteria you feel best represents this submission in each category.</p>
    % endif
    <table class="rubric">
        <tr class="points-header">
            <th></th>
        % for i in range(max_score + 1):
            <th>   
                ${i} points
            </th>
        % endfor
        </tr>
        % for i in range(len(categories)):
            <% category = categories[i] %>
        <tr>
            <th>${category['description']}</th>
            % for j in range(len(category['options'])):
                <% option = category['options'][j] %>
            %if option['selected']:
            <td class="selected-grade">
            %else:
            <td>
            % endif
                % if view_only:
                    ## if this is the selected rubric block, show it highlighted
                        <div class="rubric-label">
                        ${option['text']}
                        </div>
                % else:
                    <input type="radio" class="score-selection" name="score-selection-${i}" id="score-${i}-${j}" value="${option['points']}"/>
                    <label class="rubric-label" for="score-${i}-${j}">${option['text']}</label>
                % endif
            </td>
            % endfor
        </tr>
        % endfor
    </table>
</form>
