Skip to content

Commit

Permalink
S2U-34 Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stetsche committed Oct 6, 2023
1 parent 9baa8bd commit 0d675d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3839,7 +3839,6 @@ protected String build_instructor_grade_submission_context(VelocityPortlet portl
String gradebookUid = toolManager.getCurrentPlacement().getContext();
// If the assignment reference is not equal to the associated gradebook item, then a custom gb item is being used
if (!assignmentRef.equals(assignmentAssociateGradebook)) {
Optional<org.sakaiproject.grading.api.Assignment> assignmentOptional;
try {
org.sakaiproject.grading.api.Assignment gbAssignment = gradingService.getAssignment(gradebookUid,
assignmentAssociateGradebook);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ public boolean hasAssociatedRubric(String tool, String id) {

if (StringUtils.isBlank(id)) return false;

return associationRepository.findByToolIdAndItemId(tool, id).filter(canEvaluate.or(canEdit).or(isCreator)).isPresent();
return getRubricAssociation(tool, id).isPresent();
}

public Optional<ToolItemRubricAssociation> saveRubricAssociation(String toolId, String toolItemId, final Map<String, String> params) {
Expand Down Expand Up @@ -1015,7 +1015,7 @@ public Optional<ToolItemRubricAssociation> getRubricAssociation(String toolId, S

@Transactional(readOnly = true)
private Optional<ToolItemRubricAssociation> getRubricAssociationCheckPermission(String toolId, String associatedToolItemId) {
return getRubricAssociation(toolId, associatedToolItemId).filter(canEdit.or(isCreator));
return getRubricAssociation(toolId, associatedToolItemId).filter(canEdit.or(isCreator).or(canEvaluate));
}

@Transactional(readOnly = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ export const rubricsApiMixin = Base => class extends Base {

apiGetEvaluation() {


const url = new URL(`/api/sites/${this.siteId}/rubric-evaluations/tools/${this.toolId}/items/${this.entityId}/evaluations/${this.evaluatedItemId}`);
let url = `/api/sites/${this.siteId}/rubric-evaluations/tools/${this.toolId}/items/${this.entityId}/evaluations/${this.evaluatedItemId}/owners/${this.evaluatedItemOwnerId}`;

if (this.isPeerOrSelf) {
url.searchParams.append("isPeer", true);
url += "?isPeer=true";
}

return fetch(url.href, { credentials: "include" })
return fetch(url, { credentials: "include" })
.then(r => {

if (r.ok) {
Expand Down

0 comments on commit 0d675d4

Please sign in to comment.