diff --git a/db/StoredProcedures.sql b/db/StoredProcedures.sql
index 4f7deefbbeb58a65933f61f8a657f25d6f73d95e..d2b47bd8a40d7b949455361a4177cede9a72a5a4 100644
--- a/db/StoredProcedures.sql
+++ b/db/StoredProcedures.sql
@@ -1591,31 +1591,31 @@ END //
 
 
 -- DROP PROCEDURE IF EXISTS SearchStudents//
--- CREATE PROCEDURE `SearchStudents`	(	IN `GradeID` INT, 
--- 										IN `GroupN` INT,
--- 										IN `FacultyID` INT,
--- 										IN `Name` VARCHAR(100) CHARSET utf8
--- 									)
---     NO SQL
--- BEGIN  
--- 	SELECT	students.ID 			AS 'ID',
--- 			students.LastName		AS 'Last',	
--- 			students.FirstName 		AS 'First',
--- 			students.SecondName		AS 'Second',
--- 			grades.ID 				AS 'GradeID',
--- 			grades.Num 				AS 'GradeNum',
--- 			grades.Degree 			AS 'Degree',
--- 			study_groups.ID 		AS 'GroupID',
--- 			study_groups.GroupNum 	AS 'GroupNum'
--- 	FROM `students`
--- 	INNER JOIN `study_groups` 		ON 	students.StudyGroupID = study_groups.ID AND
--- 										GradeID = study_groups.GradeID AND
--- 										( GroupN = 0  OR GroupN = study_groups.GroupNum )
--- 	INNER JOIN `specializations`	ON 	study_groups.SpecializationID = specializations.ID
--- 	INNER JOIN `grades` 			ON 	study_groups.GradeID = grades.ID 
--- 	WHERE 	FacultyID = specializations.FacultyID AND
--- 			CONCAT(students.LastName, students.FirstName, students.SecondName) LIKE CONCAT("%",Name,"%")
--- 	ORDER BY grades.ID ASC, study_groups.GroupNum ASC;
+	-- CREATE PROCEDURE `SearchStudents`	(	IN `GradeID` INT, 
+	-- 										IN `GroupN` INT,
+	-- 										IN `FacultyID` INT,
+	-- 										IN `Name` VARCHAR(100) CHARSET utf8
+	-- 									)
+	--     NO SQL
+	-- BEGIN  
+	-- 	SELECT	students.ID 			AS 'ID',
+	-- 			students.LastName		AS 'Last',	
+	-- 			students.FirstName 		AS 'First',
+	-- 			students.SecondName		AS 'Second',
+	-- 			grades.ID 				AS 'GradeID',
+	-- 			grades.Num 				AS 'GradeNum',
+	-- 			grades.Degree 			AS 'Degree',
+	-- 			study_groups.ID 		AS 'GroupID',
+	-- 			study_groups.GroupNum 	AS 'GroupNum'
+	-- 	FROM `students`
+	-- 	INNER JOIN `study_groups` 		ON 	students.StudyGroupID = study_groups.ID AND
+	-- 										GradeID = study_groups.GradeID AND
+	-- 										( GroupN = 0  OR GroupN = study_groups.GroupNum )
+	-- 	INNER JOIN `specializations`	ON 	study_groups.SpecializationID = specializations.ID
+	-- 	INNER JOIN `grades` 			ON 	study_groups.GradeID = grades.ID 
+	-- 	WHERE 	FacultyID = specializations.FacultyID AND
+	-- 			CONCAT(students.LastName, students.FirstName, students.SecondName) LIKE CONCAT("%",Name,"%")
+	-- 	ORDER BY grades.ID ASC, study_groups.GroupNum ASC;
 -- END //
 
 
diff --git a/~dev_rating/application/views/teacher/discipline/EditStudents.twig b/~dev_rating/application/views/teacher/discipline/EditStudents.twig
index dc80c3a6ecdca2959c4bc17378a9644cb129a699..59805dc700886bf6dca955f82a24e66ef7445d48 100644
--- a/~dev_rating/application/views/teacher/discipline/EditStudents.twig
+++ b/~dev_rating/application/views/teacher/discipline/EditStudents.twig
@@ -17,38 +17,6 @@
     </div>
 {% endmacro %}
 
-{% macro outputGroups(Groups) %}
-
-    {% import _self as me %}
-
-    {% for group in Groups %}
-        <div>
-            <div class="GradeAndGroupTitle ActionShowHideGroupContainer" id="{{ group.GroupID }}">
-                <span class="info">{{ group.Degree }}, РєСѓСЂСЃ {{ group.GradeNum }} РіСЂСѓРїРїР° {{ group.GroupNum }}</span>
-                <span class="Action">Открыть список ▼</span>
-            </div>
-
-            <div class="GroupContainer">
-                <div class="hideListAction"></div>
-                {% for student in group.students %}
-                    {{ me.outputStudent(student) }}
-
-                    {#
-                    <div id="{{ student.ID }}" class="Student {% if student.Type == 'detach' %}StatusUnbind{% else %}StatusBind{% endif %}">
-                        <span class="Name">{{ student.LastName }} {{ student.FirstName }} {{ student.SecondName }}</span>
-                        {% if student.Type == 'detach' %}
-                            <button class="action Action_BindStudent">Прикрепить студента</button>
-                        {% else %}
-                            <button class="action Action_UnbindStudent">Отсоединить студента</button>
-                        {% endif %}
-                    </div>
-                    #}
-                {% endfor %}
-            </div>
-        </div>
-    {% endfor %}        
-{% endmacro %}
-
 
 {% import 'teacher/discipline/EditStudents' as idx %}
 
diff --git a/~dev_rating/media/js/discipline/EditStudents.js b/~dev_rating/media/js/discipline/EditStudents.js
index 40eb913df342ddef6bdcc39fd47c8b331e88db7f..583641ac6af9cbe8e753ebe032652e452b710d54 100644
--- a/~dev_rating/media/js/discipline/EditStudents.js
+++ b/~dev_rating/media/js/discipline/EditStudents.js
@@ -1,6 +1,11 @@
 var $ = jQuery;
 $(function() {
 
+    $("div.GroupContainerAttached").show().each(function() {
+        $(this).css("height", $(this).height());
+    });
+
+
     var jStudentInput = $(".InputStudentName").first(); 
     var jGradeSelect = $(".SelectGrade").first(); 
     var jSGSelect = $(".SelectStudyGroup").first(); 
@@ -12,18 +17,24 @@ $(function() {
                                                 <button class='action'></button> \
                                             </div>"));
 
-    var jGroupWrapPrototype = 	$($.parseHTML(	"<select class='SelectStudyGroup default_select'>
+    var jGroupWrapPrototype = 	$($.parseHTML(	"<select class='SelectStudyGroup default_select'>\
                 								<option value='0'>Выберите группу:</option>"));
 
 
-
-    $("div.GroupContainerAttached").show().each(function() {
-        $(this).css("height", $(this).height());
-    });
+    var jGroupPrototype = $($.parseHTML("<option value='0'></option>"));
 
 
+    function ConstructGroup(groupID, groupNum, specName) {
+    	var jClone = jGroupPrototype.clone();
+    	var str = "РіСЂСѓРїРїР° "+groupNum
+    	if (specName != null) {
+    		str += " - "+specName; 
+    	}
+    	jClone.html(str);
+    	jClone.val(groupID);
+    	return jClone;
+    }
 
-    // Поиск студентов
     function ConstructStudent(ID, name, from, groupID, bind) {
         var jStudent = jStudentPrototype.clone();
         var jStudentSib = jStudent.children();
@@ -48,7 +59,8 @@ $(function() {
     }
 
 
-    // Поиск студентов
+
+
     function SearchStudents() 
     {
         var name = [];
@@ -107,8 +119,7 @@ $(function() {
 
 
 
-    function GetStudyGroups() 
-    {
+    function GetStudyGroups() {
         $.post(
             g_URLdir + "handler/map/GetStudyGroups",
             {
@@ -124,52 +135,25 @@ $(function() {
                     var jClone = jGroupWrapPrototype.clone(); 
 
                     for (i in data) {
-                        jClone.append("<option value='"+ data[i].GroupID +"'>РіСЂСѓРїРїР° "+ data[i].GroupNum +" - "+ data[i].SpecName +"</option>");
+                    	var temp = data[i];
+                    	jClone.append(ConstructGroup(temp.GroupID, temp.GroupNum, temp.SpecName));
                     } 
                        
                     jSGSelect.replaceWith(jClone);
                     jSGSelect = jClone;
                 }
-                CallSearchStudents();
-            }
+                SearchStudents();
+            } //!callback
         ); //!post      
     }
 
-
     $(".SelectGrade").change(function(){
         GetStudyGroups();
-        // $.post(
-        //     g_URLdir + "handler/map/GetStudyGroups",
-        //     {
-        //         "FacultyID": g_facultyID,
-        //         "GradeID": $(this).val()
-        //     },
-        //     function(data){
-        //         data = $.parseJSON(data);
-        //         var i = 0;
-        //         if (data != null && data != undefined) {
-        //             $(".SelectStudyGroup").html("<option value='0'>Выберите группу:</option>");
-        //             for (i in data) {
-        //                 $(".SelectStudyGroup").append("<option value='"+ data[i].GroupID +"'>РіСЂСѓРїРїР° "+ data[i].GroupNum +" - "+ data[i].SpecName +"</option>");
-        //             }   
-        //         }
-        //         if (i <= 0)
-        //             $(".SelectStudyGroup").html("<option value='0'>РіСЂСѓРїРї</option>");    
-        //         CallSearchStudents();
-        //     }
-        // );
     });
 
 
-    // $(".SelectGrade").focusout(function(){
-    //     $(this).trigger("change");
-    // });
 
 
-    // $(".SelectStudyGroup").focusout(function(){
-    //     $(this).trigger("change");
-    // });
-
     // Если студент из поиска
     function BindStudentFromSearch(jThis) 
     {
@@ -202,6 +186,10 @@ $(function() {
             .addClass("StatusBind");
     }
 
+
+
+
+
     // Прикрепить студента 
     $(".StudentsList").on("click", "button.Action_BindStudent", function(){
         var jThis = $(this);