Skip to content
Snippets Groups Projects
Commit d5765558 authored by Антон Шалимов's avatar Антон Шалимов
Browse files

Ограничение 100/60 баллов

parent 169ea760
Branches
Tags
No related merge requests found
......@@ -107,8 +107,10 @@ $(function() {
if (thisObj.val() != '')
NewMaxRate = parseInt(thisObj.val());
/*
// Ограничение 100 баллов
var MaxSumRate = 100;
if ($('div').is('.ExamModule')) MaxSumRate = 60;
var currentControl = 0;
$('.moduleHead .currentControl').each(function(){
currentControl += parseInt($(this).text());
......@@ -122,12 +124,17 @@ $(function() {
subtract = parseInt(thisObj.parent().siblings('.currentControl').children().val());
if (thisObj.parent().attr('class').indexOf('currentControl') + 1 > 0)
subtract = parseInt(thisObj.parent().siblings('.landmarkControl').children().val());
if (currentControl + landmarkControl + NewMaxRate - subtract - OldMaxRate > 100) {
EventInspector_ShowMsg('Сумма баллов превышает 100', 'error');
if (currentControl + landmarkControl + NewMaxRate - subtract - OldMaxRate > MaxSumRate) {
EventInspector_ShowMsg('Сумма баллов превышает максимум', 'error');
thisObj.val(OldMaxRate);
if (NewMaxRate == 0) {
thisObj.val('0');
// Подсчет текущего и рубежного контроля после изменений
CountCurrentControl(subModulesDiv);
CountLandmarkControl(subModulesDiv);
}
return 0;
}
*/
// Меняем max балл
if (NewMaxRate != OldMaxRate) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment