diff --git a/~dev_rating/application/classes/Controller/Teacher/Rating.php b/~dev_rating/application/classes/Controller/Teacher/Rating.php index 82ab188ce8fd964c963a867c3d79fb32aef25855..0b5e93a3ffd0f206ea5786722de83b116844d99f 100644 --- a/~dev_rating/application/classes/Controller/Teacher/Rating.php +++ b/~dev_rating/application/classes/Controller/Teacher/Rating.php @@ -50,6 +50,9 @@ class Controller_Teacher_Rating extends Controller_UserEnvi { $disciplineHandled[$i]['MaxRate'] += (int) $row['MaxRate']; $disciplineHandled[$i]['ModuleTitle'] = $row['ModuleName']; $disciplineHandled[$i]['ModuleType'] = $row['ModuleType']; + if ($row['ModuleType'] == "exam") + $twig->examSubmoduleID = $row['SubmoduleID']; + $disciplineHandled[$i][$j]['SubmoduleID'] = $row['SubmoduleID']; $disciplineHandled[$i][$j]['Title'] = $row['SubModuleName']; $disciplineHandled[$i][$j]['Description'] = $row['SubmoduleDescription']; diff --git a/~dev_rating/application/views/teacher/rating.twig b/~dev_rating/application/views/teacher/rating.twig index d4bf47f55ccb0767a9adf5b710f231bcd153d410..813b2b1f4ff14b029380d3588c47330355ea9ee4 100644 --- a/~dev_rating/application/views/teacher/rating.twig +++ b/~dev_rating/application/views/teacher/rating.twig @@ -71,7 +71,13 @@ <td class="student" id="{{ student.ID }}">{{ student.Last }} {{ student.First }}</td> {% for i in 1..CellCount %} {% set RateResult = RateResult + student[i].Rate %} - <td id="{{ i }}" class="rateCell"><input type="text" value="{{ student[i].Rate }}"></td> + <td id="{{ i }}" class="rateCell"> + {% if examSubmoduleID != student[i].SubmoduleID %} + <input type="text" value="{{ student[i].Rate }}"> + {% else %} + <p>{{ student[i].Rate }}</p> + {% endif %} + </td> {% endfor %} <td class="row_{{ row }} col_{{ i + 1 }} RateResult">{{ RateResult }}</td> </tr> diff --git a/~dev_rating/media/css/rating.css b/~dev_rating/media/css/rating.css index 5d9c8c638969903e9009ab45be948ce190d3620d..b65b990854253dbd52263fb43aa1e5f0d1382b15 100644 --- a/~dev_rating/media/css/rating.css +++ b/~dev_rating/media/css/rating.css @@ -91,6 +91,10 @@ td { line-height: 140%; } */ +td p { + width: 100%; + text-align: center +} td input { display: block; margin: 0 auto;