diff --git a/deploy/phpConfig/general.json b/deploy/phpConfig/general.json index 98ba1359bfbaedfffea653adac1891c688879b15..bdfbbb7f987f4a0fcdf87f499936eb4a26ea27a1 100644 --- a/deploy/phpConfig/general.json +++ b/deploy/phpConfig/general.json @@ -13,7 +13,8 @@ "StudentsCreation": false, "StudentsTransfer": false, "TeachersCreation": false, - "DisciplineCreation": false + "DisciplineCreation": false, + "FinalFormExport": true }, "HTTPS": false } diff --git a/~dev_rating/application/classes/Controller/Api/V0/FinalReport.php b/~dev_rating/application/classes/Controller/Api/V0/FinalReport.php index a4d4a47201ff865b1d042c98ac6be4df82ec27a4..07d04b455898a5cb407f4639eb68be5ff0a5a8fa 100644 --- a/~dev_rating/application/classes/Controller/Api/V0/FinalReport.php +++ b/~dev_rating/application/classes/Controller/Api/V0/FinalReport.php @@ -99,7 +99,7 @@ class Controller_Api_V0_FinalReport extends Controller_Handler_Api ]; } - if (!isset($emulate) and isset($groupnum)) { + if ($emulate === "false" and isset($groupnum)) { //$groupID = Model_Group::find($gradenum, $groupnum, $study_form, $faculty); //TODO: поменять логи, не записывать id дисциплины if (isset($disciplineID)) { @@ -111,8 +111,13 @@ class Controller_Api_V0_FinalReport extends Controller_Handler_Api // TODO: удалить лишние учебные планы от академиков правильным способом! array_splice($response, 1); + $exportAllowed = Model_System::loadConfig()->Functional->FinalFormExport; + if ($exportAllowed || $emulate === "true") { + return $response; + } else { + $this->badRequestError("Выгрузка ведомостей заблокирована"); + } - return $response; } catch (Exception $e) { $this->badRequestError($e->getMessage()); }