Bitrix Site Manager

CLesson::GetByID

CDBResult
CLesson::GetByID(
 int ID
);

The GetByID method returns a lesson identified by the ID. The current user access permissions are considered.

Parameters

ParameterDescription
ID The lesson ID.

Return Values

The method returns an instance of the CDBResult object.

See Also

  • CDBResult
  • Lesson fields
  • CLesson::GetList

    Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $LESSON_ID = 651;
        
        $res = CLesson::GetByID($LESSON_ID);
    
        if ($arLesson = $res->GetNext())
        {
            echo "Name: ".$arLesson["NAME"];
        }
    }
    ?>