Skip to content
Snippets Groups Projects
Commit 4d4c5abd authored by Anton's avatar Anton
Browse files

используется GetStudyGroupsOrdByGroups, а не GetStudyGroups

parent 9dac8538
Branches
Tags
No related merge requests found
...@@ -364,7 +364,7 @@ class Controller_Handler_Map extends Controller_Handler { ...@@ -364,7 +364,7 @@ class Controller_Handler_Map extends Controller_Handler {
$this->response->body(json_encode($data)); $this->response->body(json_encode($data));
} }
/*
public function action_SearchStudents() { public function action_SearchStudents() {
$data['result'] = false; $data['result'] = false;
$this->post -> rule('Grade', 'digit') $this->post -> rule('Grade', 'digit')
...@@ -372,19 +372,19 @@ class Controller_Handler_Map extends Controller_Handler { ...@@ -372,19 +372,19 @@ class Controller_Handler_Map extends Controller_Handler {
-> rule('FacultyID', 'digit'); -> rule('FacultyID', 'digit');
if($this->post->check()) { if($this->post->check()) {
$SeResult = $this->model->SearchStudents( $SeResult = $this->model->SearchStudents(
$this->post->offsetGet('Grade', 'null'), $this->post->offsetGet('Grade'),
$this->post->offsetGet('GroupN', 'null'), $this->post->offsetGet('GroupN'),
$this->post->offsetGet('FacultyID', 'null'), $this->post->offsetGet('FacultyID'),
$this->post->offsetGet('Last', 'null'), $this->post->offsetGet('Last'),
$this->post->offsetGet('First', 'null'), $this->post->offsetGet('First'),
$this->post->offsetGet('Second', 'null') $this->post->offsetGet('Second')
); );
var_dump($this->post->offsetGet($SeResult)); var_dump($this->post->offsetGet($SeResult));
} }
$this->response->body(json_encode($data)); $this->response->body(json_encode($data));
} }
*/
// Прикрепить преподавателя // Прикрепить преподавателя
public function action_BindTeacher() { public function action_BindTeacher() {
......
...@@ -97,7 +97,7 @@ class Controller_Teacher_Map extends Controller_UserEnvi { ...@@ -97,7 +97,7 @@ class Controller_Teacher_Map extends Controller_UserEnvi {
$twig->User = $this->UserInfo; $twig->User = $this->UserInfo;
$twig->Discipline = $this->getDisciplineInfo($db, $id); $twig->Discipline = $this->getDisciplineInfo($db, $id);
$twig->GroupsForDiscipline = $this->GetGroupsForDiscipline($db, $id); $twig->GroupsForDiscipline = $this->GetGroupsForDiscipline($db, $id);
$twig->StudyGroups = $this->GetStudyGroups($db, $this->GradeID, $this->UserInfo['FacultyID']); $twig->StudyGroups = $this->GetStudyGroupsOrdByGroups($db, $this->GradeID, $twig->Discipline['FacultyID']);
$this->response->body($twig); $this->response->body($twig);
} }
...@@ -272,8 +272,8 @@ class Controller_Teacher_Map extends Controller_UserEnvi { ...@@ -272,8 +272,8 @@ class Controller_Teacher_Map extends Controller_UserEnvi {
return $studentsHandled; return $studentsHandled;
} }
private function GetStudyGroups($db, $Grade, $FacultyID) { private function GetStudyGroupsOrdByGroups($db, $Grade, $FacultyID) {
$Groups = $db->GetStudyGroups($Grade, $FacultyID); $Groups = $db->GetStudyGroupsOrdByGroups($Grade, $FacultyID);
$GroupsHandled = array(); $GroupsHandled = array();
$i = 0; $i = 0;
......
...@@ -134,6 +134,12 @@ class Model_Teacher_Map extends Model ...@@ -134,6 +134,12 @@ class Model_Teacher_Map extends Model
return DB::query(Database::SELECT, $sql)->execute(); return DB::query(Database::SELECT, $sql)->execute();
} }
public function GetStudyGroupsOrdByGroups($Grade, $FacultyID)
{
$sql = "CALL `GetStudyGroupsOrdByGroups`('$Grade', '$FacultyID'); ";
return DB::query(Database::SELECT, $sql)->execute();
}
public function ChangeModuleOrder($teacherID, $moduleID, $OrderNum) public function ChangeModuleOrder($teacherID, $moduleID, $OrderNum)
{ {
$sql = "SELECT `ChangeModuleOrder`('$teacherID', '$moduleID', '$OrderNum') AS `Num`;"; $sql = "SELECT `ChangeModuleOrder`('$teacherID', '$moduleID', '$OrderNum') AS `Num`;";
......
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