• Модуль: learning
  • Путь к файлу: ~/bitrix/modules/learning/classes/general/clearnpath.php
  • Класс: CLearnPath
  • Вызов: CLearnPath::GetPathAsHumanReadableString
public function GetPathAsHumanReadableString($delimiter = ' / ', $pattern = '#NAME#')
{
	$arHumanReadablePath = array();
	foreach ($this->arPath as $lessonId)
	{
		$rc = CLearnLesson::GetByID($lessonId);
		$rc = $rc->Fetch();
		$id   = '???';
		$name = '???';
		if (isset($rc['LESSON_ID']))
			$id = $rc['LESSON_ID'];

		if (isset($rc['NAME']))
			$name = htmlspecialcharsbx($rc['NAME']);

		$txt = $pattern;
		$txt = str_replace('#LESSON_ID#', $id, $txt);
		$txt = str_replace('#NAME#', $name, $txt);

		$arHumanReadablePath[] = $txt;
	}

	return (implode($delimiter, $arHumanReadablePath));
}