Documentation

CCertification::Update

bool
CCertification::Update(
 int   ID,
 array arFields
);

The Update method modifies parameters of the specified certificate.

Parameters

ParameterDescription
ID The certificate ID.
arFields The array Array("field"=>"value", ...). Contains values of all certificate fields. Required fields must be present.

Return Values

The method returns true on successful update, or false otherwise. If an error occurs, the exception will contain the error description.

See Also

  • Fields
  • CCertification::Add
  • Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $CERTIFICATE_ID = 15;
    
        $arFields = Array(
            "ACTIVE" => "N",
            "SUMMARY" => 290,
            "MAX_SUMMARY" => 555
        );
    
        $certificate = new CCertification;
        $success =  $certificate->Update($CERTIFICATE_ID, $arFields);
    
        if($success)
        {
            echo "Ok!";
        }
        else
        {
            if($e = $APPLICATION->GetException())
                echo "Error: ".$e->GetString();
        }
    
    }
    ?>
    © «Bitrix24», 2001-2024