Documentation

CCertification::Delete

bool
CCertification::Delete(
 int ID
);

The Delete method deletes the certificate specified by the ID.

Parameters

ParameterDescription
ID The certificate ID.

Return Values

The method returns true if the certificate has been successfully deleted, or false otherwise.

See Also

  • CCertification::Add
  • Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $COURSE_ID = 97;
        $CERTIFICATE_ID = 19;
    
        if (CCourse::GetPermission($COURSE_ID) >= 'W')
        {
            @set_time_limit(0);
            $DB->StartTransaction();
            if (!CCertification::Delete($CERTIFICATE_ID))
            {
                echo "Error!";
                $DB->Rollback();
            }
            else
                $DB->Commit();
        }
    }
    ?>
    © «Bitrix24», 2001-2024
    Up