Пример #1
0
/**
 * Description of dac
 *
 * @author user1
 */
function youtubeBuilder($courseID)
{
    $courseObj = new Courses();
    $json = $courseObj->viewCourseFullDetails($courseID);
    $dejson = json_decode($json);
    $html = '';
    for ($ind = 0; $ind < count($dejson); $ind++) {
        $subcourseId = $dejson[$ind]->{'idCourseLinks'};
        $courseId = $dejson[$ind]->{'courseID'};
        $title = $dejson[$ind]->{'title'};
        $engVideo = $dejson[$ind]->{'courseEngVideoLink'};
        $hindiVideo = $dejson[$ind]->{'courseEngVideoLink'};
        $telVideo = $dejson[$ind]->{'courseEngVideoLink'};
        $engPDF = $dejson[$ind]->{'courseEngPDFLink'};
        $html .= '<div class="col-xs-12 col-xs-6 col-md-4">';
        $html .= '<div class="course-video">';
        $html .= '<h5 class="course-title">' . $title . '</h5>';
        if (isset($engVideo)) {
            $html .= '<div id="englishVideo" align="center" class="video-frame">';
            $html .= '<iframe width="92%" height="80%" src="' . $engVideo . '" frameborder="0" allowfullscreen></iframe>';
            $html .= '</div>';
        } else {
            if (isset($hindiVideo)) {
                $html .= '<div id="hindiVideo" align="center" class="video-frame">';
                $html .= '<iframe width="92%" height="80%" src="' . $hindiVideo . '" frameborder="0" allowfullscreen onclick="alert(\\"English Video\\")"></iframe>';
                $html .= '</div>';
            } else {
                if (isset($telVideo)) {
                    $html .= '<div id="teluguVideo" align="center" class="video-frame">';
                    $html .= '<a href="' . $telVideo . '"';
                    $html .= '<iframe width="92%" height="80%" src="' . $telVideo . '" frameborder="0" allowfullscreen></iframe>';
                    $html .= '</a>';
                    $html .= '</div>';
                }
            }
        }
        $html .= '<div>';
        $html .= '<a href="' . $engVideo . '" target="new"><div class="english"></div></a>';
        $html .= '<a href="' . $hindiVideo . '" target="new"><div class="hindi"></div></a>';
        $html .= '<a href="' . $telVideo . '" target="new"><div class="telugu"></div></a>';
        $html .= '<a href="' . $engPDF . '" target="new" onclick="pdfDownloadLogs(\'' . $title . '\',\'' . $subcourseId . '\',\'' . $courseId . '\')">';
        $html .= '<div class="pdf-download"></div>';
        $html .= '</a>';
        $html .= '</div>';
        $html .= '</div>';
        $html .= '</div>';
    }
    return $html;
}
Пример #2
0
 public function actionShow()
 {
     $auth = Auth::checkAuth();
     if ($auth) {
         $user = Users::findOneByPK($auth);
         $user->getProfile();
     }
     $course_id = $_GET['course_id'];
     $view = new View();
     //  $view->user_login = $user->user_login;
     // $view->user_group = $user->user_group;
     if (isset($course_id)) {
         $lessons = Lessons::findAllByColumn('parent_id', $course_id);
         $course = Courses::findOneByPK($course_id);
         $crumbs = Breadcrumbs::getCrumbs($course);
         $view->crumbs = $crumbs;
         $view->user = $user;
         $view->lessons = $lessons;
         $view->page_title = $course->name;
         $view->display('header.php');
         $view->display('lessons/list.php');
         $view->display('footer.php');
     } else {
         throw new ControllerException('Невозможно отобразить список уроков для данного курса', '404');
     }
 }
Пример #3
0
 public function actionShowLesson()
 {
     $auth = Auth::checkAuth();
     $view = new View();
     $view->auth = $auth;
     if (!isset($_GET['id'])) {
         header("Location: /learns/");
     }
     if ($auth) {
         $user = Auth::getUser();
         $id = $_GET['id'];
         $lesson = Lessons::getLesson($id);
         $course = Courses::getCourse($lesson->course_id);
         $lesson_prew = Lessons::getLessonByNumber($lesson->lesson_number - 1, $lesson->course_id);
         $lesson_next = Lessons::getLessonByNumber($lesson->lesson_number + 1, $lesson->course_id);
         $view->user_login = $user->user_login;
         $view->user_group = $user->user_group;
         $view->lesson = $lesson;
         $view->course = $course;
         $view->lesson_prew = $lesson_prew;
         $view->lesson_next = $lesson_next;
         $view->display('header.php');
         $view->display('lessons/lesson_view.php');
         $view->display('footer.php');
     } else {
         header("Location: /learns/");
     }
 }
Пример #4
0
 public function add_new_class_franchise()
 {
     $currentPage = "CLASSES_FRANCHISE";
     $mainMenu = "CLASSES_MAIN";
     $franchiseeCourses = Courses::where('franchisee_id', '=', Session::get('franchiseId'))->get();
     $franchiseeBaseprice = ClassBasePrice::getBasePricebyFranchiseeId();
     $getAllClassesForFranchise = Classes::getAllClassesForFranchise();
     for ($i = 0; $i < sizeof($getAllClassesForFranchise); $i++) {
         $courseMasterId = Courses::where('id', '=', $getAllClassesForFranchise[$i]['course_id'])->get();
         $courseMasterId = $courseMasterId[0];
         $courseName = CoursesMaster::where('id', '=', $courseMasterId['master_course_id'])->get();
         $courseName = $courseName[0];
         $getAllClassesForFranchise[$i]['course_name'] = $courseName['course_name'];
         $getBasePrice = ClassBasePrice::where('base_price_no', '=', $getAllClassesForFranchise[$i]['base_price_no'])->get();
         $getBasePrice = ClassBasePrice::where('base_price_no', '=', $getAllClassesForFranchise[$i]['base_price_no'])->get();
         //$getBasePrice = $getBasePrice[0];
         if ($getAllClassesForFranchise[$i]['base_price_no'] == 0) {
             $getAllClassesForFranchise[$i]['base_price'] = '';
         } else {
             $getAllClassesForFranchise[$i]['base_price'] = $getBasePrice[0]['base_price'];
         }
     }
     //return $getAllClassesForFranchise;
     return View::make('pages.classes.add_new_class_franchise', compact('currentPage', 'mainMenu', 'franchiseeCourses', 'franchiseeBaseprice', 'getAllClassesForFranchise'));
 }
Пример #5
0
 public function actionShow()
 {
     $id = $_GET['id'];
     $auth = Auth::checkAuth();
     if ($auth) {
         $user = Users::findOneByPK($auth);
         $user->getProfile();
     }
     $courses = Courses::findAllByColumn('parent_id', $id);
     $view = new View();
     $view->user = $user;
     $view->courses = $courses;
     //  $view->user_login = $user->user_login;
     // $view->user_group = $user->user_group;
     $parent_course = Courses::findOneByPK($id);
     $crumbs = Breadcrumbs::getCrumbs($parent_course);
     $view->crumbs = $crumbs;
     $view->page_title = $parent_course->name;
     $view->display('header.php');
     if (isset($id)) {
         $view->display('courses/child-list.php');
     } else {
         $view->display('courses/list.php');
     }
     $view->display('footer.php');
 }
Пример #6
0
    function index()
    {
        $coursesModel = new Courses();
        $coursesList = $coursesModel->getAllCourses();
        $lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla libero neque, dictum ac adipiscing non, auctor at justo. Mauris sit amet enim tortor, nec porta quam. In posuere tempus eros, consequat congue diam imperdiet tristique. Maecenas ipsum arcu, porta a congue sit amet, convallis sed massa. Cras eros libero, dictum non gravida non, sagittis et ligula. Aenean in ligula eget odio cursus egestas vitae vel nisi. Maecenas a augue metus, ac egestas nulla. Suspendisse ac mauris tortor, eget condimentum ligula. Duis dolor diam, sagittis vel egestas nec, sollicitudin rutrum lectus. Donec et tellus et tortor cursus sollicitudin in et odio. Aenean sit amet diam sapien. Integer ut tellus nec quam dignissim pellentesque ut at nulla. Nullam et eros nibh. Proin vitae arcu ac ligula fermentum pellentesque a quis nulla. Sed venenatis consectetur mattis. Proin id neque orci.

Donec sit amet dolor non arcu elementum faucibus. Nam consequat magna ac nunc faucibus vitae dignissim velit hendrerit. Curabitur vitae sapien vitae elit pellentesque sagittis sed eget justo. Phasellus a nisi mi. Mauris condimentum, quam id elementum consequat, libero sem venenatis tellus, in dapibus libero purus a orci. Praesent vel accumsan ligula. Sed rutrum fermentum scelerisque. Integer turpis lacus, luctus sit amet convallis eu, ultrices ac lorem. Nam et dolor eros. Maecenas eget urna mi. Aliquam erat volutpat. Curabitur vel mauris metus, sed condimentum quam. Vestibulum arcu mauris, posuere nec molestie nec, ornare et velit.

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla facilisi. Etiam eu eros turpis, sed tempus nisl. Nullam ut ante lacus. Nam sit amet commodo augue. Etiam eget augue non felis fringilla bibendum. Duis et magna ligula. Ut at nisl diam, eget adipiscing tortor. Cras dignissim consequat viverra. Donec porttitor vestibulum elit, quis ultricies nisl condimentum eget. Ut imperdiet, dui sed pulvinar cursus, tellus orci iaculis nibh, in molestie tellus nisl non urna.

Morbi ornare turpis at elit fermentum ut placerat velit mollis. Donec ac orci nec ipsum euismod malesuada et mattis orci. Suspendisse ante mauris, suscipit ut porttitor nec, luctus porttitor turpis. Morbi nec leo at massa ullamcorper dictum. Aliquam gravida libero id dui tempor eu elementum libero hendrerit. Vivamus lacinia porta leo, ut auctor purus congue non. Suspendisse eget nibh risus. Nunc nec metus mi, ac fermentum nulla. Etiam pharetra nisl et tellus consectetur eleifend. Ut sed malesuada justo. Vivamus pretium facilisis turpis. Curabitur quis turpis augue, convallis placerat ipsum. Curabitur et libero luctus sapien eleifend pellentesque. Mauris blandit ullamcorper turpis, eu elementum ipsum porttitor ac. Aenean fermentum vehicula libero, ac malesuada est tincidunt ac. Etiam quis hendrerit tortor. Proin vitae erat consectetur neque consequat pulvinar.

Duis suscipit libero nec mauris vestibulum laoreet. Suspendisse lobortis bibendum felis, id porta sem tincidunt at. Phasellus leo magna, viverra id suscipit in, varius in metus. Nunc gravida tincidunt eros et lacinia. Suspendisse potenti. Donec congue porttitor lectus, sed ullamcorper neque consequat condimentum. Mauris ligula quam, ornare at posuere at, vulputate ut lorem. Proin blandit magna vel metus iaculis semper. Curabitur eleifend euismod metus blandit molestie. Fusce non lorem libero. Nulla ac lorem sed nunc porta euismod sit amet ac erat. Cras ante est, porttitor et sollicitudin a, vehicula ac velit. Integer eget facilisis orci. Integer in metus nibh. Vivamus at ante sem, sed volutpat massa. ';
        $data = array('leftColumn' => $coursesList, 'content' => $lorem, 'rightColumn' => $lorem);
        $this->load->view('template/welcome', $data);
    }
Пример #7
0
 public function actionTest()
 {
     $course = Courses::findOneByPK(11);
     $course->delete();
     var_dump($course);
     die;
 }
Пример #8
0
 public function courseDelete()
 {
     $course_id = Input::get('deleteId');
     Homework::where('course_id', '=', $course_id)->delete();
     Courseware::where('course_id', '=', $course_id)->delete();
     Courses::find($course_id)->delete();
     return Redirect::to('course-edit');
 }
Пример #9
0
 public function actionSave()
 {
     $data_array = $_POST;
     if (!empty($data_array)) {
         $course = new Courses();
         foreach ($data_array as $key => $value) {
             $course->{$key} = $value;
         }
         if (!empty($_FILES)) {
             $course->img = Files::upload($_FILES, 'courses');
         }
         $course->save();
     } else {
         header('Location: ' . ADMIN_PATH);
     }
     header('Location: ' . ADMIN_PATH . '?ctrl=courses&act=edit&id=' . $course->id);
 }
Пример #10
0
 public function getIndex($idCourse, $idInscription)
 {
     $course = Courses::find($idCourse);
     $inscription = Inscriptions::find($idInscription);
     $files = $inscription->files;
     $array = array('course' => $course, 'inscription' => $inscription, 'files' => $files, 'route' => self::parseRoute($course->id, $idInscription), 'parent' => self::parseParent($course->id), 'ancestor' => self::$ancestor, 'msg_success' => Session::get('msg_success'), 'msg_error' => Session::get('msg_error'));
     return View::make('backend.inscriptions.files')->with($array);
 }
Пример #11
0
 public function getCreate($idCourse)
 {
     $course = Courses::find($idCourse);
     if ($course) {
         return View::make('backend.usertypes.create', array('course' => $course, 'route' => self::parseRoute($idCourse)));
     } else {
         return Redirect::to($this->parent)->with(array('msg_error' => Lang::get('messages.course_not_found')));
     }
 }
Пример #12
0
 public function actionBycode($code, $student = null)
 {
     $course = Courses::model()->findByAttributes(array("code" => $code));
     if (!$course) {
         Yii::app()->notify->add("Курс не найден");
         return false;
     }
     $this->actionByid($course->id);
 }
Пример #13
0
 public function actionBycourse($code)
 {
     $course = Courses::model()->with("Tracks.Algorithms")->findByAttributes(array("code" => $code));
     if (!$course) {
         Yii::app()->notify->add("Курс не найден", "warning");
         $this->render('/site/index');
         return false;
     }
     $this->render('bycourse', array('course' => $course));
 }
Пример #14
0
 public function GetCourse($data, $row)
 {
     if ($data->course) {
         $course = Courses::model()->findByAttributes(array('id' => $data->course));
         if ($course->course_name) {
             return ucfirst($course->course_name);
         } else {
             echo '-';
         }
     } else {
         echo '-';
     }
 }
Пример #15
0
 public function getCreate($idCourse, $idUserType, $idDate = '')
 {
     $course = Courses::find($idCourse);
     if ($course) {
         $usertype = UserTypes::find($idUserType);
         if ($usertype) {
             return View::make('backend.dates.create', array('course' => $course, 'usertype' => $usertype, 'route' => self::parseRoute($idCourse, $idUserType)));
         } else {
             return Redirect::to(self::parseRoute($idCourse, $idUserType))->with(array('msg_error' => Lang::get('messages.usertype_not_found')));
         }
     } else {
         return Redirect::to($this->ancestor)->with(array('msg_error' => Lang::get('messages.course_not_found')));
     }
 }
Пример #16
0
 public function postIndex($route = '', $content = '', $idContent = '')
 {
     $course = Courses::findRoute($route);
     $course->start = date("d-m-Y", strtotime($course->start));
     $course->end = date("d-m-Y", strtotime($course->end));
     if ($course) {
         switch ($content) {
             case 'arquivos':
                 return self::postCourseFiles($course->id, $course, $idContent);
                 break;
         }
     } else {
         return View::make('specialpages.404');
     }
 }
Пример #17
0
 public function actionSearch($q)
 {
     $result = array();
     $term = trim(addcslashes($q, '%_'));
     // escape LIKE's special characters
     if (!empty($term)) {
         $param = new CDbCriteria(array('condition' => "name LIKE :match AND degree_id=" . $_SESSION['did'], 'params' => array(':match' => "%{$term}%")));
         $cursor = Courses::model()->findAll($param);
         if (!empty($cursor)) {
             foreach ($cursor as $id => $value) {
                 $result[] = array('id' => $value['cid'], 'name' => $value['name']);
             }
         }
     }
     echo json_encode($result);
     Yii::app()->end();
 }
Пример #18
0
 public function actionShow()
 {
     $courses = Courses::findAllByColumn('parent_id', 0);
     $auth = Auth::checkAuth();
     if ($auth) {
         $user = Users::findOneByPK($auth);
         $user->getProfile();
     }
     $view = new View();
     $view->user = $user;
     $view->courses = $courses;
     //  $view->user_login = $user->user_login;
     // $view->user_group = $user->user_group;
     $view->display('header.php');
     $view->display('content.php');
     $view->display('footer.php');
 }
Пример #19
0
 static function return_courses_class()
 {
     $diretorios = Courses::return_courses();
     $dir_all = [];
     foreach ($diretorios as $diretorio) {
         $dir_classes = scandir('arquivos/' . $diretorio);
         foreach ($dir_classes as $dir_turma) {
             if ($dir_turma == '.' || $dir_turma == '..') {
                 $key = array_search($dir_turma, $dir_classes);
                 unset($dir_classes[$key]);
             } else {
                 $dir_all[] = $dir_turma;
             }
         }
     }
     return $dir_all;
 }
Пример #20
0
 function edit()
 {
     if (isset($_POST['save'])) {
         $id = $this->input->post('id');
         $data = array('course_name' => trim($this->input->post('course_name')), 'graduation_type' => trim($this->input->post('graduation_type')), 'state' => $this->input->post('state'));
         $dataIn = $this->courses_model->edit($id, $data);
         if ($dataIn) {
             $this->admintemp->write('message', 'Edited Successfully');
             redirect('courses');
         } else {
             $this->admintemp->write('message', 'Error occured while editing');
             Courses::index();
         }
     } else {
         Courses::_edit();
     }
 }
Пример #21
0
 public function actionShowAll()
 {
     $auth = Auth::checkAuth();
     $view = new View();
     $view->auth = $auth;
     if ($auth) {
         $user = Auth::getUser();
         $courses = Courses::getCourses();
         $view->user_login = $user->user_login;
         $view->user_group = $user->user_group;
         $view->courses = $courses;
         $view->display('header.php');
         $view->display('courses/courses_list.php');
         $view->display('footer.php');
     } else {
         header("Location: /learns/");
     }
 }
Пример #22
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function getIndex($route = '', $content = '', $idContent = '')
 {
     //
     if ($route == '') {
         return Redirect::to('http://abge.org.br');
     } elseif ($route != '') {
         $course = Courses::findRoute($route);
         $course->start = date("d-m-Y", strtotime($course->start));
         $course->end = date("d-m-Y", strtotime($course->end));
         if ($course) {
             switch ($content) {
                 case '':
                     return FrontendCourseController::getCourseContent($route, $course, $idContent);
                     break;
                 case 'content':
                     return FrontendCourseController::getCourseContent($route, $course, $idContent);
                     break;
                 case 'inscriptions':
                     return FrontendCourseController::getCourseInscription($route, $course, $idContent);
                     break;
                 case 'works':
                     return FrontendCourseController::getCourseWorks($route, $course, $idContent);
                     break;
                 case 'signin':
                     return FrontendCourseController::getCourseSignin($route, $course, $idContent);
                     break;
                 case 'files':
                     return FrontendCourseController::getCourseFiles($route, $course, $idContent);
                     break;
                 case 'filesuploaded':
                     return FrontendCourseController::getCourseFilesUploaded($route, $course, $idContent);
                     break;
                 case 'payment':
                     return FrontendCourseController::getCoursePayment($route, $course, $idContent);
                     break;
                 default:
                     return FrontendCourseController::getCourseContent($route, $course, $idContent);
                     break;
             }
         } else {
             return View::make('specialpages.404');
         }
     }
 }
Пример #23
0
 public function actionLessons()
 {
     $tasks = ['Добавить' => 'show', 'Добавить' => 'add', 'Изменить' => 'edit', 'Удалить' => 'del'];
     $task = $_GET['task'];
     $id = $_GET['id'];
     $view = new View();
     $view->tasks = $tasks;
     if (!isset($task)) {
         $lessons = Lessons::getLessons($id);
         $view->lessons = $lessons;
         $view->display('admin/header.php');
         $view->display('admin/lessons/list.php');
         $view->display('admin/footer.php');
     } elseif ('add' == $task) {
         if (!empty($_POST)) {
             $id = Lessons::addLesson($_POST);
             header('Location: /?ctrl=Admin&act=Lessons&task=edit&id=' . $id);
         }
         $courses = Courses::getCourses();
         $view->courses = $courses;
         $view->display('admin/header.php');
         $view->display('admin/lessons/add.php');
         $view->display('admin/footer.php');
     } elseif ('edit' == $task && isset($id)) {
         if (!empty($_POST)) {
             Lessons::updateLesson($_POST);
         }
         $lesson = Lessons::getLesson($id);
         $courses = Courses::getCourses();
         $view->lesson = $lesson;
         $view->courses = $courses;
         $view->display('admin/header.php');
         $view->display('admin/lessons/edit.php');
         $view->display('admin/footer.php');
     } elseif ('del' == $task) {
         Courses::delCourse($id);
         header('Location: /?ctrl=Admin&act=Lessons');
     } else {
         $view->display('header.php');
         $view->display('404.php');
         $view->display('footer.php');
     }
 }
Пример #24
0
 public function getCrumbs($item)
 {
     $paths = ['courses/?id=', 'lessons/show/?course_id=', 'lessons/lesson/?lesson_id='];
     $crumbs[] = $item;
     if ($item->parent_id) {
         do {
             $item = Courses::findOneByColumn('id', $item->parent_id);
             $crumbs[] = $item;
         } while ($item->parent_id);
     }
     $crumbs = array_reverse($crumbs);
     $count = count($crumbs);
     $breadcrumbs = [];
     for ($i = 0; $i < $count; $i++) {
         if (isset($crumbs[$i]->id)) {
             $paths[$i] = $paths[$i] . $crumbs[$i]->id;
             $breadcrumbs[$i]['name'] = $crumbs[$i]->name;
         }
         $breadcrumbs[$i]['path'] = $paths[$i];
     }
     return $breadcrumbs;
 }
Пример #25
0
           <?php 
    if ($batch != NULL) {
        ?>
    
    <li class="img_text">
    	<?php 
        echo '<strong>' . Yii::t('Batch', 'Batch:  ') . '</strong>';
        echo $batch->name;
        ?>
<br>
        <span><strong><?php 
        echo Yii::t('Batch', 'Course:');
        ?>
</strong>
        <?php 
        $course = Courses::model()->findByAttributes(array('id' => $batch->course_id));
        if ($course != NULL) {
            echo $course->course_name;
        }
        ?>
</span>
      
    </li>
    </ul>
     <div class="clear"></div>
    </div>
    <div class="status_bx">
    	<ul>
        	<li style="border-right:1px #d9e1e7 solid"><span><?php 
        echo count(Students::model()->findAll("batch_id=:x", array(':x' => $_REQUEST['id'])));
        ?>
Пример #26
0
 /**
  * Unifikovana metoda pre edit a copy.
  * Vykona predbezne kontroly, ziska a anstaveni potrebne data
  * @param int $predmetID - id predmetu
  * @param array $metaPoz - nacitana metapoziadavka
  */
 private function commonEdit($predmetID, $metaPoz)
 {
     // postacuje canSee, edit moze byt pouzite aj na prehliadanie
     if (!$this->canSee($predmetID, "Pract", $this->redirect)) {
         return;
     }
     //nastavime si array minulorocnych predmetov
     //TODO: presunut do __getCommonData ??
     //TODO: potrebne ziskavat stale ???? nestaci len pri prvej ???
     $crses = new Courses();
     $minule = $crses->getMinulorocne($this->getSemesterID());
     $this->set('minule', $minule);
     // nastavi vseobecne data
     $this->__getCommonData($predmetID);
     // defaultne prazdny
     // edit si ho prida ak ma, preberanie ponechava prazdne lebo tam je to prva
     $this->session->write($this->getLockName($predmetID), "");
     // defaultne neprebera => prepisat v copy treba
     $this->set('poziadavka_prebrata', 0);
     if (!empty($metaPoz)) {
         $req = $this->requirements->load($metaPoz["id"]);
         $this->set("requirement", $req["requirement"]);
         $this->set("actualMetaID", $metaPoz["id"]);
     }
 }
Пример #27
0
// Session, configuration file, localization constructor
//============================================================================================
require '../includes/php/bootstrap.php';
$SESSION = new \Zend_Session_Namespace('internal', true);
if (!isset($SESSION->lang)) {
    $SESSION->lang = DEFAULT_LANGUAGE;
}
\Locale::setDefault($SESSION->lang);
$l10n->setLanguage($SESSION->lang);
//============================================================================================
// MODEL
//============================================================================================
$profile = new Profile($dbo);
$bursary = new Bursaries($dbo);
$follow = new FollowUps($dbo);
$courses = new Courses($dbo);
if (isset($_GET['student_num']) && ctype_digit($_GET['student_num'])) {
    $studentProfile = $profile->getProfile($_GET['student_num']);
}
//============================================================================================
// Load the content
//============================================================================================
if (!isset($_GET['page'])) {
    $render = true;
    if (!empty($studentProfile)) {
        $thisPage = 'fund';
        $followupcount = $follow->fetchFollowUpsCountStudent($_GET['student_num']);
        $poccount = $profile->countUnlockedPOC($_GET['student_num']);
        $semester = \Ventus\Utilities\Functions::fetchSemester();
        $current_courses = $courses->fetchAllStudentCoursesForSemester($_GET['student_num'], $semester['now_short']);
        $osap = $bursary->listOsapBursaries($_GET['student_num']);
Пример #28
0
</table>

		
        
	</div>
    
    
    <div class="inner_new_formCon_row">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="20%"><?php 
echo $form->labelEx($model, 'course');
?>
</td>
    <td width="80%"> <?php 
$data = CHtml::listData(Courses::model()->findAll('is_deleted=:x', array(':x' => '0'), array('order' => 'course_name DESC')), 'id', 'course_name');
echo $form->dropDownList($model, 'course', $data, array('prompt' => 'Select', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('fileUploads/batch'), 'update' => '#batch_id', 'data' => 'js:$(this).serialize()')));
?>
		<?php 
echo $form->error($model, 'course');
?>
</td>
  </tr>
</table>

		
       
	</div>

	<div class="inner_new_formCon_row">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
Пример #29
0
												<!-- Week Timetable -->
												<?php 
                if ($_REQUEST['mode'] == 1) {
                    $this->renderPartial('/weekdays/viewtable', array('course_id' => $course, 'batch_id' => $batch->id, 'mode' => $_REQUEST['mode']));
                } elseif ($_REQUEST['mode'] == 2) {
                    $this->renderPartial('/weekdays/viewtable', array('course_id' => $course, 'batch_id' => $batch->id, 'mode' => $_REQUEST['mode'], 'day' => $_REQUEST['day']));
                }
                ?>
												<!-- END Week Timetable -->
										<?php 
            }
            // END foreach($batches as $batch)
        }
        // END foreach($courses as $course)
    } else {
        $course = Courses::model()->findByAttributes(array('id' => $_REQUEST['cid']));
        //echo 'Individual Course - '.count($course).' : '.$course->course_name.'<br />';
        if ($_REQUEST['bid'] == 0) {
            //echo 'All Batches';
            $batches = Batches::model()->findAllByAttributes(array('course_id' => $course->id, 'is_active' => 1, 'is_deleted' => 0));
            foreach ($batches as $batch) {
                ?>
												<!-- Batch Details -->
												<div class="formCon"> 
													<div class="formConInner">
														<table style="text-align:center;">
															<tr>
																<td style="width:auto; min-width:200px;">
																	<?php 
                echo Yii::t('timetable', 'Course') . ' : ' . ucfirst($course->course_name);
                ?>
Пример #30
0
<hr>

<h4>Подписаться на треки</h4>

<?php 
$settings = new Settings();
$settings->findByPk(Yii::app()->my->id);
?>


	<?php 
$form = $this->beginWidget('CActiveForm');
?>

		<?php 
$list = CHtml::listData(Courses::model()->findAll(), 'id', 'title');
?>
	

		<?php 
echo $form->checkboxList($settings, 'courses', $list, array("multiple" => true));
?>

		<hr>	

		<button type="submit " class="btn btn-success ">Сохранить</button>

	<?php 
$this->endWidget();
?>