Skip to content

Commit

Permalink
SAK-50171:Assignments: Rubrics are not published when pressing Releas…
Browse files Browse the repository at this point in the history
…e Grades
  • Loading branch information
Aniii10 committed Sep 26, 2024
1 parent a07a023 commit 7a1df1b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
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;
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

0 comments on commit 7a1df1b

Please sign in to comment.