Exemple #1
0
 // khong co pre test
 if (time() > strtotime($item['end_date'])) {
     echo "<span class='label label-default'>" . Yii::t('web/home', 'Not Finish') . "</span>";
 } else {
     if (WTrainingLog::getStatusLearnLecture('r=wlecture/LectureView&course_lecture_id=' . $item['id']) == FALSE) {
         if (time() > strtotime($item['end_date'])) {
             echo "<span class='label label-default'>" . Yii::t('web/home', 'Not Finish') . "</span>";
         } else {
             echo '<a href="' . $url . '"><span class="label label-info">' . Yii::t('web/home', 'Studying') . '...</span></a>';
         }
     } else {
         //Hoan thanh bai giang
         //Co bai Pos test
         if (!empty($item["test_id"])) {
             //Kiem tra lam bai pos test hay chua
             if (WUserTest::checkTestStatus($item["course_id"], $item["lecture_id"], $item["test_id"], Yii::app()->user->id, 0) == 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 Post-test') . "</span> - <a href='" . $url . "'>" . Yii::t('web/home', 'Do Post-Testing now') . "</a>";
                 }
             } else {
                 // Ket qua
                 if (time() > strtotime($item['end_date'])) {
                     echo Yii::t('web/home', 'Finish') . " - " . '<a href="' . $url . '"><img src="' . Yii::app()->theme->baseUrl . '/img/complete.png" style="margin-right: 5px; border: 0px" /><span style="color: #3ab54a">' . Yii::t('web/home', 'Completed') . '</span></a>';
                 } else {
                     echo '<a href="' . $url . '"><img src="' . Yii::app()->theme->baseUrl . '/img/complete.png" style="margin-right: 5px; border: 0px" /><span style="color: #3ab54a">' . Yii::t('web/home', 'Completed') . '</span></a>';
                 }
             }
         } else {
             //Khong co bai Pos Test