bool CCoursePackage::CCoursePackage( int COURSE_ID );
The class CCoursePackage constructor initializes the course to be exported.
| Parameter | Description |
|---|---|
| COURSE_ID | The course ID. |
If an error occurs, the LAST_ERROR property will contain the error description.
<?
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!";
}
}
}
?>| © 2001-2007 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |