Skip to content

Commit

Permalink
Merge pull request #335 from oat-sa/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
kilatib authored Oct 5, 2022
2 parents 1f162a6 + 90a4459 commit df61121
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/qtism/runtime/tests/AssessmentItemSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,11 @@ public function beginAttempt()
* @param State $responses (optional) A State composed by the candidate's responses to the item.
* @param bool $responseProcessing (optional) Whether to execute the responseProcessing or not.
* @param bool $forceLateSubmission (optional) Force the acceptance of late response submission. In this case, responses that are received out of the time frame indicated by the time limits in force are accepted anyway.
* @param bool $forceResponseSave (opional) Force save response even if it empty or validation required
* @throws AssessmentItemSessionException If the time limits in force are not respected, an error occurs during response processing, a state violation occurs.
* @throws PhpStorageException
*/
public function endAttempt(State $responses = null, $responseProcessing = true, $forceLateSubmission = false, $ignoreAllowSkippingCheck = false)
public function endAttempt(State $responses = null, $responseProcessing = true, $forceLateSubmission = false, $forceResponseSave = false)
{
// Flag to indicate if time is exceed or not.
$maxTimeExceeded = false;
Expand All @@ -792,8 +793,8 @@ public function endAttempt(State $responses = null, $responseProcessing = true,

// Apply the responses (if provided) to the current state.
if ($responses !== null) {
$this->checkResponseValidityConstraints($responses);
if (!$ignoreAllowSkippingCheck) {
if (!$forceResponseSave) {
$this->checkResponseValidityConstraints($responses);
$this->checkAllowSkipping($responses);
}
$this->mergeResponses($responses);
Expand Down

0 comments on commit df61121

Please sign in to comment.