I am looking for a little information on GradebookFileManagerFactory... I have been able to find GradebookFileManager documentation but not the Factory. Any Ideas?
I've not used the GradebookFileManager but if you are looking at attaching files to attempts, I managed to do that the other day using AssignmentAttemptManager.
Here is the code I wrote while I was playing around with it (obviously, it needs work):
final GradableItemDAO gradableItemDAO = GradableItemDAO.get();
final AttemptManager attemptManager = GradebookManagerFactory.getAttemptManager();
final AssignmentAttemptManager assignmentAttemptManager = AssignmentAttemptManagerFactory.getInstance();
final GradableItem gradableItem = gradableItemDAO.loadById(Id.toId(GradableItem.DATA_TYPE, 251L));
final AttemptDetail attemptDetail = attemptManager.prepareNewAttempt(gradableItem.getId(), Id.toId(CourseMembership.DATA_TYPE, 2444L));
assignmentAttemptManager.saveSubmission(attemptDetail, "Comment", FormattedText.toFormattedText("Formatted Comment"), true);
final File file = new File("/path/to/test/file.txt");
assignmentAttemptManager.addAttemptFile(Id.toId(Course.DATA_TYPE, 3L), attemptDetail.getId(), file, "File Name", "Link Name", AttemptFile.FileType.STUDENT);
I've just had a poke around, and have discovered that the AssignmentAttemptManager uses a GradebookFileManager, so depending on what you are trying to achieve, I think the AssignmentAttemptManager might be a little less abstract and probably the better choice. For completeness though, it looks like this is how you get a GradebookFileManager:
GradebookFileManager manager = (GradebookFileManager)FileSystemServiceFactory.getInstance().getFileManager(GradableItem.DATA_TYPE);
Hopefully, this helps.
Retrieving data ...