فهرست منبع

Fixed bug where "Started" tests did not appear for tester.

Alan Lam 8 سال پیش
والد
کامیت
29a7985536
2فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 1 1
      engine/user.php
  2. 6 0
      views/test_list_assigned.php

+ 1 - 1
engine/user.php

@@ -369,7 +369,7 @@ class User extends Model {
 	public function getPendingTests() {
 		return Test::query([
 			"tester_id" => $this->id,
-			"status" => [Test::STATUS_ASSIGNED, Test::STATUS_CONFIRMED, Test::STATUS_PENDING_VERIFICATION],
+			"status" => [Test::STATUS_ASSIGNED, Test::STATUS_CONFIRMED, Test::STATUS_STARTED, Test::STATUS_PENDING_VERIFICATION],
 		], [
 			"sort" => "id",
 			"order" => "desc"

+ 6 - 0
views/test_list_assigned.php

@@ -28,6 +28,7 @@
 
 			$is_assigned = $test->status == Test::STATUS_ASSIGNED;
 			$is_confirmed = $test->status == Test::STATUS_CONFIRMED;
+			$is_started = $test->status == Test::STATUS_STARTED;
 			$is_unverified = $test->status == Test::STATUS_PENDING_VERIFICATION;
 
 			$status_text = $test->getStatusText();
@@ -63,6 +64,11 @@
 								<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>">Begin</a>
 								<?php
 							}
+							else if($is_started) {
+								?>
+								<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>">Continue</a>
+								<?php
+							}
 							else if($is_unverified) {
 								?>
 								<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>">Amend</a>