gnowledge/gstudio — pull request #960 by AvadootNachankar (2014-12-28 17:49:50+00:00)
Title: MIS Update and Other Implrovements (Appending Inverse-relations to relation_set field)

**Functionalities implemented:**

**Subscribing Program Officer as group-admin to college group(s)**

1) views/person.py

- ```person_create_edit()``` modified
- If Person node (GSystem) is of Program Officer type, then only go for subscription
- Fetch College's ObjectId to which Program Officer is assigned (via "officer_incharge_of")
- If College's ObjectId exists (i.e., list as PO might be assigned to more than one college), then prepare a list of their corresponding private group(s) (via "has_group")
- If college-group list exists, then update their group_admin field (append PO's created_by)

**Appending inverse-name to relation_set field of right-subject node (For both One-to-One & One-to-Many Mapping)**

1) views/methods.py

- ```create_grelation()``` modified

**Bug-fix for Course Announcement's task creation**

1) views/course.py

- ```course_create_edit()``` modified
- Now courses can be announced in college (or college-group) which has more than one group-admins

**Improvements based on Inverse-Relation**

1) views/ajax_views.py

- ```deletion_instances()``` modified
- Deleting key-value pair from ```relation_set``` field of node which is related with deleting node as right_subject
- Here, key is referenced as inverse_name of the relationship
- Special case added (Urgently required for MIS): If deleting node has "has_login" relationship associated with it, then using right_subject node from that relationship removing it's reference from ```group_admin``` and/or ```author_set``` field of group node found where it exists