Forum OpenACS Development: Re: Bug in .LRN/openacs group memberships

Collapse
Posted by Dave Bauer on
Tom, no problem, the questions help me think.

No there was not any additional row.

Each dotlrn user has one acs_rel, either a dotlrn_student_rel or dotlrn_admin_rel for each community membership.

A community is a group. This means the user gets one row in acs_rels regarding their membership in the group.

The membership in the group triggers an entry in party_approved_member_map with (group_id,user_id,rel_id) and the trigger also loops through all the relevenat relational_segments. So a user also gets a row with (rel_segment_id,user_id,1). At least that is what happened in the past. Now the row is (rel_segmetn_id,user_id,rel_id).

There isn't a problem since the rows are unique.

The membership_rels_in_tr function (insert trigger)
calls party_approved_member_add function which calls
party_approved_member_add_one
for the party in the acs_rel.object_id_one
and loops through the relational segments and calls party_approved_member_add_one for each relational segment.

Its only the relational segment rows that have the invalid tag.

I looks like this is legacy data from an old bug and it just needs to be cleaned up. I can't produce a new acs_rel with this problem.