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

The undefined variable warning suppressed

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