Release to group setting for assignments not saved when using Assignments2

Description

Lessons has the ability to release assignments, quizzes, etc, to selected groups. Even if an assignment or quiz is created with the option to release to the entire course, once the group setting is set in Lessons, it is applied to the assignment/quiz in question.
Currently, group settings set through Lessons for Assignments are not being kept. Initially this did work on regression, and I'm not sure when this broke.
To reproduce you will need a site with groups:
Create an Assignment and leave the default to display to all
Add the assignment into Lessons
Click Edit in Lessons beside the assignment
Click on "Edit the groups for which this item should be shown"
Select a group and Update
After the update, there is no [group] text beside the assignment
Click Edit again and "Edit the groups for which this item should be shown"
Settings were not saved

Using breakpoints to step through what happens when you select a group and click update, I have tracked down a problem area to the Asssignments2Entity.java file, around line 582, the setGroups method.

quick reference:
https://gist.github.com/4268656

Looking at this file, compared to the code used when you are using Assignments1, there is a big difference:
https://gist.github.com/4268703

There is hard coded sql in the Assignments2Entity, and for whatever reason, it never actually saves the groups, even when I verify that neither fgroups nor fassignGroups are null or empty.

Additionally, my IDE gives me warnings in that area of code:

-SQLService type is deprecated
-transact method is deprecated
-dbWrite method is deprecated

At this point, I've kind of reached the limit of my knowledge and would like you to take a look to see if this can be changed somehow.

Activity

Show:

Charles Hedrick December 19, 2012 at 10:58 AM

I think Poindexter's verification is enough. Thanks for checking.

Andrea Schmidt December 19, 2012 at 10:57 AM

Am unable to verify this on any test server currently since Assignments2 don't interact by default on a test server. So far I've only been able to test Assignments1 with Lesson Builder.

David Poindexter December 17, 2012 at 1:22 PM

I did a quick merge in of your changes, and they worked for us. You can mark this resolved. We're a little late in our schedule to include them for our next release, but we'll try to rope them in soon.

Thanks again for your help!

Charles Hedrick December 17, 2012 at 8:34 AM

I brought up a test copy on Oracle. The fix was close, but had a typo. I've resolved that and check that it worked. So I'm calling it fixed.

I'm considering doing my 2.9.x testing on Oracle, since I get testing on mysql from the Rutgers copy and hsql from trunk.

Charles Hedrick December 14, 2012 at 1:59 PM

I've just checked in a likely fix to 2.9.x and trunk. Please try it. This is a lot of mechanism for one db-specific line, but it's the way other tools do this kind of thing.

Fixed

Details

Priority

Affects versions

Fix versions

Components

Assignee

Reporter

Created December 12, 2012 at 7:37 AM
Updated April 18, 2018 at 7:31 AM
Resolved December 17, 2012 at 8:32 AM