gnowledge/gstudio — pull request #901 by AvadootNachankar (2014-11-05 20:34:43+00:00)
Title: MIS updates - Trainer registration module

**1. views/person.py**
- ```person_detail()``` modified
- Listing updated: Query modified to get Name, Gender, Birth date, Email ID

- ```person_create_edit()``` modified
- Passing additional context variables for Voluntary Teacher & Master Trainer

**2. templates/ndf/mis_list.html**
- Listing-view updated (Columns updated): Listing by Name, Gender, Birth date, Email ID, Edit button & Delete button
- On click of Edit button, opening editing details in new tab
- Delete (Common) button replaced from left-top to extreme right column-header of the table

**3. templates/ndf/person_list.html**
- Now extends ```templates/ndf/mis_list.html```

**4. templates/ndf/trainer_create_edit.html created**
- New template for trainer registrations
- New tabs added: Course, Educational details & Professional details

**5. templates/ndf/voluntary_teacher_create_edit.html created**
- Extends ```templates/ndf/trainer_create_edit.html```

**6. templates/ndf/master_trainer_create_edit.html created**
- Extends ```templates/ndf/trainer_create_edit.html```

**7. urls/ajax-urls.py**
- ```get_course_details_for_trainer``` url added

**8. views/ajax_views.py**
- ```get_course_details_for_trainer()``` created
- This view returns a dictionary holding data required for trainer's enrollment into given announced course(s).

- ```deletion_instances()``` modified
- If given node is used in relationship with any other node (as right_subject) then this node's ObjectId is removed from relation_set field of other node
- Instead of using name, altnames are used for listing
- GAttribute's object_value is converted into string before sending it as

**9. views/course.py**
- ```course_create_edit()``` modified
- Temporary solution: if-block placed which looks for either Announced Course or other Course.

**10. views/methods.py**
- ```parse_template_data()``` modified
- Parsing updated for data-type ([...]): If JSON.stringify() formatted-string is found as value, then json.loads() is performed on that value; otherwise (considered it as string having comma-separated value) split using "," which basically returns a list.