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-50171 Assignments rubrics are not published when pressing release grades #12919

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 @@ -347,6 +347,7 @@ ResponseEntity patchEvaluation(@PathVariable String siteId, @PathVariable Long e
return rubricsService.getEvaluation(evaluationId, siteId).map(evaluation -> {

ObjectMapper objectMapper = new ObjectMapper();
objectMapper.registerModule(new JavaTimeModule());

try {
JsonNode patched = patch.apply(objectMapper.convertValue(evaluation, JsonNode.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,16 @@ export class SakaiRubricStudentButton extends rubricsApiMixin(RubricsElement) {

return null;
})
.then(async data => {

const evaluation = data._embedded.evaluations[0];
.then(async evaluation => {
if (evaluation) {
evaluation.status = 2;
const evaluationStatus = 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should set 2 on the evaluation object itself, or set it on completion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this still need to be addressed? I don't understand how to do it

url = `/api/sites/${this.siteId}/rubric-evaluations/${evaluation.id}`;
await fetch(url, {
body: JSON.stringify(evaluation),
body: JSON.stringify([
{ "op": "replace", "path": "/status", "value": evaluationStatus }
]),
credentials: "include",
headers: { "Content-Type": "application/json" },
headers: { "Content-Type": "application/json-patch+json" },
method: "PATCH",
})
.then(r => {
Expand Down
Loading