Documentation

CCourse::GetPermission

string
CCourse::GetPermission(
 int COURSE_ID
);

The GetPermission method returns the access permissions of a current user for the specified training course.

Parameters

ParameterDescription
COURSE_ID The course ID.

Return Values

The following values can be returned: "D" - deny, "R" - read, "W" - write, "X" - full access (write access and permission to edit other's permissions).

See Also

  • CCourse::SetPermission
  • CCourse::GetGroupPermissions

    Example

    
    <?
    $permission = CIBlock::GetPermission($id);
    if ($permission<"X")
        return false;
    ?>
  • © «Bitrix24», 2001-2024
    Up