• Модуль: learning
  • Путь к файлу: ~/bitrix/modules/learning/classes/general/student.php
  • Класс: CStudent
  • Вызов: CStudent::Add
static function Add($arFields)
{
	global $DB;

	if(CStudent::CheckFields($arFields))
	{
		CLearnHelper::FireEvent('OnBeforeStudentAdd', $arFields);

		$arInsert = $DB->PrepareInsert("b_learn_student", $arFields, "learning");

		if ($arInsert[0] == '' || $arInsert[0] == '')
			return false;

		$strSql =
			"INSERT INTO b_learn_student(".$arInsert[0].") ".
			"VALUES(".$arInsert[1].")";

		if(!$DB->Query($strSql, false, "File: ".__FILE__."
Line: ".__LINE__)) return false; CLearnHelper::FireEvent('OnAfterStudentAdd', $arFields); return $arFields["USER_ID"]; } return false; }