Add setting to show pending survey link in user menu BT#14395

pull/2539/head
jmontoyaa 8 years ago
parent d9d7d6d010
commit 4473bd11ac
  1. 8
      main/inc/lib/template.lib.php
  2. 3
      main/install/configuration.dist.php
  3. 6
      main/template/default/layout/menu.tpl

@ -1541,8 +1541,14 @@ class Template
$this->assign('message_link', $message_link);
$this->assign('message_url', $message_url);
// Certificate Link
$pendingSurveyLink = '';
$show = api_get_configuration_value('show_pending_survey_in_menu');
if ($show) {
$pendingSurveyLink = api_get_path(WEB_CODE_PATH).'survey/pending.php';
}
$this->assign('pending_survey_url', $pendingSurveyLink);
// Certificate Link
$allow = api_get_configuration_value('hide_my_certificate_link');
if ($allow === false) {
$certificateUrl = api_get_path(WEB_CODE_PATH).'gradebook/my_certificates.php';

@ -858,6 +858,9 @@ VALUES (2, 13, 'session_courses_read_only_mode', 'Lock Course In Session', 1, 1,
// Hide gradebook "download report in PDF" button
// $_configuration['gradebook_hide_pdf_report_button'] = false;
// Show pending survey link in user menu
// $_configuration['show_pending_survey_in_menu'] = false;
// ------ Custom DB changes (keep this at the end)
// Add user activation by confirmation email
// This option prevents the new user to login in the platform if your account is not confirmed via email

@ -72,11 +72,15 @@
</a>
</li>
{% endif %}
{% if pending_survey_url %}
<li class="user-body">
<a href="{{ _p.web_main ~ 'survey/pending.php' }}">
<a href="{{ pending_survey_url }}">
<em class="fa fa-pie-chart"></em> {{ 'PendingSurveys'|get_lang }}
</a>
</li>
{% endif %}
{% if certificate_url %}
<li class="user-body">
<a title="{{ "MyCertificates"|get_lang }}" href="{{ certificate_url }}">

Loading…
Cancel
Save