Documentation

CTest::GetByID

CDBResult
CTest::GetByID(
 int ID
);

The GetByID method returns a specified test record. The current user access permissions are respected.

Parameters

ParameterDescription
ID The test ID.

Return Values

The method returns an instance of the CDBResult object.

See Also

  • CDBResult
  • Test fields
  • CTest::GetList

    Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $TEST_ID = 32;
        
        $res = CTest::GetByID($TEST_ID);
    
        if ($arTest = $res->GetNext())
        {
            echo "Test name: ".$arTest["NAME"];
        }
    }
    ?>
  • © «Bitrix24», 2001-2024
    Up