Rename constant for invitee users - refs BT#9070

1.10.x
Angel Fernando Quiroz Campos 11 years ago
parent dcf2fe6774
commit 4f9e3d7e7b
  1. 2
      main/admin/user_add.php
  2. 2
      main/admin/user_edit.php
  3. 2
      main/gradebook/gradebook_display_certificate.php
  4. 4
      main/inc/lib/course.lib.php
  5. 12
      main/inc/lib/main_api.lib.php
  6. 2
      main/inc/lib/tracking.lib.php
  7. 4
      main/mySpace/myStudents.php
  8. 2
      main/work/work.lib.php

@ -198,7 +198,7 @@ $status[COURSEMANAGER] = get_lang('Teacher');
$status[STUDENT] = get_lang('Learner');
$status[DRH] = get_lang('Drh');
$status[SESSIONADMIN] = get_lang('SessionsAdmin');
$status[ROLE_INVITED] = get_lang('Invited');
$status[INVITEE] = get_lang('Invitee');
$form->addElement('select', 'status', get_lang('Profile'), $status, array('id' => 'status_select', 'class'=>'chzn-select', 'onchange' => 'javascript: display_drh_list();'));

@ -211,7 +211,7 @@ $status[COURSEMANAGER] = get_lang('Teacher');
$status[STUDENT] = get_lang('Learner');
$status[DRH] = get_lang('Drh');
$status[SESSIONADMIN] = get_lang('SessionsAdmin');
$status[ROLE_INVITED] = get_lang('Invited');
$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'));

@ -53,7 +53,7 @@ switch ($action) {
$user_list = CourseManager::get_user_list_from_course_code(api_get_course_id(), api_get_session_id());
if (!empty($user_list)) {
foreach ($user_list as $user_info) {
if ($user_info['status'] == ROLE_INVITED) {
if ($user_info['status'] == INVITEE) {
continue;
}

@ -1787,7 +1787,7 @@ class CourseManager
WHERE course_code = '$course_code' AND cu.status = ".STUDENT;
if (!$includeInvitedUsers) {
$sql .= " AND u.status != " . ROLE_INVITED;
$sql .= " AND u.status != " . INVITEE;
}
$rs = Database::query($sql);
@ -1822,7 +1822,7 @@ class CourseManager
}
if (!$includeInvitedUsers) {
$sql .= " AND u.status != " . ROLE_INVITED;
$sql .= " AND u.status != " . INVITEE;
}
$rs = Database::query($sql_query);

@ -43,7 +43,7 @@ define('SESSION_GENERAL_COACH', 13);
define('COURSE_STUDENT', 14); //student subscribed in a course
define('SESSION_STUDENT', 15); //student subscribed in a session course
define('COURSE_TUTOR', 16); // student is tutor of a course (NOT in session)
define('ROLE_INVITED', 20);
define('INVITEE', 20);
// Table of status
$_status_list[COURSEMANAGER] = 'teacher'; // 1
@ -51,7 +51,7 @@ $_status_list[SESSIONADMIN] = 'session_admin'; // 3
$_status_list[DRH] = 'drh'; // 4
$_status_list[STUDENT] = 'user'; // 5
$_status_list[ANONYMOUS] = 'anonymous'; // 6
$_status_list[ROLE_INVITED] = 'invited'; // 20
$_status_list[INVITEE] = 'invited'; // 20
// COURSE VISIBILITY CONSTANTS
/** only visible for course admin */
@ -2568,7 +2568,7 @@ function api_is_teacher() {
function apiIsInvitedUser() {
global $_user;
return isset($_user['status']) && $_user['status'] == ROLE_INVITED;
return isset($_user['status']) && $_user['status'] == INVITEE;
}
/**
@ -4675,7 +4675,7 @@ function api_get_status_langvars() {
DRH => get_lang('Drh', ''),
STUDENT => get_lang('Student', ''),
ANONYMOUS => get_lang('Anonymous', ''),
ROLE_INVITED => get_lang('Invited')
INVITEE => get_lang('Invited')
);
}
@ -7529,7 +7529,7 @@ function apiIsExcludedUserType($checkDB = false, $userId = 0)
$userInfo = api_get_user_info($userId);
switch ($userInfo['status']) {
case ROLE_INVITED:
case INVITEE:
//no break;
case ANONYMOUS:
return true;
@ -7556,7 +7556,7 @@ function apiIsExcludedUserType($checkDB = false, $userId = 0)
function apiGetExcludedUserTypes($format = 'array')
{
$excludedTypes = array(
ROLE_INVITED,
INVITEE,
ANONYMOUS
);

@ -5753,7 +5753,7 @@ class TrackingCourseLog
$invitedUsersCondition = '';
if (!$includeInvitedUsers) {
$invitedUsersCondition = " AND user.status != " . ROLE_INVITED;
$invitedUsersCondition = " AND user.status != " . INVITEE;
}
$sql = "SELECT user.user_id as user_id,

@ -749,7 +749,7 @@ if (!empty($student_id)) {
echo '</table>';
}
} else {
if ($user_info['status'] != ROLE_INVITED) {
if ($user_info['status'] != INVITEE) {
$csv_content[] = array();
$csv_content[] = array(str_replace('&nbsp;', '', $table_title));
$t_lp = Database :: get_course_table(TABLE_LP_MAIN);
@ -939,7 +939,7 @@ if (!empty($student_id)) {
</table>
<?php } ?>
<!-- line about exercises -->
<?php if ($user_info['status'] != ROLE_INVITED) { ?>
<?php if ($user_info['status'] != INVITEE) { ?>
<table class="data_table">
<tr>
<th><?php echo get_lang('Exercices'); ?></th>

@ -2273,7 +2273,7 @@ function get_work_user_list(
$sql = " $select
FROM $work_condition $user_condition
WHERE $extra_conditions $where_condition $condition_session
AND u.status != " . ROLE_INVITED . "
AND u.status != " . INVITEE . "
ORDER BY $column $direction";
if (!empty($start) && !empty($limit)) {

Loading…
Cancel
Save