public/main/admin/subscribe_user2course.php
Variable "this_section" is not in valid camel caps format Open
Open
$this_section = SECTION_PLATFORM_ADMIN;
- Exclude checks
Variable "link_add_group" is not in valid camel caps format Open
Open
echo Display::toolbarAction('subscribe', [$link_add_group]);
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
if (1 == $extra_field[8] && ExtraField::FIELD_TYPE_TAG == $extra_field[2]) {
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
'name' => $extra_field[3],
- Exclude checks
Variable "target_name" is not in valid camel caps format Open
Open
$orderBy = $target_name;
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* This script allows platform admins to add users to courses.
- Exclude checks
Variable "tbl_user" is not in valid camel caps format Open
Open
$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
- Exclude checks
Variable "new_field" is not in valid camel caps format Open
Open
$fieldtype = $new_field['type'];
- Exclude checks
Variable "extra_field_result" is not in valid camel caps format Open
Open
$final_result = array_intersect($extra_field_result[$i], $extra_field_result[$i + 1]);
- Exclude checks
Variable "where_filter" is not in valid camel caps format Open
Open
$where_filter = " AND u.id IN ('".implode("','", $final_result)."') ";
- Exclude checks
Variable "tool_name" is not in valid camel caps format Open
Open
Display :: display_header($tool_name);
- Exclude checks
Variable "first_letter_course" is not in valid camel caps format Open
Open
$first_letter_course = Database::escape_string($_POST['firstLetterCourse']);
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
Open
$user = api_get_user_info($user_id);
- Exclude checks
Variable "use_extra_fields" is not in valid camel caps format Open
Open
$use_extra_fields = false;
- Exclude checks
Variable "final_result" is not in valid camel caps format Open
Open
$final_result = [];
- Exclude checks
Variable "extra_field_result" is not in valid camel caps format Open
Open
if (is_array($extra_field_result[$i + 1])) {
- Exclude checks
Variable "final_result" is not in valid camel caps format Open
Open
$final_result = $extra_field_result[0];
- Exclude checks
Variable "final_result" is not in valid camel caps format Open
Open
if (is_array($final_result) && count($final_result) > 0) {
- Exclude checks
Variable "where_filter" is not in valid camel caps format Open
Open
$where_filter = " AND id = -1";
- Exclude checks
Variable "access_url_id" is not in valid camel caps format Open
Open
access_url_id = $access_url_id AND
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
'name' => $extra_field[3],
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
'type' => $extra_field[2],
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
$options = UserManager::get_extra_user_data_for_tags($extra_field[1]);
- Exclude checks
Variable "form_sent" is not in valid camel caps format Open
Open
if (1 == $form_sent) {
- Exclude checks
Variable "tbl_user" is not in valid camel caps format Open
Open
$sql = "SELECT count(*) as nb_users FROM $tbl_user";
- Exclude checks
Variable "new_field_list" is not in valid camel caps format Open
Open
foreach ($new_field_list as $new_field) {
- Exclude checks
Variable "use_extra_fields" is not in valid camel caps format Open
Open
$use_extra_fields = true;
- Exclude checks
Variable "extra_field_result" is not in valid camel caps format Open
Open
$final_result = array_intersect($extra_field_result[$i], $extra_field_result[$i + 1]);
- Exclude checks
Variable "target_name" is not in valid camel caps format Open
Open
WHERE id <>2 AND ".$target_name." LIKE '".$first_letter_user."%' $where_filter
- Exclude checks
Variable "access_url_id" is not in valid camel caps format Open
Open
$access_url_id = api_get_current_access_url_id();
- Exclude checks
Variable "new_field_list" is not in valid camel caps format Open
Open
if (is_array($new_field_list) && count($new_field_list) > 0) {
- Exclude checks
Variable "new_field_list" is not in valid camel caps format Open
Open
if (is_array($new_field_list) && count($new_field_list) > 0) {
- Exclude checks
Variable "extra_field_result" is not in valid camel caps format Open
Open
for ($i = 0; $i < count($extra_field_result) - 1; $i++) {
- Exclude checks
Variable "where_filter" is not in valid camel caps format Open
Open
WHERE id <>2 AND ".$target_name." LIKE '".$first_letter_user."%' $where_filter
- Exclude checks
Variable "db_users" is not in valid camel caps format Open
Open
$db_users = Database::store_result($result);
- Exclude checks
Variable "form_sent" is not in valid camel caps format Open
Open
$form_sent = 0;
- Exclude checks
Variable "first_letter_user" is not in valid camel caps format Open
Open
$first_letter_user = Database::escape_string($_POST['firstLetterUser']);
- Exclude checks
Variable "num_row" is not in valid camel caps format Open
Open
if ($num_row['nb_users'] > 1000) {
- Exclude checks
Variable "tbl_course_rel_access_url" is not in valid camel caps format Open
Open
$tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
if (1 == $extra_field[8] && ExtraField::FIELD_TYPE_TAG == $extra_field[2]) {
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
Open
foreach ($courses as $course_code) {
- Exclude checks
Variable "first_letter_user" is not in valid camel caps format Open
Open
$first_letter_user = 'A';
- Exclude checks
Variable "where_filter" is not in valid camel caps format Open
Open
$where_filter = " AND u.id = -1";
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* you can select multiple users and courses and then click on
- Exclude checks
Variable "tool_name" is not in valid camel caps format Open
Open
$form->addElement('header', '', $tool_name);
- Exclude checks
Variable "form_sent" is not in valid camel caps format Open
Open
$form_sent = $_POST['form_sent'];
- Exclude checks
Variable "new_field" is not in valid camel caps format Open
Open
if (UserManager::is_extra_field_available($new_field['variable'])) {
- Exclude checks
Variable "final_result" is not in valid camel caps format Open
Open
$final_result = array_intersect($extra_field_result[$i], $extra_field_result[$i + 1]);
- Exclude checks
Variable "final_result" is not in valid camel caps format Open
Open
if (is_array($final_result) && count($final_result) > 0) {
- Exclude checks
Variable "final_result" is not in valid camel caps format Open
Open
$where_filter = " AND u.id IN ('".implode("','", $final_result)."') ";
- Exclude checks
Variable "final_result" is not in valid camel caps format Open
Open
$where_filter = " AND id IN ('".implode("','", $final_result)."') ";
- Exclude checks
Variable "target_name" is not in valid camel caps format Open
Open
$target_name = 'lastname';
- Exclude checks
Variable "access_url_id" is not in valid camel caps format Open
Open
if (-1 != $access_url_id) {
- Exclude checks
Variable "first_letter_course" is not in valid camel caps format Open
Open
WHERE visual_code LIKE '".$first_letter_course."%'
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* @todo use formvalidator for the form
- Exclude checks
Variable "new_field" is not in valid camel caps format Open
Open
$new_field['variable'],
- Exclude checks
Variable "use_extra_fields" is not in valid camel caps format Open
Open
if ($use_extra_fields) {
- Exclude checks
Variable "extra_field_result" is not in valid camel caps format Open
Open
$final_result = $extra_field_result[0];
- Exclude checks
Variable "tbl_user_rel_access_url" is not in valid camel caps format Open
Open
INNER JOIN $tbl_user_rel_access_url user_rel_url
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* 'Add to this(these) course(s)'.
- Exclude checks
Variable "first_letter_user" is not in valid camel caps format Open
Open
$first_letter_user = '';
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
if (1 == $extra_field[8] && ExtraField::FIELD_TYPE_SELECT == $extra_field[2]) {
- Exclude checks
Variable "new_field_list" is not in valid camel caps format Open
Open
$new_field_list[] = [
- Exclude checks
Variable "first_letter_user" is not in valid camel caps format Open
Open
if (empty($first_letter_user)) {
- Exclude checks
Variable "result_list" is not in valid camel caps format Open
Open
$result_list = [];
- Exclude checks
Variable "tbl_user_rel_access_url" is not in valid camel caps format Open
Open
$tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
- Exclude checks
Variable "extra_field_list" is not in valid camel caps format Open
Open
$extra_field_list = UserManager::get_extra_fields();
- Exclude checks
Variable "new_field_list" is not in valid camel caps format Open
Open
$new_field_list = [];
- Exclude checks
Variable "extra_field_list" is not in valid camel caps format Open
Open
if (is_array($extra_field_list)) {
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
if (1 == $extra_field[8] && ExtraField::FIELD_TYPE_SELECT == $extra_field[2]) {
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
'variable' => $extra_field[1],
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
'type' => $extra_field[2],
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
'variable' => $extra_field[1],
- Exclude checks
Variable "num_row" is not in valid camel caps format Open
Open
$num_row = Database::fetch_array($result);
- Exclude checks
Variable "extra_field_list" is not in valid camel caps format Open
Open
if (is_array($extra_field_list)) {
- Exclude checks
Variable "new_field" is not in valid camel caps format Open
Open
$varname = 'field_'.$new_field['variable'];
- Exclude checks
Variable "final_result" is not in valid camel caps format Open
Open
if (is_array($final_result) && count($final_result) > 0) {
- Exclude checks
Variable "tbl_user" is not in valid camel caps format Open
Open
FROM $tbl_user u
- Exclude checks
Spaces must be used for alignment; tabs are not allowed Open
Open
* It displays a list of users and a list of courses;
- Exclude checks
Variable "extra_field_list" is not in valid camel caps format Open
Open
foreach ($extra_field_list as $extra_field) {
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
'data' => $extra_field[9],
- Exclude checks
Variable "new_field" is not in valid camel caps format Open
Open
foreach ($new_field_list as $new_field) {
- Exclude checks
Variable "extra_field_result" is not in valid camel caps format Open
Open
if (count($extra_field_result) > 1) {
- Exclude checks
Variable "tbl_user" is not in valid camel caps format Open
Open
FROM $tbl_user
- Exclude checks
Variable "target_name" is not in valid camel caps format Open
Open
(".$target_name." LIKE '".$first_letter_user."%' )
- Exclude checks
Variable "tbl_course" is not in valid camel caps format Open
Open
FROM $tbl_course
- Exclude checks
Variable "tbl_course" is not in valid camel caps format Open
Open
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
- Exclude checks
Variable "extra_field" is not in valid camel caps format Open
Open
foreach ($extra_field_list as $extra_field) {
- Exclude checks
Variable "where_filter" is not in valid camel caps format Open
Open
$where_filter = null;
- Exclude checks
Variable "first_letter_user" is not in valid camel caps format Open
Open
WHERE id <>2 AND ".$target_name." LIKE '".$first_letter_user."%' $where_filter
- Exclude checks
Variable "first_letter_user" is not in valid camel caps format Open
Open
(".$target_name." LIKE '".$first_letter_user."%' )
- Exclude checks
Variable "access_url_id" is not in valid camel caps format Open
Open
$access_url_id = api_get_current_access_url_id();
- Exclude checks
Variable "link_add_group" is not in valid camel caps format Open
Open
$link_add_group = '<a href="usergroups.php">'.
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
Open
foreach ($users as $user_id) {
- Exclude checks
Variable "extra_field_result" is not in valid camel caps format Open
Open
$extra_field_result[] = UserManager::get_extra_user_data_by_tags(
- Exclude checks
Variable "extra_field_result" is not in valid camel caps format Open
Open
$extra_field_result[] = UserManager::get_extra_user_data_by_value(
- Exclude checks
Variable "where_filter" is not in valid camel caps format Open
Open
$where_filter = " AND id IN ('".implode("','", $final_result)."') ";
- Exclude checks
Variable "where_filter" is not in valid camel caps format Open
Open
$where_filter
- Exclude checks
Variable "first_letter_course" is not in valid camel caps format Open
Open
$first_letter_course = '';
- Exclude checks
Variable "tool_name" is not in valid camel caps format Open
Open
$tool_name = get_lang('Add users to course');
- Exclude checks
Variable "new_field_list" is not in valid camel caps format Open
Open
$new_field_list[] = [
- Exclude checks
Variable "course_code" is not in valid camel caps format Open
Open
$courseInfo = api_get_course_info($course_code);
- Exclude checks
Variable "user_id" is not in valid camel caps format Open
Open
CourseManager::subscribeUser($user_id, $courseInfo['real_id']);
- Exclude checks
Variable "extra_field_result" is not in valid camel caps format Open
Open
$extra_field_result = [];
- Exclude checks
Variable "final_result" is not in valid camel caps format Open
Open
if (is_array($final_result) && count($final_result) > 0) {
- Exclude checks
Variable "db_users" is not in valid camel caps format Open
Open
<?php foreach ($db_users as $user) {
- Exclude checks
Closing brace indented incorrectly; expected 8 spaces, found 10 Open
Open
} ?>>
- Exclude checks
Variable "tbl_course_rel_access_url" is not in valid camel caps format Open
Open
INNER JOIN $tbl_course_rel_access_url course_rel_url
- Exclude checks
Variable "new_field" is not in valid camel caps format Open
Open
foreach ($new_field['data'] as $option) {
- Exclude checks
Variable "access_url_id" is not in valid camel caps format Open
Open
if (-1 != $access_url_id) {
- Exclude checks
Variable "access_url_id" is not in valid camel caps format Open
Open
access_url_id = $access_url_id AND
- Exclude checks
Variable "new_field" is not in valid camel caps format Open
Open
foreach ($new_field_list as $new_field) {
- Exclude checks
Variable "first_letter_course" is not in valid camel caps format Open
Open
echo Display :: get_alphabet_options($first_letter_course);
- Exclude checks
Variable "extra_field_list" is not in valid camel caps format Open
Open
if (is_array($extra_field_list)) {
- Exclude checks
Closing brace indented incorrectly; expected 4 spaces, found 6 Open
Open
} ?>
- Exclude checks
Variable "db_courses" is not in valid camel caps format Open
Open
$db_courses = Database::store_result($result);
- Exclude checks
Variable "new_field" is not in valid camel caps format Open
Open
$fieldtype = $new_field['type'];
- Exclude checks
Variable "new_field_list" is not in valid camel caps format Open
Open
if (is_array($new_field_list) && count($new_field_list) > 0) {
- Exclude checks
Variable "new_field_list" is not in valid camel caps format Open
Open
foreach ($new_field_list as $new_field) {
- Exclude checks
Variable "new_field" is not in valid camel caps format Open
Open
$varname = 'field_'.$new_field['variable'];
- Exclude checks
Variable "first_letter_user" is not in valid camel caps format Open
Open
echo Display :: get_alphabet_options($first_letter_user);
- Exclude checks
Closing brace indented incorrectly; expected 9 spaces, found 10 Open
Open
} ?>>
- Exclude checks
Variable "first_letter_course" is not in valid camel caps format Open
Open
(visual_code LIKE '".$first_letter_course."%' )
- Exclude checks
Variable "tbl_course" is not in valid camel caps format Open
Open
FROM $tbl_course as course
- Exclude checks
Variable "new_field_list" is not in valid camel caps format Open
Open
if (is_array($new_field_list) && count($new_field_list) > 0) {
- Exclude checks
Closing brace indented incorrectly; expected 4 spaces, found 6 Open
Open
} ?>
- Exclude checks
Variable "db_courses" is not in valid camel caps format Open
Open
<?php foreach ($db_courses as $course) {
- Exclude checks
Variable "new_field" is not in valid camel caps format Open
Open
echo $new_field['name'];
- Exclude checks
Closing brace indented incorrectly; expected 4 spaces, found 6 Open
Open
} ?>
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 14 Open
Open
echo 'selected="selected"';
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 13 Open
Open
<?php echo '('.$course['visual_code'].') '.$course['title']; ?>
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
Open
<?php
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 10 Open
Open
?>
- Exclude checks
Closing brace indented incorrectly; expected 4 spaces, found 6 Open
Open
} ?>
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
Open
<?php
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
Open
?>
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 10 Open
Open
?>
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 10 Open
Open
} ?>>
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 6 Open
Open
} ?>
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
Open
?>
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
Open
<?php
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 10 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 10 Open
Open
if ($showOfficialCode) {
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 14 Open
Open
echo 'selected="selected"';
- Exclude checks
Closing brace indented incorrectly; expected 25 spaces, found 10 Open
Open
} ?>>
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 6 Open
Open
} ?>
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
Open
echo Display :: get_alphabet_options($first_letter_course);
- Exclude checks
Line indented incorrectly; expected 0 spaces, found 10 Open
Open
} ?>>
- Exclude checks
Closing brace indented incorrectly; expected 24 spaces, found 10 Open
Open
} ?>>
- Exclude checks