AnsweredAssumed Answered

Problem when retrieving an GradableItem

Question asked by my0055371 on May 16, 2016
Latest reply on Aug 1, 2016 by scott.hurrey

Hi,

I'm trying to develop a gradebook integration using LTI.

I'm using this to create a GradableItem:

GradableItem gi = new GradableItem();
gi.setCourseId(courseId);
gi.setCourseContentId(content.getId());
gi.setDisplayTitle(multipart.getParameter("title"));
gi.setTitle(multipart.getParameter("title"));
gi.setScorable(true);
gi.setPoints(100);
gi.setVisibleInBook(true);
gi.setVisibleToStudents(true);
GradableItemManager giManager = GradebookManagerFactory.getGradableItemManager();
giManager.persistGradebookItem(gi);

 

But when i try to retrieve the item from the DB(from a different servlet), I always get null:

Id gradableItemId = GradableItemDAO.get().getIdFromContentId(content.getId());

 

I only use this because "BasicLTILauncher.addGradingInformation(gradingURL, sourcedId) " doesn't add anything to the LTI launch.

so I've decompiled it to see what's wrong...

 

Any idea anyone...

 

Thnaks.

 

Outcomes