Minor - format code.

1.10.x
Julio Montoya 10 years ago
parent 89322e016c
commit bde896ab53
  1. 20
      main/admin/user_add.php
  2. 18
      main/admin/user_edit.php
  3. 2
      main/course_description/course_description.class.php

@ -319,7 +319,25 @@ if( $form->validate()) {
} }
} }
$user_id = UserManager::create_user($firstname, $lastname, $status, $email, $username, $password, $official_code, $language, $phone, null, $auth_source, $expiration_date, $active, $hr_dept_id, $extra, null, $send_mail); $user_id = UserManager::create_user(
$firstname,
$lastname,
$status,
$email,
$username,
$password,
$official_code,
$language,
$phone,
null,
$auth_source,
$expiration_date,
$active,
$hr_dept_id,
$extra,
null,
$send_mail
);
Security::clear_token(); Security::clear_token();
$tok = Security::get_token(); $tok = Security::get_token();

@ -25,7 +25,6 @@ $htmlHeadXtra[] = '
<script> <script>
var is_platform_id = "'.$is_platform_admin.'"; var is_platform_id = "'.$is_platform_admin.'";
<!--
function enable_expiration_date() { function enable_expiration_date() {
document.user_edit.radio_expiration_date[0].checked=false; document.user_edit.radio_expiration_date[0].checked=false;
document.user_edit.radio_expiration_date[1].checked=true; document.user_edit.radio_expiration_date[1].checked=true;
@ -69,7 +68,6 @@ function confirmation(name) {
return false; return false;
} }
} }
//-->
</script>'; </script>';
$libpath = api_get_path(LIBRARY_PATH); $libpath = api_get_path(LIBRARY_PATH);
@ -81,7 +79,9 @@ $interbreadcrumb[] = array('url' => "user_list.php","name" => get_lang('UserList
$table_user = Database::get_main_table(TABLE_MAIN_USER); $table_user = Database::get_main_table(TABLE_MAIN_USER);
$table_admin = Database::get_main_table(TABLE_MAIN_ADMIN); $table_admin = Database::get_main_table(TABLE_MAIN_ADMIN);
$sql = "SELECT u.*, a.user_id AS is_admin FROM $table_user u LEFT JOIN $table_admin a ON a.user_id = u.user_id WHERE u.user_id = '".$user_id."'"; $sql = "SELECT u.*, a.user_id AS is_admin FROM $table_user u
LEFT JOIN $table_admin a ON a.user_id = u.user_id
WHERE u.user_id = '".$user_id."'";
$res = Database::query($sql); $res = Database::query($sql);
if (Database::num_rows($res) != 1) { if (Database::num_rows($res) != 1) {
header('Location: user_list.php'); header('Location: user_list.php');
@ -210,7 +210,17 @@ $status[SESSIONADMIN] = get_lang('SessionsAdmin');
$status[STUDENT_BOSS] = get_lang('RoleStudentBoss'); $status[STUDENT_BOSS] = get_lang('RoleStudentBoss');
$status[INVITEE] = get_lang('Invitee'); $status[INVITEE] = get_lang('Invitee');
$form->addElement('select', 'status', get_lang('Profile'), $status, array('id' => 'status_select', 'onchange' => 'javascript: display_drh_list();','class'=>'chzn-select')); $form->addElement(
'select',
'status',
get_lang('Profile'),
$status,
array(
'id' => 'status_select',
'onchange' => 'javascript: display_drh_list();',
'class' => 'chzn-select'
)
);
$display = isset($user_data['status']) && ($user_data['status'] == STUDENT || (isset($_POST['status']) && $_POST['status'] == STUDENT)) ? 'block' : 'none'; $display = isset($user_data['status']) && ($user_data['status'] == STUDENT || (isset($_POST['status']) && $_POST['status'] == STUDENT)) ? 'block' : 'none';

@ -198,7 +198,7 @@ class CourseDescription
// */ // */
// public function insert_stats($description_type) // public function insert_stats($description_type)
// { // {
// $tbl_stats_item_property = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ITEM_PROPERTY); // $tbl_stats_item_property = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ITEM_PROPERTY);
// $description_id = $this->get_id_by_description_type($description_type); // $description_id = $this->get_id_by_description_type($description_type);
// $course_id = api_get_real_course_id(); // $course_id = api_get_real_course_id();
// $course_code = api_get_course_id(); // $course_code = api_get_course_id();

Loading…
Cancel
Save