Ejemplo n.º 1
0
 public function getAllTypes()
 {
     static $types;
     if (!isset($types)) {
         $crud = CRUD::read('exam_types');
         $list = $crud->getAll();
         $types = array();
         foreach ($list as $type) {
             $types[$type['id']] = $type->getAllData();
         }
     }
     return $types;
 }
Ejemplo n.º 2
0
 public function getAll()
 {
     $crud = CRUD::read('specials');
     return $crud->getAll();
 }
Ejemplo n.º 3
0
 public function getAll()
 {
     $crud = CRUD::read('subjects');
     return $crud->getAll();
 }
Ejemplo n.º 4
0
 public function getAllSubSubjects($extend = true)
 {
     if (!isset($this->sub_subjects)) {
         if ($extend) {
             $subjects = $this->getAllSubjects();
         }
         $crud = CRUD::read('sub_subjects');
         $list = $crud->getAll();
         $this->sub_subjects = array();
         foreach ($list as $id => $sub_subject) {
             $sub = $sub_subject->getAllData();
             if ($extend) {
                 $sub['subject'] = $subjects[$sub['subject_id']];
             }
             $this->sub_subjects[$sub['id']] = $sub;
         }
     }
     return $this->sub_subjects;
 }