Bitrix Site Manager

CLQuestion::Delete

bool
CLQuestion::Delete(
 int ID
);

The Delete method deletes a question identified by the ID.

Parameters

ParameterDescription
ID The question ID.

Return Values

The method returns true on success, or false otherwise.

See Also

  • CLQuestion::Add

    Example

    
    <?
    if (CModule::IncludeModule("learning"))
    {
        $COURSE_ID = 97;
        $QUESTION_ID = 600;
    
        if (CCourse::GetPermission($COURSE_ID) >= 'W')
        {
            @set_time_limit(0);
            $DB->StartTransaction();
            if (!CLQuestion::Delete($QUESTION_ID))
            {
                echo "Error!";
                $DB->Rollback();
            }
            else
                $DB->Commit();
        }
    }
    ?>