diff --git a/~dev_rating/application/classes/Controller/Teacher/Discipline.php b/~dev_rating/application/classes/Controller/Teacher/Discipline.php index c6c4eb479184ba315596ec49b6549c062a934842..5450a5b51589ac3bbda2c2558927c6cd36e1e2de 100644 --- a/~dev_rating/application/classes/Controller/Teacher/Discipline.php +++ b/~dev_rating/application/classes/Controller/Teacher/Discipline.php @@ -146,7 +146,8 @@ class Controller_Teacher_Discipline extends Controller_UserEnvironment { $twig->BindTeachersList = Model_Teachers::getNamesForDiscipline($id); $twig->FacultiesList = Model_Faculties::toArray(); $twig->Departments = Model_Departments::byFaculty($this->user['FacultyID']); - + $twig->Author = Model_Account::getPersonalInfo($twig->Discipline['AuthorID']); + $this->response->body($twig); } diff --git a/~dev_rating/application/views/teacher/discipline/EditTeachers.twig b/~dev_rating/application/views/teacher/discipline/EditTeachers.twig index 2549a4d829227bb0c3a50257ec52947cd5d13724..46f0d16a3a73193a7cd4dd37589db1acd33ae127 100644 --- a/~dev_rating/application/views/teacher/discipline/EditTeachers.twig +++ b/~dev_rating/application/views/teacher/discipline/EditTeachers.twig @@ -29,7 +29,7 @@ <input type="hidden" class="HiddenInputFacultyID" value="{{ Discipline.FacultyID }}"> <select class="SelectFaculty defaultForm"> {% for Faculty in FacultiesList %} - <option value="{{ Faculty.ID }}" {% if User.FacultyID == Faculty.ID %}selected{% endif %}>{{ Faculty.Name }}</option> + <option value="{{ Faculty.ID }}" {% if Author.FacultyID == Faculty.ID %}selected{% endif %}>{{ Faculty.Name }}</option> {% endfor %} </select> <select class="SelectDepartment defaultForm"> diff --git a/~dev_rating/modules/account/classes/Model/Kohana/Account.php b/~dev_rating/modules/account/classes/Model/Kohana/Account.php index d3af3cf27423f5452b0cee0dde18acf450be5f1f..b886486a18b0b8dec5f4c56be256f12cccc53d8c 100644 --- a/~dev_rating/modules/account/classes/Model/Kohana/Account.php +++ b/~dev_rating/modules/account/classes/Model/Kohana/Account.php @@ -113,14 +113,14 @@ class Model_Kohana_Account extends Model return $response->get('Num'); } - public function getPersonalInfo($id) + public static function getPersonalInfo($id) { $sql = "CALL `GetPersonalInfo`('$id');"; $query = DB::query(Database::SELECT, $sql)->execute(); return $query[0]; } - public function GetAccountInfo($id) + public static function GetAccountInfo($id) { $sql = "CALL GetAccountInfo('$id');"; $query = DB::query(Database::SELECT, $sql)->execute();