Documentation

CTestAttempt::GetByID

CDBResult
CTestAttempt::GetByID(
 int ID
);

The GetByID method returns an attempt identified by the ID. The current user access permissions are respected.

Parameters

ParameterDescription
ID The attempt ID.

Return Values

The method returns an instance of the CDBResult object.

See Also

  • CDBResult
  • Attempt fields
  • CTestAttempt::GetList

    Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $ATTEMPT_ID = 590;
        
        $res = CTestAttempt::GetByID($ATTEMPT_ID);
    
        if ($arAttempt = $res->GetNext())
        {
            echo "Test name: ".$arAttempt["TEST_NAME"];
            echo "Date start: ".$arAttempt["DATE_START"];
        }
    }
    ?>
  • © «Bitrix24», 2001-2024
    Up