• Модуль: learning
  • Путь к файлу: ~/bitrix/modules/learning/classes/general/certification.php
  • Класс: CAllCertification
  • Вызов: CAllCertification::LessonIdByCertId
static function LessonIdByCertId ($certId)
{
	$rc = CCertification::GetByID($certId);
	if ($rc === false)
		throw new LearnException('', LearnException::EXC_ERR_ALL_GIVEUP);

	$row = $rc->Fetch();

	if ( ! isset($row['COURSE_ID']) )
		throw new LearnException('', LearnException::EXC_ERR_ALL_GIVEUP);

	$lessonId = CCourse::CourseGetLinkedLesson($row['COURSE_ID']);

	if ($lessonId === false)
		throw new LearnException('', LearnException::EXC_ERR_ALL_GIVEUP);

	return ($lessonId);
}