Bitrix Site Manager

CLAnswer::Delete

bool
CLAnswer::Delete(
 int ID
);

The Delete method removes an answer identified by the ID.

Parameters

ParameterDescription
ID The answer ID.

Return Values

The method returns true on success, or false otherwise.

Example


<?
if (CModule::IncludeModule("learning"))
{
    $COURSE_ID = 97;
    $ANSWER_ID = 1553;

    if (CCourse::GetPermission($COURSE_ID) >= 'W')
    {
        @set_time_limit(0);
        $DB->StartTransaction();
        if (!CLAnswer::Delete($ANSWER_ID))
        {
            echo "Error!";
            $DB->Rollback();
        }
        else
            $DB->Commit();
    }
}
?>