[svn r16968] adding in groups the feature of portal configuration setting "show email address". If off: only teachers can see the email

skala
Juan Carlos Raña 17 years ago
parent cc5a36a209
commit 2db52e103a
  1. 11
      main/group/group.php
  2. 19
      main/group/group_space.php

@ -1,4 +1,4 @@
<?php // $Id: group.php 16873 2008-11-22 23:22:02Z herodoto $
<?php // $Id: group.php 16968 2008-11-26 22:28:32Z herodoto $
/*
==============================================================================
@ -324,7 +324,14 @@ foreach ($group_cats as $index => $category)
{
foreach($tutorsids_of_group as $tutor_id){
$tutor = api_get_user_info($tutor_id);
$tutor_info .= Display::encrypted_mailto_link($tutor['mail'],$tutor['firstName'].' '.$tutor['lastName']).', ';
if (api_get_setting("show_email_addresses") == "true")
{
$tutor_info .= Display::encrypted_mailto_link($tutor['mail'],$tutor['firstName'].' '.$tutor['lastName']).', ';
}
else
{
$tutor_info .= $tutor['firstName'].' '.$tutor['lastName'].', ';
}
}
}
$tutor_info = substr($tutor_info,0,strlen($tutor_info)-2);

@ -1,4 +1,4 @@
<?php //$Id: group_space.php 16962 2008-11-26 20:40:18Z yannoo $
<?php //$Id: group_space.php 16968 2008-11-26 22:28:32Z herodoto $
/*
==============================================================================
Dokeos - elearning and course management software
@ -277,8 +277,21 @@ $table->set_additional_parameters($parameters);
$table->set_header(0, '');
$table->set_header(1, get_lang('LastName'));
$table->set_header(2, get_lang('FirstName'));
$table->set_header(3, get_lang('Email'));
$table->set_column_filter(3, 'email_filter');
if (api_get_setting("show_email_addresses") == "true")
{
$table->set_header(3, get_lang('Email'));
$table->set_column_filter(3, 'email_filter');
}
else
{
if (api_is_allowed_to_edit())
{
$table->set_header(3, get_lang('Email'));
$table->set_column_filter(3, 'email_filter');
}
}
$table->set_column_filter(0, 'user_icon_filter');
$table->display();

Loading…
Cancel
Save