diff --git a/admin/adminTestResults.php b/admin/adminTestResults.php index 186029c..0c00253 100644 --- a/admin/adminTestResults.php +++ b/admin/adminTestResults.php @@ -15,8 +15,8 @@ require_once(BASE."include/distributions.php"); if ($_REQUEST['sub']) { - if (!($_SESSION['current']->hasPriv("admin")) && - !($_SESSION['current']->hasAppVersionModifyPermission($_REQUEST['iVersionId']))) + $oTest = new testData($_REQUEST['iTestingId']); + if (!($_SESSION['current']->hasAppVersionModifyPermission($oTest->iVersionId))) { errorpage("Insufficient privileges."); exit; @@ -54,36 +54,51 @@ if ($_REQUEST['sub']) { $oTest = new testData($_REQUEST['iTestingId']); } + $oVersion = new Version($oTest->iVersionId); + $oApp = new application($oVersion->iAppId); + $sVersionInfo = $oApp->sName." ".$oVersion->sName; if ($_REQUEST['sub'] == 'view') { switch($oTest->sQueued) { - case "new": - apidb_header("Submit new testing results"); - $_REQUEST['sTestedDate'] = date('Y-m-d H:i:s'); - break; case "true": - case "rejected": - apidb_header("Edit new testing results"); + apidb_header("Edit new testing results for ".$sVersionInfo); break; - case "False": - apidb_header("Edit testing results"); + case "rejected": + apidb_header("Edit rejected testing results for ".$sVersionInfo); + break; + case "false": + apidb_header("Edit testing results for ".$sVersionInfo); break; } echo '
',"\n"; // View Testing Details echo "\n"; -/* - //help - echo "
\n\n"; - echo "

This is the full view of the rejected application. \n"; - echo "You need to pick a category before submitting \n"; - echo "it into the database.\n"; - echo "

Click delete to remove the selected item from the queue. An email will automatically be sent to the\n"; - echo "submitter to let them know the item was deleted.

\n\n"; - echo "
\n\n"; -*/ + + //help + echo "
\n\n"; + switch($oTest->sQueued) + { + case "false": + echo "

This Testing result has already been verified and accepted int the database. \n"; + echo "You can edit the entry and the save it back to the database by clicking on save. \n"; + break; + case "true": + echo "

This Testing result has not yet been and accepted into the database. \n"; + echo "You can edit the entry and ether submit it into the database by clicking on Submit or you can reject it \n"; + echo "for further editing by the submitter by clicking on Reject. \n"; + break; + case "rejected": + echo "

This Testing result has been rejected and is awaiting further information from the submitter. \n"; + echo "You can edit the entry and ether submit it into the database by clicking on Submit or you can save it \n"; + echo "for further editing by the submitter by clicking on Save. \n"; + break; + } + echo "

Click delete to remove it entirly from the database. An email will automatically be sent to the\n"; + echo "submitter to let them know the item was deleted.

\n\n"; + echo "
\n\n"; + $oTest->OutputEditor(); echo 'Back'; @@ -94,7 +109,7 @@ if ($_REQUEST['sub']) switch($oTest->sQueued) { case "false": - echo ' ',"\n"; + echo ' ',"\n"; echo '',"\n"; break; case "true":