• Модуль: learning
  • Путь к файлу: ~/bitrix/modules/learning/classes/general/clearnaccess.php
  • Класс: CLearnAccess
  • Вызов: CLearnAccess::GetLessonPermissions
public function GetLessonPermissions ($in_lessonId)
{
	global $DB;

	$lessonId = self::StrictlyCastToInteger($in_lessonId);

	$rc = $DB->Query(
		"SELECT LESSON_ID, SUBJECT_ID, TASK_ID 
		FROM b_learn_rights
		WHERE LESSON_ID = " . $lessonId . "
		");

	if ($rc === false)
	{
		throw new LearnException('EA_SQLERROR', 
			LearnException::EXC_ERR_ALL_GIVEUP 
			| LearnException::EXC_ERR_ALL_ACCESS_DENIED);
	}

	$arPermPairs = array();
	while ($row = $rc->Fetch())
		$arPermPairs[$row['SUBJECT_ID']] = (int) $row['TASK_ID'];

	return ($arPermPairs);
}