Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SAK-44225 Assignments add group filter to sakai grader #12842

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4394,6 +4394,7 @@ protected String build_instructor_grade_submission_context(VelocityPortlet portl
} else {
context.put("method", "doGrade_assignment");
context.put("urlParams", "assignmentId=" + assignmentRef);
context.put("selectedGroup", state.getAttribute(VIEW_SUBMISSION_LIST_OPTION));
}
return template + TEMPLATE_INSTRUCTOR_GRADE_SUBMISSION_WITH_GRADER;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
user-list-url="#toolLinkParam("$action" "$method" "$urlParams")"
current-student-id="$!submitterId"
has-associated-rubric="$!hasAssociatedRubric"
selected-group="$selectedGroup"
#if ($!hasAssociatedRubric)
tool-id="sakai.assignment.grades"
entity-id="$assignment.Id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export class SakaiGrader extends graderRenderingMixin(gradableDataMixin(SakaiEle
submissionId: { attribute: "submission-id", type: String },
currentStudentId: { attribute: "current-student-id", type: String },
gradableTitle: { attribute: "gradable-title", type: String },
selectedGroup: { attribute: "selected-group", type: String },
hasAssociatedRubric: { attribute: "has-associated-rubric", type: String },
entityId: { attribute: "entity-id", type: String },
toolId: { attribute: "tool-id", type: String },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ export const graderRenderingMixin = Base => class extends Base {
${this.groups ? html`
<div class="grader-groups">
<div>${this.i18n.group_label}</div>
<sakai-group-picker .groups=${this.groups} @groups-selected=${this._groupsSelected}></sakai-group-picker>
<sakai-group-picker .groups=${this.groups}
@groups-selected=${this._groupsSelected}
group-ref=${ifDefined(this.selectedGroup)}>
</sakai-group-picker>
</div>
` : nothing }
`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ export class SakaiGroupPicker extends SakaiElement {
this.dispatchEvent(new CustomEvent("groups-selected", { detail: { value: groups }, bubbles: true }));
}

firstUpdated() {

if (this.groupRef) {
// An initial group has been specified. We only want to do this on the first update.
this.groupChanged({ target: { value: this.groupRef } });
}
}

shouldUpdate() {
return this._i18n && this.groups;
}
Expand Down
Loading