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

Передача дисциплины

parent 469b2696
Branches
Tags
No related merge requests found
......@@ -77,6 +77,19 @@ class Controller_Handler_Map extends Controller_Handler {
-> rule('DisciplineID', 'not_empty')
-> rule('DisciplineID', 'digit');
if($this->post->check()) {
$BindTeachersList = DataArray::factory('Teachers')->forDiscipline($id)->asArray();
$binded = false;
foreach ($BindTeachersList as $teacher)
{
if ($teacher['TeacherID'] == $this->post->offsetGet('NewAuthorID')) {
$binded = true;
break;
}
}
if ($binded == false) {
$result = $this->model->BindTeacher($this->user['TeacherID'], $this->post->offsetGet('NewAuthorID'), $this->post->offsetGet('DisciplineID'));
}
$result = $this->model->DelegateDiscipline(
$this->user['TeacherID'],
$this->post->offsetGet('NewAuthorID'),
......
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