[gradebook2-dev] a serious issue : new item added by assignment tool to weighted category in GB2, causes the student info. screen part blank in instructor view and bug report in catalina.out

Kim Huang kimhuang at oit.rutgers.edu
Tue Dec 13 12:03:23 PST 2011


Thomas,
I think the problem is here:
In GradeCalculationsImpl.java

private BigDecimal[] populateGradeRecordUnits(Category category, CategoryCalculationUnit categoryCalculationUnit, 
			Collection<Assignment> assignments, List<GradeRecordCalculationUnit> gradeRecordUnits, Map<Long, AssignmentGradeRecord> assignmentGradeRecordMap, boolean isWeighted, boolean isExtraCreditCategory) {

...
if (assignments != null) {
			for (Assignment assignment : assignments) {

				if (assignment.isRemoved())
					continue;

				if (isUnweighted(assignment))
					continue;

				BigDecimal assignmentWeight = getAssignmentWeight(assignment);    <---- the assignment causing the problem is from external, 
                                                                                              getAssignmentWeight(assignment) will return null
....

}
					else						
					{						
						// GRBK 483 - we deduct this assignment weight
						if (!isExtraCreditItem){
							
							myTotalCategoryPercent = subtract(myTotalCategoryPercent, multiply(assignmentWeight, BIG_DECIMAL_100)); <-- will throw null pointer
						}
						// GRBK-784 - we need a count of items in this thing. 
						if (!isExcused(assignmentGradeRecord))
						{
							totalUnexcusedItems++; 
						}
						
....
---------------------
in BigDecimalCalculationsWrapper.java
....
public BigDecimal multiply(BigDecimal multiplier, BigDecimal multiplicand) {
		if(multiplier != null)
			return multiplier.multiply(multiplicand); <-- will throw null pointer exception
		else 
			return new BigDecimal(0);
	}

How does GB2 redistribute the weight when adding an item which created by the external tool ?

Thanks,
-Kim



----- Original Message -----
From: "Thomas Amsler" <tpamsler at ucdavis.edu>
To: "Kim Huang" <kimhuang at oit.rutgers.edu>
Cc: gradebook2-dev at collab.sakaiproject.org, "Maka Gradin" <mgradin at rutgers.edu>
Sent: Tuesday, December 13, 2011 12:50:49 PM
Subject: Re: [gradebook2-dev] a serious issue : new item added by assignment tool to weighted category in GB2, causes the student info. screen part blank in instructor view and bug report in catalina.out

If you cannot find an existing JIRA, just create a new one, and please
add all of this information.

Thank you.

Best,
--Thomas

On Tue, Dec 13, 2011 at 9:08 AM, Kim Huang <kimhuang at oit.rutgers.edu> wrote:
> Hi, Folks,
>
> Please look at the attachment for the screen shots of the problem. I list the steps to reproduce it.
>
> The current behavior of GB2 is:
>
> When the new item is added by external tool, such as assignment, you can choose to add it to certain category in GB2 from assignment tool page.
> >From GB2 display, if the category is the weighted category and the checkbox of "weight equally" is checked, new item is shown as 0 point in that category, the right part of student info. screen is missing.(bug report is thrown.)
>
> The correct way should be:
> GB2 recalculates the values of all the items within the weighted category since the new item is added.
> or there is a message to indicate user that you should not add the pointed item to the weighted category.
>
>
> More:
> GB2 doesn't have problem to do the redistribution if the new item is added within GB2.
> ----------------------------------------
> I tried to search on jira to find out whether this problem has been reported in the past. No luck.
> Do you have better way to search the existing issue on jira ? It is pretty unfriendly to me.
>
> -----
> reproduce:
>
> Add GB2 and Assignments to a site.
> Set GB2 to use weighted categories, check the weight item equally checkbox.
> Add a few items to the category (make them 10 points each).
>
> Go to Assignments and create a new assignment. Set it to send grades to gradebook and choose the weighted category. Post it.
>
> When you switch back to GB2, you will see the problem.
> _______________________________________________
> gradebook2-dev mailing list
> gradebook2-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/gradebook2-dev
>


More information about the gradebook2-dev mailing list