Added user session time validation in session about - Refs BT#12240

remotes/angel/1.11.x
José Loguercio 8 years ago
parent cb4445b645
commit aca450c326
  1. 9
      main/session/about.php
  2. 6
      main/template/default/session/about.tpl

@ -181,6 +181,15 @@ $template->assign(
true true
) )
); );
$template->assign(
'user_session_time',
SessionManager::getDayLeftInSession(
$session->getId(),
api_get_user_id(),
$session->getDuration()
)
);
$redirectToSession = api_get_configuration_value('allow_redirect_to_session_after_inscription_about'); $redirectToSession = api_get_configuration_value('allow_redirect_to_session_after_inscription_about');
$redirectToSession = $redirectToSession ? '?s=' . $sessionId : false; $redirectToSession = $redirectToSession ? '?s=' . $sessionId : false;

@ -46,10 +46,14 @@
</div> </div>
{% endif %} {% endif %}
{% if is_subscribed %} {% if is_subscribed and user_session_time != -0 %}
<div class="alert alert-info"> <div class="alert alert-info">
{{ 'AlreadyRegisteredToSession'|get_lang }} {{ 'AlreadyRegisteredToSession'|get_lang }}
</div> </div>
{% elseif is_subscribed and user_session_time < 1 %}
<div class="alert alert-warning">
{{ 'YourSessionTimeIsExpired'|get_lang }}
</div>
{% endif %} {% endif %}
{% for course_data in courses %} {% for course_data in courses %}

Loading…
Cancel
Save