Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 5725698

Browse files
committed
Abillity to collapse rubrics when grading
fixes #460
1 parent b9badfc commit 5725698

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<jackson.version>2.4.4</jackson.version>
2121
<jetty.version>9.2.10.v20150310</jetty.version>
2222
<resteasy.version>3.0.10.Final</resteasy.version>
23-
<freemarker.version>2.3.21</freemarker.version>
23+
<freemarker.version>2.3.23</freemarker.version>
2424
<slf4j.version>1.7.7</slf4j.version>
2525
<httpclient.version>4.3.6</httpclient.version>
2626
<h2.version>1.3.173</h2.version>

src/main/resources/templates/courses/assignments/group-delivery-review.ftl

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@
8080
[#list assignment.getTasks() as task]
8181
<tbody class="task" data-id="${task.id?c}">
8282
<tr class="active">
83-
<td colspan="2"><strong>${task.description}</strong></td>
83+
<td colspan="2"><span><strong>${task.description}<p class="octicon octicon-chevron-down" data-toggle="collapse" data-target=".collapse-target-${task?index}"></p></strong></span></td>
8484
<td><strong>${task.getTotalWeight()?c}</strong></td>
8585
<td><strong id="lbl-total-task-${task.id?c}">0</strong></td>
8686
</tr>
8787
[#list task.getCharacteristics() as characteristic]
88-
<tr data-id="${characteristic.id?c}" data-weight="${characteristic.weight?c}" class="characteristic">
88+
<tr data-id="${characteristic.id?c}" data-weight="${characteristic.weight?c}" class="characteristic collapse-target-${task?index}">
8989
<td>${characteristic.description}</td>
9090
<td>
9191
[#list characteristic.getLevels() as level]
@@ -170,6 +170,20 @@
170170
$(computeTotals)
171171
$('[type="radio"]').on('change', computeTotals)
172172
$('[type="radio"]').on('change', persistMasteries)
173+
174+
var down = "octicon-chevron-down"
175+
var right ="octicon-chevron-right"
176+
177+
$('[data-target*="collapse-target"]').click(function() {
178+
var tableRow = $(this);
179+
if(tableRow.hasClass(down)) {
180+
tableRow.removeClass(down).addClass(right)
181+
} else {
182+
tableRow.removeClass(right).addClass(down)
183+
}
184+
185+
})
186+
173187
</script>
174188

175189
[/@macros.renderScripts]

0 commit comments

Comments
 (0)