[svn r12612] invert the lastname and the firstname (task http://projects.dokeos.com/?do=details&id=1598)

skala
Julian Prud'homme 18 years ago
parent b2e7a641a6
commit 8dc7b67b02
  1. 4
      main/admin/course_add.php
  2. 8
      main/admin/course_edit.php
  3. 10
      main/admin/user_list.php
  4. 32
      main/user/user.php

@ -1,5 +1,5 @@
<?php
// $Id: course_add.php 11641 2007-03-21 16:42:52Z elixir_inter $
// $Id: course_add.php 12612 2007-06-15 13:37:31Z elixir_julian $
/*
==============================================================================
Dokeos - elearning and course management software
@ -71,7 +71,7 @@ $res = api_sql_query($sql,__FILE__,__LINE__);
$teachers = array();
while($obj = mysql_fetch_object($res))
{
$teachers[$obj->user_id] = $obj->firstname.' '.$obj->lastname;
$teachers[$obj->user_id] = $obj->lastname.' '.$obj->firstname;
}
// Build the form
$form = new FormValidator('update_course');

@ -1,6 +1,6 @@
<?php
// $Id: course_edit.php 12498 2007-05-28 08:48:09Z elixir_julian $
// $Id: course_edit.php 12612 2007-06-15 13:37:31Z elixir_julian $
/*
==============================================================================
Dokeos - elearning and course management software
@ -96,7 +96,7 @@ $res = api_sql_query($sql,__FILE__,__LINE__);
$course_teachers = array();
while($obj = mysql_fetch_object($res))
{
$course_teachers[$obj->user_id] = $obj->firstname.' '.$obj->lastname;
$course_teachers[$obj->user_id] = $obj->lastname.' '.$obj->firstname;
}
// Get all possible teachers without the course teachers
@ -106,7 +106,7 @@ $teachers = array();
while($obj = mysql_fetch_object($res))
{
if(!array_key_exists($obj->user_id,$course_teachers)){
$teachers[$obj->user_id] = $obj->firstname.' '.$obj->lastname;
$teachers[$obj->user_id] = $obj->lastname.' '.$obj->firstname;
}
@ -114,7 +114,7 @@ while($obj = mysql_fetch_object($res))
$course['tutor_name']=$obj->user_id;
}
//We add in the array platform teachers
$platform_teachers[$obj->user_id] = $obj->firstname.' '.$obj->lastname;
$platform_teachers[$obj->user_id] = $obj->lastname.' '.$obj->firstname;
}
//Case where there is no teacher in the course

@ -1,6 +1,6 @@
<?php
// $Id: user_list.php 12484 2007-05-26 23:05:46Z yannoo $
// $Id: user_list.php 12612 2007-06-15 13:37:31Z elixir_julian $
/*
==============================================================================
Dokeos - elearning and course management software
@ -211,8 +211,8 @@ function get_user_data($from, $number_of_items, $column, $direction)
$sql = "SELECT
u.user_id AS col0,
u.official_code AS col1,
u.firstname AS col2,
u.lastname AS col3,
u.lastname AS col2,
u.firstname AS col3,
u.username AS col4,
u.email AS col5,
IF(u.status=1,'".get_lang('Teacher')."','".get_lang('Student')."') AS col6,
@ -516,8 +516,8 @@ else
$table->set_additional_parameters($parameters);
$table->set_header(0, '', false);
$table->set_header(1, get_lang('OfficialCode'));
$table->set_header(2, get_lang('FirstName'));
$table->set_header(3, get_lang('LastName'));
$table->set_header(2, get_lang('LastName'));
$table->set_header(3, get_lang('FirstName'));
$table->set_header(4, get_lang('LoginName'));
$table->set_header(5, get_lang('Email'));
$table->set_header(6, get_lang('Status'));

@ -351,32 +351,6 @@ Display::display_introduction_section(TOOL_USER, $is_allowed);
*/
function get_number_of_users()
{
/*$user_table = Database::get_main_table(TABLE_MAIN_USER);
$course_user_table = Database::get_main_table(TABLE_MAIN_COURSE_USER);
if(api_get_setting('use_session_mode')!="true"){
$sql = "SELECT COUNT(u.user_id) AS number_of_users FROM $user_table u,$course_user_table cu WHERE u.user_id = cu.user_id and course_code='".$_SESSION['_course']['id']."'";
}
else{
if(!empty($_SESSION['id_session'])){
$session_course_user_table = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
$sql = "SELECT COUNT(DISTINCT id_user) AS number_of_users
FROM $user_table u, $session_course_user_table
WHERE course_code= '".$_SESSION['_course']['id']."'
AND id_session='".$_SESSION['id_session']."'";
}
else{
$sql = "SELECT COUNT(u.user_id) AS number_of_users FROM $user_table u,$course_user_table cu WHERE u.user_id = cu.user_id and course_code='".$_SESSION['_course']['id']."'";
}
}
if( isset ($_GET['keyword']))
{
$keyword = mysql_real_escape_string($_GET['keyword']);
$sql .= " AND (firstname LIKE '%".$keyword."%' OR lastname LIKE '%".$keyword."%' OR username LIKE '%".$keyword."%' OR official_code LIKE '%".$keyword."%')";
}
$res = api_sql_query($sql, __FILE__, __LINE__);
$result = mysql_fetch_object($res);
return $result->number_of_users;*/
$counter=0;
if(!empty($_SESSION["id_session"])){
@ -441,8 +415,8 @@ function get_user_data($from, $number_of_items, $column, $direction)
$temp=array();
$temp[] = $user_id;
$temp[] = $o_course_user['official_code'];
$temp[] = $o_course_user['firstname'];
$temp[] = $o_course_user['lastname'];
$temp[] = $o_course_user['firstname'];
$temp[] = $o_course_user['role'];
$temp[] = implode(', ',$groups_name); //Group
@ -460,8 +434,8 @@ function get_user_data($from, $number_of_items, $column, $direction)
else{
$temp=array();
$temp[] = $o_course_user['official_code'];
$temp[] = $o_course_user['firstname'];
$temp[] = $o_course_user['lastname'];
$temp[] = $o_course_user['firstname'];
$temp[] = $o_course_user['role'];
$temp[] = implode(', ',$groups_name);//Group
$temp[] = $user_id;
@ -518,8 +492,8 @@ $header_nr = 0;
$table->set_header($header_nr++, '', false);
}
$table->set_header($header_nr++, get_lang('OfficialCode'));
$table->set_header($header_nr++, get_lang('FirstName'));
$table->set_header($header_nr++, get_lang('LastName'));
$table->set_header($header_nr++, get_lang('FirstName'));
$table->set_header($header_nr++, get_lang('Description'));
$table->set_header($header_nr++, get_lang('Group'),false);
if( api_is_allowed_to_edit())

Loading…
Cancel
Save