public function actionLoadTestResult() { self::CheckLogin(); $page = $_REQUEST["page"]; $course_id = isset($_REQUEST["course_id"]) ? $_REQUEST["course_id"] : NULL; $test_kind = isset($_REQUEST["test_kind"]) ? $_REQUEST["test_kind"] : NULL; $test_success = isset($_REQUEST["test_success"]) ? $_REQUEST["test_success"] : NULL; $results = WUserTest::GetAllTest(10, $page - 1, $course_id, NULL, NULL, $test_kind, "", $test_success); $data = $this->renderPartial("blocks/_result", array('data' => $results), true); echo json_encode(array("result" => "true", "html" => $data)); }
<?php $data = WUserTest::GetAllTest(10, 0, $course_id, NULL, NULL, $test_kind, "", $test_success); $total = WUserTest::getTotalPages(10, 0, $course_id, NULL, NULL, $test_kind, "", $test_success); $page = ceil($total / 10); ?> <table class="table table-hover"> <thead class="first_thead"> <tr> <th class="col-md-2">Học viên</th> <th>Bài kiểm tra</th> <th class="col-md-1">Trạng thái</th> <th class="col-md-3"><center>Kết quả</center></th> <th><center>Điểm</center></th> <th>Làm xong bài</th> <th></th> </tr> </thead> <tbody class="last_desgin" id="content_data"> <?php if (!empty($data)) { ?> <?php foreach ($data as $item) { ?> <tr id="row_testresult_<?php echo $item["id"]; ?> "> <td > <strong><?php