Skip to content

Instantly share code, notes, and snippets.

@jonespm
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonespm/a95dcb84938d8f6f0632 to your computer and use it in GitHub Desktop.
Save jonespm/a95dcb84938d8f6f0632 to your computer and use it in GitHub Desktop.
getAssignmentWithStats
public List getAssignmentsWithStats(final Long gradebookId, final String sortBy, final boolean ascending) {
return getAssignmentsWithStats(gradebookId, sortBy, ascending, false);
}
/**
*/
public List getAssignmentsWithStats(final Long gradebookId, final String sortBy, final boolean ascending, final boolean includeDroppedScores) {
Set studentUids = getAllStudentUids(getGradebookUid(gradebookId));
List<AssignmentGradeRecord> gradeRecords = getAllAssignmentGradeRecords(gradebookId, studentUids);
if(!includeDroppedScores) {
applyDropScores(gradeRecords);
}
List assignments = getAssignmentsWithStats(gradebookId, sortBy, ascending, gradeRecords);
return assignments;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment