Skip to content

Commit

Permalink
SAK-41530 Added rubric button against grade in instructor view
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfish authored and Miguel Pellicer committed Mar 22, 2019
1 parent 210b53d commit 73a32b8
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,12 @@ function printView(url) {
#else
$!service.getGradeForSubmitter($submission, $userSubmission.User.Id)
#end
<sakai-rubric-student-button
token="$!rbcs-token"
tool-id="sakai.assignment"
evaluated-item-id="$submission.Id"
entity-id="$assignment.Id">
</sakai-rubric-student-button>
</td>
#end
#if ($allowReviewService && $assignment.ContentReview)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@
<td class="gb-summary-grade-score" wicket:id="gradeScore">
<span class="gb-summary-grade-score-raw" wicket:id="grade" wicket:message="aria-label:studentsummary.gradebookitem.score"></span>
<span class="gb-summary-grade-score-outof" wicket:id="outOf" wicket:message="aria-label:studentsummary.gradebookitem.outof"></span>
<span style="float: right;">
<sakai-rubric-student-button wicket:id="sakai-rubric-student-button"></sakai-rubric-student-button>
</span>
<sakai-rubric-student-button wicket:id="sakai-rubric-student-button"></sakai-rubric-student-button>
</td>
<td wicket:id="weight"><!-- empty --></td>
<td class="gb-summary-grade-duedate" wicket:id="dueDate"></td>
Expand Down
4 changes: 4 additions & 0 deletions gradebookng/tool/src/webapp/styles/gradebook-grades.css
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,10 @@ div.wicket-modal div.w_right > div {
font-weight: normal;
}

.gb-summary-grade-score sakai-rubric-student-button {
float: right;
}

.gb-summary-grade-panel .gb-summary-grade-stats:before {
font-family: 'gradebook-icons';
content: '\f080';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,4 +513,8 @@
margin: 0.8em $standard-spacing 0 0;
width: 80px;
}

#submissionList sakai-rubric-student-button {
float: right;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ export class SakaiRubricCriterionStudent extends SakaiElement {
}

get evaluationDetails() { return this._evaluationDetails; }

shouldUpdate(changedProperties) {
return (this.preview && this.criteria) || this.ready;
}

render() {

Expand Down Expand Up @@ -80,7 +76,7 @@ export class SakaiRubricCriterionStudent extends SakaiElement {
<strong class="points-display ${this.getOverriddenClass(c.pointoverride,c.selectedvalue)}">
&nbsp;
${c.selectedvalue}
${!c.selectedRadingId ? "0" : ""}
${!c.selectedRatingId ? "0" : ""}
&nbsp;
</strong>
${this.isOverridden(c.pointoverride,c.selectedvalue) ?
Expand All @@ -107,13 +103,16 @@ export class SakaiRubricCriterionStudent extends SakaiElement {

if (ed.criterionId === c.id) {

var ratingItem = c.ratings.filter(r => r.id == ed.selectedRatingId)[0];
ratingItem.selected = true;
var selectedRatingItem;
c.ratings.forEach(r => {
r.selected = (r.id == ed.selectedRatingId);
selectedRatingItem = r;
});

c.selectedRadingId = ed.selectedRatingId;
c.selectedRatingId = ed.selectedRatingId;
if (ed.pointsAdjusted) {
c.pointoverride = ed.points;
c.selectedvalue = ratingItem.points;
c.selectedvalue = selectedRatingItem.points;
} else {
c.pointoverride = "";
c.selectedvalue = ed.points;
Expand Down

0 comments on commit 73a32b8

Please sign in to comment.