gnowledge/gstudio — pull request #955 by AvadootNachankar (2014-12-25 11:11:36+00:00)
Title: Bug-fix for Course-Announcement & Other Improvements

**Run following command after taking this pull request:**
1) python manage.py filldb -nc

**What to test?**
1) In shell, for any of the node, check it's relation_set field - whether it shows both relations (normal & inverse) with proper key-names and values or not.

2) Only for MIS
- Register Program Officer (PO) for a given college and subscribe him/her into that respective college group
- In Course-Announcement UI, select university under which the above college for which you registered and subscribed PO is affiliated to.
- Based on university selection, it will populate only those colleges for announcement for which PO is registered and subscribed; and others would be listed as unavailable!

**Functionalities implemented**
1) relation_set field updated for existing documents (appending inverse-relations)
2) Bug-fix for Course-Announcement

**relation_set field updated for existing documents (appending inverse-relations)**
1) management/commands/filldb.py
- Now appends ```relation_set``` field with inverse_relation (key-value pair where key is inverse-name of RelationType and value is list of ObjectIds from subject field of corresponding GRelation document) as well for existing documents

**Bug-fix for Course-Announcement**
1) views/ajax_views.py
- ```get_colleges()``` modified
- Returns two list

1) List of colleges for which Program officer(s) are registered and also subscribed into their respective college group

2) List of colleges for which Program officer(s) are either not registered or not subscribed into their respective college group

2) templates/ndf/announced_course_create_edit.html
- Listing only those colleges for course announcement for which Program officer(s) are registered and also subscribed into their respective college group

**Other Improvements**
1) views/course.py
- Commented code removed.