[svn r19800] icon improvement

correct feedback messages
actions consistency
actions icons
language improvements
breadcrumb consistency
form consistency
skala
Patrick Cool 16 years ago
parent 8286074205
commit 3b10fdba16
  1. 32
      main/group/group.php
  2. 13
      main/group/group_category.php
  3. 14
      main/group/group_creation.php
  4. 11
      main/group/group_edit.php
  5. 13
      main/group/group_overview.php
  6. 16
      main/group/group_space.php

@ -1,4 +1,4 @@
<?php // $Id: group.php 19694 2009-04-09 21:45:33Z ivantcholakov $
<?php // $Id: group.php 19800 2009-04-16 08:08:55Z pcool $
/*
==============================================================================
@ -105,18 +105,18 @@ if (isset ($_GET['action']))
if (GroupManager :: is_self_registration_allowed($_SESSION['_user']['user_id'], $_GET['group_id']))
{
GroupManager :: subscribe_users($_SESSION['_user']['user_id'], $_GET['group_id']);
Display :: display_normal_message(get_lang('GroupNowMember'));
Display :: display_confirmation_message(get_lang('GroupNowMember'));
}
break;
case 'self_unreg' :
if (GroupManager :: is_self_unregistration_allowed($_SESSION['_user']['user_id'], $_GET['group_id']))
{
GroupManager :: unsubscribe_users($_SESSION['_user']['user_id'], $_GET['group_id']);
Display :: display_normal_message(get_lang('StudentDeletesHimself'));
Display :: display_confirmation_message(get_lang('StudentDeletesHimself'));
}
break;
case 'show_msg' :
Display :: display_normal_message($_GET['msg']);
Display :: display_confirmation_message($_GET['msg']);
break;
}
}
@ -135,21 +135,21 @@ if (api_is_allowed_to_edit(false,true))
if( is_array($_POST['group']))
{
GroupManager :: delete_groups($_POST['group']);
Display :: display_normal_message(get_lang('SelectedGroupsDeleted'));
Display :: display_confirmation_message(get_lang('SelectedGroupsDeleted'));
}
break;
case 'empty_selected' :
if( is_array($_POST['group']))
{
GroupManager :: unsubscribe_all_users($_POST['group']);
Display :: display_normal_message(get_lang('SelectedGroupsEmptied'));
Display :: display_confirmation_message(get_lang('SelectedGroupsEmptied'));
}
break;
case 'fill_selected' :
if( is_array($_POST['group']))
{
GroupManager :: fill_groups($_POST['group']);
Display :: display_normal_message(get_lang('SelectedGroupsFilled'));
Display :: display_confirmation_message(get_lang('SelectedGroupsFilled'));
}
break;
}
@ -161,23 +161,23 @@ if (api_is_allowed_to_edit(false,true))
{
case 'swap_cat_order' :
GroupManager :: swap_category_order($_GET['id1'], $_GET['id2']);
Display :: display_normal_message(get_lang('CategoryOrderChanged'));
Display :: display_confirmation_message(get_lang('CategoryOrderChanged'));
break;
case 'delete_one' :
GroupManager :: delete_groups($_GET['id']);
Display :: display_normal_message(get_lang('GroupDel'));
Display :: display_confirmation_message(get_lang('GroupDel'));
break;
case 'empty_one' :
GroupManager :: unsubscribe_all_users($_GET['id']);
Display :: display_normal_message(get_lang('GroupEmptied'));
Display :: display_confirmation_message(get_lang('GroupEmptied'));
break;
case 'fill_one' :
GroupManager :: fill_groups($_GET['id']);
Display :: display_normal_message(get_lang('GroupFilledGroups'));
Display :: display_confirmation_message(get_lang('GroupFilledGroups'));
break;
case 'delete_category' :
GroupManager :: delete_category($_GET['id']);
Display :: display_normal_message(get_lang('CategoryDeleted'));
Display :: display_confirmation_message(get_lang('CategoryDeleted'));
break;
}
}
@ -198,13 +198,15 @@ if (api_is_allowed_to_edit(false,true))
//echo '<a href="group_category.php?'.api_get_cidreq().'&id=2">'.Display::return_icon('edit_group.gif').'&nbsp;'.get_lang('PropModify').'</a>&nbsp;';
echo Display::return_icon('settings.gif', get_lang('PropModify')) . '<a href="group_category.php?'.api_get_cidreq().'&id=2">'.get_lang('PropModify').'</a>&nbsp;';
}
echo Display::return_icon('csv.gif', get_lang('ExportAsCSV')).'<a href="group_overview.php?'.api_get_cidreq().'&action=export&type=csv">'.get_lang('ExportAsCSV').'</a> ';
echo Display::return_icon('excel.gif', get_lang('ExportAsXLS')).' <a href="group_overview.php?'.api_get_cidreq().'&action=export&type=xls">'.get_lang('ExportAsXLS').'</a>';
//echo '<a href="group_creation.php?'.api_get_cidreq().'">'.Display::return_icon('group_add_big.gif').'&nbsp;'.get_lang('NewGroupCreate').'</a>&nbsp;';
}
$group_cats = GroupManager :: get_categories();
if (get_setting('allow_group_categories') == 'true' && count($group_cats) > 1)
{
//echo '<p><a href="?'.api_get_cidreq().'&show_all=1">'.get_lang('ShowAll').'</a></p>';
echo '<a href="?'.api_get_cidreq().'&show_all=1">'.get_lang('ShowAll').'</a>';
echo Display::return_icon('group.gif').' <a href="?'.api_get_cidreq().'&show_all=1">'.get_lang('ShowAll').'</a>';
}
echo '</div>';
/*
@ -218,13 +220,13 @@ foreach ($group_cats as $index => $category)
{
if (isset ($_GET['show_all']) || (isset ($_GET['category']) && $_GET['category'] == $category['id']))
{
echo '<img src="../img/opendir.gif" alt=""/>';
echo '<img src="../img/shared_folder.gif" alt=""/>';
echo ' <a href="group.php?'.api_get_cidreq().'&origin='.$_GET['origin'].'">'.$category['title'].'</a>';
$in_category = true;
}
else
{
echo '<img src="../img/file.gif" alt=""/>';
echo '<img src="../img/folder_document.gif" alt=""/>';
echo ' <a href="group.php?'.api_get_cidreq().'&origin='.$_GET['origin'].'&amp;category='.$category['id'].'">'.$category['title'].'</a>';
}
$group_list = GroupManager :: get_group_list($category['id']);

@ -1,5 +1,5 @@
<?php
// $Id: group_category.php 19398 2009-03-27 22:18:21Z iflorespaz $
// $Id: group_category.php 19800 2009-04-16 08:08:55Z pcool $
/*
==============================================================================
Dokeos - elearning and course management software
@ -75,7 +75,7 @@ if (get_setting('allow_group_categories') == 'true')
if (isset ($_GET['id']))
{
$category = GroupManager :: get_category($_GET['id']);
$nameTools = get_lang('Edit').' '.$category['title'];
$nameTools = get_lang('EditGroupCategory').': '.$category['title'];
}
else
{
@ -89,7 +89,7 @@ else
$category = GroupManager :: get_category($_GET['id']);
$nameTools = get_lang('PropModify');
}
$interbreadcrumb[] = array ("url" => "group.php", "name" => get_lang('GroupManagement'));
$interbreadcrumb[] = array ("url" => "group.php", "name" => get_lang('Groups'));
// Build the form
if (isset ($_GET['id']))
{
@ -112,6 +112,8 @@ else
$action = 'add_category';
$form = new FormValidator('group_category');
}
$form->addElement('header', '', $nameTools);
// If categories allowed, show title & description field
if (get_setting('allow_group_categories') == 'true')
{
@ -139,7 +141,7 @@ $group[] = & $form->createElement('static', null, null, get_lang('QtyOfUserCanSu
$form->addGroup($group, 'limit_group', get_lang('GroupLimit'), ' ', false);
$form->addRule('limit_group',get_lang('MaxGroupsPerUserInvalid'),'callback','check_groups_per_user');
// Default settings for new groups
$form->addElement('header', null, get_lang('DefaultSettingsForNewGroups'));
$form->addElement('static', null, '<b>'.get_lang('DefaultSettingsForNewGroups').'</b>');
// Members per group
$form->addElement('radio', 'max_member_no_limit', get_lang('GroupLimit'), get_lang('NoLimit'),MEMBER_PER_GROUP_NO_LIMIT);
$group = array ();
@ -214,9 +216,6 @@ if ($form->validate())
}
// Else display the form
Display :: display_header($nameTools, "Group");
echo '<div class="actions-title">';
echo $nameTools;
echo '</div>';
$defaults = $category;
$defaults['action'] = $action;
if( $defaults['max_student'] == MEMBER_PER_GROUP_NO_LIMIT)

@ -106,11 +106,9 @@ if (isset ($_POST['action']))
}
}
$nameTools = get_lang('GroupCreation');
$interbreadcrumb[] = array ("url" => "group.php", "name" => get_lang('GroupManagement'));
$interbreadcrumb[] = array ("url" => "group.php", "name" => get_lang('Groups'));
Display :: display_header($nameTools, "Group");
echo '<div class="actions-title">';
echo $nameTools;
echo '</div>';
if (!is_allowed_to_edit())
{
api_not_allowed();
@ -217,7 +215,7 @@ elseif (isset ($_POST['number_of_groups']))
EOT;
$renderer->setElementTemplate($element_template);
$form->addElement('header', '', $nameTools);
$form->addElement('hidden', 'action');
$form->addElement('hidden', 'number_of_groups');
@ -272,11 +270,11 @@ else
* Show form to generate new groups
*/
$categories = GroupManager :: get_categories();
echo '<b>'.get_lang('NewGroups').'</b>';
echo '<blockquote>';
//echo '<blockquote>';
if (count($categories) > 1 || isset ($categories[0]) && $categories[0]['id'] != VIRTUAL_COURSE_CATEGORY)
{
$create_groups_form = new FormValidator('create_groups');
$create_groups_form->addElement('header', '', $nameTools);
$group_el = array ();
$group_el[] = & $create_groups_form->createElement('static', null, null, get_lang('Create'));
$group_el[] = & $create_groups_form->createElement('text', 'number_of_groups', null, array ('size' => 3));
@ -292,7 +290,7 @@ else
{
echo get_lang('NoCategoriesDefined');
}
echo '</blockquote>';
//echo '</blockquote>';
/*
* Show form to generate groups from virtual courses
*/

@ -63,7 +63,7 @@ $current_group = GroupManager :: get_group_properties($_SESSION['_gid']);
-----------------------------------------------------------
*/
$nameTools = get_lang('EditGroup');
$interbreadcrumb[] = array ("url" => "group.php", "name" => get_lang('GroupManagement'));
$interbreadcrumb[] = array ("url" => "group.php", "name" => get_lang('Groups'));
if (!api_is_allowed_to_edit(false,true)) {
api_not_allowed(true);
@ -123,6 +123,7 @@ function check_group_members($value) {
// Build form
$form = new FormValidator('group_edit');
$form->addElement('header', '', $nameTools);
$form->addElement('hidden', 'action');
$form->addElement('hidden', 'referer');
// Group name
@ -307,11 +308,11 @@ if (isset($_POST['group_members'])) {
}
}
Display :: display_header($nameTools, "Group");
echo '<div class="actions-title">';
echo $nameTools;
echo '</div>';
?>
<a href="group_space.php"><?php echo get_lang('GroupSpace') ?></a>
<div class="actions">
<a href="group_space.php"><?php echo Display::return_icon('back.png').get_lang('Back').' '.get_lang('To').' '.get_lang('GroupSpace') ?></a>
</div>
<br/>
<br/>
<?php

@ -1,4 +1,4 @@
<?php // $Id: group_overview.php 18162 2009-02-02 18:07:20Z herodoto $
<?php // $Id: group_overview.php 19800 2009-04-16 08:08:55Z pcool $
/*
==============================================================================
@ -97,10 +97,11 @@ if( isset($_GET['action']))
Header
-----------------------------------------------------------
*/
$interbreadcrumb[]=array("url" => "group.php","name" => get_lang('GroupManagement'));
$interbreadcrumb[]=array("url" => "group.php","name" => get_lang('Groups'));
if (!isset ($_GET['origin']) || $_GET['origin'] != 'learnpath')
{ //so we are not in learnpath tool
if (! $is_allowed_in_course) api_not_allowed(true);
if (!api_is_allowed_to_edit(false,true)) api_not_allowed(true);
else Display::display_header($nameTools,"Group");
}
else
@ -110,6 +111,14 @@ else
// action links
echo '<div class="actions">';
echo Display::return_icon('groupadd.gif', get_lang('NewGroupCreate')) . '<a href="group_creation.php?'.api_get_cidreq().'">'.get_lang('NewGroupCreate').'</a>';
echo Display::return_icon('group.gif', get_lang('Groups')) .'<a href="group.php?'.api_get_cidreq().'">'.get_lang('Groups').'</a>';
if (get_setting('allow_group_categories') == 'true') {
echo Display::return_icon('folder_new.gif', get_lang('AddCategory')) . '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'.get_lang('AddCategory').'</a>&nbsp;';
} else {
//echo '<a href="group_category.php?'.api_get_cidreq().'&id=2">'.Display::return_icon('edit_group.gif').'&nbsp;'.get_lang('PropModify').'</a>&nbsp;';
echo Display::return_icon('settings.gif', get_lang('PropModify')) . '<a href="group_category.php?'.api_get_cidreq().'&id=2">'.get_lang('PropModify').'</a>&nbsp;';
}
echo Display::return_icon('csv.gif', get_lang('ExportAsCSV')).'<a href="group_overview.php?'.api_get_cidreq().'&action=export&type=csv">'.get_lang('ExportAsCSV').'</a> ';
echo Display::return_icon('excel.gif', get_lang('ExportAsXLS')).' <a href="group_overview.php?'.api_get_cidreq().'&action=export&type=xls">'.get_lang('ExportAsXLS').'</a>';
echo '</div>';

@ -1,4 +1,4 @@
<?php //$Id: group_space.php 19694 2009-04-09 21:45:33Z ivantcholakov $
<?php //$Id: group_space.php 19800 2009-04-16 08:08:55Z pcool $
/*
==============================================================================
Dokeos - elearning and course management software
@ -89,7 +89,7 @@ if ($current_group['doc_state']!=1 and $current_group['calendar_state']!=1 and
Header
-----------------------------------------------------------
*/
Display::display_header($nameTools,"Group");
Display::display_header($nameTools.' '.stripslashes($current_group['name']),"Group");
/*
-----------------------------------------------------------
@ -123,27 +123,30 @@ if (!empty($_GET['selfUnReg']) && GroupManager :: is_self_unregistration_allowed
GroupManager :: unsubscribe_users($_SESSION['_user']['user_id'], $current_group['id']);
Display::display_normal_message(get_lang('StudentDeletesHimself'));
}
echo '<div class="actions">';
echo '<a href="group.php">'.Display::return_icon('back.png').get_lang('BackToGroupList').'</a>';
/*
* Edit the group
*/
if (api_is_allowed_to_edit(false,true) or GroupManager :: is_tutor($_user['user_id'])) {
isset($origin)?$my_origin = $origin:$my_origin='';
echo Display::return_icon('settings.gif', get_lang("EditGroup"))."<a href=\"group_edit.php?origin=$my_origin\">".get_lang("EditGroup")."</a><br/><br/>";
echo Display::return_icon('edit.gif', get_lang("EditGroup"))."<a href=\"group_edit.php?origin=$my_origin\">".get_lang("EditGroup")."</a>";
}
/*
* Register to group
*/
if (GroupManager :: is_self_registration_allowed($_SESSION['_user']['user_id'], $current_group['id'])) {
echo '<p align="right"><a href="'.api_get_self().'?selfReg=1&amp;group_id='.$current_group['id'].'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.get_lang("RegIntoGroup").'</a></p>';
echo '<a href="'.api_get_self().'?selfReg=1&amp;group_id='.$current_group['id'].'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('groupadd.gif').get_lang("RegIntoGroup").'</a>';
}
/*
* Unregister from group
*/
if (GroupManager :: is_self_unregistration_allowed($_SESSION['_user']['user_id'], $current_group['id'])) {
echo '<p align="right"><a href="'.api_get_self().'?selfUnReg=1" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.get_lang("StudentUnsubscribe").'</a></p>';
echo '<a href="'.api_get_self().'?selfUnReg=1" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('group_delete.gif').get_lang("StudentUnsubscribe").'</a>';
}
echo '&nbsp;</div>';
if( isset($_GET['action'])) {
switch( $_GET['action']) {
@ -163,7 +166,8 @@ $is_course_member = CourseManager :: is_user_subscribed_in_real_or_linked_course
/*
* Group title and comment
*/
api_display_tool_title($nameTools.' '.stripslashes($current_group['name']));
//api_display_tool_title($nameTools.' '.stripslashes($current_group['name']));
if (!empty($current_group['description'])) {
echo '<blockquote>'.stripslashes($current_group['description']).'</blockquote>';
}

Loading…
Cancel
Save