gnowledge/gstudio — pull request #883 by AvadootNachankar (2014-10-18 18:10:02+00:00)
Title: MIS - Students' list view updated (Listing done based on filters)

**1. models.py**
* Functions updated: ```append_attribute()``` & ```append_relation()```
- Data (i.e. dictionary) returned by these functions now consist of '_id' along with other details for respective GAttribute & GRelation

**2. settings.py**
* TEMPLATE_CONTEXT_PROCESSORS added for static directory, so that ```get_static_prefix``` can be used on templates.

**3. methods.py**
* Function updated: ```parse_template_data()```
- Query removed as it wasn't required; instead directly using ObjectId
- Previously unecessarily querying from database for given node and using only ObjectId from that fetched node details
- Hence, query dropped and direclty making use of ObjectId

* New function added: ```get_widget_built_up_data()```
- Returns data in list of dictionary format which is required for building html widget for respective AttributeType/RelationType. This data is used by ```html_widget``` template-tag.

- This function is written so that other's can make use of this function for building widgets for AttributeType/RelationType which are not related to given node. Pass data returned by this function to ```html_widget``` template tag on templates; which in turn returns the required widget!

* Function updated: ```get_property_order_with_value()```
- Set of code moved into ```get_widget_built_up_data()``` function and replaced with corresponding function call

* Function updated: ```create_grelation()```
- When match is found with existing relationships while updating, update given node's ```relation_set``` field. For doing this, missing required query added!

**4. ajax-urls.py**
* Urls added for following:
- ```get_affiliated_colleges/```: Getting affiliated colleges to a given university
- ```get_students/```: Getting students belonging to a given college
- ```get_college_wise_students_data/```: Getting students' summary data degree-wise and college-wise

**5. ajax_views.py**
* Views added for following:
- ```get_affiliated_colleges()```: Getting affiliated colleges to a given university
- ```get_students()```: Getting students belonging to a given college
- CSV file that is created dynamically is stored under **../static/csv** directory on the server
- ```get_college_wise_students_data()```: Getting students' summary data degree-wise and college-wise
- CSV file that is created dynamically is stored under **../static/csv** directory on the server

**6. person.py**
* List-view for students updated.
* Now instead of listing all students, filters are provided for improving performance.
* To start with, limited filters (name, degree_year, college, university) are provided. Later on, more will be added.
* Instead of generic template (```person_list.html```), redirecting to newly created template (```student_list.html```).

**7. student_list.html**
* Special report download option provided which is accessible only via **MIS_admin** group.
* Based on filters, students listings is provided.

**8. student_data_review.html**
* Lists student in table form.
* Edit button open's edit form in new tab.
* For ease of accessiblity to each record, 'Top' & 'Bottom' buttons are provided that takes to top and bottom of the list respectively
* Download CSV link provided for corresponding students' listed data.

**9. ndf_tags.py**
* Template tag (assignment tag) added: ```get_university()```
* This tag returns university name to which given college is affiliated to.