[Building Sakai] [Using Sakai] Gradebook database relations
Gregory Guthrie
guthrie at mum.edu
Sun Sep 2 20:15:45 PDT 2012
Mark, thanks - is your code available to see what it does, and how?
Actually I should have been clearer that I am trying to just do a direct database query for the data, to avoid for now having to learn all the innards of the Java APIs and development environment.
I will post this to the Sakai-dev forum and move any follow-ups to there; thanks.
I navigated around from GB_GRADEBOOK_T and could find gradable_objects and GB_Category's, but couldn't find the link from a course to the GRADEBOOK_UID to start the chain of graded entities.
I suppose I could go from course -> Students and correlate them with GB_GRADING_EVENT_T's, but that seems circumspect.
-------------------------------------------
> Can anyone give me a quick hint on how to find a gradebook associated with a course, and then
> the graded items in the gradebook?
> I found many of the key relations, but could not yet connect to a course.
>
> I am trying to replicate the "assignments/grade report/download spreadsheet" data by a
> database query.
>
> Is there a query in the source code somewhere I should look at for this?
> > -------------------------------------------
> > As it happens, I just did this very thing.
>
> 1. Get an instance of the GradebookService either via injection or
> using the ComponentManager.
> 2. GradebookService.getViewableAssignmentsForCurrentUser(String
> gradebookUid) gets a list of Assignments.
> 3. For each assignment:
> 1. Assignment.getName();
> 2. Assignment.getId();
> 3. GradebookService.getAssignmentScoreString(courseId,
> assignmentId, userId);
>
More information about the sakai-dev
mailing list