Skip to content
Snippets Groups Projects
Commit 19987336 authored by xamgore's avatar xamgore
Browse files

The undefined variable warning suppressed

parent 4db7c49a
Branches
No related merge requests found
<?php defined('SYSPATH') or die('No direct script access.'); <?php defined('SYSPATH') or die('No direct script access.');
class SortingOptions { //extends SplEnum { abstract class SortingOptions { //extends SplEnum { // todo: think about usage & file system
//const __default = self::Name; //const __default = self::Name;
const Name = 0; const Name = 0;
...@@ -117,6 +117,8 @@ class Controller_Handler_AdmStudents extends Controller_Handler { ...@@ -117,6 +117,8 @@ class Controller_Handler_AdmStudents extends Controller_Handler {
public function action_getStudentsList($option = SortingOptions::Name) public function action_getStudentsList($option = SortingOptions::Name)
{ {
$twig = Twig::factory('admin/students/handler/listOutput');
$success = false; $success = false;
$facultyID = $this->post->offsetGet('facultyID'); $facultyID = $this->post->offsetGet('facultyID');
$gradeID = $this->post->offsetGet('gradeID'); $gradeID = $this->post->offsetGet('gradeID');
...@@ -128,17 +130,17 @@ class Controller_Handler_AdmStudents extends Controller_Handler { ...@@ -128,17 +130,17 @@ class Controller_Handler_AdmStudents extends Controller_Handler {
-> rule('gradeID', 'digit') -> rule('gradeID', 'digit')
-> rule('GroupID', 'not_empty') -> rule('GroupID', 'not_empty')
-> rule('groupID', 'digit'); -> rule('groupID', 'digit');
if($this->post->check()) { if($this->post->check()) {
// $result = $this->commonModel->GetStudentsList($this->user['UserID'], $facultyID , $gradeID, $groupID); // $result = $this->commonModel->GetStudentsList($this->user['UserID'], $facultyID , $gradeID, $groupID);
$result = Model_Students::create()->byFaculty($facultyID , $gradeID, $groupID)->asArray(); $result = Model_Students::create()->byFaculty($facultyID , $gradeID, $groupID)->asArray();
if (!empty($result)) { if (!empty($result)) {
$twig->List = $result;
$success = true; $success = true;
} }
} }
//$this->response->body(json_encode($data)); //$this->response->body(json_encode($data));
$twig = Twig::factory('admin/students/handler/listOutput');
$twig->List = $result;
$twig->Success = $success; $twig->Success = $success;
$this->response->body($twig); $this->response->body($twig);
} }
......
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