diff --git a/~dev_rating/application/classes/Controller/Authentication.php b/~dev_rating/application/classes/Controller/Authentication.php index ab75df8e92b6a66ca46760a8fae31faf59e64295..54e5fcbe0df7555db31027968f4177d806e76528 100644 --- a/~dev_rating/application/classes/Controller/Authentication.php +++ b/~dev_rating/application/classes/Controller/Authentication.php @@ -13,16 +13,10 @@ class Controller_Authentication extends Controller { } } } - - public function action_sign() - { - if(!User::instance()->isSignedIn()) - { - $type = $this->request->param('type'); - if(empty($type)) $type = 'in'; - $twig = Twig::factory('sign/'.$type); - $fp = fopen(APPPATH.'updates.txt', 'r'); + + protected function getUpdates() { + $fp = fopen(APPPATH.'updates.txt', 'r'); $updates['Date'] = fgets($fp, 999); $updates['Text'] = '<ol>'; if ($fp) @@ -32,9 +26,19 @@ class Controller_Authentication extends Controller { $updates['Text'] = $updates['Text'].'<li>'.fgets($fp, 999).'</li>'; } } - $updates['Text'] = $updates['Text'].'</ol>'; - $twig->Updates = $updates; + return $updates; + } + + public function action_sign() + { + if(!User::instance()->isSignedIn()) + { + $type = $this->request->param('type'); + if(empty($type)) $type = 'in'; + $twig = Twig::factory('sign/'.$type); + + $twig->Updates = self::getUpdates(); $this->response->body($twig); } } @@ -43,18 +47,8 @@ class Controller_Authentication extends Controller { { if(!User::instance()->isSignedIn()) { - $t = '<ol>'; - $fp = fopen(APPPATH.'updates.txt', 'r'); - if ($fp) - { - while (!feof($fp)) - { - $t = $t.'<li>'.fgets($fp, 999).'</li>'; - } - } - $twig = Twig::factory('sign/remindpass'); - $twig->Updates = $t.'</ol>'; + $twig->Updates = $twig->Updates = self::getUpdates(); $this->response->body($twig); } } @@ -67,18 +61,8 @@ class Controller_Authentication extends Controller { 'Сожалеем, но данная ссылка для восстановления пароля более недействительна!'); if(!User::instance()->isSignedIn()) { - $t = '<ol>'; - $fp = fopen(APPPATH.'updates.txt', 'r'); - if ($fp) - { - while (!feof($fp)) - { - $t = $t.'<li>'.fgets($fp, 999).'</li>'; - } - } - $twig = Twig::factory('sign/changepass'); - $twig->Updates = $t.'</ol>'; + $twig->Updates = self::getUpdates(); $twig->Token = $token; $this->response->body($twig); } diff --git a/~dev_rating/application/views/email/recovery.twig b/~dev_rating/application/views/email/recovery.twig index 4d86d18c0f9caae7e9c1c892d96e6d620e25221a..ac71921c262c79ab8d4197221e29bad189a75bdb 100644 --- a/~dev_rating/application/views/email/recovery.twig +++ b/~dev_rating/application/views/email/recovery.twig @@ -9,7 +9,7 @@ Если это были Вы, то для завершения процедуры смены пароля пройдите по ссылке, указаной ниже: </p> <br> - <a href="http://rating.mmcs.sfedu.ru/remind/{{ Token }}">http://rating.mmcs.sfedu.ru/remind/{{ Token }}</a> + <a href="{{ curl }}/remind/{{ Token }}">http://rating.mmcs.sfedu.ru/remind/{{ Token }}</a> <br> <p> Данная ссылка работоспособна в течение одного часа. diff --git a/~dev_rating/application/views/teacher/discipline/EditStructure.twig b/~dev_rating/application/views/teacher/discipline/EditStructure.twig index d9a86fc23288fa007153081b777e5ef82bf435ea..9d7ea57eb96618c55808c43c8881ed2421101c1c 100644 --- a/~dev_rating/application/views/teacher/discipline/EditStructure.twig +++ b/~dev_rating/application/views/teacher/discipline/EditStructure.twig @@ -3,10 +3,15 @@ {% set step_2 = 'active' %} {% block discipline_media %} - {{ HTML.script('media/js/discipline/EditStructure.js')|raw }} + {% if Discipline.isLocked != 1 %} + {{ HTML.script('media/js/discipline/EditStructure.js')|raw }} + {% else %} + {{ HTML.script('media/js/discipline/EditStructureLocked.js')|raw }} + {% endif %} {% endblock %} {% block map_content %} + <p class="notification" style="display: none;">{{ Discipline.SemesterNum }} семестр {{ Discipline.SemesterYear }}/{{ Discipline.SemesterYear + 1 }} учебного года</p> <div class="rateIndicatorDIV"> Количество баллов: <span class="rateIndicator">{{ Map.MaxRate }}</span>{% if Map.isSetBonus == true %} + 10 бонусных баллов{% endif %} @@ -25,7 +30,7 @@ <div class="moduleGroup" id="{{ Map[i].ModuleID }}"> <div class="moduleHead"> <div class="name"> - <input type="text" class="inputName moduleName" placeholder="Наименование модуля" value="{{ Map[i].ModuleTitle }}" > + <input type="text" class="inputName moduleName" placeholder="Наименование модуля" value="{{ Map[i].ModuleTitle }}"> </div> <div class="currentControl">{{ Map[i].CurrentControl }}</div> <div class="landmarkControl">{{ Map[i].LandmarkControl }}</div> diff --git a/~dev_rating/modules/account/classes/Kohana/Account.php b/~dev_rating/modules/account/classes/Kohana/Account.php index 0e0ae81a542c1b94a0704037e0864a2d829ea4a7..2100a3726117f5bed267b0ff4f4c64730ebebf51 100644 --- a/~dev_rating/modules/account/classes/Kohana/Account.php +++ b/~dev_rating/modules/account/classes/Kohana/Account.php @@ -134,6 +134,7 @@ class Kohana_Account { $this->_model->createRecoveryToken($email, $requestToken); $subject = ASSEMBLY_SYSTEM_NAME.": Восстановление пароля"; $twig = Twig::factory('email/recovery'); + $twig->curl = URL::base(TRUE, 'https'); $twig->Token = $requestToken; $twig->EMail = $email; $twig->Subject = $subject;