CLesson::Delete
bool CLesson::Delete( int ID );
The Delete method deletes a lesson identified by the ID.
Parameters
Parameter | Description |
---|---|
ID | The lesson ID. |
Return Values
The method returns true on success, or false otherwise.
Example
<? if (CModule::IncludeModule("learning")) { $COURSE_ID = 97; $LESSON_ID = 732; if (CCourse::GetPermission($COURSE_ID) >= 'W') { @set_time_limit(0); $DB->StartTransaction(); if (!CLesson::Delete($LESSON_ID)) { echo "Error!"; $DB->Rollback(); } else $DB->Commit(); } } ?>
© «Bitrix24», 2001-2024