Documentation

CTestAttempt::AttemptFinished

bool
CTestAttempt::AttemptFinished(
 int ATTEMPT_ID
);

The AttemptFinished method moves an attempt to the Complete status and counts the score.

Parameters

ParameterDescription
ATTEMPT_ID The attempt ID.

Return Values

The method returns true on success, or false otherwise.

See Also

  • CTestAttempt::Update
  • Example

    
    
    if (CModule::IncludeModule("learning"))
    {
        $ATTEMPT_ID = 23;
        $oTestAttempt = new CTestAttempt;
        $success = $oTestAttempt->AttemptFinished($ATTEMPT_ID);
        if ($success)
            echo "Attempt has been finished";
        else
            echo "Error!";
    }
    © «Bitrix24», 2001-2024