int CGradeBook::Add( array arFields );
The Add method adds a new record to the grade book.
Parameter | Description |
---|---|
arFields | The array Array("field"=>"value", ...). Contains values of all the grade book fields. Required fields must be present. |
The method returns the ID of the new record on success, or false otherwise. If an error occurs, the exception will contain the error description.
<? if (CModule::IncludeModule("learning")) { $TEST_ID = 32; $STUDENT_ID = 3; $arFields = Array( "TEST_ID" => $TEST_ID, "STUDENT_ID" => $STUDENT_ID, "RESULT" => 300, "MAX_RESULT" => 300 ); $gradebook = new CGradeBook; $ID = $gradebook->Add($arFields); $success = ($ID>0); if($success) { echo "Ok!"; } else { if($e = $APPLICATION->GetException()) echo "Error: ".$e->GetString(); } } ?>
© 2001-2007 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |