Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/cvetdv.ru/bitrix/components/bitrix/learning.student.certificates/ |
Upload File : |
<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); //Authorized? if (!$USER->IsAuthorized()) { $APPLICATION->AuthForm(GetMessage("LEARNING_NO_AUTHORIZE"), false, false, "N", false); return; } //Module if (!CModule::IncludeModule("learning")) { ShowError(GetMessage("LEARNING_MODULE_NOT_FOUND")); return; } //Params $arParams["TESTS_LIST_TEMPLATE"] = ( $arParams["TESTS_LIST_TEMPLATE"] <> '' ? htmlspecialcharsbx($arParams["TESTS_LIST_TEMPLATE"]) : "course/test_list.php?COURSE_ID=#COURSE_ID#" ); $arParams["COURSE_DETAIL_TEMPLATE"] = ( $arParams["COURSE_DETAIL_TEMPLATE"] <> '' ? htmlspecialcharsbx($arParams["COURSE_DETAIL_TEMPLATE"]): "course/index.php?COURSE_ID=#COURSE_ID#" ); $arResult = Array( "COURSES" => Array(), "CERTIFICATES" => Array(), ); //Certificates $rsCertificate = CCertification::GetList( Array("ID"=>"DESC"), Array( "STUDENT_ID"=>intval($USER->GetID()), "ACTIVE" => "Y" ) ); while ($arCertificate = $rsCertificate->GetNext()) $arResult["CERTIFICATES"][$arCertificate["COURSE_ID"]] = $arCertificate; //Courses $rsCourse = CCourse::GetList( Array("SORT" => "ASC"), Array( "ACTIVE" => "Y", "ACTIVE_DATE" => "Y", "SITE_ID" => LANG ) ); while ($arCourse = $rsCourse->GetNext()) { //Test list Url $arCourse["TESTS_LIST_URL"] = CComponentEngine::MakePathFromTemplate($arParams["TESTS_LIST_TEMPLATE"],Array("COURSE_ID" => $arCourse["ID"])); //Course Url $arCourse["COURSE_DETAIL_URL"] = CComponentEngine::MakePathFromTemplate($arParams["COURSE_DETAIL_TEMPLATE"], Array("COURSE_ID" => $arCourse["ID"])); $arCourse["COMPLETED"] = (array_key_exists($arCourse["ID"], $arResult["CERTIFICATES"])); if (!$arCourse["COMPLETED"]) { $testsCount = CTest::GetCount(array("COURSE_ID"=>$arCourse["ID"], "ACTIVE" => "Y", 'CHECK_PERMISSIONS' => 'N')); $arCourse["NO_TESTS"] = ($testsCount == 0); } // Resolve links "?COURSE_ID={SELF}". Don't relay on it, this behaviour // can be changed in future without any notifications. if (isset($arCourse['DETAIL_TEXT'])) { $arCourse['DETAIL_TEXT'] = CLearnHelper::PatchLessonContentLinks( $arCourse['DETAIL_TEXT'], $arCourse['ID'] ); } if (isset($arCourse['PREVIEW_TEXT'])) { $arCourse['PREVIEW_TEXT'] = CLearnHelper::PatchLessonContentLinks( $arCourse['PREVIEW_TEXT'], $arCourse['ID'] ); } $arResult["COURSES"][] = $arCourse; } unset($arCertificate); unset($arCourse); //Set Title $arParams["SET_TITLE"] = ($arParams["SET_TITLE"] == "N" ? "N" : "Y" ); if ($arParams["SET_TITLE"] == "Y") $APPLICATION->SetTitle(GetMessage("LEARNING_CERTIFICATES_TITLE")); $this->IncludeComponentTemplate(); ?>