From 55c9fa364cf7b01102ad1a023d06fd37dfd4c9f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A8=D0=B0=D0=BB=D0=B8?= =?UTF-8?q?=D0=BC=D0=BE=D0=B2?= <solidovic@gmail.com> Date: Thu, 18 Dec 2014 22:39:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/classes/Controller/Teacher/Rating.php | 8 +++++++- ~dev_rating/application/views/teacher/exam.twig | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/~dev_rating/application/classes/Controller/Teacher/Rating.php b/~dev_rating/application/classes/Controller/Teacher/Rating.php index d00ab35dd..62009e0a8 100644 --- a/~dev_rating/application/classes/Controller/Teacher/Rating.php +++ b/~dev_rating/application/classes/Controller/Teacher/Rating.php @@ -147,6 +147,12 @@ class Controller_Teacher_Rating extends Controller_UserEnvi { $id = $this->request->param('id'); $db = new Model_Teacher_Rating; + // Узнаем ExamType + $dbMap = new Model_Teacher_Map; + $disc_temp = $dbMap->getDisciplineInfoByID($id); + $disciplineInfo['ExamType'] = $disc_temp['ExamType']; + $disciplineInfo['ID'] = $id; + // Шапка таблицы: структура РЈРљР” (модули Рё мероприятия) $structure = $db->GetMapForDisciplineExam($this->UserInfo['TeacherID'], $id); @@ -286,7 +292,7 @@ class Controller_Teacher_Rating extends Controller_UserEnvi { $twig->studyGroupID = $this->GetSGID($id); - $twig->DisciplineID = $id; + $twig->disciplineInfo = $disciplineInfo; $this->response->body($twig); } diff --git a/~dev_rating/application/views/teacher/exam.twig b/~dev_rating/application/views/teacher/exam.twig index 290fb126d..814ac708b 100644 --- a/~dev_rating/application/views/teacher/exam.twig +++ b/~dev_rating/application/views/teacher/exam.twig @@ -12,6 +12,16 @@ {% block main_content %} <h2 style="margin-left: 2.5%; font-weight: normal; color: #3399CC;">Ркзамен</h2> + {% if disciplineInfo.ExamType == 'exam' %} + <button class="downloadExamTable">Скачать отчёт РїРѕ экзамену</button> + {% else %} + <button class="downloadCreditTable">Скачать отчёт РїРѕ зачету</button> + {% endif %} + + {{ HTML.anchor('rate/'~DisciplineID, + "Перейти Рє оцениванию", + {'title': 'Оценивание', 'class': 'rate_a'})|raw }} + <div class="groupSelectorWrap"> <div class="groupSelectorText">Фильтр:</div> <select class="groupSelector"> -- GitLab