예제 #1
0
 public function __construct($studentId, $identityId, $gradeId, $schoolId)
 {
     $this->studentId = $studentId;
     $this->identity = Identity::findById($identityId);
     $this->school = School::findById($schoolId);
     $this->grade = Grade::findById($gradeId);
 }
예제 #2
0
 public function listStudents()
 {
     $schoolList = [];
     foreach (School::all() as $i) {
         $schoolList[] = $i->getValues();
     }
     $studentsAtSchool = [];
     $schoolName = '';
     if (isset($_POST['schoolID'])) {
         $studentObjects = Student::allStudentsAtSchool($_POST['schoolID']);
         $schoolName = School::findById($_POST['schoolID']);
         $schoolName = $schoolName->getValues();
         $schoolName = $schoolName['name'];
         foreach ($studentObjects as $i) {
             $studentsAtSchool[] = $i->getValues();
         }
     }
     require_once 'views/student/listStudents.php';
 }
예제 #3
0
 public function listClasses()
 {
     $start = 0;
     if (isset($_POST['rStart'])) {
         $start = $_POST['rStart'];
     }
     $number = 0;
     if (isset($_POST['rNumber'])) {
         $number = $_POST['rNumber'];
     } else {
         $number = Sclass::rowCount();
     }
     $schoolList = School::all($start, $number);
     $classesAtSchool = '';
     $schoolName = '';
     if (isset($_POST['schoolID'])) {
         $classesAtSchool = Sclass::getAllClassesAtSchool($_POST['schoolID'], $start, $number);
         $schoolName = School::findById($_POST['schoolID']);
         $schoolName = $schoolName->getValues();
         $schoolName = $schoolName['name'];
     }
     require_once 'views/class/listClasses.php';
 }