Explorar el Código

Adds accept/decline buttons for assigned tests.

Alan Lam hace 8 años
padre
commit
0d3beb4eab
Se han modificado 1 ficheros con 12 adiciones y 0 borrados
  1. 12 0
      views/test_list_assigned.php

+ 12 - 0
views/test_list_assigned.php

@@ -27,7 +27,19 @@
 						<?=htmlspecialchars($location->getDisplayAddress())?>
 					</div>
 					<div class="col-auto align-self-center">
+					<?php
+					if($test->status == Test::STATUS_ASSIGNED) {
+						?>
+						<a class="btn btn-outline-success" href="/account/tests/<?=$test->id?>/accept">Accept</a>
+						<a class="btn btn-outline-danger" href="/account/tests/<?=$test->id?>/decline">Decline</a>
+						<?php
+					}
+					else {
+						?>
 						<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>" title="Begin" data-toggle="tooltip">Begin</a>
+						<?php
+					}
+					?>
 					</div>
 				</div>
 			</div>