• Модуль: learning
  • Путь к файлу: ~/bitrix/modules/learning/classes/general/export.php
  • Класс: CCoursePackage
  • Вызов: CCoursePackage::_GetCourseContent
function _GetCourseContent($parentLessonId, $DEPTH_LEVEL = 1)
{
	global $DB;

	$res = CLearnLesson::GetListOfImmediateChilds (
		$parentLessonId, 
		array(	 	// order
			'EDGE_SORT' => 'asc'
			)
		);

	while ($arRes= $res->Fetch())
	{
		$arRes['ID'] = $arRes['LESSON_ID'];		// for compatibility

		if ($arRes['IS_CHILDS'] == '1')
			$itemType = 'CHA';
		else
			$itemType = 'LES';

		if (CLearnLesson::IsPublishProhibited($arRes['LESSON_ID'], $parentLessonId))
			$arRes['META_PUBLISH_PROHIBITED'] = 'Y';
		else
			$arRes['META_PUBLISH_PROHIBITED'] = 'N';

		$r = ++$this->RefID;
		$this->arItems[$r] = $this->_CreateContent($itemType, $arRes, $r);
		$this->strItems .= ''.htmlspecialcharsbx($arRes["NAME"]).'';
		$this->strResourses  .= ''.$this->_GetResourceFiles($r).'';

		$this->createQuestionItems($arRes["ID"]);

		// Load content recursively for chapters
		if ($arRes['IS_CHILDS'] == '1')
			$this->_GetCourseContent($arRes["ID"], $DEPTH_LEVEL+1);

		$this->strItems .= "";
	}
}