|
@@ -1,4 +1,4 @@
|
|
|
-<?php // $Id: group.php 20095 2009-04-24 22:24:33Z juliomontoya $
|
|
|
+<?php // $Id: group.php 20455 2009-05-10 16:31:12Z ivantcholakov $
|
|
|
|
|
|
/*
|
|
|
==============================================================================
|
|
@@ -222,6 +222,7 @@ echo '</div>';
|
|
|
*/
|
|
|
foreach ($group_cats as $index => $category)
|
|
|
{
|
|
|
+ global $charset;
|
|
|
$group_list = array ();
|
|
|
$in_category = false;
|
|
|
if (get_setting('allow_group_categories') == 'true')
|
|
@@ -242,7 +243,7 @@ foreach ($group_cats as $index => $category)
|
|
|
if (api_is_allowed_to_edit(false,true))
|
|
|
{
|
|
|
echo '<a href="group_category.php?'.api_get_cidreq().'&id='.$category['id'].'" title="'.get_lang('Edit').'"><img src="../img/edit.gif" alt="'.get_lang('Edit').'"/></a> ';
|
|
|
- echo '<a href="group.php?'.api_get_cidreq().'&action=delete_category&id='.$category['id'].'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice')))."'".')) return false;" title="'.get_lang('Delete').'"><img src="../img/delete.gif" alt="'.get_lang('Delete').'"/></a> ';
|
|
|
+ echo '<a href="group.php?'.api_get_cidreq().'&action=delete_category&id='.$category['id'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset))."'".')) return false;" title="'.get_lang('Delete').'"><img src="../img/delete.gif" alt="'.get_lang('Delete').'"/></a> ';
|
|
|
if ($index != 0)
|
|
|
{
|
|
|
echo ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$category['id'].'&id2='.$group_cats[$index -1]['id'].'"><img src="../img/up.gif" alt=""/></a>';
|
|
@@ -317,11 +318,11 @@ foreach ($group_cats as $index => $category)
|
|
|
{
|
|
|
if (GroupManager :: is_self_registration_allowed($_user['user_id'], $this_group['id']))
|
|
|
{
|
|
|
- $row[] = '<a href="group.php?'.api_get_cidreq().'&category='.$category['id'].'&action=self_reg&group_id='.$this_group['id'].'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice')))."'".')) return false;">'.get_lang('GroupSelfRegInf').'</a>';
|
|
|
+ $row[] = '<a href="group.php?'.api_get_cidreq().'&category='.$category['id'].'&action=self_reg&group_id='.$this_group['id'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset))."'".')) return false;">'.get_lang('GroupSelfRegInf').'</a>';
|
|
|
}
|
|
|
elseif (GroupManager :: is_self_unregistration_allowed($_user['user_id'], $this_group['id']))
|
|
|
{
|
|
|
- $row[] = '<a href="group.php?'.api_get_cidreq().'&category='.$category['id'].'&action=self_unreg&group_id='.$this_group['id'].'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice')))."'".')) return false;">'.get_lang('GroupSelfUnRegInf').'</a>';
|
|
|
+ $row[] = '<a href="group.php?'.api_get_cidreq().'&category='.$category['id'].'&action=self_unreg&group_id='.$this_group['id'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset))."'".')) return false;">'.get_lang('GroupSelfUnRegInf').'</a>';
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -356,15 +357,15 @@ foreach ($group_cats as $index => $category)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $tutor_info = substr($tutor_info,0,strlen($tutor_info)-2);
|
|
|
+ $tutor_info = api_substr($tutor_info,0,api_strlen($tutor_info)-2);
|
|
|
$row[] = $tutor_info;
|
|
|
// edit-links
|
|
|
if (api_is_allowed_to_edit(false,true) && !(api_is_course_coach() && intval($this_group['session_id'])!=intval($_SESSION['id_session'])))
|
|
|
{
|
|
|
$edit_actions = '<a href="group_edit.php?'.api_get_cidreq().'&gidReq='.$this_group['id'].'" title="'.get_lang('Edit').'"><img src="../img/edit.gif" alt="'.get_lang('Edit').'"/></a> ';
|
|
|
- $edit_actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&category='.$category['id'].'&action=delete_one&id='.$this_group['id'].'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice')))."'".')) return false;" title="'.get_lang('Delete').'"><img src="../img/delete.gif" alt="'.get_lang('Delete').'"/></a> ';
|
|
|
- $edit_actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&category='.$category['id'].'&action=empty_one&id='.$this_group['id'].'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice')))."'".')) return false;" title="'.get_lang('EmptyGroup').'"><img src="../img/clean_group.gif" alt="'.get_lang('EmptyGroup').'"/></a> ';
|
|
|
- $edit_actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&category='.$category['id'].'&action=fill_one&id='.$this_group['id'].'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice')))."'".')) return false;" title="'.get_lang('FillGroup').'"><img src="../img/fill_group.gif" alt="'.get_lang('FillGroup').'"/></a>';
|
|
|
+ $edit_actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&category='.$category['id'].'&action=delete_one&id='.$this_group['id'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset))."'".')) return false;" title="'.get_lang('Delete').'"><img src="../img/delete.gif" alt="'.get_lang('Delete').'"/></a> ';
|
|
|
+ $edit_actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&category='.$category['id'].'&action=empty_one&id='.$this_group['id'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset))."'".')) return false;" title="'.get_lang('EmptyGroup').'"><img src="../img/clean_group.gif" alt="'.get_lang('EmptyGroup').'"/></a> ';
|
|
|
+ $edit_actions .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&category='.$category['id'].'&action=fill_one&id='.$this_group['id'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset))."'".')) return false;" title="'.get_lang('FillGroup').'"><img src="../img/fill_group.gif" alt="'.get_lang('FillGroup').'"/></a>';
|
|
|
$row[] = $edit_actions;
|
|
|
}
|
|
|
if (!empty($this_group['nbMember'])) {
|