Documentation

CCourse::GetByID

CDBResult
CCourse::GetByID(
 int ID
);

The GetByID method returns fields of the specified course. The current user access permissions are respected.

Parameters

ParameterDescription
ID The course ID.

Return Values

The method returns an instance of the CDBResult object.

See Also

  • CDBResult
  • Course fields
  • CCourse::GetList
  • Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $course = CCourse::GetByID($COURSE_ID);
        if ($arCourse = $course->GetNext())
        {
            echo $arCourse["NAME"];
        }
    }
    ?>
    © «Bitrix24», 2001-2024