Skip to content

Commit

Permalink
S2U-26 Fixes for conflicts related to recent SAK (49656)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgarciaentornos committed Feb 2, 2024
1 parent b78fd84 commit 2e7a94e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.sakaiproject.grading.api.CategoryDefinition;
import org.sakaiproject.grading.api.GradebookInformation;
import org.sakaiproject.grading.api.GradingCategoryType;
import org.sakaiproject.grading.api.SortType;
import org.sakaiproject.samigo.util.SamigoConstants;
import org.sakaiproject.section.api.SectionAwareness;
import org.sakaiproject.section.api.coursemanagement.EnrollmentRecord;
Expand Down Expand Up @@ -2135,7 +2136,7 @@ private List<SelectItem> populateExistingGradebookItems() {
}
}

List<Assignment> gradebookAssignmentList = gradingService.getAssignments(AgentFacade.getCurrentSiteId());
List<Assignment> gradebookAssignmentList = gradingService.getAssignments(AgentFacade.getCurrentSiteId(), AgentFacade.getCurrentSiteId(), SortType.SORT_BY_NONE);
for (Assignment gradebookAssignment : gradebookAssignmentList) {
boolean isExternallyMaintained = gradebookAssignment.getExternallyMaintained();
boolean isDefaultSamigoGradebookAssociation = isExternallyMaintained && StringUtils.equals("sakai.samigo", gradebookAssignment.getExternalAppName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,7 @@ private List<SelectItem> populateExistingGradebookItems() {
}
}

List<Assignment> gradebookAssignmentList = gradingService.getAssignments(AgentFacade.getCurrentSiteId());
List<Assignment> gradebookAssignmentList = gradingService.getAssignments(AgentFacade.getCurrentSiteId(), AgentFacade.getCurrentSiteId(), SortType.SORT_BY_NONE);
for (Assignment gradebookAssignment : gradebookAssignmentList) {
boolean isExternallyMaintained = gradebookAssignment.getExternallyMaintained();
boolean isDefaultSamigoGradebookAssociation = isExternallyMaintained && StringUtils.equals("sakai.samigo", gradebookAssignment.getExternalAppName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public SecurityAdvice isAllowed(String userId, String function, String reference

try {
securityService.pushAdvisor(securityAdvisor);
g.setAssignmentScoreString(gradebookUId, assignmentId, ag.getAgentId(), points, null);
g.setAssignmentScoreString(gradebookUId, gradebookUId, assignmentId, ag.getAgentId(), points, null);
} catch (Exception e) {
log.error("Error while grading submission {} for agent {}", assignmentId, ag.getAgentId());
} finally {
Expand Down Expand Up @@ -261,7 +261,7 @@ public void updateExternalAssessmentScores(Long publishedAssessmentId, final Map
while (it.hasNext()) {
String agentId = (String)it.next();
Double score = (Double) studentUidsToScores.get(agentId);
g.setAssignmentScoreString(gradebookUId, assignmentId, agentId, score.toString(), null);
g.setAssignmentScoreString(gradebookUId, gradebookUId, assignmentId, agentId, score.toString(), null);
}
}

Expand Down

0 comments on commit 2e7a94e

Please sign in to comment.