Documentation

CGradeBook::Update

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

The Update method modifies the parameters of the specified grade book record.

Parameters

ParameterDescription
ID The grade book record ID.
arFields An array in the format Array("field"=>"value", ...). The array contains values of all the grade book 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

  • Grade book fields
  • CGradeBook::Add

    Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $RECORD_ID = 96;
    
        $arFields = Array(
            "RESULT" => 250,
            "MAX_RESULT" => 300
        );
    
        $gradebook = new CGradeBook;
        $success = $gradebook->Update($RECORD_ID, $arFields);
    
        if($success)
        {
            echo "Ok!";
        }
        else
        {
            if($e = $APPLICATION->GetException())
                echo "Error: ".$e->GetString();
        }
    }
    ?>
  • © «Bitrix24», 2001-2024
    Up