[Building Sakai] Using the Gradebook API
Zhen Qian
zqian at umich.edu
Wed Aug 4 07:27:11 PDT 2010
I see SAK-16963 is fixed for updateExternalAssessmentScore. However,
similar problem remains for native Gradebook assignment. See
http://jira.sakaiproject.org/browse/SAK-13666. The implementation of
setAssignmentScoreString is using Double.valueOf(score), which would throw
NullPointerException if score is null.
Are empty strings and null values treated the same inside GradebookService,
in terms of UI, class average calculation, etc?
Thanks,
- Zhen
On Wed, 4 Aug 2010 08:28:43 -0400, Matthew Jones wrote: Hi Chuck, I'm
not sure if you're actually talking about removing the grade from the
gradebook or just clearing out the grade. I remember that mneme was using
the "null" idea you mentioned to clear out the grade and it was working
pre-2.6. I had to fix it when we went into production so it still worked.
The code was calling. updateExternalAssessmentScore(String gradebookUid,
String externalId, String studentUid, Double points) and was getting an
NPE when the points were
'null'. Previously (and after the patch in 2.6.2)
it clears out the points. Perhaps what you're seeing with your NPE is a
bug, perhaps this is the function you're looking for?
http://jira.sakaiproject.org/browse/SAK-16963 [1]
On Wed, Aug 4, 2010 at 8:13 AM, csev wrote:
Actually, I am at a much lower level, writing a Sakai web service to
read/set/delete grades, the webservice talks to this API:
https://source.sakaiproject.org/svn/edu-services/trunk/gradebook-service/api/src/java/org/sakaiproject/service/gradebook/shared/GradebookService.java
[3]
So we really want to delete the score (i.e. set it to empty and are wasy
past asking "are you sure" :).
If you look at
setAssignmentScoreComment
versus
setAssignmentScoreString
And see the difference in treatment of the score/comment.
I guess I will look at the GB tool to see how it handles the "emptying" of
a cell.
/Chuck
On Aug 4, 2010, at 12:04 PM, John Norman wrote:
> I don't really know enough about how this
code works, but if there is
/any/ chance the null entry could be created by user error, I would hope a
confirmation dialogue (you are about to delete this grading information -
continue/cancel?) would be useful. I suspect you are working at a lower
level so feel free to ignore me.
_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org [4]
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev [5]
TO UNSUBSCRIBE: send email to
sakai-dev-unsubscribe at collab.sakaiproject.org [6] with a subject of
"unsubscribe"
Links:
------
[1] http://jira.sakaiproject.org/browse/SAK-16963
[2] mailto:csev at umich.edu
[3]
https://source.sakaiproject.org/svn/edu-services/trunk/gradebook-service/api/src/java/org/sakaiproject/service/gradebook/shared/GradebookService.java
[4] mailto:sakai-dev at collab.sakaiproject.org
[5] http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
[6] mailto:sakai-dev-unsubscribe at collab.sakaiproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100804/d1c90e37/attachment.html
More information about the sakai-dev
mailing list