-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: improve course feedback table
chore: add comment for inverted index fix: only show feedback on feedback table column fix: round average rating fix: improve column table size
- Loading branch information
Showing
7 changed files
with
92 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ | |
[run] | ||
data_file = .coverage | ||
source = feedback | ||
omit = */urls.py | ||
omit = | ||
*/urls.py | ||
*/settings/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.feedback-instructor-wrapper { | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.go-back { | ||
margin: 16px 0px 16px 0px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,52 @@ | ||
{% load i18n %} | ||
|
||
<div class="feedback-instructor-wrapper"> | ||
<table> | ||
<tr> | ||
<th>Location</th> | ||
<th>Numbers of ratings</th> | ||
<th>Average rating</th> | ||
<th>Feedback received</th> | ||
</tr> | ||
{% for block in blocks %} | ||
<tr> | ||
<td><a href="{{ block.url }}">{{ block.parent }}</a></td> | ||
<td> | ||
<ul> | ||
{% for vote_aggregate in block.vote_aggregate %} | ||
<li>{{ vote_aggregate.scale_text }}: {{ vote_aggregate.count }}</li> | ||
<div class="feedback-instructor-wrapper"></div> | ||
<div class="paragon-styles"> | ||
<div class="pgn__data-table-container"> | ||
<table role="table" class="pgn__data-table is-striped"> | ||
<thead> | ||
<tr role="row"> | ||
<th colspan="6" role="columnheader"> | ||
<span class="d-flex align-items-center"><span>{% trans "Unit" %}</span></span> | ||
</th> | ||
<th colspan="3" role="columnheader"> | ||
<span class="d-flex align-items-center"><span>{% trans "Number of ratings" %}</span></span> | ||
</th> | ||
<th colspan="3" role="columnheader"> | ||
<span class="d-flex align-items-center"><span>{% trans "Average rating" %}</span></span> | ||
</th> | ||
<th colspan="8" role="columnheader"> | ||
<span class="d-flex align-items-center"><span>{% trans "Feedback " %}</span></span> | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody role="rowgroup"> | ||
{% for block in blocks %} | ||
<tr role="row" class="pgn__data-table-row"> | ||
<td colspan="6" role="cell" class="pgn__data-table-cell-wrap"> | ||
<a class="admin-panel" href="{{ block.url }}"><button class="btn btn-primary" ="button">{% trans "See Unit" %}: {{ block.parent }}</button></a> | ||
</td> | ||
<td colspan="3" role="cell" class="pgn__data-table-cell-wrap"> | ||
<ul> | ||
{% for vote_aggregate in block.vote_aggregate %} | ||
<li>{{ vote_aggregate.scale_text }}: {{ vote_aggregate.count }}</li> | ||
{% endfor %} | ||
</ul> | ||
</td> | ||
<td colspan="3" role="cell" class="pgn__data-table-cell-wrap">{{ block.average_rating }}</td> | ||
<td colspan="8" role="cell" class="pgn__data-table-cell-wrap"> | ||
<ul> | ||
{% for feedback in block.answers %} | ||
<li>{% trans "Comment" %}: {{ feedback.user_freeform }}. {% trans "Vote" %}: {% if feedback.user_vote != -1 %} {{ feedback.user_vote }} {% else %} {% trans "No vote" %} {% endif %}</li> | ||
{% endfor %} | ||
</ul> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</ul> | ||
</td> | ||
<td>{{ block.average_rating }}</td> | ||
<td> | ||
{% for feedback in block.answers %} | ||
<div class="feedback-block-answer"> * {{ feedback.user_freeform }}. Vote: {{ feedback.user_vote }}</div> | ||
{% endfor %} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</div> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
|
||
<!-- This script is because it's currently not possible to add sections dinamically from the frontend. --> | ||
<script type="text/javascript" src="/static/js/src/feedback_instructor.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$(function () { | ||
|
||
const cssUrl = "https://cdn.jsdelivr.net/npm/@edx/[email protected]/dist/paragon.min.css"; | ||
|
||
$('<link>').attr({ | ||
href: cssUrl, | ||
rel: "stylesheet" | ||
}).appendTo('head'); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters