public function actionIntroduce() { if (empty(Yii::app()->user->id) or WCourseTrainee::checkRegister(intval($_REQUEST['course_id'])) != 1) { $this->redirect(Yii::app()->createUrl('')); } $test_id = isset($_GET['test_id']) ? $_GET['test_id'] : ''; $course_id = isset($_GET['course_id']) ? $_GET['course_id'] : ''; $lecture_id = isset($_GET['lecture_id']) ? $_GET['lecture_id'] : ''; $kind = isset($_GET['kind']) ? $_GET['kind'] : ''; $data = WTestParent::model()->find('id=:id', array(':id' => $test_id)); $this->render('introduce', array('data' => $data, 'course_id' => $course_id, 'lecture_id' => $lecture_id, 'kind' => $kind)); }
?> <span class="start">Start</span> <?php break; case 5: ?> <span class="complete">Complete</span> <?php break; } ?> </span> </p>--> <?php $checkResgiter = WCourseTrainee::checkRegister($item["id"]); if (empty($checkResgiter)) { ?> <p><button courseId="<?php echo $item['id']; ?> " class="btn btn-danger btn-sm btn_desgin btn_reject" onclick="return RegisterCourse(this);"><?php echo Yii::t('web/home', 'Register Course'); ?> </button> </p> <?php } else { ?> <div class="alert alert-success" style="background-image: none; border: 1px solid #d6e9c6; width: 200px; padding: 3px 20px; color: #3c763d" role="alert"><?php echo Yii::t('web/home', 'Register Pending'); ?>
} ?> </td> </tr> <tr> <td class="tbl_td_left"><?php echo Yii::t('web/home', 'Status'); ?> </td> <td> <?php // thoi gian chua bat dau if (time() > strtotime($item['start_date'])) { // Check user co trong khoa hoc nay khog ? if (WCourseTrainee::checkRegister(intval($_REQUEST['id'])) == 1) { //truong hop ton tai pre-test if (!empty($item["pre_test_id"])) { //chua lam bai test $checkEmptyTEst = WTestParent::model()->find("id=" . $item["pre_test_id"]); if (!empty($checkEmptyTEst)) { if (WUserTest::checkTestStatus($item["course_id"], $item["lecture_id"], $item["pre_test_id"], Yii::app()->user->id, 1) == FALSE) { if (time() > strtotime($item['end_date'])) { echo "<span class='label label-default'>" . Yii::t('web/home', 'Not Finish') . "</span>"; } else { echo "<span style=\"color: #ff6714\">" . Yii::t('web/home', 'Waiting for Pre-test') . "</span> - <a href='" . $url . "'>" . Yii::t('web/home', 'Do Pre-Testing now') . "</a>"; } } else { //Da lam bai test //Chua hoan thanh bai giang if (WTrainingLog::getStatusLearnLecture('r=wlecture/LectureView&course_lecture_id=' . $item['id']) == FALSE) {