From ffc1c99109c6d0cf2502d4b4bd32cede43215877 Mon Sep 17 00:00:00 2001 From: RomanSteinberg <roman.accs@gmail.com> Date: Sun, 8 Feb 2015 22:53:23 +0300 Subject: [PATCH] FIX: additional pass rate again --- ~dev_rating/application/views/teacher/exam.twig | 14 +++++++++++--- ~dev_rating/media/js/rating.js | 4 +++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/~dev_rating/application/views/teacher/exam.twig b/~dev_rating/application/views/teacher/exam.twig index 57ab9a8ab..d1205bd63 100644 --- a/~dev_rating/application/views/teacher/exam.twig +++ b/~dev_rating/application/views/teacher/exam.twig @@ -69,7 +69,7 @@ <tr class="RatingTableSubmodulesHeadMaxRate"> {% set columnsCount = 4 %} {# студенты, итог за семестр, бонусы, итог #} - {% set col = 0 %} + {% set col = 1 %} <td class="title">Макс. балл</td> {% for i in 1..headerRate.ModulesCount %} {% set columnsCount = columnsCount + headerRate[i].SubmodulesCount %} @@ -155,8 +155,16 @@ </td> {% else %} <td class="commonCell {{ td_class }}" id="col_{{ col }}_row_{{ row }}"> - <input type="text" value="{{ r.Rate }}" {% if r.ModuleType == 'extra' %} - placeholder="{% if r.MaxRate > 0 %} макс. {{r.MaxRate}} {% else %} --- {% endif %}"{% endif %}> + <input type="text" value="{{ r.Rate }}" + {% if r.ModuleType == 'extra' %} + {% if r.MaxRate > 0 %} + placeholder="макс. {{r.MaxRate}}" + {% else %} + placeholder="---" + disabled="disabled" + {% endif %} + {% endif %} + > </td> {% endif %} diff --git a/~dev_rating/media/js/rating.js b/~dev_rating/media/js/rating.js index 889d39a26..5d95c7dca 100644 --- a/~dev_rating/media/js/rating.js +++ b/~dev_rating/media/js/rating.js @@ -133,7 +133,9 @@ $(function() { function TdInfo(jThis) { var disciplineType = json_settings.ExamType; - var disciplinePassRate = 0; + var disciplinePassRate = 60; // credit pass rate + if (disciplineType == "exam") + disciplinePassRate = 38; // Получаем подмодуль g_submoduleID = parseInt($(".RatingTableSubmodulesInfo .col_"+g_col+":first").attr("id")); -- GitLab