Beispiel #1
0
 public function getCourseSyllabusDisciplines($courseId)
 {
     $this->load->model('discipline_model');
     $syllabus = new Syllabus();
     $foundSyllabus = $syllabus->getCourseSyllabus($courseId);
     if (sizeof($foundSyllabus) > 0) {
         $syllabusId = $foundSyllabus['id_syllabus'];
         $disciplines = $this->discipline_model->getCourseSyllabusDisciplines($syllabusId);
     } else {
         $disciplines = FALSE;
     }
     return $disciplines;
 }
Beispiel #2
0
 public function secretary_courseSyllabus()
 {
     $semester = new Semester();
     $currentSemester = $semester->getCurrentSemester();
     // Get the current user id
     $logged_user_data = $this->session->userdata("current_user");
     $currentUser = $logged_user_data['user']['id'];
     // Get the courses of the secretary
     $course = new Course();
     $courses = $course->getCoursesOfSecretary($currentUser);
     if ($courses !== FALSE) {
         $syllabus = new Syllabus();
         $coursesSyllabus = array();
         foreach ($courses as $course) {
             $coursesSyllabus[$course['course_name']] = $syllabus->getCourseSyllabus($course['id_course']);
         }
     } else {
         $coursesSyllabus = FALSE;
     }
     $data = array('current_semester' => $currentSemester, 'courses' => $courses, 'syllabus' => $coursesSyllabus);
     loadTemplateSafelyByPermission(PermissionConstants::COURSE_SYLLABUS_PERMISSION, 'usuario/secretary_course_syllabus', $data);
 }