diff --git a/~dev_rating/application/views/teacher/discipline/EditStructure.twig b/~dev_rating/application/views/teacher/discipline/EditStructure.twig
index d0f9a4f7b4274eed10c3aca357fae88e741b7821..8d77d4b0994afc4b38a7088ec2f6136fb22df987 100644
--- a/~dev_rating/application/views/teacher/discipline/EditStructure.twig
+++ b/~dev_rating/application/views/teacher/discipline/EditStructure.twig
@@ -9,7 +9,7 @@
 {% block map_content %}
 	<p class="notification" style="display: none;">{{ Discipline.SemesterNum }} семестр {{ Discipline.SemesterYear }}/{{ Discipline.SemesterYear + 1 }} учебного года</p>
 	<div class="RateIndicatorDIV">
-		Количество баллов: <span class="RateIndicator">{{ Map.MaxRate }}{% if Map.isSetBonus == true %} + 10 бонусных баллов{% endif %}</span>
+		Количество баллов: <span class="RateIndicator">{{ Map.MaxRate }}</span>{% if Map.isSetBonus == true %} + 10 бонусных баллов{% endif %}
 	</div>
 	<div class="studyMap StructureTable">
 		<div class="name">Виды контрольных мероприятий</div>
diff --git a/~dev_rating/media/js/discipline/CreateDiscipline.js b/~dev_rating/media/js/discipline/CreateDiscipline.js
index 4dfdf97319299e27d03fc6895c7e5f2c34053cfa..8eb5da693a7af69f65bfe762d80769d5e9be836b 100644
--- a/~dev_rating/media/js/discipline/CreateDiscipline.js
+++ b/~dev_rating/media/js/discipline/CreateDiscipline.js
@@ -3,6 +3,7 @@ $(function() {
 
 	// Изменения базовых параметров дисциплины
     $(".AddDiscipline").click(function(){
+		var thisObj = $(this);
     	$(this).attr("disabled", true);
 		var BonusRate = $(".BonusRate").first().prop("checked");
 		$.post(
@@ -19,11 +20,11 @@ $(function() {
 			function(data){
 				data = $.parseJSON(data);
 				if(data.success === true) {
-					$(this).hide();
+					//thisObj.hide();
 					EventInspector_ShowMsg('Дисциплина добавлена', 'success');
-					setTimeout('location.replace("'+URLdir+'discipline/structure/'+data.DisciplineID+'")',1000); 
+					//setTimeout('location.replace("'+URLdir+'discipline/structure/'+data.DisciplineID+'")', 1000); 
 				} else {
-					$(this).removeAttr('disabled');
+					thisObj.removeAttr('disabled');
 					EventInspector_ShowMsg('Ошибка при добавление дисциплины', 'error');
 				}
 			}
diff --git a/~dev_rating/media/js/discipline/EditStructure.js b/~dev_rating/media/js/discipline/EditStructure.js
index da47faeade9c26cc0f57c8abcfc918d9105bf421..f21e2c48de3f38186f05bb23330dc3ba33189c15 100644
--- a/~dev_rating/media/js/discipline/EditStructure.js
+++ b/~dev_rating/media/js/discipline/EditStructure.js
@@ -49,7 +49,7 @@ $(function() {
 			var credit = parseInt($(this).val());
 			maxCredits = maxCredits + ((isNum(credit)) ? credit : 0);
 		});
-		subModulesDiv.prev().children('.currentControl').text(maxCredits);
+		subModulesDiv.prev().children('div.currentControl').text(maxCredits);
 	}
 	// Подсчет рубежного контроля
 	function CountLandmarkControl(subModulesDiv){
@@ -58,7 +58,7 @@ $(function() {
 			var credit = parseInt($(this).val());
 			maxCredits = maxCredits + ((isNum(credit)) ? credit : 0); 
 		});
-		subModulesDiv.prev().children('.landmarkControl').text(maxCredits);
+		subModulesDiv.prev().children('div.landmarkControl').text(maxCredits);
 	}
 	
 	// Изменение типа подмодуля
@@ -107,7 +107,7 @@ $(function() {
 		
 		// Ограничение 100 баллов
 		var MaxSumRate = 100;
-		if ($('.ExamModule').first().length > 0) MaxSumRate = 60;
+		if ($('div.ExamModule').first().length > 0) MaxSumRate = 60;
 		
 		var currentControl = 0;
 		$('div.moduleHead').children('div.currentControl').each(function(){
@@ -141,10 +141,8 @@ $(function() {
 			
 			// Счетчик баллов
 			var RateIndicarot = currentControl + landmarkControl + NewMaxRate - subtract - OldMaxRate;
-			if ($('div').is('.ExamModule')) RateIndicarot += 40;
-			$('.RateIndicatorDIV .RateIndicator').html(RateIndicarot);
-			if ($('div').is('.BonusModule'))
-				$('.RateIndicatorDIV .RateIndicator').append(' + 10 бонусных баллов');
+			if ($('div.ExamModule').length > 0) RateIndicarot += 40;
+			$('div.RateIndicatorDIV span.RateIndicator').html(RateIndicarot);
 			
 			// Меняем тип
 			ControlType = 'CurrentControl'; // По-умолчанию 
@@ -154,10 +152,10 @@ $(function() {
 				ChangeSubmoduleControlType(ID, ControlType);
 			
 			if (ControlType == 'CurrentControl')
-				thisObj.parent().parent().find('.landmarkControl').children('.inputLandmarkControl').val('0');
+				thisObj.parent().parent().find('div.landmarkControl').children('input.inputLandmarkControl').val('0');
 				
 			if (ControlType == 'LandmarkControl')
-				thisObj.parent().parent().find('.currentControl').children('.inputCurrentControl').val('0');
+				thisObj.parent().parent().find('div.currentControl').children('input.inputCurrentControl').val('0');
 		}
 		
 		// Подсчет текущего и рубежного контроля после изменений
@@ -203,48 +201,54 @@ $(function() {
 	
 	// Переместить вверх МОДУЛЬ
     $(".moduleList").on('click', '.upModule', function(){
-        var parentDIV = $(this).parent('div').parent('div').parent('div');
-        parentDIV.insertBefore(parentDIV.prev('.moduleGroup'));
-		
-		var ModuleID = parentDIV.attr('id');
-		// Для того, который СТАЛ находится ниже
-		var nextModuleID = parentDIV.next('div').attr('id');
-		SwapModuleOrder(ModuleID, nextModuleID);
+        var parentDIV = $(this).parent().parent().parent();
+		var moduleGroupDiv = parentDIV.prev('div.moduleGroup');
+		if (moduleGroupDiv.length > 0) {
+			parentDIV.insertBefore(parentDIV.prev('.moduleGroup'));
+			
+			var ModuleID = parentDIV.attr('id');
+			// Для того, который СТАЛ находится ниже
+			var nextModuleID = parentDIV.next().attr('id');
+			SwapModuleOrder(ModuleID, nextModuleID);
+		}
     });
 	
 	// Переместить вниз МОДУЛЬ
     $(".moduleList").on('click', '.downModule', function(){
-        var parentDIV = $(this).parent('div').parent('div').parent('div');
+        var parentDIV = $(this).parent().parent().parent();
 		var moduleGroupDiv = parentDIV.next('div.moduleGroup');
 		if (moduleGroupDiv.length > 0) {
 			parentDIV.insertAfter(moduleGroupDiv);
 			
 			var ModuleID = parentDIV.attr('id');
 			// Для того, который СТАЛ находится выше
-			var prevModuleID = parentDIV.prev('div').attr('id');
+			var prevModuleID = parentDIV.prev().attr('id');
 			SwapModuleOrder(ModuleID, prevModuleID);
 		}
     });
 	
 	// Переместить вверх мероприятие
     $(".moduleList").on('click', '.upSubModule', function(){
-        var parentDIV = $(this).parent('div').parent('div');
-        parentDIV.insertBefore(parentDIV.prev());
-		
-		var SubmoduleID = parentDIV.attr('id');
-		var nextSubmoduleID = parentDIV.next('div').attr('id');
-		SwapSubmoduleOrder(SubmoduleID, nextSubmoduleID);
+        var parentDIV = $(this).parent().parent();
+		var subModule = parentDIV.prev('div.subModule');
+		if (subModule.length > 0) {
+			parentDIV.insertBefore(parentDIV.prev());
+			
+			var SubmoduleID = parentDIV.attr('id');
+			var nextSubmoduleID = parentDIV.next().attr('id');
+			SwapSubmoduleOrder(SubmoduleID, nextSubmoduleID);
+		}
     });
 	
 	// Переместить вниз мероприятие
     $(".moduleList").on('click', '.downSubModule', function(){
-        var parentDIV = $(this).parent('div').parent('div');
+        var parentDIV = $(this).parent().parent();
 		var subModule = parentDIV.next('div.subModule');
 		if (subModule.length > 0) {
 			parentDIV.insertAfter(subModule);
 			
 			var SubmoduleID = parentDIV.attr('id');
-			var prevSubmoduleID = parentDIV.prev('div').attr('id');
+			var prevSubmoduleID = parentDIV.prev().attr('id');
 			SwapSubmoduleOrder(SubmoduleID, prevSubmoduleID);
 		}
     });
@@ -261,10 +265,15 @@ $(function() {
 				data = $.parseJSON(data);
 				if(data.success === true) {
 					var ExamModule = $('div.ExamModule');
-					if (ExamModule.length > 0)
-						$('div.ExamModule').before(GetModuleTmp());
-					else
-						$('div.moduleList').append(GetModuleTmp());
+					var BonusModule = $('div.BonusModule');
+					if (BonusModule.length > 0)
+						$('div.BonusModule').before(GetModuleTmp());
+					else {
+						if (ExamModule.length > 0)
+							$('div.ExamModule').before(GetModuleTmp());
+						else
+							$('div.moduleList').append(GetModuleTmp());
+					}
 						
 					// К добавленному модулю добавляем ID
 					var thisModuleDIV = $('div.moduleGroup').eq(OrderNum - 1);
@@ -331,7 +340,7 @@ $(function() {
 		$.post(
 			URLdir + 'handler/map/DeleteModule',
 			{
-				'ModuleID': $(this).parent('').parent('').parent('').attr('id'),
+				'ModuleID': $(this).parent().parent().parent().attr('id'),
 				'SubmodulesID': JSONSubmodules,
 				'CurrentModuleOrder': CurrentModuleOrder,
 				'ChangeOrderModulesID': ChangeOrderModulesID
@@ -339,7 +348,29 @@ $(function() {
 			function(data){
 				data = $.parseJSON(data);
 				if(data.success === true) {
-					thisObj.parent('').parent('').parent('').remove();
+					thisObj.parent().parent().parent().remove();
+					
+					var c = 0;
+					$('div.moduleGroup')
+						.children('div.moduleHead')
+						.children('div.currentControl')
+						.each(function(){
+							c += parseInt($(this).text());
+						});
+						
+					var l = 0;
+					$('div.moduleGroup')
+						.children('div.moduleHead')
+						.children('div.landmarkControl')
+						.each(function(){
+							l += parseInt($(this).text());
+						});
+					
+					var e = 0;
+					if ($('div.ExamModule').length > 0) e = 40;
+					
+					$('span.RateIndicator').html(c + l + e);
+						
 					EventInspector_ShowMsg('Модуль удален', 'success');
 				}
 				else EventInspector_ShowMsg('Ошибка при удаление модуля', 'error');
@@ -365,36 +396,36 @@ $(function() {
 			return $(element).attr("id");
 		});
 		var ChangeOrderSubmodulesID = '[' + AttrID.get() + ']';
-		ChangeSubmoduleMaxRate($(this).parent('').parent('').attr('id'), 0);
 		//
 		$.post(
 			URLdir + 'handler/map/DeleteSubmodule',
 			{
-				'SubmoduleID': $(this).parent('').parent('').attr('id'),
+				'SubmoduleID': $(this).parent().parent().attr('id'),
 				'CurrentSubmoduleOrder': CurrentSubmoduleOrder,
 				'ChangeOrderSubmodulesID': ChangeOrderSubmodulesID
 			},
 			function(data){
 				data = $.parseJSON(data);
 				if(data.success === true) {
-					var sub = thisObj.parent('').parent('');
-					var mod = sub.parent('').parent('').find('.moduleHead');
+					var sub = thisObj.parent().parent();
+					var mod = sub.parent().parent().find('div.moduleHead');
 					// get old submodule values
-					var dif1 = sub.find('.currentControl').find('input').val();
-					var dif2 = sub.find('.landmarkControl').find('input').val();
+					var dif1 = parseInt(sub.find('div.currentControl').find('input').val());
+					var dif2 = parseInt(sub.find('div.landmarkControl').find('input').val());
 					
 					// change module header
-					var old = mod.find('.currentControl').html();
-					mod.children('.currentControl').html(old - dif1);
+					var old = parseInt(mod.find('div.currentControl').html());
+					mod.children('div.currentControl').html(old - dif1);
 
-					old = mod.find('.landmarkControl').html();
-					mod.children('.landmarkControl').html(old - dif2);
-
-					// change max rate
-					old = $('.RateIndicator').html(); 
-					$('.RateIndicator').html(old - dif1 - dif2);
-					thisObj.parent('div').parent('div').remove();
+					old = parseInt(mod.find('div.landmarkControl').html());
+					mod.children('div.landmarkControl').html(old - dif2);
 
+					// change sum rate
+					var RateIndicator = $('span.RateIndicator');
+					old = RateIndicator.html();
+					RateIndicator.html(old - dif1 - dif2);
+					
+					thisObj.parent().parent().remove();
 					EventInspector_ShowMsg('Мероприятие удалено', 'success');
 				}
 				else EventInspector_ShowMsg('Ошибка при удаление мероприятия', 'error');
@@ -404,7 +435,7 @@ $(function() {
 	
 	// Отмена удаления модулей/мероприятий
 	$('.moduleList').on('click', '.cancel ', function(){
-		$(this).parent().parent().children('.actions').css('display', 'block');
+		$(this).parent().parent().children('div.actions').css('display', 'block');
 		$(this).parent().remove();
 	});
 	
diff --git a/~dev_rating/media/js/discipline/general.js b/~dev_rating/media/js/discipline/general.js
index 757b412d344581efd5883bb803bc11dbed2d960e..29a1c35fe5ef5253e6de4613db480cc4a3521d40 100644
--- a/~dev_rating/media/js/discipline/general.js
+++ b/~dev_rating/media/js/discipline/general.js
@@ -62,7 +62,7 @@ $(function() {
 		var NameFilter = $(this).val();
 
 		if (NameFilter.length <= 0) {
-			SelectSubject.html('');
+			$('.SelectSubject').html('');
 			return;
 		}