skala
rrodriguez 16 years ago
parent f55ba251dc
commit eab6418cc7
  1. 2
      main/admin/user_export.php
  2. 8612
      main/css/chamilo/default.css
  3. 46
      main/group/group_edit.php
  4. 7
      main/inc/banner.inc.php
  5. 28
      main/inc/header.inc.php
  6. 7
      main/user/user.php

@ -78,7 +78,7 @@ $form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'XML','xml')
$form->addElement('radio', 'file_type', null, 'CSV','csv');
$form->addElement('checkbox', 'addcsvheader', get_lang('AddCSVHeader'), get_lang('YesAddCSVHeader'),'1');
$form->addElement('select', 'course_code', get_lang('OnlyUsersFromCourse'), $courses);
$form->addElement('style_submit_button', 'submit',get_lang('Ok'),'class="save"');
$form->addElement('style_submit_button', 'submit',get_lang('Export'),'class="save"');
$form->setDefaults(array('file_type'=>'csv'));
if ($form->validate())

File diff suppressed because it is too large Load Diff

@ -40,6 +40,21 @@ if (!api_is_allowed_to_edit(false,true)) {
/* FUNCTIONS */
/**
* List all users registered to the course
*/
function search_members_keyword($firstname, $lastname, $username, $official_code, $keyword) {
if (api_strripos($firstname, $keyword) !== false || api_strripos($lastname, $keyword) !== false || api_strripos($username, $keyword) !== false || api_strripos($official_code, $keyword) !== false) {
var_dump($firstname);
echo 'aaaaa111111';
return true;
} else {
return false;
}
}
/**
* function to sort users after getting the list in the db. Necessary because there are 2 or 3 queries. Called by usort()
*/
@ -170,15 +185,41 @@ $form->addElement('radio', 'chat_state', get_lang('Chat'), get_lang('NotAvailabl
$form->addElement('radio', 'chat_state', null, get_lang('Public'), TOOL_PUBLIC);
$form->addElement('radio', 'chat_state', null, get_lang('Private'), TOOL_PRIVATE);
// Search Members of group
//$form = new FormValidator('search_member', 'get', 'group_edit', '', null, false);
//$renderer = & $form->defaultRenderer();
//$renderer->setElementTemplate('<span>{element}</span> ');
$form->add_textfield('keyword', get_lang('SearchMembersOfGroup'), false);
$form->addElement('style_submit_button', 'submit', get_lang('SearchButton'), 'class="search"');
// Getting all the users
if (isset($_SESSION['id_session'])) {
$complete_user_list = CourseManager :: get_user_list_from_course_code($_course['id'], true, $_SESSION['id_session']);
$complete_user_list2 = CourseManager :: get_coach_list_from_course_code($_course['id'], $_SESSION['id_session']);
$complete_user_list = array_merge($complete_user_list, $complete_user_list2);
} else {
$complete_user_list = CourseManager :: get_user_list_from_course_code($_course['id']);
}
foreach ($complete_user_list as $user_id => $o_course_user) {
if ((isset ($_GET['keyword']) && search_members_keyword($o_course_user['firstname'], $o_course_user['lastname'], $o_course_user['username'], $o_course_user['official_code'], $_GET['keyword'])) || !isset($_GET['keyword']) || empty($_GET['keyword'])) {
$groups_name = GroupManager :: get_user_group_name($user_id);
if ($is_western_name_order) {
$temp[] = $o_course_user['firstname'];
$temp[] = $o_course_user['lastname'];
} else {
$temp[] = $o_course_user['lastname'];
$temp[] = $o_course_user['firstname'];
}
$temp[] = $o_course_user['role'];
$temp[] = implode(', ', $groups_name); //Group
$temp[] = $o_course_user['official_code'];
}
}
usort($complete_user_list, 'sort_users');
$possible_users = array();
@ -293,6 +334,11 @@ if (isset($_POST['group_members'])) {
}
}
if (!empty($_GET['keyword']) && !empty($_GET['submit'])) {
$keyword_name = Security::remove_XSS($_GET['keyword']);
echo '<br/>'.get_lang('SearchResultsFor').' <span style="font-style: italic ;"> '.$keyword_name.' </span><br>';
}
Display :: display_header($nameTools, 'Group');
?>

@ -144,6 +144,7 @@ if (api_get_setting('show_link_bug_notification') == 'true') { ?>
<?php
}
if (api_is_allowed_to_edit()) {
if (!empty($help)) {
echo '<li>';
@ -152,10 +153,11 @@ if (api_is_allowed_to_edit()) {
echo '|';
}
//echo get_lang('Help');
?>
?> <?php /*
<a href="#" onclick="javascript: MyWindow=window.open('<?php echo api_get_path(WEB_CODE_PATH).'help/help.php'; ?>?open=<?php echo $help; ?>','MyWindow','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=620,height=600,left=200,top=20'); return false;">
<img src="<?php echo api_get_path(WEB_IMG_PATH); ?>help.png" style="vertical-align: middle;" title="<?php echo get_lang('Help'); ?>" alt="<?php echo get_lang('Help'); ?>"/></a>
<?php
*/?>
<?php
echo "</li>";
}
}
@ -469,6 +471,7 @@ if (!empty($header_hide_main_div) && $header_hide_main_div === true) {
//do nothing
} else {
?>
<div id="main"> <!-- start of #main wrapper for #content and #menu divs -->
<?php
}

@ -78,7 +78,7 @@ if ($show_learn_path) {
$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CSS_PATH).$my_style.'/learnpath.css"/>';
$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="dtree.css" />'; //will be moved
$htmlHeadXtra[] = '<script src="dtree.js" type="text/javascript"></script>'; //will be moved
}
}
echo '@import "'.api_get_path(WEB_CSS_PATH).$my_style.'/default.css";'."\n";
echo '@import "'.api_get_path(WEB_CSS_PATH).$my_style.'/course.css";'."\n";
@ -98,7 +98,9 @@ if ($navigator_info['name']=='Internet Explorer' && $navigator_info['version']=
?>
/*]]>*/
</style>
<script src="<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/jquery.js" type="text/javascript" ></script>
<script src="<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/thickbox.js" type="text/javascript" ></script>
<link rel="stylesheet" href="<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/thickbox.css" type="text/css" />
<link rel="top" href="<?php echo api_get_path(WEB_PATH); ?>index.php" title="" />
<link rel="courses" href="<?php echo api_get_path(WEB_CODE_PATH); ?>auth/courses.php" title="<?php echo api_htmlentities(get_lang('OtherCourses'), ENT_QUOTES); ?>" />
<link rel="profil" href="<?php echo api_get_path(WEB_CODE_PATH); ?>auth/profile.php" title="<?php echo api_htmlentities(get_lang('ModifyProfile'), ENT_QUOTES); ?>" />
@ -106,7 +108,25 @@ if ($navigator_info['name']=='Internet Explorer' && $navigator_info['version']=
<link href="http://www.chamilo.org/team.php" rel="Author" />
<link href="http://www.chamilo.org" rel="Copyright" />
<link rel="shortcut icon" href="<?php echo api_get_path(WEB_PATH); ?>favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo api_get_system_encoding(); ?>" />
<script src= "<?php echo api_get_path(WEB_LIBRARY_PATH);?>javascript/mmenu.js" type="text/javascript"></script>
<?php if (!empty($help)) { ?>
<script type="text/javascript">
//One global variable to set, use true if you want the menus to reinit when the user changes text size (recommended):
menu[3] = {
id:'menu-slide-right', //use unique quoted id (quoted) REQUIRED!!
bartext: '<img src="/main/img/help.png">',
menupos:'right',
kviewtype:'fixed',
menuItems:[ // REQUIRED!!
//[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
["Help", "<?php echo api_get_path(WEB_CODE_PATH); ?>help/help.php?open=Home&height=400&width=600", "", "thickbox"],
]}; // REQUIRED!! do not edit or remove
make_menus();
</script>
<?php } ?>
<script type="text/javascript">
//<![CDATA[
@ -133,8 +153,11 @@ if ( ( navigator.userAgent.toLowerCase().indexOf('msie') != -1 ) && ( navigator.
) ;
}
//]]>
</script>
<?php
if (isset($htmlHeadXtra) && $htmlHeadXtra) {
foreach ($htmlHeadXtra as & $this_html_head) {
@ -160,7 +183,6 @@ include api_get_path(LIBRARY_PATH).'javascript/email_links.lib.js.php';
<li><a href="#content" accesskey="2"><?php echo get_lang('WCAGGoContent'); ?></a></li>
</ul>
</div>
<?php
// Banner
require_once api_get_path(INCLUDE_PATH).'banner.inc.php';

@ -178,7 +178,7 @@ function display_user_search_form() {
echo get_lang("SearchForUser") . "&nbsp;&nbsp;";
echo '<input type="text" name="keyword" value="'.Security::remove_XSS($_GET['keyword']).'"/>';
echo '<input type="submit" value="'.get_lang('SearchButton').'"/>';
echo '</form>';
echo '</form>';
}
/**
* This function displays a list if users for each virtual course linked to the current
@ -366,6 +366,7 @@ function get_number_of_users() {
$counter = 0;
if (!empty($_SESSION["id_session"])){
$a_course_users = CourseManager :: get_user_list_from_course_code($_SESSION['_course']['id'], true, $_SESSION['id_session']);
} else {
$a_course_users = CourseManager :: get_user_list_from_course_code($_SESSION['_course']['id'], false);
}
@ -383,6 +384,7 @@ function search_keyword($firstname, $lastname, $username, $official_code, $keywo
} else {
return false;
}
}
@ -390,7 +392,6 @@ function search_keyword($firstname, $lastname, $username, $official_code, $keywo
* Get the users to display on the current page.
*/
function get_user_data($from, $number_of_items, $column, $direction) {
global $origin;
global $is_western_name_order;
global $sort_by_first_name;
@ -509,6 +510,8 @@ function get_user_data($from, $number_of_items, $column, $direction) {
}
}
return $a_users;
}

Loading…
Cancel
Save