8 function testData_queue($iTestId = null, $oRow = null)
10 $this->oTestData
= new testData($iTestId, $oRow);
11 $this->oDistribution
= new distribution($this->oTestData
->iDistributionId
);
16 if(!$this->oTestData
->iDistributionId
)
18 $this->oDistribution
->create();
19 $this->oTestData
->iDistributionId
= $this->oDistribution
->iDistributionId
;
22 return $this->oTestData
->create();
27 $bSuccess = $this->oTestData
->purge();
29 /* We delete the distribution if it has not been approved and is not associated
30 with any other testData. Otherwise we would have to have a distribution
31 queue for admins to clean up unused, queued entries */
32 $this->oDistribution
= new distribution($this->oDistribution
->iDistributionId
);
33 if(!sizeof($this->oDistribution
->aTestingIds
) &&
34 $this->oDistribution
->canEdit())
35 $this->oDistribution
->purge();
42 $bSuccess = $this->oTestData
->delete();
44 /* We delete the distribution if it has not been approved and is not associated
45 with any other testData. Otherwise we would have to have a distribution
46 queue for admins to clean up unused, queued entries */
47 $this->oDistribution
= new distribution($this->oDistribution
->iDistributionId
);
48 if(!sizeof($this->oDistribution
->aTestingIds
) &&
49 $this->oDistribution
->canEdit())
50 $this->oDistribution
->delete();
57 $this->oTestData
->reQueue();
59 $this->oDistribution
->reQueue();
64 $this->oTestData
->unQueue();
66 /* Avoid a misguiding message about the distribution being unqueued */
67 if($this->oDistribution
->objectGetState() != 'accepted')
68 $this->oDistribution
->unQueue();
73 $this->oTestData
->reject();
78 $this->oTestData
->update();
80 /* If the distribution was already un-queued the form for editing it would
81 not have been displayed and getOutputEditorValues() wouldn't have
82 retrieved a valid sName for the distribution. If sName isn't valid
83 we shouldn't update the distribution */
84 if($this->oDistribution
->sName
)
85 $this->oDistribution
->update();
88 function outputEditor()
90 $this->oTestData
->outputEditor();
92 /* If we are processing queued test results with a queued distribution,
93 we display some additional help here */
94 if($this->oDistribution
->iDistributionId
&&
95 $this->oDistribution
->objectGetState() != 'accepted' && $this->canEdit())
97 echo "The user submitted a new distribution, which will be un-queued ".
98 "together with the test data unless you select an existing one ".
99 "from the list above.";
102 /* If the testData is already associated with a distribution and the
103 distribution is un-queued, there is no need to display the
104 distribution form here */
105 if(!$this->oTestData
->iDistributionId
or
106 $this->oDistribution
->objectGetState() != 'accepted')
108 echo html_frame_start("New Distribution", "90%");
109 $this->oDistribution
->outputEditor();
110 echo html_frame_end();
114 function getOutputEditorValues($aClean)
116 $this->oTestData
->getOutputEditorValues($aClean);
117 $this->oDistribution
->getOutputEditorValues($aClean);
120 function checkOutputEditorInput($aClean)
122 return $this->oTestData
->checkOutputEditorInput($aClean);
125 function objectGetState()
127 return $this->oTestData
->objectGetState();
132 return $this->oTestData
->canEdit();
135 function mustBeQueued()
137 return $this->oTestData
->mustBeQueued();
140 function objectDisplayAddItemHelp()
142 $this->oTestData
->objectDisplayAddItemHelp();
145 public static function objectGetDefaultSort()
147 return testData
::objectGetDefaultSort();
150 function objectGetEntries($sState, $iRows = 0, $iStart = 0, $sOrderBy = "testingId", $bAscending = true)
152 return $this->oTestData
->objectGetEntries($sState, $iRows, $iStart, $sOrderBy, $bAscending);
155 function objectGetEntriesCount($sState)
157 return testData
::objectGetEntriesCount($sState);
160 function objectGetHeader()
162 return $this->oTestData
->objectGetHeader();
165 function objectGetTableRow()
167 return $this->oTestData
->objectGetTableRow();
170 function objectDisplayQueueProcessingHelp()
172 $oTest = new testData();
173 $oTest->objectDisplayQueueProcessingHelp();
176 function objectShowPreview()
178 return $this->oTestData
->objectShowPreview();
183 return $this->oTestData
->display();
186 function objectMakeUrl()
188 return $this->oTestData
->objectMakeUrl();
191 function objectMakeLink()
193 return $this->oTestData
->objectMakeLink();
196 function allowAnonymousSubmissions()
198 return testData
::allowAnonymousSubmissions();
201 function objectAllowPurgingRejected()
203 return $this->oTestData
->objectAllowPurgingRejected();
206 public function objectGetSubmitTime()
208 return $this->oTestData
->objectGetSubmitTime();
211 function objectGetItemsPerPage($sState = 'accepted')
213 return testData
::objectGetItemsPerPage($sState);
216 function objectGetId()
218 return $this->oTestData
->objectGetId();
221 function objectGetSubmitterId()
223 return $this->oTestData
->objectGetSubmitterId();
226 function objectGetChildren($bIncludeDeleted = false)
228 return $this->oTestData
->objectGetChildren($bIncludeDeleted);
231 function objectGetMailOptions($sAction, $bMailSubmitter, $bParentAction)
233 return $this->oTestData
->objectGetMailOptions($sAction, $bMailSubmitter, $bParentAction);
236 function objectGetMail($sAction, $bMailSubmitter, $bParentAction)
238 return $this->oTestData
->objectGetMail($sAction, $bMailSubmitter, $bParentAction);