Documentation

CCourse::SetPermission

CCourse::SetPermission(
 int COURSE_ID,
 array arPERMISSIONS
);

The SetPermission method sets the access permissions arPERMISSIONS to the training course identified by the COURSE_ID.

Parameters

ParameterDescription
COURSE_ID The course ID.
arPERMISSIONS The array in the format Array("group ID"=>"access permission", ....). Access permission can be one of the following:
  • D - deny;
  • R - read;
  • W - write;
  • X - full access (write access and permission to edit other's permissions for this course).

See Also

  • CCourse::GetPermission
  • CCourse::Update()

    Example

    
    <?
        CCourse::SetPermission($COURSE_ID, Array("2"=>"R", "3"=>"W"));
    ?>
  • © «Bitrix24», 2001-2024
    Up