Commit 28a0e441 by Vik Paruchuri

Quick rubric restyle

parent 8bc98b2f
.rubric { .rubric {
margin: 40px 0px; margin: 0px 0px;
tr { tr {
margin:10px 0px; margin:0px 0px;
height: 100%; height: 100%;
} }
td { td {
padding: 20px 0px 25px 0px;
height: 100%; height: 100%;
border: 1px black solid; border: 1px black solid;
text-align: center; text-align: center;
...@@ -21,10 +20,6 @@ ...@@ -21,10 +20,6 @@
.rubric-label .rubric-label
{ {
position: relative; position: relative;
padding: 0px 15px 15px 15px;
width: 130px;
min-height: 50px;
min-width: 50px;
font-size: .9em; font-size: .9em;
background-color: white; background-color: white;
display: block; display: block;
...@@ -33,7 +28,6 @@ ...@@ -33,7 +28,6 @@
position: absolute; position: absolute;
bottom:0px; bottom:0px;
right:0px; right:0px;
margin:10px;
} }
.selected-grade, .selected-grade,
.selected-grade .rubric-label { .selected-grade .rubric-label {
...@@ -42,10 +36,14 @@ ...@@ -42,10 +36,14 @@
} }
input[type=radio]:checked + .rubric-label { input[type=radio]:checked + .rubric-label {
background: white; background: white;
color: $base-font-color; } color: $base-font-color;
white-space:nowrap;
}
.wrappable {
white-space:normal;
}
input[class='score-selection'] { input[class='score-selection'] {
position: relative; position: relative;
margin-left: 10px;
font-size: 16px; font-size: 16px;
} }
} }
......
<form class="rubric-template" id="inputtype_${id}"> <form class="rubric-template" id="inputtype_${id}" xmlns="http://www.w3.org/1999/html">
<h3>Rubric</h3> <h3>Rubric</h3>
% if view_only and has_score: % 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> <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>
...@@ -7,38 +7,32 @@ ...@@ -7,38 +7,32 @@
% else: % else:
<p>Select the criteria you feel best represents this submission in each category.</p> <p>Select the criteria you feel best represents this submission in each category.</p>
% endif % endif
<table class="rubric"> <div 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)): % for i in range(len(categories)):
<% category = categories[i] %> <% category = categories[i] %>
<tr> <b>${category['description']}</b><br/>
<th>${category['description']}</th> <ul>
% for j in range(len(category['options'])): % for j in range(len(category['options'])):
<% option = category['options'][j] %> <% option = category['options'][j] %>
%if option['selected']: %if option['selected']:
<td class="selected-grade"> <li class="selected-grade">
%else: %else:
<td> <li>
% endif % endif
% if view_only: % if view_only:
## if this is the selected rubric block, show it highlighted ## if this is the selected rubric block, show it highlighted
<div class="rubric-label"> <div class="rubric-label">
${option['text']} ${option['text']}
</div> </div>
% else: % 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}">
<label class="rubric-label" for="score-${i}-${j}">${option['text']}</label> <input type="radio" class="score-selection" name="score-selection-${i}" id="score-${i}-${j}" value="${option['points']}"/>
% endif <span class="wrappable">${option['text']}</span>
</td> </label>
% endfor % endif
</tr> </li>
% endfor
</ul>
% endfor % endfor
</table> </table>
</form> </form>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment