CCoursePackage::CCoursePackage
bool CCoursePackage::CCoursePackage( int COURSE_ID );
The class CCoursePackage constructor initializes the course to be exported.
Parameters
Parameter | Description |
---|---|
COURSE_ID | The course ID. |
Remarks
If an error occurs, the LAST_ERROR property will contain the error description.
See Also
Example
<? if (CModule::IncludeModule("learning")) { $COURSE_ID = 97; if (CCourse::GetPermission($COURSE_ID) >= 'W') { @set_time_limit(0); $package = new CCoursePackage($COURSE_ID); if (strlen($package->LAST_ERROR) > 0) { echo "Error: ".$package->LAST_ERROR; } else { $success = $package->CreatePackage($PACKAGE_DIR = "/upload/mypackage/"); if (!$success) echo "Error: ".$package->LAST_ERROR; else echo "Ok!"; } } } ?>
© «Bitrix24», 2001-2024