gnowledge/gstudio — pull request #816 by AvadootNachankar (2014-09-18 19:58:28+00:00)
Title: MIS updates - Enroll Students in Courses (Student's listing updated)

**Functionalities implemented:**

**1) filldb updated**

- Query updated to find GSystem(s) if either of the field i.e., attribute_set or relation_set is empty. Previously finding only those GSystem(s) for which both fields are empty!

- Code for filling relation_set updated

- Instead of creating multiple dictionaries for same key with multiple values (Previously doing)

- Now creating only one dictionary with list as it's value that is holding those multipe values

**2) views/person.py**

- ```person_enroll()``` updated: Code added for saving enrolled students in courses

**3) views/ajax_views.py**

- ```get_announced_courses()``` function updated

- Queries updated: Now making use of attribute_set & relation_set fields

- ```get_anncourses_allstudents()``` function updated

- Queries updated: Now making use of attribute_set & relation_set fields

- Code added for fetching enrolled and/or non-enrolled students and filling them in required drawers of drawer-widget

**4) views/methods.py**

- Functions are updated: ```create_gattribute()``` & ```create_grelation()```

- Code added to update attribute_set & relation_set respectively

- Whenever GAttribute and/or GRelation is created/updated using these functions, respective attribute_set and/or relation_set field gets updated for it's corresponding GSystem

**5) templates/ndf/student_enroll.html**

- Drawer-widget implemented for selecting enrolled and/or non-enrolled students

- Disabling all checkboxes for 'Foundation Course' NUSSD course-type

**6) templates/ndf/announced_course_create_edit.html**

- Disabling all checkboxes for 'Foundation Course' NUSSD course-type

- Enabling/Disabling Find button

- Enabled only when any of the input element of the fieldset (Search Criteria) is changed

**7) templates/ndf/nussd_course_create_edit.html**

- Hidden input element 'name' removed, creating problems for saving NUSSD course

**8) templates/ndf/html_field_widget.html**

- Bug resolved: Unnecessary redirection to very first tab on click of button present on other than the first tab