Can not update a student's note

Description

Steps to reproduce the issue:
1 - Publish the assessment (exportAssessment.xml)
2 - Any student performing the assessment. Answer anything.
3 - The teacher grades the student's assessment. Change the score of the last question, for example, 2 points.
4 - The score has not changed. There has been an hibernate exception.

We have been investigating this issue. The problem is the system is trying to keep a record ITEMGRADING that has the field ASSESSMENTGRADINGID to null.
This why it happens? In class ItemContentsBean, setRationale method is adding a new ITEMGRADINGDATA. I do not know why it's done. I tried to remove this code and the bug has been fixed.

// for MCSC
//if (data.getItemGradingId() == null) {
// this is a new answer , now we just need to set the rationale

data.setRationale(newRationale);

/*} else {
// the answer is the same, the student only changed the
// rationale, not the MC selection
// we need to create a new ItemGradingData. because
// SubmitForGradingListener doesn't recognize that this is a
// modified answer
// unless the itemgradingid = null

ItemGradingData newdata = new ItemGradingData();
newdata.setPublishedItemId(data.getPublishedItemId());
newdata.setPublishedItemTextId(data.getPublishedItemTextId());
newdata.setRationale(newRationale);
newdata.setPublishedAnswerId(data.getPublishedAnswerId());
ArrayList items = getItemGradingDataArray();
items.add(newdata);
setItemGradingDataArray(items);
}*/

Attachments

1
  • 09 Feb 2010, 12:13 AM

Activity

Show:

Hui Tsao February 16, 2010 at 3:39 PM

Angel,

I see. I didn't make my earlier suggestion clear. The patch is contributed by Bryan (PLU) and seems cannot resolve the issue. r73065 is the correct one to use. I will try to delete the patch.

Thanks,
Karen

Angel Nueda Lozano February 12, 2010 at 12:28 AM

Karen,

I applied the patch from https://sakaiproject.atlassian.net/browse/SAM-758#icft=SAM-758 (file attached: assessPatch.diff). And that did not solve the problem. However, the commit r73065 makes more sense to me.

Now the problem is solved. Yes, is related to SAM-758. You can close this issue.

Thank you

Angel Nueda Lozano February 11, 2010 at 7:41 AM

Karen,

It is duplicating itemGradingData. Without applying the patch an hibernate exception occurs (because the field assessmentGradingId is null). In applying the patch is no longer produced hibernate exception, but the assessment is stored with itemGradingData duplicated.

The problem we have is that when the assessment is being formed with student responses, the method setRationale duplicates the itemGradingData.

Hui Tsao February 10, 2010 at 10:33 AM

Angel,

I see. Is duplicated itemGradingData created before the patch applied? If you can easily identify the duplicate data, maybe you can delete them.

Please monitor if there are duplicate data created after you apply the patch. Let me know if it happens again.

Thanks,
Karen

Duplicate

Details

Priority

Affects versions

Fix versions

Assignee

Reporter

Created February 9, 2010 at 12:13 AM
Updated April 17, 2018 at 8:25 AM
Resolved February 16, 2010 at 5:06 PM

Flag notifications