';
echo '
'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'';
diff --git a/main/document/edit_paint.php b/main/document/edit_paint.php
index f49cbf4c4b..53636376eb 100755
--- a/main/document/edit_paint.php
+++ b/main/document/edit_paint.php
@@ -125,7 +125,7 @@ if (!$is_allowedToEdit) {
Event::event_access_tool(TOOL_DOCUMENT);
-Display :: display_header($nameTools, 'Doc');
+Display::display_header($nameTools, 'Doc');
echo '
';
echo '
'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'';
diff --git a/main/document/save_pixlr.php b/main/document/save_pixlr.php
index be48e8cd1f..0938d51849 100755
--- a/main/document/save_pixlr.php
+++ b/main/document/save_pixlr.php
@@ -123,7 +123,7 @@ $temp_file_2delete = Session::read('temp_realpath_image');
if (empty($temp_file_2delete)) {
// Create file
if (0 != $groupId) {
- $group_properties = GroupManager :: get_group_properties($groupId);
+ $group_properties = GroupManager::get_group_properties($groupId);
$groupPath = $group_properties['directory'];
} else {
$groupPath = '';
diff --git a/main/dropbox/dropbox_functions.inc.php b/main/dropbox/dropbox_functions.inc.php
index 6a7e282f76..7cebd0eb17 100755
--- a/main/dropbox/dropbox_functions.inc.php
+++ b/main/dropbox/dropbox_functions.inc.php
@@ -562,7 +562,7 @@ function display_add_form($viewReceivedCategory, $viewSentCategory, $view, $id =
if (api_get_session_id()) {
$complete_user_list_for_dropbox = [];
if (api_get_setting('dropbox_allow_student_to_student') == 'true' || $_user['status'] != STUDENT) {
- $complete_user_list_for_dropbox = CourseManager:: get_user_list_from_course_code(
+ $complete_user_list_for_dropbox = CourseManager::get_user_list_from_course_code(
$course_info['code'],
api_get_session_id(),
null,
diff --git a/main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php b/main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php
index 6d76e0cb4c..12535118cf 100644
--- a/main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php
+++ b/main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php
@@ -11,11 +11,11 @@ use ChamiloSession as Session;
*/
class MultipleAnswerTrueFalseDegreeCertainty extends Question
{
- const LEVEL_DARKGREEN = 1;
- const LEVEL_LIGHTGREEN = 2;
- const LEVEL_WHITE = 3;
- const LEVEL_LIGHTRED = 4;
- const LEVEL_DARKRED = 5;
+ public const LEVEL_DARKGREEN = 1;
+ public const LEVEL_LIGHTGREEN = 2;
+ public const LEVEL_WHITE = 3;
+ public const LEVEL_LIGHTRED = 4;
+ public const LEVEL_DARKRED = 5;
public $typePicture = 'mccert.png';
public $explanationLangVar = 'MultipleAnswerTrueFalseDegreeCertainty';
diff --git a/main/exercise/comparative_group_report.php b/main/exercise/comparative_group_report.php
index 6a53aa034c..6df10b46d2 100644
--- a/main/exercise/comparative_group_report.php
+++ b/main/exercise/comparative_group_report.php
@@ -85,7 +85,7 @@ if ($exportXls) {
}
Display::display_header($nameTools, get_lang('Exercise'));
$actions = '
'.
- Display:: return_icon(
+ Display::return_icon(
'back.png',
get_lang('GoBackToQuestionList'),
'',
diff --git a/main/exercise/exercise.class.php b/main/exercise/exercise.class.php
index 19728f6a3e..a48a37c471 100755
--- a/main/exercise/exercise.class.php
+++ b/main/exercise/exercise.class.php
@@ -9309,7 +9309,7 @@ class Exercise
c_id = $courseId AND
path LIKE '".Database::escape_string($uploadPath.'/%/%')."'";
$res = Database::query($sql);
- $hp_count = Database :: num_rows($res);
+ $hp_count = Database::num_rows($res);
} else {
$sql = "SELECT * FROM $TBL_DOCUMENT d
INNER JOIN $TBL_ITEM_PROPERTY ip
@@ -9882,7 +9882,7 @@ class Exercise
ORDER BY exe_id DESC";
$qryres = Database::query($sql);
- $num = Database :: num_rows($qryres);
+ $num = Database::num_rows($qryres);
// Hide the results.
$my_result_disabled = $row['results_disabled'];
@@ -9906,7 +9906,7 @@ class Exercise
) {
// More than one attempt
if ($num > 0) {
- $row_track = Database :: fetch_array($qryres);
+ $row_track = Database::fetch_array($qryres);
$attempt_text = get_lang('LatestAttempt').' : ';
$attempt_text .= ExerciseLib::show_score(
$row_track['exe_result'],
@@ -9973,7 +9973,7 @@ class Exercise
)
) {
if ($num > 0) {
- $row_track = Database :: fetch_array($qryres);
+ $row_track = Database::fetch_array($qryres);
$attempt_text = get_lang('LatestAttempt').' : ';
$attempt_text .= ExerciseLib::show_score(
$row_track['exe_result'],
@@ -10053,7 +10053,7 @@ class Exercise
WHERE
d.c_id = $courseId AND
(d.path LIKE '%htm%') AND
- d.path LIKE '".Database :: escape_string($uploadPath.'/%/%')."'
+ d.path LIKE '".Database::escape_string($uploadPath.'/%/%')."'
LIMIT $from , $limit"; // only .htm or .html files listed
} else {
$sql = "SELECT d.iid, d.path as path, d.comment as comment
@@ -10061,7 +10061,7 @@ class Exercise
WHERE
d.c_id = $courseId AND
(d.path LIKE '%htm%') AND
- d.path LIKE '".Database :: escape_string($uploadPath.'/%/%')."'
+ d.path LIKE '".Database::escape_string($uploadPath.'/%/%')."'
LIMIT $from , $limit";
}
diff --git a/main/exercise/exercise.php b/main/exercise/exercise.php
index 3a74509776..9b117b9df4 100644
--- a/main/exercise/exercise.php
+++ b/main/exercise/exercise.php
@@ -583,7 +583,7 @@ if ($is_allowedToEdit) {
$query = "SELECT iid FROM $TBL_DOCUMENT
WHERE c_id = $courseId AND path='".Database::escape_string($file)."'";
$res = Database::query($query);
- $row = Database :: fetch_array($res, 'ASSOC');
+ $row = Database::fetch_array($res, 'ASSOC');
api_item_property_update(
$courseInfo,
TOOL_DOCUMENT,
@@ -604,7 +604,7 @@ if ($is_allowedToEdit) {
$query = "SELECT iid FROM $TBL_DOCUMENT
WHERE c_id = $courseId AND path='".Database::escape_string($file)."'";
$res = Database::query($query);
- $row = Database :: fetch_array($res, 'ASSOC');
+ $row = Database::fetch_array($res, 'ASSOC');
api_item_property_update(
$courseInfo,
TOOL_DOCUMENT,
diff --git a/main/exercise/exercise_report.php b/main/exercise/exercise_report.php
index 49052cd678..4da9cdb638 100755
--- a/main/exercise/exercise_report.php
+++ b/main/exercise/exercise_report.php
@@ -251,7 +251,7 @@ if (isset($_REQUEST['comments']) &&
GROUP BY question_id';
$res = Database::query($qry);
$tot = 0;
- while ($row = Database :: fetch_array($res, 'ASSOC')) {
+ while ($row = Database::fetch_array($res, 'ASSOC')) {
$marks = $row['marks'];
if (!$objExerciseTmp->propagate_neg && $marks < 0) {
continue;
diff --git a/main/exercise/exercise_result.class.php b/main/exercise/exercise_result.class.php
index 795251f38e..2b67e5d6c2 100755
--- a/main/exercise/exercise_result.class.php
+++ b/main/exercise/exercise_result.class.php
@@ -206,7 +206,7 @@ class ExerciseResult
LIMIT 1";
$query = Database::query($sql_exe);
- if (Database:: num_rows($query) > 0) {
+ if (Database::num_rows($query) > 0) {
$revised = 1;
}
}
@@ -661,7 +661,7 @@ class ExerciseResult
strip_tags(
implode(
", ",
- GroupManager:: get_user_group_name($row['user_id'])
+ GroupManager::get_user_group_name($row['user_id'])
)
),
ENT_QUOTES,
diff --git a/main/exercise/exercise_submit.php b/main/exercise/exercise_submit.php
index a2d5f47f99..45e2b97b92 100755
--- a/main/exercise/exercise_submit.php
+++ b/main/exercise/exercise_submit.php
@@ -1131,7 +1131,7 @@ if (isset($_custom['exercises_hidden_when_no_start_date']) &&
$_custom['exercises_hidden_when_no_start_date']
) {
if (empty($objExercise->start_time)) {
- echo Display:: return_message(
+ echo Display::return_message(
sprintf(
get_lang('ExerciseNoStartedYet'),
$exercise_title,
diff --git a/main/exercise/fill_blanks.class.php b/main/exercise/fill_blanks.class.php
index 7ae831a95a..267464392a 100755
--- a/main/exercise/fill_blanks.class.php
+++ b/main/exercise/fill_blanks.class.php
@@ -10,9 +10,9 @@
*/
class FillBlanks extends Question
{
- const FILL_THE_BLANK_STANDARD = 0;
- const FILL_THE_BLANK_MENU = 1;
- const FILL_THE_BLANK_SEVERAL_ANSWER = 2;
+ public const FILL_THE_BLANK_STANDARD = 0;
+ public const FILL_THE_BLANK_MENU = 1;
+ public const FILL_THE_BLANK_SEVERAL_ANSWER = 2;
public $typePicture = 'fill_in_blanks.png';
public $explanationLangVar = 'FillBlanks';
diff --git a/main/exercise/hotpotatoes_exercise_report.php b/main/exercise/hotpotatoes_exercise_report.php
index 12278bad92..7f2b7536cf 100755
--- a/main/exercise/hotpotatoes_exercise_report.php
+++ b/main/exercise/hotpotatoes_exercise_report.php
@@ -103,7 +103,7 @@ if ($is_allowedToEdit || $is_tutor) {
$objExerciseTmp = new Exercise();
}
-Display :: display_header($nameTools);
+Display::display_header($nameTools);
$actions = Display::div($actions, ['class' => 'actions']);
$extra = '';
-Display :: display_header(get_lang('EditLink'));
+Display::display_header(get_lang('EditLink'));
$form->display();
-Display :: display_footer();
+Display::display_footer();
diff --git a/main/gradebook/gradebook_edit_result.php b/main/gradebook/gradebook_edit_result.php
index af6259a250..be761efef0 100755
--- a/main/gradebook/gradebook_edit_result.php
+++ b/main/gradebook/gradebook_edit_result.php
@@ -84,4 +84,4 @@ $interbreadcrumb[] = [
Display::display_header(get_lang('EditResult'));
DisplayGradebook::display_header_result($evaluation[0], null, 0, 0);
echo $table;
-Display :: display_footer();
+Display::display_footer();
diff --git a/main/gradebook/gradebook_showlog_eval.php b/main/gradebook/gradebook_showlog_eval.php
index 9f724c99d3..794b937cad 100755
--- a/main/gradebook/gradebook_showlog_eval.php
+++ b/main/gradebook/gradebook_showlog_eval.php
@@ -31,7 +31,7 @@ $t_linkeval_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
$t_user = Database::get_main_table(TABLE_MAIN_USER);
$visible_log = Security::remove_XSS($_GET['visiblelog']);
-$evaledit = Evaluation :: load($visible_log);
+$evaledit = Evaluation::load($visible_log);
$sql = "SELECT le.name,le.description,le.weight,le.visible,le.type,le.created_at, us.user_id
FROM $t_linkeval_log le
INNER JOIN $t_user us
@@ -73,4 +73,4 @@ $table->set_header(5, get_lang('Date'));
$table->set_header(6, get_lang('GradebookWhoChangedItLog'));
$table->display();
-Display :: display_footer();
+Display::display_footer();
diff --git a/main/gradebook/gradebook_showlog_link.php b/main/gradebook/gradebook_showlog_link.php
index d9fd523c73..271783fd9b 100755
--- a/main/gradebook/gradebook_showlog_link.php
+++ b/main/gradebook/gradebook_showlog_link.php
@@ -34,7 +34,7 @@ echo '';
$t_user = Database::get_main_table(TABLE_MAIN_USER);
$t_link_log = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINKEVAL_LOG);
$visible_link = Security::remove_XSS($_GET['visiblelink']);
-$evaledit = EvalLink:: load($visible_link);
+$evaledit = EvalLink::load($visible_link);
$sql = "SELECT lk.name,lk.description,lk.weight,lk.visible,lk.type,lk.created_at,us.username
FROM ".$t_link_log." lk inner join ".$t_user." us
ON lk.user_id_log=us.user_id
@@ -66,4 +66,4 @@ $table->set_header(5, get_lang('Date'));
$table->set_header(6, get_lang('GradebookWhoChangedItLog'));
$table->display();
-Display :: display_footer();
+Display::display_footer();
diff --git a/main/gradebook/gradebook_statistics.php b/main/gradebook/gradebook_statistics.php
index faeabe4ed8..7e57be36fe 100755
--- a/main/gradebook/gradebook_statistics.php
+++ b/main/gradebook/gradebook_statistics.php
@@ -106,4 +106,4 @@ if (!$displayScore->is_custom() || empty($displays)) {
$html .= '';
echo $html;
}
-Display :: display_footer();
+Display::display_footer();
diff --git a/main/gradebook/gradebook_view_result.php b/main/gradebook/gradebook_view_result.php
index ea516ee6cf..d5fd7afa1e 100755
--- a/main/gradebook/gradebook_view_result.php
+++ b/main/gradebook/gradebook_view_result.php
@@ -46,7 +46,7 @@ if (isset($_GET['delete_mark'])) {
}
if (isset($_GET['selecteval'])) {
- $allresults = Result :: load(null, null, $select_eval);
+ $allresults = Result::load(null, null, $select_eval);
$iscourse = !empty(api_get_course_id());
}
@@ -222,7 +222,7 @@ if (isset($_GET['import'])) {
''
);
if (!$import_result_form->validate()) {
- Display :: display_header(get_lang('Import'));
+ Display::display_header(get_lang('Import'));
}
$eval[0]->check_lock_permissions();
if (isset($_POST['formSent']) && $_POST['formSent']) {
@@ -230,7 +230,7 @@ if (isset($_GET['import'])) {
$values = $import_result_form->exportValues();
$file_type = $_POST['file_type'];
$file_name = $_FILES['import_file']['tmp_name'];
- $results = Import :: csvToArray($file_name);
+ $results = Import::csvToArray($file_name);
$nr_results_added = 0;
foreach ($results as $index => $importedresult) {
//check username & score
@@ -415,7 +415,7 @@ if (isset($_GET['export'])) {
$head_table[] = [get_lang('Letters'), 15];
}
$head_display_score = '';
- $scoredisplay = ScoreDisplay :: instance();
+ $scoredisplay = ScoreDisplay::instance();
$customdisplays = $scoredisplay->get_custom_score_display_settings();
if (!empty($customdisplays) && $scoredisplay->is_custom()) {
@@ -533,7 +533,7 @@ if (isset($_POST['action'])) {
case 'delete':
$number_of_deleted_results = 0;
foreach ($_POST['id'] as $indexstr) {
- $result = Result :: load($indexstr);
+ $result = Result::load($indexstr);
$result[0]->delete();
$number_of_deleted_results++;
}
diff --git a/main/gradebook/index.php b/main/gradebook/index.php
index f611a0cd21..9d8b3cacb4 100755
--- a/main/gradebook/index.php
+++ b/main/gradebook/index.php
@@ -740,7 +740,7 @@ if (isset($_GET['studentoverview'])) {
// then Category::load() will create a new 'root' category with empty
// course and session fields in memory (Category::create_root_category())
- $cats = Category:: load(
+ $cats = Category::load(
null,
null,
$course_code,
diff --git a/main/gradebook/lib/fe/catform.class.php b/main/gradebook/lib/fe/catform.class.php
index cd639b434d..278d179f8b 100755
--- a/main/gradebook/lib/fe/catform.class.php
+++ b/main/gradebook/lib/fe/catform.class.php
@@ -8,10 +8,10 @@
*/
class CatForm extends FormValidator
{
- const TYPE_ADD = 1;
- const TYPE_EDIT = 2;
- const TYPE_MOVE = 3;
- const TYPE_SELECT_COURSE = 4;
+ public const TYPE_ADD = 1;
+ public const TYPE_EDIT = 2;
+ public const TYPE_MOVE = 3;
+ public const TYPE_SELECT_COURSE = 4;
/** @var Category */
private $category_object;
diff --git a/main/gradebook/lib/fe/dataform.class.php b/main/gradebook/lib/fe/dataform.class.php
index 1a11d063da..9cc14259dd 100755
--- a/main/gradebook/lib/fe/dataform.class.php
+++ b/main/gradebook/lib/fe/dataform.class.php
@@ -8,9 +8,9 @@
*/
class DataForm extends FormValidator
{
- const TYPE_IMPORT = 1;
- const TYPE_EXPORT = 2;
- const TYPE_EXPORT_PDF = 3;
+ public const TYPE_IMPORT = 1;
+ public const TYPE_EXPORT = 2;
+ public const TYPE_EXPORT_PDF = 3;
/**
* Builds a form containing form items based on a given parameter.
@@ -30,7 +30,7 @@ class DataForm extends FormValidator
$target = '',
$locked_status
) {
- parent:: __construct($form_name, $method, $action, $target);
+ parent::__construct($form_name, $method, $action, $target);
$this->form_type = $form_type;
if ($this->form_type == self::TYPE_IMPORT) {
$this->build_import_form();
diff --git a/main/gradebook/lib/fe/evalform.class.php b/main/gradebook/lib/fe/evalform.class.php
index 7ffe955110..25887f4240 100755
--- a/main/gradebook/lib/fe/evalform.class.php
+++ b/main/gradebook/lib/fe/evalform.class.php
@@ -10,13 +10,13 @@
*/
class EvalForm extends FormValidator
{
- const TYPE_ADD = 1;
- const TYPE_EDIT = 2;
- const TYPE_MOVE = 3;
- const TYPE_RESULT_ADD = 4;
- const TYPE_RESULT_EDIT = 5;
- const TYPE_ALL_RESULTS_EDIT = 6;
- const TYPE_ADD_USERS_TO_EVAL = 7;
+ public const TYPE_ADD = 1;
+ public const TYPE_EDIT = 2;
+ public const TYPE_MOVE = 3;
+ public const TYPE_RESULT_ADD = 4;
+ public const TYPE_RESULT_EDIT = 5;
+ public const TYPE_ALL_RESULTS_EDIT = 6;
+ public const TYPE_ADD_USERS_TO_EVAL = 7;
protected $evaluation_object;
private $result_object;
@@ -564,7 +564,7 @@ class EvalForm extends FormValidator
$session_id = api_get_session_id();
$course_code = api_get_course_id();
- $all_categories = Category:: load(
+ $all_categories = Category::load(
null,
null,
$course_code,
diff --git a/main/gradebook/lib/fe/flatviewtable.class.php b/main/gradebook/lib/fe/flatviewtable.class.php
index 9bf4e3a520..01a18c9983 100755
--- a/main/gradebook/lib/fe/flatviewtable.class.php
+++ b/main/gradebook/lib/fe/flatviewtable.class.php
@@ -43,7 +43,7 @@ class FlatViewTable extends SortableTable
$addparams = null,
$mainCourseCategory = null
) {
- parent:: __construct(
+ parent::__construct(
'flatviewlist',
null,
null,
diff --git a/main/gradebook/lib/fe/linkaddeditform.class.php b/main/gradebook/lib/fe/linkaddeditform.class.php
index 5f19bdefa5..8db7cb1d2d 100755
--- a/main/gradebook/lib/fe/linkaddeditform.class.php
+++ b/main/gradebook/lib/fe/linkaddeditform.class.php
@@ -10,8 +10,8 @@
*/
class LinkAddEditForm extends FormValidator
{
- const TYPE_ADD = 1;
- const TYPE_EDIT = 2;
+ public const TYPE_ADD = 1;
+ public const TYPE_EDIT = 2;
/**
* Constructor
@@ -32,7 +32,7 @@ class LinkAddEditForm extends FormValidator
if (isset($link_object)) {
$link = $link_object;
} elseif (isset($link_type) && isset($category_object)) {
- $link = LinkFactory:: create($link_type);
+ $link = LinkFactory::create($link_type);
$link->set_course_code(api_get_course_id());
$link->set_session_id(api_get_session_id());
$link->set_category_id($category_object[0]->get_id());
diff --git a/main/gradebook/lib/fe/linkform.class.php b/main/gradebook/lib/fe/linkform.class.php
index 1e64daab35..ac8424803f 100755
--- a/main/gradebook/lib/fe/linkform.class.php
+++ b/main/gradebook/lib/fe/linkform.class.php
@@ -11,8 +11,8 @@
*/
class LinkForm extends FormValidator
{
- const TYPE_CREATE = 1;
- const TYPE_MOVE = 2;
+ public const TYPE_CREATE = 1;
+ public const TYPE_MOVE = 2;
/** @var Category */
private $category_object;
private $link_object;
diff --git a/main/gradebook/lib/fe/resulttable.class.php b/main/gradebook/lib/fe/resulttable.class.php
index fc35f398a6..eb9f37bef9 100755
--- a/main/gradebook/lib/fe/resulttable.class.php
+++ b/main/gradebook/lib/fe/resulttable.class.php
@@ -31,7 +31,7 @@ class ResultTable extends SortableTable
$addparams = [],
$forprint = false
) {
- parent:: __construct(
+ parent::__construct(
'resultlist',
null,
null,
diff --git a/main/gradebook/lib/fe/userform.class.php b/main/gradebook/lib/fe/userform.class.php
index 85e18ecb35..57ddada43a 100755
--- a/main/gradebook/lib/fe/userform.class.php
+++ b/main/gradebook/lib/fe/userform.class.php
@@ -9,8 +9,8 @@
*/
class UserForm extends FormValidator
{
- const TYPE_USER_INFO = 1;
- const TYPE_SIMPLE_SEARCH = 3;
+ public const TYPE_USER_INFO = 1;
+ public const TYPE_SIMPLE_SEARCH = 3;
/**
* Builds a form containing form items based on a given parameter.
diff --git a/main/gradebook/lib/flatview_data_generator.class.php b/main/gradebook/lib/flatview_data_generator.class.php
index 563db5bfcd..d768bbf3a9 100755
--- a/main/gradebook/lib/flatview_data_generator.class.php
+++ b/main/gradebook/lib/flatview_data_generator.class.php
@@ -11,10 +11,10 @@
class FlatViewDataGenerator
{
// Sorting types constants
- const FVDG_SORT_LASTNAME = 1;
- const FVDG_SORT_FIRSTNAME = 2;
- const FVDG_SORT_ASC = 4;
- const FVDG_SORT_DESC = 8;
+ public const FVDG_SORT_LASTNAME = 1;
+ public const FVDG_SORT_FIRSTNAME = 2;
+ public const FVDG_SORT_ASC = 4;
+ public const FVDG_SORT_DESC = 8;
public $params;
/** @var Category */
public $category;
diff --git a/main/gradebook/lib/gradebook_data_generator.class.php b/main/gradebook/lib/gradebook_data_generator.class.php
index 10b6c9a871..3828c77e92 100755
--- a/main/gradebook/lib/gradebook_data_generator.class.php
+++ b/main/gradebook/lib/gradebook_data_generator.class.php
@@ -14,14 +14,14 @@ use ChamiloSession as Session;
class GradebookDataGenerator
{
// Sorting types constants
- const GDG_SORT_TYPE = 1;
- const GDG_SORT_NAME = 2;
- const GDG_SORT_DESCRIPTION = 4;
- const GDG_SORT_WEIGHT = 8;
- const GDG_SORT_DATE = 16;
- const GDG_SORT_ASC = 32;
- const GDG_SORT_DESC = 64;
- const GDG_SORT_ID = 128;
+ public const GDG_SORT_TYPE = 1;
+ public const GDG_SORT_NAME = 2;
+ public const GDG_SORT_DESCRIPTION = 4;
+ public const GDG_SORT_WEIGHT = 8;
+ public const GDG_SORT_DATE = 16;
+ public const GDG_SORT_ASC = 32;
+ public const GDG_SORT_DESC = 64;
+ public const GDG_SORT_ID = 128;
public $userId;
public $hidePercentage = false;
diff --git a/main/gradebook/lib/results_data_generator.class.php b/main/gradebook/lib/results_data_generator.class.php
index 5fde377829..15031d58f3 100755
--- a/main/gradebook/lib/results_data_generator.class.php
+++ b/main/gradebook/lib/results_data_generator.class.php
@@ -11,13 +11,13 @@
class ResultsDataGenerator
{
// Sorting types constants
- const RDG_SORT_LASTNAME = 1;
- const RDG_SORT_FIRSTNAME = 2;
- const RDG_SORT_SCORE = 4;
- const RDG_SORT_MASK = 8;
+ public const RDG_SORT_LASTNAME = 1;
+ public const RDG_SORT_FIRSTNAME = 2;
+ public const RDG_SORT_SCORE = 4;
+ public const RDG_SORT_MASK = 8;
- const RDG_SORT_ASC = 16;
- const RDG_SORT_DESC = 32;
+ public const RDG_SORT_ASC = 16;
+ public const RDG_SORT_DESC = 32;
private $evaluation;
private $results;
private $is_course_ind;
diff --git a/main/gradebook/lib/user_data_generator.class.php b/main/gradebook/lib/user_data_generator.class.php
index 55e8241ff7..2fda43a5fb 100755
--- a/main/gradebook/lib/user_data_generator.class.php
+++ b/main/gradebook/lib/user_data_generator.class.php
@@ -11,16 +11,16 @@
class UserDataGenerator
{
// Sorting types constants
- const UDG_SORT_TYPE = 1;
- const UDG_SORT_NAME = 2;
- const UDG_SORT_COURSE = 4;
- const UDG_SORT_CATEGORY = 8;
- const UDG_SORT_AVERAGE = 16;
- const UDG_SORT_SCORE = 32;
- const UDG_SORT_MASK = 64;
-
- const UDG_SORT_ASC = 128;
- const UDG_SORT_DESC = 256;
+ public const UDG_SORT_TYPE = 1;
+ public const UDG_SORT_NAME = 2;
+ public const UDG_SORT_COURSE = 4;
+ public const UDG_SORT_CATEGORY = 8;
+ public const UDG_SORT_AVERAGE = 16;
+ public const UDG_SORT_SCORE = 32;
+ public const UDG_SORT_MASK = 64;
+
+ public const UDG_SORT_ASC = 128;
+ public const UDG_SORT_DESC = 256;
private $items;
private $userid;
diff --git a/main/gradebook/user_stats.php b/main/gradebook/user_stats.php
index 82f7ecbc97..b49d15f226 100755
--- a/main/gradebook/user_stats.php
+++ b/main/gradebook/user_stats.php
@@ -49,7 +49,7 @@ if (isset($_GET['exportpdf'])) {
true
);
$newarray = [];
- $displayscore = ScoreDisplay :: instance();
+ $displayscore = ScoreDisplay::instance();
foreach ($data_array as $data) {
$newarray[] = array_slice($data, 1);
}
diff --git a/main/group/group_creation.php b/main/group/group_creation.php
index d4b74aee46..14d5d07a66 100755
--- a/main/group/group_creation.php
+++ b/main/group/group_creation.php
@@ -326,7 +326,7 @@ EOT;
$classForm->addHtml($description);
$classForm->addElement('hidden', 'action');
if (api_get_setting('allow_group_categories') === 'true') {
- $group_categories = GroupManager :: get_categories();
+ $group_categories = GroupManager::get_categories();
$cat_options = [];
foreach ($group_categories as $index => $category) {
$cat_options[$category['id']] = $category['title'];
diff --git a/main/group/group_space.php b/main/group/group_space.php
index d9ddec97bb..1434e2afa4 100755
--- a/main/group/group_space.php
+++ b/main/group/group_space.php
@@ -89,7 +89,7 @@ if (GroupManager::is_self_registration_allowed($user_id, $current_group)) {
* Unregister from group
*/
$unsubscribe_group = '';
-if (GroupManager :: is_self_unregistration_allowed($user_id, $current_group)) {
+if (GroupManager::is_self_unregistration_allowed($user_id, $current_group)) {
$unsubscribe_group = '
'.
get_lang('StudentUnsubscribe').'';
}
diff --git a/main/group/member_settings.php b/main/group/member_settings.php
index 47a976cf9c..8ef63da0d3 100755
--- a/main/group/member_settings.php
+++ b/main/group/member_settings.php
@@ -211,7 +211,7 @@ $action = isset($_GET['action']) ? $_GET['action'] : null;
switch ($action) {
case 'empty':
if (api_is_allowed_to_edit(false, true)) {
- GroupManager:: unsubscribe_all_users($current_group);
+ GroupManager::unsubscribe_all_users($current_group);
echo Display::return_message(get_lang('GroupEmptied'), 'confirm');
}
break;
diff --git a/main/group/settings.php b/main/group/settings.php
index 9ccd0e56db..62b7b53166 100755
--- a/main/group/settings.php
+++ b/main/group/settings.php
@@ -389,4 +389,4 @@ echo '
';
$form->display();
echo '
';
-Display :: display_footer();
+Display::display_footer();
diff --git a/main/group/tutor_settings.php b/main/group/tutor_settings.php
index c248613379..4825ce3eef 100755
--- a/main/group/tutor_settings.php
+++ b/main/group/tutor_settings.php
@@ -164,7 +164,7 @@ if ($form->validate()) {
$values = $form->exportValues();
// Storing the tutors (we first remove all the tutors and then add only those who were selected)
- GroupManager :: unsubscribe_all_tutors($current_group['iid']);
+ GroupManager::unsubscribe_all_tutors($current_group['iid']);
if (isset($_POST['group_tutors']) && count($_POST['group_tutors']) > 0) {
GroupManager::subscribe_tutors($values['group_tutors'], $current_group);
}
@@ -195,9 +195,9 @@ if (!empty($_GET['keyword']) && !empty($_GET['submit'])) {
echo '
'.get_lang('SearchResultsFor').'
'.$keyword_name.' ';
}
-Display :: display_header($nameTools, 'Group');
+Display::display_header($nameTools, 'Group');
$form->setDefaults($defaults);
echo GroupManager::getSettingBar('tutor');
$form->display();
-Display :: display_footer();
+Display::display_footer();
diff --git a/main/help/allowed_html_tags.php b/main/help/allowed_html_tags.php
index 140aa340f3..13466f24d0 100755
--- a/main/help/allowed_html_tags.php
+++ b/main/help/allowed_html_tags.php
@@ -45,7 +45,7 @@ if (api_get_setting('stylesheets') != '') {
$html_type = $_SESSION['status'] == COURSEMANAGER ? TEACHER_HTML : STUDENT_HTML;
$fullpage = intval($_GET['fullpage']) != 0;
-$tags = HTML_QuickForm_Rule_HTML :: get_allowed_tags($html_type, $fullpage);
+$tags = HTML_QuickForm_Rule_HTML::get_allowed_tags($html_type, $fullpage);
$table_header = [];
$table_header[] = ['tag', true];
$table_header[] = ['attributes', false];
diff --git a/main/inc/ajax/gradebook.ajax.php b/main/inc/ajax/gradebook.ajax.php
index 056c09dcbd..18e0e08a39 100755
--- a/main/inc/ajax/gradebook.ajax.php
+++ b/main/inc/ajax/gradebook.ajax.php
@@ -29,7 +29,7 @@ switch ($action) {
case 'get_gradebook_weight':
if (api_is_allowed_to_edit(null, true)) {
$cat_id = $_GET['cat_id'];
- $cat = Category :: load($cat_id);
+ $cat = Category::load($cat_id);
if ($cat && isset($cat[0])) {
echo $cat[0]->get_weight();
} else {
diff --git a/main/inc/ajax/lang.ajax.php b/main/inc/ajax/lang.ajax.php
index 813d1b6de0..2b07c01fd8 100644
--- a/main/inc/ajax/lang.ajax.php
+++ b/main/inc/ajax/lang.ajax.php
@@ -28,7 +28,7 @@ switch ($action) {
$languageId = (int) $_REQUEST['id'];
$subLanguageId = (int) $_REQUEST['sub'];
- $langFilesToLoad = SubLanguageManager:: get_lang_folder_files_list(
+ $langFilesToLoad = SubLanguageManager::get_lang_folder_files_list(
api_get_path(SYS_LANG_PATH).'english',
true
);
diff --git a/main/inc/global.inc.php b/main/inc/global.inc.php
index 5c7b4c57bd..e303b387bf 100755
--- a/main/inc/global.inc.php
+++ b/main/inc/global.inc.php
@@ -378,7 +378,7 @@ $langpath = api_get_path(SYS_LANG_PATH);
/* This will only work if we are in the page to edit a sub_language */
if (isset($this_script) && $this_script == 'sub_language') {
// getting the arrays of files i.e notification, trad4all, etc
- $language_files_to_load = SubLanguageManager:: get_lang_folder_files_list(
+ $language_files_to_load = SubLanguageManager::get_lang_folder_files_list(
api_get_path(SYS_LANG_PATH).'english',
true
);
diff --git a/main/inc/lib/Compilatio.php b/main/inc/lib/Compilatio.php
index 4c1175891e..56058a6adb 100644
--- a/main/inc/lib/Compilatio.php
+++ b/main/inc/lib/Compilatio.php
@@ -478,7 +478,7 @@ class Compilatio
return false;
}
- $table = Database:: get_course_table(TABLE_PLAGIARISM);
+ $table = Database::get_course_table(TABLE_PLAGIARISM);
$params = [$courseId, $itemId];
Database::delete($table, ['c_id = ? AND document_id = ?' => $params]);
diff --git a/main/inc/lib/CourseChatUtils.php b/main/inc/lib/CourseChatUtils.php
index cb0ae551c3..fa3f200635 100644
--- a/main/inc/lib/CourseChatUtils.php
+++ b/main/inc/lib/CourseChatUtils.php
@@ -463,7 +463,7 @@ class CourseChatUtils
$document_path = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document';
$group_info = [];
if ($this->groupId) {
- $group_info = GroupManager:: get_group_properties($this->groupId);
+ $group_info = GroupManager::get_group_properties($this->groupId);
$basepath_chat = $group_info['directory'].'/chat_files';
}
diff --git a/main/inc/lib/NotificationEvent.php b/main/inc/lib/NotificationEvent.php
index 30452c841d..c2c1863928 100644
--- a/main/inc/lib/NotificationEvent.php
+++ b/main/inc/lib/NotificationEvent.php
@@ -3,10 +3,10 @@
class NotificationEvent extends Model
{
- const ACCOUNT_EXPIRATION = 1;
- const JUSTIFICATION_EXPIRATION = 2;
- const GLOBAL_NOTIFICATION = 3;
- const SPECIFIC_USER = 4;
+ public const ACCOUNT_EXPIRATION = 1;
+ public const JUSTIFICATION_EXPIRATION = 2;
+ public const GLOBAL_NOTIFICATION = 3;
+ public const SPECIFIC_USER = 4;
public $table;
public $columns = [
diff --git a/main/inc/lib/SmsPlugin.php b/main/inc/lib/SmsPlugin.php
index a11f903ae8..f429cb46c1 100644
--- a/main/inc/lib/SmsPlugin.php
+++ b/main/inc/lib/SmsPlugin.php
@@ -8,50 +8,50 @@
*/
class SmsPlugin extends Plugin
{
- const WELCOME_LOGIN_PASSWORD = 0;
- const NEW_FILE_SHARED_COURSE_BY = 1;
- const ACCOUNT_APPROVED_CONNECT = 2;
- const NEW_COURSE_BEEN_CREATED = 3;
- const NEW_USER_SUBSCRIBED_COURSE = 4;
- const NEW_COURSE_SUGGESTED_TEACHER = 5;
- const COURSE_OPENING_REQUEST_CODE_REGISTERED = 6;
- const COURSE_OPENING_REQUEST_CODE_APPROVED = 7;
- const COURSE_OPENING_REQUEST_CODE_REJECTED = 8;
- const COURSE_OPENING_REQUEST_CODE = 9;
- const BEEN_SUBSCRIBED_COURSE = 10;
- const ASSIGNMENT_BEEN_CREATED_COURSE = 11;
- const ACCOUNT_CREATED_UPDATED_LOGIN_PASSWORD = 12;
- const PASSWORD_UPDATED_LOGIN_PASSWORD = 13;
- const REQUESTED_PASSWORD_CHANGE = 14;
- const RECEIVED_NEW_PERSONAL_MESSAGES = 15;
- const NEW_USER_PENDING_APPROVAL = 16;
- const POSTED_FORUM_COURSE = 17;
- const CHECK_EMAIL_CONNECT_MORE_INFO = 18;
- const STUDENT_ANSWERED_TEST = 19;
- const STUDENT_ANSWERED_TEST_OPEN_QUESTION = 20;
- const STUDENT_ANSWERED_TEST_VOICE_QUESTION = 21;
- const ANSWER_OPEN_QUESTION_TEST_REVIEWED = 22;
- const NEW_THREAD_STARTED_FORUM = 23;
- const NEW_ANSWER_POSTED_FORUM = 24;
- const NEW_SYSTEM_ANNOUNCEMENT_ADDED = 25;
- const TEST_NEW_SYSTEM_ANNOUNCEMENT_ADDED = 26;
- const SYSTEM_ANNOUNCEMENT_UPDATE = 27;
- const TEST_SYSTEM_ANNOUNCEMENT_UPDATE = 28;
- const USER_UPLOADED_ASSIGNMENT_COURSE_STUDENT_SUBMITS_PAPER = 29;
- const USER_UPLOADED_ASSIGNMENT_CHECK_STUDENT_SUBMITS_PAPER = 30;
- const USER_UPLOADED_ASSIGNMENT_COURSE = 31;
- const USER_UPLOADED_ASSIGNMENT_CHECK = 32;
- const SUBSCRIBED_SESSION = 33;
- const SUBSCRIBED_SESSION_CSV = 34;
- const USER_SUGGESTED_BE_FRIENDS = 35;
- const USER_ANSWERED_INBOX_MESSAGE = 36;
- const BEEN_INVITED_JOIN_GROUP = 37;
- const MESSAGES_SENT_EDITED_GROUP_EDITED = 38;
- const MESSAGES_SENT_EDITED_GROUP_ADDED = 39;
- const BEEN_INVITED_COMPLETE_SURVEY_COURSE = 40;
- const REMINDER_ASSIGNMENT_COURSE_DUE = 41;
- const USER_DETAILS_MODIFIED = 42;
- const CERTIFICATE_NOTIFICATION = 43;
+ public const WELCOME_LOGIN_PASSWORD = 0;
+ public const NEW_FILE_SHARED_COURSE_BY = 1;
+ public const ACCOUNT_APPROVED_CONNECT = 2;
+ public const NEW_COURSE_BEEN_CREATED = 3;
+ public const NEW_USER_SUBSCRIBED_COURSE = 4;
+ public const NEW_COURSE_SUGGESTED_TEACHER = 5;
+ public const COURSE_OPENING_REQUEST_CODE_REGISTERED = 6;
+ public const COURSE_OPENING_REQUEST_CODE_APPROVED = 7;
+ public const COURSE_OPENING_REQUEST_CODE_REJECTED = 8;
+ public const COURSE_OPENING_REQUEST_CODE = 9;
+ public const BEEN_SUBSCRIBED_COURSE = 10;
+ public const ASSIGNMENT_BEEN_CREATED_COURSE = 11;
+ public const ACCOUNT_CREATED_UPDATED_LOGIN_PASSWORD = 12;
+ public const PASSWORD_UPDATED_LOGIN_PASSWORD = 13;
+ public const REQUESTED_PASSWORD_CHANGE = 14;
+ public const RECEIVED_NEW_PERSONAL_MESSAGES = 15;
+ public const NEW_USER_PENDING_APPROVAL = 16;
+ public const POSTED_FORUM_COURSE = 17;
+ public const CHECK_EMAIL_CONNECT_MORE_INFO = 18;
+ public const STUDENT_ANSWERED_TEST = 19;
+ public const STUDENT_ANSWERED_TEST_OPEN_QUESTION = 20;
+ public const STUDENT_ANSWERED_TEST_VOICE_QUESTION = 21;
+ public const ANSWER_OPEN_QUESTION_TEST_REVIEWED = 22;
+ public const NEW_THREAD_STARTED_FORUM = 23;
+ public const NEW_ANSWER_POSTED_FORUM = 24;
+ public const NEW_SYSTEM_ANNOUNCEMENT_ADDED = 25;
+ public const TEST_NEW_SYSTEM_ANNOUNCEMENT_ADDED = 26;
+ public const SYSTEM_ANNOUNCEMENT_UPDATE = 27;
+ public const TEST_SYSTEM_ANNOUNCEMENT_UPDATE = 28;
+ public const USER_UPLOADED_ASSIGNMENT_COURSE_STUDENT_SUBMITS_PAPER = 29;
+ public const USER_UPLOADED_ASSIGNMENT_CHECK_STUDENT_SUBMITS_PAPER = 30;
+ public const USER_UPLOADED_ASSIGNMENT_COURSE = 31;
+ public const USER_UPLOADED_ASSIGNMENT_CHECK = 32;
+ public const SUBSCRIBED_SESSION = 33;
+ public const SUBSCRIBED_SESSION_CSV = 34;
+ public const USER_SUGGESTED_BE_FRIENDS = 35;
+ public const USER_ANSWERED_INBOX_MESSAGE = 36;
+ public const BEEN_INVITED_JOIN_GROUP = 37;
+ public const MESSAGES_SENT_EDITED_GROUP_EDITED = 38;
+ public const MESSAGES_SENT_EDITED_GROUP_ADDED = 39;
+ public const BEEN_INVITED_COMPLETE_SURVEY_COURSE = 40;
+ public const REMINDER_ASSIGNMENT_COURSE_DUE = 41;
+ public const USER_DETAILS_MODIFIED = 42;
+ public const CERTIFICATE_NOTIFICATION = 43;
public $isCoursePlugin = true;
public $isMailPlugin = true;
diff --git a/main/inc/lib/SortableTableFromArray.php b/main/inc/lib/SortableTableFromArray.php
index 03fc1e7245..6437e0c92a 100644
--- a/main/inc/lib/SortableTableFromArray.php
+++ b/main/inc/lib/SortableTableFromArray.php
@@ -31,7 +31,7 @@ class SortableTableFromArray extends SortableTable
$get_total_number_function = null,
$tableId = ''
) {
- parent:: __construct(
+ parent::__construct(
$tableName,
$get_total_number_function,
null,
diff --git a/main/inc/lib/StudentFollowPage.php b/main/inc/lib/StudentFollowPage.php
index e2c6ead66e..f6583b1e62 100644
--- a/main/inc/lib/StudentFollowPage.php
+++ b/main/inc/lib/StudentFollowPage.php
@@ -9,8 +9,8 @@ use Chamilo\CourseBundle\Entity\CItemProperty;
*/
class StudentFollowPage
{
- const VARIABLE_ACQUISITION = 'acquisition';
- const VARIABLE_INVISIBLE = 'invisible';
+ public const VARIABLE_ACQUISITION = 'acquisition';
+ public const VARIABLE_INVISIBLE = 'invisible';
public static function getLpSubscription(
array $lpInfo,
diff --git a/main/inc/lib/TicketManager.php b/main/inc/lib/TicketManager.php
index cf5ae93fc2..b997f3e440 100644
--- a/main/inc/lib/TicketManager.php
+++ b/main/inc/lib/TicketManager.php
@@ -14,20 +14,20 @@ use Chamilo\TicketBundle\Entity\Ticket;
*/
class TicketManager
{
- const PRIORITY_NORMAL = 'NRM';
- const PRIORITY_HIGH = 'HGH';
- const PRIORITY_LOW = 'LOW';
-
- const SOURCE_EMAIL = 'MAI';
- const SOURCE_PHONE = 'TEL';
- const SOURCE_PLATFORM = 'PLA';
- const SOURCE_PRESENTIAL = 'PRE';
-
- const STATUS_NEW = 'NAT';
- const STATUS_PENDING = 'PND';
- const STATUS_UNCONFIRMED = 'XCF';
- const STATUS_CLOSE = 'CLS';
- const STATUS_FORWARDED = 'REE';
+ public const PRIORITY_NORMAL = 'NRM';
+ public const PRIORITY_HIGH = 'HGH';
+ public const PRIORITY_LOW = 'LOW';
+
+ public const SOURCE_EMAIL = 'MAI';
+ public const SOURCE_PHONE = 'TEL';
+ public const SOURCE_PLATFORM = 'PLA';
+ public const SOURCE_PRESENTIAL = 'PRE';
+
+ public const STATUS_NEW = 'NAT';
+ public const STATUS_PENDING = 'PND';
+ public const STATUS_UNCONFIRMED = 'XCF';
+ public const STATUS_CLOSE = 'CLS';
+ public const STATUS_FORWARDED = 'REE';
/**
* Constructor.
diff --git a/main/inc/lib/add_course.lib.inc.php b/main/inc/lib/add_course.lib.inc.php
index 5e47600eac..5410b0b700 100755
--- a/main/inc/lib/add_course.lib.inc.php
+++ b/main/inc/lib/add_course.lib.inc.php
@@ -848,7 +848,7 @@ class AddCourse
"INSERT INTO $TABLETOOLDOCUMENT (c_id, path,title,filetype,size)
VALUES ($course_id,'$path_documents".$folder_path."','".$title."','folder','0')"
);
- $image_id = Database:: insert_id();
+ $image_id = Database::insert_id();
Database::insert(
$TABLEITEMPROPERTY,
@@ -899,7 +899,7 @@ class AddCourse
"INSERT INTO $TABLETOOLDOCUMENT (c_id, path,title,filetype,size)
VALUES ($course_id,'$path_documents".$value["file"]."','".$temp[count($temp) - 1]."','file','$file_size')"
);
- $image_id = Database:: insert_id();
+ $image_id = Database::insert_id();
if ($image_id) {
$sql = "UPDATE $TABLETOOLDOCUMENT SET id = iid WHERE iid = $image_id";
Database::query($sql);
@@ -1098,12 +1098,12 @@ class AddCourse
"INSERT INTO $TABLEGRADEBOOK (name, description, user_id, course_code, parent_id, weight, visible, certif_min_score, session_id, document_id)
VALUES ('$course_code','',1,'$course_code',0,100,0,75,NULL,$example_cert_id)"
);
- $gbid = Database:: insert_id();
+ $gbid = Database::insert_id();
Database::query(
"INSERT INTO $TABLEGRADEBOOK (name, description, user_id, course_code, parent_id, weight, visible, certif_min_score, session_id, document_id)
VALUES ('$course_code','',1,'$course_code',$gbid,100,1,75,NULL,$example_cert_id)"
);
- $gbid = Database:: insert_id();
+ $gbid = Database::insert_id();
Database::query(
"INSERT INTO $TABLEGRADEBOOKLINK (type, ref_id, user_id, course_code, category_id, created_at, weight, visible, locked)
VALUES (1,$exercise_id,1,'$course_code',$gbid,'$now',100,1,0)"
@@ -1132,7 +1132,7 @@ class AddCourse
$sql = "INSERT INTO $tableDocument (id, c_id, path,title,filetype,size, readonly, session_id)
VALUES ($counter, $course_id, '".$file['path']."', '".$file['title']."', '".$file['filetype']."', '".$file['size']."', 0, 0)";
Database::query($sql);
- $docId = Database:: insert_id();
+ $docId = Database::insert_id();
$authorId = empty($authorId) ? api_get_user_id() : (int) $authorId;
@@ -1330,7 +1330,7 @@ class AddCourse
// Default true
$addTeacher = isset($params['add_user_as_teacher']) ? $params['add_user_as_teacher'] : true;
if ($addTeacher) {
- $i_course_sort = CourseManager:: userCourseSort(
+ $i_course_sort = CourseManager::userCourseSort(
$user_id,
$code
);
diff --git a/main/inc/lib/agenda.lib.php b/main/inc/lib/agenda.lib.php
index 562447d37e..9331b69d49 100644
--- a/main/inc/lib/agenda.lib.php
+++ b/main/inc/lib/agenda.lib.php
@@ -4432,7 +4432,7 @@ class Agenda
$course['db']
);
// get the groups to which the user belong
- $group_memberships = GroupManager:: get_group_ids(
+ $group_memberships = GroupManager::get_group_ids(
$course['db'],
$user_id
);
diff --git a/main/inc/lib/attendance.lib.php b/main/inc/lib/attendance.lib.php
index 6a4a6cab6f..b203f0a525 100755
--- a/main/inc/lib/attendance.lib.php
+++ b/main/inc/lib/attendance.lib.php
@@ -13,9 +13,9 @@
class Attendance
{
// constants
- const DONE_ATTENDANCE_LOG_TYPE = 'done_attendance_sheet';
- const UPDATED_ATTENDANCE_LOG_TYPE = 'updated_attendance_sheet';
- const LOCKED_ATTENDANCE_LOG_TYPE = 'locked_attendance_sheet';
+ public const DONE_ATTENDANCE_LOG_TYPE = 'done_attendance_sheet';
+ public const UPDATED_ATTENDANCE_LOG_TYPE = 'updated_attendance_sheet';
+ public const LOCKED_ATTENDANCE_LOG_TYPE = 'locked_attendance_sheet';
public $category_id;
private $session_id;
private $course_id;
@@ -689,14 +689,14 @@ class Attendance
$studentInGroup = [];
if (!empty($current_session_id)) {
- $a_course_users = CourseManager:: get_user_list_from_course_code(
+ $a_course_users = CourseManager::get_user_list_from_course_code(
$current_course_id,
$current_session_id,
'',
'lastname'
);
} else {
- $a_course_users = CourseManager:: get_user_list_from_course_code(
+ $a_course_users = CourseManager::get_user_list_from_course_code(
$current_course_id,
0,
'',
diff --git a/main/inc/lib/blog.lib.php b/main/inc/lib/blog.lib.php
index e9f41e5123..a09032026f 100755
--- a/main/inc/lib/blog.lib.php
+++ b/main/inc/lib/blog.lib.php
@@ -2520,7 +2520,7 @@ class Blog
$column_header[] = [get_lang('Email'), false, ''];
$column_header[] = [get_lang('Register'), false, ''];
- $student_list = CourseManager:: get_student_list_from_course_code(
+ $student_list = CourseManager::get_student_list_from_course_code(
$currentCourse,
false,
$session_id
diff --git a/main/inc/lib/certificate.lib.php b/main/inc/lib/certificate.lib.php
index 5858b72cca..14130cd07f 100755
--- a/main/inc/lib/certificate.lib.php
+++ b/main/inc/lib/certificate.lib.php
@@ -929,7 +929,7 @@ class Certificate extends Model
if (!empty($sessionData['courses'])) {
$sessionId = $sessionData['session_id'];
foreach ($sessionData['courses'] as $courseData) {
- $cats = Category:: load(
+ $cats = Category::load(
null,
null,
$courseData['course_code'],
diff --git a/main/inc/lib/chamilo_session.class.php b/main/inc/lib/chamilo_session.class.php
index f112166967..e4b52574a9 100755
--- a/main/inc/lib/chamilo_session.class.php
+++ b/main/inc/lib/chamilo_session.class.php
@@ -28,7 +28,7 @@ use Symfony\Component\HttpFoundation\Session\Session;
*/
class ChamiloSession extends System\Session
{
- const NAME = 'ch_sid';
+ public const NAME = 'ch_sid';
/**
* Generate new session instance.
diff --git a/main/inc/lib/course.lib.php b/main/inc/lib/course.lib.php
index e1a771cb2e..f3099fee9b 100755
--- a/main/inc/lib/course.lib.php
+++ b/main/inc/lib/course.lib.php
@@ -26,11 +26,11 @@ use Doctrine\Common\Collections\Criteria;
*/
class CourseManager
{
- const MAX_COURSE_LENGTH_CODE = 40;
+ public const MAX_COURSE_LENGTH_CODE = 40;
/** This constant is used to show separate user names in the course
* list (userportal), footer, etc */
- const USER_SEPARATOR = ' |';
- const COURSE_FIELD_TYPE_CHECKBOX = 10;
+ public const USER_SEPARATOR = ' |';
+ public const COURSE_FIELD_TYPE_CHECKBOX = 10;
public $columns = [];
/**
@@ -1732,7 +1732,7 @@ class CourseManager
$users[$row_key]['count_users_registered'] = $registered_users_with_extra_field;
$users[$row_key]['average_hours_per_user'] = $users[$row_key]['training_hours'] / $users[$row_key]['count_users'];
- $category = Category:: load(
+ $category = Category::load(
null,
null,
$course_code,
@@ -1773,7 +1773,7 @@ class CourseManager
)
);
- $category = Category:: load(
+ $category = Category::load(
null,
null,
$course_code,
diff --git a/main/inc/lib/custom_pages.class.php b/main/inc/lib/custom_pages.class.php
index 8e77688f85..f606afada2 100755
--- a/main/inc/lib/custom_pages.class.php
+++ b/main/inc/lib/custom_pages.class.php
@@ -10,12 +10,12 @@
*/
class CustomPages
{
- const INDEX_LOGGED = 'index-logged';
- const INDEX_UNLOGGED = 'index-unlogged';
- const LOGGED_OUT = 'loggedout';
- const REGISTRATION_FEEDBACK = 'registration-feedback';
- const REGISTRATION = 'registration';
- const LOST_PASSWORD = 'lostpassword';
+ public const INDEX_LOGGED = 'index-logged';
+ public const INDEX_UNLOGGED = 'index-unlogged';
+ public const LOGGED_OUT = 'loggedout';
+ public const REGISTRATION_FEEDBACK = 'registration-feedback';
+ public const REGISTRATION = 'registration';
+ public const LOST_PASSWORD = 'lostpassword';
/**
* Returns true if custom pages are enabled. False otherwise.
diff --git a/main/inc/lib/diagnoser.lib.php b/main/inc/lib/diagnoser.lib.php
index 6ce537542a..e3aceefcfd 100755
--- a/main/inc/lib/diagnoser.lib.php
+++ b/main/inc/lib/diagnoser.lib.php
@@ -13,10 +13,10 @@
*/
class Diagnoser
{
- const STATUS_OK = 1;
- const STATUS_WARNING = 2;
- const STATUS_ERROR = 3;
- const STATUS_INFORMATION = 4;
+ public const STATUS_OK = 1;
+ public const STATUS_WARNING = 2;
+ public const STATUS_ERROR = 3;
+ public const STATUS_INFORMATION = 4;
/**
* Contructor.
diff --git a/main/inc/lib/exercise.lib.php b/main/inc/lib/exercise.lib.php
index 24383e9ebc..e24e01cf89 100644
--- a/main/inc/lib/exercise.lib.php
+++ b/main/inc/lib/exercise.lib.php
@@ -2853,7 +2853,7 @@ HOTSPOT;
switch ($revised) {
case 0:
$actions .= "
".
- Display:: return_icon(
+ Display::return_icon(
'quiz.png',
get_lang('Qualify')
);
@@ -2865,7 +2865,7 @@ HOTSPOT;
break;
case 1:
$actions .= "".
- Display:: return_icon(
+ Display::return_icon(
'edit.png',
get_lang('Edit'),
[],
@@ -2883,7 +2883,7 @@ HOTSPOT;
.'&exerciseId='.$exercise_id
.'&a=close&id='.$id
.'">'.
- Display:: return_icon(
+ Display::return_icon(
'lock.png',
get_lang('MarkAttemptAsClosed'),
[],
@@ -2896,7 +2896,7 @@ HOTSPOT;
);
break;
case 3: //still ongoing
- $actions .= Display:: return_icon(
+ $actions .= Display::return_icon(
'clock.png',
get_lang('AttemptStillOngoingPleaseWait'),
[],
@@ -2912,7 +2912,7 @@ HOTSPOT;
if ($filter == 2) {
$actions .= ' '.
- Display:: return_icon(
+ Display::return_icon(
'history.png',
get_lang('ViewHistoryChange')
).'';
diff --git a/main/inc/lib/fileManage.lib.php b/main/inc/lib/fileManage.lib.php
index 9f00976c59..b83dc858c2 100755
--- a/main/inc/lib/fileManage.lib.php
+++ b/main/inc/lib/fileManage.lib.php
@@ -43,7 +43,7 @@ function check_name_exist($file_path)
*
* @author - Hugues Peeters
*
- * @param $file (String) - the path of file or directory to delete
+ * @param $file (String) - the path of file or directory to delete
*
* @return bool - true if the delete succeed, false otherwise
*
diff --git a/main/inc/lib/formvalidator/FormValidator.class.php b/main/inc/lib/formvalidator/FormValidator.class.php
index 8d894941b3..56d39f8675 100755
--- a/main/inc/lib/formvalidator/FormValidator.class.php
+++ b/main/inc/lib/formvalidator/FormValidator.class.php
@@ -8,11 +8,11 @@
*/
class FormValidator extends HTML_QuickForm
{
- const LAYOUT_HORIZONTAL = 'horizontal';
- const LAYOUT_INLINE = 'inline';
- const LAYOUT_BOX = 'box';
- const LAYOUT_BOX_NO_LABEL = 'box-no-label';
- const LAYOUT_GRID = 'grid';
+ public const LAYOUT_HORIZONTAL = 'horizontal';
+ public const LAYOUT_INLINE = 'inline';
+ public const LAYOUT_BOX = 'box';
+ public const LAYOUT_BOX_NO_LABEL = 'box-no-label';
+ public const LAYOUT_GRID = 'grid';
public $with_progress_bar = false;
private $layout;
diff --git a/main/inc/lib/groupmanager.lib.php b/main/inc/lib/groupmanager.lib.php
index b20c20d310..82ec89d6e6 100755
--- a/main/inc/lib/groupmanager.lib.php
+++ b/main/inc/lib/groupmanager.lib.php
@@ -17,45 +17,45 @@ class GroupManager
/* DEFAULT_GROUP_CATEGORY:
When group categories aren't available (platform-setting),
all groups are created in this 'dummy'-category*/
- const DEFAULT_GROUP_CATEGORY = 2;
+ public const DEFAULT_GROUP_CATEGORY = 2;
/**
* infinite.
*/
- const INFINITE = 99999;
+ public const INFINITE = 99999;
/**
* No limit on the number of users in a group.
*/
- const MEMBER_PER_GROUP_NO_LIMIT = 0;
+ public const MEMBER_PER_GROUP_NO_LIMIT = 0;
/**
* No limit on the number of groups per user.
*/
- const GROUP_PER_MEMBER_NO_LIMIT = 0;
+ public const GROUP_PER_MEMBER_NO_LIMIT = 0;
/**
* The tools of a group can have 3 states
* - not available
* - public
* - private.
*/
- const TOOL_NOT_AVAILABLE = 0;
- const TOOL_PUBLIC = 1;
- const TOOL_PRIVATE = 2;
- const TOOL_PRIVATE_BETWEEN_USERS = 3;
+ public const TOOL_NOT_AVAILABLE = 0;
+ public const TOOL_PUBLIC = 1;
+ public const TOOL_PRIVATE = 2;
+ public const TOOL_PRIVATE_BETWEEN_USERS = 3;
/**
* Constants for the available group tools.
*/
- const GROUP_TOOL_FORUM = 0;
- const GROUP_TOOL_DOCUMENTS = 1;
- const GROUP_TOOL_CALENDAR = 2;
- const GROUP_TOOL_ANNOUNCEMENT = 3;
- const GROUP_TOOL_WORK = 4;
- const GROUP_TOOL_WIKI = 5;
- const GROUP_TOOL_CHAT = 6;
-
- const DOCUMENT_MODE_SHARE = 0; // By default
- const DOCUMENT_MODE_READ_ONLY = 1;
- const DOCUMENT_MODE_COLLABORATION = 2;
+ public const GROUP_TOOL_FORUM = 0;
+ public const GROUP_TOOL_DOCUMENTS = 1;
+ public const GROUP_TOOL_CALENDAR = 2;
+ public const GROUP_TOOL_ANNOUNCEMENT = 3;
+ public const GROUP_TOOL_WORK = 4;
+ public const GROUP_TOOL_WIKI = 5;
+ public const GROUP_TOOL_CHAT = 6;
+
+ public const DOCUMENT_MODE_SHARE = 0; // By default
+ public const DOCUMENT_MODE_READ_ONLY = 1;
+ public const DOCUMENT_MODE_COLLABORATION = 2;
/**
* GroupManager constructor.
diff --git a/main/inc/lib/link.lib.php b/main/inc/lib/link.lib.php
index 0d3ea8798d..1b93f7a0f6 100755
--- a/main/inc/lib/link.lib.php
+++ b/main/inc/lib/link.lib.php
@@ -85,8 +85,8 @@ class Link extends Model
WHERE
c_id = $courseId AND
category_id = '".intval($params['category_id'])."'";
- $result = Database:: query($sql);
- list($orderMax) = Database:: fetch_row($result);
+ $result = Database::query($sql);
+ list($orderMax) = Database::fetch_row($result);
$order = $orderMax + 1;
$params['display_order'] = $order;
@@ -282,9 +282,9 @@ class Link extends Model
(int) $selectcategory,
$course_int_id
);
- $result = Database:: query($sql_cat);
- if (Database:: num_rows($result) == 1) {
- $row = Database:: fetch_array($result);
+ $result = Database::query($sql_cat);
+ if (Database::num_rows($result) == 1) {
+ $row = Database::fetch_array($result);
$ic_slide->addValue(
'category',
$row['category_title']
@@ -293,7 +293,7 @@ class Link extends Model
}
$di = new ChamiloIndexer();
- isset($_POST['language']) ? $lang = Database:: escape_string(
+ isset($_POST['language']) ? $lang = Database::escape_string(
$_POST['language']
) : $lang = 'english';
$di->connectDb(null, null, $lang);
@@ -317,7 +317,7 @@ class Link extends Model
$link_id,
$did
);
- Database:: query($sql);
+ Database::query($sql);
}
}
Display::addFlash(Display::return_message(get_lang('LinkAdded')));
@@ -335,11 +335,11 @@ class Link extends Model
$ok = false;
} else {
// Looking for the largest order number for this category.
- $result = Database:: query(
+ $result = Database::query(
"SELECT MAX(display_order) FROM $tbl_categories
WHERE c_id = $course_id "
);
- list($orderMax) = Database:: fetch_row($result);
+ list($orderMax) = Database::fetch_row($result);
$order = $orderMax + 1;
$order = intval($order);
$session_id = api_get_session_id();
@@ -356,7 +356,7 @@ class Link extends Model
if ($linkId) {
// iid
$sql = "UPDATE $tbl_categories SET id = iid WHERE iid = $linkId";
- Database:: query($sql);
+ Database::query($sql);
// add link_category visibility
// course ID is taken from context in api_set_default_visibility
@@ -411,7 +411,7 @@ class Link extends Model
// This will make a restore function possible for the platform administrator.
$sql = "UPDATE $tbl_link SET on_homepage='0'
WHERE c_id = $course_id AND id='".$id."'";
- Database:: query($sql);
+ Database::query($sql);
api_item_property_update(
$courseInfo,
@@ -429,11 +429,11 @@ class Link extends Model
// First we delete the category itself and afterwards all the links of this category.
$sql = "DELETE FROM ".$tbl_categories."
WHERE c_id = $course_id AND id='".$id."'";
- Database:: query($sql);
+ Database::query($sql);
$sql = "DELETE FROM ".$tbl_link."
WHERE c_id = $course_id AND category_id='".$id."'";
- Database:: query($sql);
+ Database::query($sql);
api_item_property_update(
$courseInfo,
@@ -466,15 +466,15 @@ class Link extends Model
);
$sql = 'SELECT * FROM %s WHERE course_code=\'%s\' AND tool_id=\'%s\' AND ref_id_high_level=%s LIMIT 1';
$sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_LINK, $link_id);
- $res = Database:: query($sql);
- if (Database:: num_rows($res) > 0) {
+ $res = Database::query($sql);
+ if (Database::num_rows($res) > 0) {
$row = Database::fetch_array($res);
$di = new ChamiloIndexer();
$di->remove_document($row['search_did']);
}
$sql = 'DELETE FROM %s WHERE course_code=\'%s\' AND tool_id=\'%s\' AND ref_id_high_level=%s LIMIT 1';
$sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_LINK, $link_id);
- Database:: query($sql);
+ Database::query($sql);
// Remove terms from db.
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
@@ -554,8 +554,8 @@ class Link extends Model
// Finding the old category_id.
$sql = "SELECT * FROM $tbl_link
WHERE c_id = $course_id AND id='".$id."'";
- $result = Database:: query($sql);
- $row = Database:: fetch_array($result);
+ $result = Database::query($sql);
+ $row = Database::fetch_array($result);
$category_id = $row['category_id'];
if ($category_id != $values['category_id']) {
@@ -564,8 +564,8 @@ class Link extends Model
WHERE
c_id = $course_id AND
category_id='".intval($values['category_id'])."'";
- $result = Database:: query($sql);
- list($max_display_order) = Database:: fetch_row($result);
+ $result = Database::query($sql);
+ list($max_display_order) = Database::fetch_row($result);
$max_display_order++;
} else {
$max_display_order = $row['display_order'];
@@ -590,8 +590,8 @@ class Link extends Model
if (api_get_setting('search_enabled') === 'true') {
$course_int_id = api_get_course_int_id();
$course_id = api_get_course_id();
- $link_title = Database:: escape_string($values['title']);
- $link_description = Database:: escape_string($values['description']);
+ $link_title = Database::escape_string($values['title']);
+ $link_description = Database::escape_string($values['description']);
// Actually, it consists on delete terms from db,
// insert new ones, create a new search engine document, and remove the old one.
@@ -607,12 +607,12 @@ class Link extends Model
TOOL_LINK,
$id
);
- $res = Database:: query($sql);
+ $res = Database::query($sql);
- if (Database:: num_rows($res) > 0) {
+ if (Database::num_rows($res) > 0) {
require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
- $se_ref = Database:: fetch_array($res);
+ $se_ref = Database::fetch_array($res);
$specific_fields = get_specific_field_list();
$ic_slide = new IndexableChunk();
@@ -676,9 +676,9 @@ class Link extends Model
$categoryId,
$course_int_id
);
- $result = Database:: query($sql_cat);
- if (Database:: num_rows($result) == 1) {
- $row = Database:: fetch_array($result);
+ $result = Database::query($sql_cat);
+ if (Database::num_rows($result) == 1) {
+ $row = Database::fetch_array($result);
$ic_slide->addValue(
'category',
$row['category_title']
@@ -687,7 +687,7 @@ class Link extends Model
}
$di = new ChamiloIndexer();
- isset($_POST['language']) ? $lang = Database:: escape_string($_POST['language']) : $lang = 'english';
+ isset($_POST['language']) ? $lang = Database::escape_string($_POST['language']) : $lang = 'english';
$di->connectDb(null, null, $lang);
$di->remove_document($se_ref['search_did']);
$di->addChunk($ic_slide);
@@ -707,7 +707,7 @@ class Link extends Model
TOOL_LINK,
$id
);
- Database:: query($sql);
+ Database::query($sql);
$sql = 'INSERT INTO %s (c_id, id, course_code, tool_id, ref_id_high_level, search_did)
VALUES (NULL , \'%s\', \'%s\', %s, %s)';
$sql = sprintf(
@@ -719,7 +719,7 @@ class Link extends Model
$id,
$did
);
- Database:: query($sql);
+ Database::query($sql);
}
}
}
@@ -955,7 +955,7 @@ class Link extends Model
$condition
ORDER BY link.display_order ASC, ip.session_id DESC";
- $result = Database:: query($sql);
+ $result = Database::query($sql);
return Database::store_result($result);
}
@@ -1179,7 +1179,7 @@ class Link extends Model
$categoryId = $category['id'];
$token = null;
$tools = '
'.
- Display:: return_icon(
+ Display::return_icon(
'edit.png',
get_lang('Modify'),
[],
@@ -1189,14 +1189,14 @@ class Link extends Model
// DISPLAY MOVE UP COMMAND only if it is not the top link.
if ($currentCategory != 0) {
$tools .= ''.
- Display:: return_icon(
+ Display::return_icon(
'up.png',
get_lang('Up'),
[],
ICON_SIZE_SMALL
).'';
} else {
- $tools .= Display:: return_icon(
+ $tools .= Display::return_icon(
'up_na.png',
get_lang('Up'),
[],
@@ -1207,14 +1207,14 @@ class Link extends Model
// DISPLAY MOVE DOWN COMMAND only if it is not the bottom link.
if ($currentCategory < $countCategories - 1) {
$tools .= '
'.
- Display:: return_icon(
+ Display::return_icon(
'down.png',
get_lang('Down'),
[],
ICON_SIZE_SMALL
).'';
} else {
- $tools .= Display:: return_icon(
+ $tools .= Display::return_icon(
'down_na.png',
get_lang('Down'),
[],
@@ -1224,7 +1224,7 @@ class Link extends Model
$tools .= '
".
- Display:: return_icon(
+ Display::return_icon(
'delete.png',
get_lang('Delete'),
[],
@@ -1277,9 +1277,9 @@ class Link extends Model
$sql = "SELECT id, display_order FROM $movetable
WHERE c_id = $courseId
ORDER BY display_order $sortDirection";
- $linkresult = Database:: query($sql);
+ $linkresult = Database::query($sql);
$thislinkOrder = 1;
- while ($sortrow = Database:: fetch_array($linkresult)) {
+ while ($sortrow = Database::fetch_array($linkresult)) {
// STEP 2 : FOUND THE NEXT LINK ID AND ORDER, COMMIT SWAP
// This part seems unlogic, but it isn't . We first look for the current link with the querystring ID
// and we know the next iteration of the while loop is the next one. These should be swapped.
@@ -1287,12 +1287,12 @@ class Link extends Model
$nextlinkId = $sortrow['id'];
$nextlinkOrder = $sortrow['display_order'];
- Database:: query(
+ Database::query(
"UPDATE ".$movetable."
SET display_order = '$nextlinkOrder'
WHERE c_id = $courseId AND id = '$thiscatlinkId'"
);
- Database:: query(
+ Database::query(
"UPDATE ".$movetable."
SET display_order = '$thislinkOrder'
WHERE c_id = $courseId AND id = '$nextlinkId'"
diff --git a/main/inc/lib/login.lib.php b/main/inc/lib/login.lib.php
index 1569be7c63..e6ad9d1b67 100755
--- a/main/inc/lib/login.lib.php
+++ b/main/inc/lib/login.lib.php
@@ -128,7 +128,7 @@ class Login
if ($result == 1) {
return get_lang('YourPasswordHasBeenReset');
} else {
- $mail = Display:: encrypted_mailto_link(
+ $mail = Display::encrypted_mailto_link(
api_get_setting('emailAdministrator'),
api_get_person_name(
api_get_setting('administratorName'),
@@ -201,7 +201,7 @@ class Login
return get_lang('AnEmailToResetYourPasswordHasBeenSent');
} else {
- $admin_email = Display:: encrypted_mailto_link(
+ $admin_email = Display::encrypted_mailto_link(
api_get_setting('emailAdministrator'),
api_get_person_name(
api_get_setting('administratorName'),
diff --git a/main/inc/lib/message.lib.php b/main/inc/lib/message.lib.php
index 46e0182f9d..00d7be99dd 100755
--- a/main/inc/lib/message.lib.php
+++ b/main/inc/lib/message.lib.php
@@ -15,9 +15,9 @@ use ChamiloSession as Session;
*/
class MessageManager
{
- const MESSAGE_TYPE_INBOX = 1;
- const MESSAGE_TYPE_OUTBOX = 2;
- const MESSAGE_TYPE_PROMOTED = 3;
+ public const MESSAGE_TYPE_INBOX = 1;
+ public const MESSAGE_TYPE_OUTBOX = 2;
+ public const MESSAGE_TYPE_PROMOTED = 3;
/**
* Get count new messages for the current user from the database.
diff --git a/main/inc/lib/myspace.lib.php b/main/inc/lib/myspace.lib.php
index 41857a5491..9d72e6a5ae 100644
--- a/main/inc/lib/myspace.lib.php
+++ b/main/inc/lib/myspace.lib.php
@@ -2832,7 +2832,7 @@ class MySpace
$session_id
);
- $last_login_date_tmp = Tracking:: get_last_connection_date_on_the_course(
+ $last_login_date_tmp = Tracking::get_last_connection_date_on_the_course(
$row_user->user_id,
$courseInfo,
$session_id,
@@ -3567,7 +3567,7 @@ class MySpace
// coach only will registered users
$default_status = STUDENT;
if ($user['create'] == COURSEMANAGER) {
- $user['id'] = UserManager:: create_user(
+ $user['id'] = UserManager::create_user(
$user['FirstName'],
$user['LastName'],
$default_status,
diff --git a/main/inc/lib/notification.lib.php b/main/inc/lib/notification.lib.php
index 8997d320d1..11551b65d1 100644
--- a/main/inc/lib/notification.lib.php
+++ b/main/inc/lib/notification.lib.php
@@ -9,29 +9,29 @@
class Notification extends Model
{
// mail_notify_message ("At once", "Daily", "No")
- const NOTIFY_MESSAGE_AT_ONCE = 1;
- const NOTIFY_MESSAGE_DAILY = 8;
- const NOTIFY_MESSAGE_WEEKLY = 12;
- const NOTIFY_MESSAGE_NO = 0;
+ public const NOTIFY_MESSAGE_AT_ONCE = 1;
+ public const NOTIFY_MESSAGE_DAILY = 8;
+ public const NOTIFY_MESSAGE_WEEKLY = 12;
+ public const NOTIFY_MESSAGE_NO = 0;
// mail_notify_invitation ("At once", "Daily", "No")
- const NOTIFY_INVITATION_AT_ONCE = 1;
- const NOTIFY_INVITATION_DAILY = 8;
- const NOTIFY_INVITATION_WEEKLY = 12;
- const NOTIFY_INVITATION_NO = 0;
+ public const NOTIFY_INVITATION_AT_ONCE = 1;
+ public const NOTIFY_INVITATION_DAILY = 8;
+ public const NOTIFY_INVITATION_WEEKLY = 12;
+ public const NOTIFY_INVITATION_NO = 0;
// mail_notify_group_message ("At once", "Daily", "No")
- const NOTIFY_GROUP_AT_ONCE = 1;
- const NOTIFY_GROUP_DAILY = 8;
- const NOTIFY_GROUP_WEEKLY = 12;
- const NOTIFY_GROUP_NO = 0;
+ public const NOTIFY_GROUP_AT_ONCE = 1;
+ public const NOTIFY_GROUP_DAILY = 8;
+ public const NOTIFY_GROUP_WEEKLY = 12;
+ public const NOTIFY_GROUP_NO = 0;
// Notification types
- const NOTIFICATION_TYPE_MESSAGE = 1;
- const NOTIFICATION_TYPE_INVITATION = 2;
- const NOTIFICATION_TYPE_GROUP = 3;
- const NOTIFICATION_TYPE_WALL_MESSAGE = 4;
- const NOTIFICATION_TYPE_DIRECT_MESSAGE = 5;
+ public const NOTIFICATION_TYPE_MESSAGE = 1;
+ public const NOTIFICATION_TYPE_INVITATION = 2;
+ public const NOTIFICATION_TYPE_GROUP = 3;
+ public const NOTIFICATION_TYPE_WALL_MESSAGE = 4;
+ public const NOTIFICATION_TYPE_DIRECT_MESSAGE = 5;
public $table;
public $columns = [
'id',
diff --git a/main/inc/lib/plugin.class.php b/main/inc/lib/plugin.class.php
index a694229e50..4ff3586a2b 100755
--- a/main/inc/lib/plugin.class.php
+++ b/main/inc/lib/plugin.class.php
@@ -19,8 +19,8 @@ use Chamilo\CourseBundle\Entity\CTool;
*/
class Plugin
{
- const TAB_FILTER_NO_STUDENT = '::no-student';
- const TAB_FILTER_ONLY_STUDENT = '::only-student';
+ public const TAB_FILTER_NO_STUDENT = '::no-student';
+ public const TAB_FILTER_ONLY_STUDENT = '::only-student';
public $isCoursePlugin = false;
public $isAdminPlugin = false;
public $isMailPlugin = false;
diff --git a/main/inc/lib/sessionmanager.lib.php b/main/inc/lib/sessionmanager.lib.php
index 568ef87629..616ebc1083 100755
--- a/main/inc/lib/sessionmanager.lib.php
+++ b/main/inc/lib/sessionmanager.lib.php
@@ -25,10 +25,10 @@ use Monolog\Logger;
*/
class SessionManager
{
- const STATUS_PLANNED = 1;
- const STATUS_PROGRESS = 2;
- const STATUS_FINISHED = 3;
- const STATUS_CANCELLED = 4;
+ public const STATUS_PLANNED = 1;
+ public const STATUS_PROGRESS = 2;
+ public const STATUS_FINISHED = 3;
+ public const STATUS_CANCELLED = 4;
public static $_debug = false;
@@ -2586,7 +2586,7 @@ class SessionManager
if ($copyEvaluation) {
$cats = Category::load(null, null, $courseInfo['code']);
if (!empty($cats)) {
- $sessionCategory = Category:: load(
+ $sessionCategory = Category::load(
null,
null,
$courseInfo['code'],
diff --git a/main/inc/lib/social.lib.php b/main/inc/lib/social.lib.php
index 462a5d7fa1..1b30db9885 100755
--- a/main/inc/lib/social.lib.php
+++ b/main/inc/lib/social.lib.php
@@ -16,8 +16,8 @@ use Zend\Feed\Reader\Reader;
*/
class SocialManager extends UserManager
{
- const DEFAULT_WALL_POSTS = 10;
- const DEFAULT_SCROLL_NEW_POST = 5;
+ public const DEFAULT_WALL_POSTS = 10;
+ public const DEFAULT_SCROLL_NEW_POST = 5;
/**
* Constructor.
diff --git a/main/inc/lib/sortable_table.class.php b/main/inc/lib/sortable_table.class.php
index 409284dcb5..7b3545e375 100755
--- a/main/inc/lib/sortable_table.class.php
+++ b/main/inc/lib/sortable_table.class.php
@@ -300,22 +300,22 @@ class SortableTable extends HTML_Table
$params['urlVar'] = $this->param_prefix.'page_nr';
$params['currentPage'] = $this->page_nr;
$icon_attributes = ['style' => 'vertical-align: middle;'];
- $params['prevImg'] = Display:: return_icon(
+ $params['prevImg'] = Display::return_icon(
'action_prev.png',
get_lang('PreviousPage'),
$icon_attributes
);
- $params['nextImg'] = Display:: return_icon(
+ $params['nextImg'] = Display::return_icon(
'action_next.png',
get_lang('NextPage'),
$icon_attributes
);
- $params['firstPageText'] = Display:: return_icon(
+ $params['firstPageText'] = Display::return_icon(
'action_first.png',
get_lang('FirstPage'),
$icon_attributes
);
- $params['lastPageText'] = Display:: return_icon(
+ $params['lastPageText'] = Display::return_icon(
'action_last.png',
get_lang('LastPage'),
$icon_attributes
diff --git a/main/inc/lib/statistics.lib.php b/main/inc/lib/statistics.lib.php
index 635f8b9eb3..414f088513 100644
--- a/main/inc/lib/statistics.lib.php
+++ b/main/inc/lib/statistics.lib.php
@@ -1124,7 +1124,7 @@ class Statistics
$table_header[] = [get_lang("LastAccess"), true];
ob_start();
- Display:: display_sortable_table(
+ Display::display_sortable_table(
$table_header,
$courses,
['column' => $column, 'direction' => $direction],
diff --git a/main/inc/lib/usergroup.lib.php b/main/inc/lib/usergroup.lib.php
index 958ec7c0f5..a419ba8b9e 100755
--- a/main/inc/lib/usergroup.lib.php
+++ b/main/inc/lib/usergroup.lib.php
@@ -10,8 +10,8 @@
*/
class UserGroup extends Model
{
- const SOCIAL_CLASS = 1;
- const NORMAL_CLASS = 0;
+ public const SOCIAL_CLASS = 1;
+ public const NORMAL_CLASS = 0;
public $columns = [
'id',
'name',
diff --git a/main/inc/lib/userportal.lib.php b/main/inc/lib/userportal.lib.php
index 2c101af7c8..fec29791ef 100755
--- a/main/inc/lib/userportal.lib.php
+++ b/main/inc/lib/userportal.lib.php
@@ -655,7 +655,7 @@ class IndexManager
}
if ($category != '') {
$result .= ''
- .Display:: return_icon('back.png', get_lang('BackToHomePage'))
+ .Display::return_icon('back.png', get_lang('BackToHomePage'))
.get_lang('BackToHomePage').'
';
}
diff --git a/main/inc/lib/webservices/Rest.php b/main/inc/lib/webservices/Rest.php
index 7a637f206c..29992fe23d 100644
--- a/main/inc/lib/webservices/Rest.php
+++ b/main/inc/lib/webservices/Rest.php
@@ -16,114 +16,114 @@ use Symfony\Component\HttpFoundation\Request as HttpRequest;
*/
class Rest extends WebService
{
- const SERVICE_NAME = 'MsgREST';
- const EXTRA_FIELD_GCM_REGISTRATION = 'gcm_registration_id';
-
- const GET_AUTH = 'authenticate';
- const SAVE_GCM_ID = 'gcm_id';
- const LOGOUT = 'logout';
-
- const GET_USER_MESSAGES = 'user_messages';
- const GET_USER_MESSAGES_RECEIVED = 'user_messages_received';
- const DELETE_USER_MESSAGE = 'delete_user_message';
- const GET_USER_MESSAGES_SENT = 'user_messages_sent';
- const GET_COUNT_NEW_MESSAGES = 'get_count_new_messages';
- const SET_MESSAGE_READ = 'set_message_read';
- const POST_USER_MESSAGE_READ = 'user_message_read';
- const POST_USER_MESSAGE_UNREAD = 'user_message_unread';
- const SAVE_USER_MESSAGE = 'save_user_message';
- const GET_MESSAGE_USERS = 'message_users';
- const VIEW_MESSAGE = 'view_message';
-
- const GET_USER_COURSES = 'user_courses';
- const GET_USER_SESSIONS = 'user_sessions';
-
- const VIEW_PROFILE = 'view_user_profile';
- const GET_PROFILE = 'user_profile';
-
- const VIEW_MY_COURSES = 'view_my_courses';
- const VIEW_COURSE_HOME = 'view_course_home';
- const GET_COURSE_INFO = 'course_info';
- const GET_COURSE_DESCRIPTIONS = 'course_descriptions';
- const GET_COURSE_DOCUMENTS = 'course_documents';
- const GET_COURSE_ANNOUNCEMENTS = 'course_announcements';
- const GET_COURSE_ANNOUNCEMENT = 'course_announcement';
- const GET_COURSE_AGENDA = 'course_agenda';
- const GET_COURSE_NOTEBOOKS = 'course_notebooks';
- const GET_COURSE_FORUM_CATEGORIES = 'course_forumcategories';
- const GET_COURSE_FORUM = 'course_forum';
- const GET_COURSE_FORUM_THREAD = 'course_forumthread';
- const GET_COURSE_LEARNPATHS = 'course_learnpaths';
- const GET_COURSE_LEARNPATH = 'course_learnpath';
- const GET_COURSE_LP_PROGRESS = 'course_lp_progress';
- const GET_COURSE_LINKS = 'course_links';
- const GET_COURSE_WORKS = 'course_works';
-
- const SAVE_COURSE_NOTEBOOK = 'save_course_notebook';
-
- const SAVE_FORUM_POST = 'save_forum_post';
- const SAVE_FORUM_THREAD = 'save_forum_thread';
- const SET_THREAD_NOTIFY = 'set_thread_notify';
- const DOWNLOAD_FORUM_ATTACHMENT = 'download_forum_attachment';
-
- const GET_WORK_LIST = 'get_work_list';
- const GET_WORK_STUDENTS_WITHOUT_PUBLICATIONS = 'get_work_students_without_publications';
- const GET_WORK_USERS = 'get_work_users';
- const GET_WORK_STUDENT_LIST = 'get_work_student_list';
- const PUT_WORK_STUDENT_ITEM_VISIBILITY = 'put_course_work_visibility';
- const DELETE_WORK_STUDENT_ITEM = 'delete_work_student_item';
- const DELETE_WORK_CORRECTIONS = 'delete_work_corrections';
- const DOWNLOAD_WORK_FOLDER = 'download_work_folder';
- const DOWNLOAD_WORK_COMMENT_ATTACHMENT = 'download_work_comment_attachment';
- const DOWNLOAD_WORK = 'download_work';
-
- const VIEW_DOCUMENT_IN_FRAME = 'view_document_in_frame';
-
- const VIEW_QUIZ_TOOL = 'view_quiz_tool';
-
- const VIEW_SURVEY_TOOL = 'view_survey_tool';
-
- const CREATE_CAMPUS = 'add_campus';
- const EDIT_CAMPUS = 'edit_campus';
- const DELETE_CAMPUS = 'delete_campus';
-
- const GET_USERS = 'get_users';
- const USERNAME_EXIST = 'username_exist';
- const SAVE_USER = 'save_user';
- const SAVE_USER_GET_APIKEY = 'save_user_get_apikey';
- const SAVE_USER_JSON = 'save_user_json';
- const UPDATE_USER_FROM_USERNAME = 'update_user_from_username';
- const UPDATE_USER_APIKEY = 'update_user_apikey';
- const DELETE_USER = 'delete_user';
- const GET_USERS_API_KEYS = 'get_users_api_keys';
- const GET_USER_API_KEY = 'get_user_api_key';
-
- const GET_COURSES = 'get_courses';
- const GET_COURSES_FROM_EXTRA_FIELD = 'get_courses_from_extra_field';
- const SAVE_COURSE = 'save_course';
- const DELETE_COURSE = 'delete_course';
-
- const GET_SESSION_FROM_EXTRA_FIELD = 'get_session_from_extra_field';
- const SAVE_SESSION = 'save_session';
- const CREATE_SESSION_FROM_MODEL = 'create_session_from_model';
- const UPDATE_SESSION = 'update_session';
-
- const SUBSCRIBE_USER_TO_COURSE = 'subscribe_user_to_course';
- const SUBSCRIBE_USER_TO_COURSE_PASSWORD = 'subscribe_user_to_course_password';
- const UNSUBSCRIBE_USER_FROM_COURSE = 'unsubscribe_user_from_course';
- const GET_USERS_SUBSCRIBED_TO_COURSE = 'get_users_subscribed_to_course';
-
- const ADD_COURSES_SESSION = 'add_courses_session';
- const ADD_USERS_SESSION = 'add_users_session';
- const SUBSCRIBE_USER_TO_SESSION_FROM_USERNAME = 'subscribe_user_to_session_from_username';
-
- const GET_COURSE_QUIZ_MDL_COMPAT = 'get_course_quiz_mdl_compat';
-
- const UPDATE_USER_PAUSE_TRAINING = 'update_user_pause_training';
-
- const CHECK_CONDITIONAL_LOGIN = 'check_conditional_login';
- const GET_LEGAL_CONDITIONS = 'get_legal_conditions';
- const UPDATE_CONDITION_ACCEPTED = 'update_condition_accepted';
+ public const SERVICE_NAME = 'MsgREST';
+ public const EXTRA_FIELD_GCM_REGISTRATION = 'gcm_registration_id';
+
+ public const GET_AUTH = 'authenticate';
+ public const SAVE_GCM_ID = 'gcm_id';
+ public const LOGOUT = 'logout';
+
+ public const GET_USER_MESSAGES = 'user_messages';
+ public const GET_USER_MESSAGES_RECEIVED = 'user_messages_received';
+ public const DELETE_USER_MESSAGE = 'delete_user_message';
+ public const GET_USER_MESSAGES_SENT = 'user_messages_sent';
+ public const GET_COUNT_NEW_MESSAGES = 'get_count_new_messages';
+ public const SET_MESSAGE_READ = 'set_message_read';
+ public const POST_USER_MESSAGE_READ = 'user_message_read';
+ public const POST_USER_MESSAGE_UNREAD = 'user_message_unread';
+ public const SAVE_USER_MESSAGE = 'save_user_message';
+ public const GET_MESSAGE_USERS = 'message_users';
+ public const VIEW_MESSAGE = 'view_message';
+
+ public const GET_USER_COURSES = 'user_courses';
+ public const GET_USER_SESSIONS = 'user_sessions';
+
+ public const VIEW_PROFILE = 'view_user_profile';
+ public const GET_PROFILE = 'user_profile';
+
+ public const VIEW_MY_COURSES = 'view_my_courses';
+ public const VIEW_COURSE_HOME = 'view_course_home';
+ public const GET_COURSE_INFO = 'course_info';
+ public const GET_COURSE_DESCRIPTIONS = 'course_descriptions';
+ public const GET_COURSE_DOCUMENTS = 'course_documents';
+ public const GET_COURSE_ANNOUNCEMENTS = 'course_announcements';
+ public const GET_COURSE_ANNOUNCEMENT = 'course_announcement';
+ public const GET_COURSE_AGENDA = 'course_agenda';
+ public const GET_COURSE_NOTEBOOKS = 'course_notebooks';
+ public const GET_COURSE_FORUM_CATEGORIES = 'course_forumcategories';
+ public const GET_COURSE_FORUM = 'course_forum';
+ public const GET_COURSE_FORUM_THREAD = 'course_forumthread';
+ public const GET_COURSE_LEARNPATHS = 'course_learnpaths';
+ public const GET_COURSE_LEARNPATH = 'course_learnpath';
+ public const GET_COURSE_LP_PROGRESS = 'course_lp_progress';
+ public const GET_COURSE_LINKS = 'course_links';
+ public const GET_COURSE_WORKS = 'course_works';
+
+ public const SAVE_COURSE_NOTEBOOK = 'save_course_notebook';
+
+ public const SAVE_FORUM_POST = 'save_forum_post';
+ public const SAVE_FORUM_THREAD = 'save_forum_thread';
+ public const SET_THREAD_NOTIFY = 'set_thread_notify';
+ public const DOWNLOAD_FORUM_ATTACHMENT = 'download_forum_attachment';
+
+ public const GET_WORK_LIST = 'get_work_list';
+ public const GET_WORK_STUDENTS_WITHOUT_PUBLICATIONS = 'get_work_students_without_publications';
+ public const GET_WORK_USERS = 'get_work_users';
+ public const GET_WORK_STUDENT_LIST = 'get_work_student_list';
+ public const PUT_WORK_STUDENT_ITEM_VISIBILITY = 'put_course_work_visibility';
+ public const DELETE_WORK_STUDENT_ITEM = 'delete_work_student_item';
+ public const DELETE_WORK_CORRECTIONS = 'delete_work_corrections';
+ public const DOWNLOAD_WORK_FOLDER = 'download_work_folder';
+ public const DOWNLOAD_WORK_COMMENT_ATTACHMENT = 'download_work_comment_attachment';
+ public const DOWNLOAD_WORK = 'download_work';
+
+ public const VIEW_DOCUMENT_IN_FRAME = 'view_document_in_frame';
+
+ public const VIEW_QUIZ_TOOL = 'view_quiz_tool';
+
+ public const VIEW_SURVEY_TOOL = 'view_survey_tool';
+
+ public const CREATE_CAMPUS = 'add_campus';
+ public const EDIT_CAMPUS = 'edit_campus';
+ public const DELETE_CAMPUS = 'delete_campus';
+
+ public const GET_USERS = 'get_users';
+ public const USERNAME_EXIST = 'username_exist';
+ public const SAVE_USER = 'save_user';
+ public const SAVE_USER_GET_APIKEY = 'save_user_get_apikey';
+ public const SAVE_USER_JSON = 'save_user_json';
+ public const UPDATE_USER_FROM_USERNAME = 'update_user_from_username';
+ public const UPDATE_USER_APIKEY = 'update_user_apikey';
+ public const DELETE_USER = 'delete_user';
+ public const GET_USERS_API_KEYS = 'get_users_api_keys';
+ public const GET_USER_API_KEY = 'get_user_api_key';
+
+ public const GET_COURSES = 'get_courses';
+ public const GET_COURSES_FROM_EXTRA_FIELD = 'get_courses_from_extra_field';
+ public const SAVE_COURSE = 'save_course';
+ public const DELETE_COURSE = 'delete_course';
+
+ public const GET_SESSION_FROM_EXTRA_FIELD = 'get_session_from_extra_field';
+ public const SAVE_SESSION = 'save_session';
+ public const CREATE_SESSION_FROM_MODEL = 'create_session_from_model';
+ public const UPDATE_SESSION = 'update_session';
+
+ public const SUBSCRIBE_USER_TO_COURSE = 'subscribe_user_to_course';
+ public const SUBSCRIBE_USER_TO_COURSE_PASSWORD = 'subscribe_user_to_course_password';
+ public const UNSUBSCRIBE_USER_FROM_COURSE = 'unsubscribe_user_from_course';
+ public const GET_USERS_SUBSCRIBED_TO_COURSE = 'get_users_subscribed_to_course';
+
+ public const ADD_COURSES_SESSION = 'add_courses_session';
+ public const ADD_USERS_SESSION = 'add_users_session';
+ public const SUBSCRIBE_USER_TO_SESSION_FROM_USERNAME = 'subscribe_user_to_session_from_username';
+
+ public const GET_COURSE_QUIZ_MDL_COMPAT = 'get_course_quiz_mdl_compat';
+
+ public const UPDATE_USER_PAUSE_TRAINING = 'update_user_pause_training';
+
+ public const CHECK_CONDITIONAL_LOGIN = 'check_conditional_login';
+ public const GET_LEGAL_CONDITIONS = 'get_legal_conditions';
+ public const UPDATE_CONDITION_ACCEPTED = 'update_condition_accepted';
/**
* @var Session
diff --git a/main/lp/learnpath.class.php b/main/lp/learnpath.class.php
index c8263f4f00..5870e4d3ea 100755
--- a/main/lp/learnpath.class.php
+++ b/main/lp/learnpath.class.php
@@ -359,7 +359,7 @@ class learnpath
ORDER BY view_count DESC ";
$status_list = [];
$res = Database::query($sql);
- while ($row = Database:: fetch_array($res)) {
+ while ($row = Database::fetch_array($res)) {
$status_list[$row['lp_item_id']] = $row['status'];
}
@@ -3754,7 +3754,7 @@ class learnpath
lp_view_id ='".$lp_view_id."' AND
status='completed'";
$result = Database::query($sql);
- $row_count = Database:: fetch_row($result);
+ $row_count = Database::fetch_row($result);
$count_item_view = (int) $row_count[0];
$not_multiple_attempt = 0;
if ($prevent_reinit === 1 && $count_item_view > 0) {
@@ -7997,7 +7997,7 @@ class learnpath
$legend .= get_lang('EditCurrentExecice');
}
if (isset($_GET['edit']) && $_GET['edit'] == 'true') {
- $legend .= Display:: return_message(
+ $legend .= Display::return_message(
get_lang('Warning').' ! '.get_lang('WarningEditingDocument')
);
}
diff --git a/main/mySpace/admin.php b/main/mySpace/admin.php
index f992f17a4a..9e4a28b2cc 100755
--- a/main/mySpace/admin.php
+++ b/main/mySpace/admin.php
@@ -15,7 +15,7 @@ $nameTools = get_lang('Administrators');
api_block_anonymous_users();
$interbreadcrumb[] = ["url" => "index.php", "name" => get_lang('MySpace')];
-Display :: display_header($nameTools);
+Display::display_header($nameTools);
api_display_tool_title($nameTools);
diff --git a/main/mySpace/course.php b/main/mySpace/course.php
index 0ef2b67655..9dbd0971b7 100755
--- a/main/mySpace/course.php
+++ b/main/mySpace/course.php
@@ -59,7 +59,7 @@ if (api_get_setting('add_users_by_coach') == 'true') {
}
}
-Display :: display_header(get_lang('Courses'));
+Display::display_header(get_lang('Courses'));
$user_id = 0;
$a_courses = [];
$menu_items = [];
@@ -307,11 +307,11 @@ function get_courses($from, $limit, $column, $direction)
if (count($userIdList) > 0) {
$countStudents = count($userIdList);
// tracking data
- $avgProgressInCourse = Tracking :: get_avg_student_progress($userIdList, $courseCode, [], $sessionId);
- $avgScoreInCourse = Tracking :: get_avg_student_score($userIdList, $courseCode, [], $sessionId);
- $avgTimeSpentInCourse = Tracking :: get_time_spent_on_the_course($userIdList, $courseInfo['real_id'], $sessionId);
- $messagesInCourse = Tracking :: count_student_messages($userIdList, $courseCode, $sessionId);
- $assignmentsInCourse = Tracking :: count_student_assignments($userIdList, $courseCode, $sessionId);
+ $avgProgressInCourse = Tracking::get_avg_student_progress($userIdList, $courseCode, [], $sessionId);
+ $avgScoreInCourse = Tracking::get_avg_student_score($userIdList, $courseCode, [], $sessionId);
+ $avgTimeSpentInCourse = Tracking::get_time_spent_on_the_course($userIdList, $courseInfo['real_id'], $sessionId);
+ $messagesInCourse = Tracking::count_student_messages($userIdList, $courseCode, $sessionId);
+ $assignmentsInCourse = Tracking::count_student_assignments($userIdList, $courseCode, $sessionId);
$avgTimeSpentInCourse = api_time_to_hms($avgTimeSpentInCourse / $countStudents);
$avgProgressInCourse = round($avgProgressInCourse / $countStudents, 2);
@@ -395,4 +395,4 @@ $form->setDefaults($params);
$form->display();
$table->display();
-Display :: display_footer();
+Display::display_footer();
diff --git a/main/mySpace/current_courses.php b/main/mySpace/current_courses.php
index dd9085b010..d80922f4e6 100755
--- a/main/mySpace/current_courses.php
+++ b/main/mySpace/current_courses.php
@@ -40,7 +40,7 @@ if (!empty($my_courses)) {
}
}
- $tmp_students = CourseManager :: get_student_list_from_course_code($course_code, false);
+ $tmp_students = CourseManager::get_student_list_from_course_code($course_code, false);
//Cleaning students only REAL students
$students = [];
@@ -69,8 +69,8 @@ if (!empty($my_courses)) {
$total_tools += $tool['count_access_tool'];
}
- if (Database :: num_rows($rs_lp) > 0) {
- while ($learnpath = Database :: fetch_array($rs_lp)) {
+ if (Database::num_rows($rs_lp) > 0) {
+ while ($learnpath = Database::fetch_array($rs_lp)) {
$lp_id = $learnpath['id'];
$lp_items =
diff --git a/main/mySpace/index.php b/main/mySpace/index.php
index 134af0a7c9..ea70875459 100755
--- a/main/mySpace/index.php
+++ b/main/mySpace/index.php
@@ -404,6 +404,6 @@ $view->display_one_col_template();
// Send the csv file if asked
if ($export_csv) {
ob_end_clean();
- Export:: arrayToCsv($csv_content, 'reporting_index');
+ Export::arrayToCsv($csv_content, 'reporting_index');
exit;
}
diff --git a/main/mySpace/progression.php b/main/mySpace/progression.php
index 8b2c83ff55..cf8ee3a65e 100755
--- a/main/mySpace/progression.php
+++ b/main/mySpace/progression.php
@@ -19,7 +19,7 @@ $this_section = SECTION_TRACKING;
api_block_anonymous_users();
$interbreadcrumb[] = ["url" => "index.php", "name" => get_lang('MySpace')];
-Display :: display_header($nameTools);
+Display::display_header($nameTools);
// Database Table Definitions
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
@@ -75,4 +75,4 @@ if (Database::num_rows($result_course) > 0) {
echo get_lang('NoCourse');
}
-Display :: display_footer();
+Display::display_footer();
diff --git a/main/mySpace/session_admin_teachers.php b/main/mySpace/session_admin_teachers.php
index dc70d3b832..7bf7e24d14 100644
--- a/main/mySpace/session_admin_teachers.php
+++ b/main/mySpace/session_admin_teachers.php
@@ -113,7 +113,7 @@ function get_users($from, $limit, $column, $direction)
foreach ($courses as $course_code) {
$courseInfo = api_get_course_info($course_code);
$courseId = $courseInfo['real_id'];
- if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) {
+ if (CourseManager::is_user_subscribed_in_course($student_id, $course_code, true)) {
$avg_time_spent += Tracking::get_time_spent_on_the_course(
$student_id,
$courseId,
@@ -273,7 +273,7 @@ if ($export_csv) {
}
$csv_content = array_merge($csv_header, $content);
ob_end_clean();
- Export :: arrayToCsv($csv_content, 'reporting_teacher_list');
+ Export::arrayToCsv($csv_content, 'reporting_teacher_list');
exit;
} else {
Display::display_header($nameTools);
diff --git a/main/mySpace/student.php b/main/mySpace/student.php
index 62c1321f6e..6b743eb034 100755
--- a/main/mySpace/student.php
+++ b/main/mySpace/student.php
@@ -160,7 +160,7 @@ function get_users($from, $limit, $column, $direction): array
}
if (isset($_GET['id_session'])) {
- $courses = Tracking :: get_course_list_in_session_from_student($student_id, $sessionId);
+ $courses = Tracking::get_course_list_in_session_from_student($student_id, $sessionId);
}
$avg_time_spent = $avg_student_score = $avg_student_progress = 0;
diff --git a/main/mySpace/teachers.php b/main/mySpace/teachers.php
index d536b0f17c..1c66a9b26a 100755
--- a/main/mySpace/teachers.php
+++ b/main/mySpace/teachers.php
@@ -125,7 +125,7 @@ function get_users($from, $limit, $column, $direction)
foreach ($courses as $course_code) {
$courseInfo = api_get_course_info($course_code);
$courseId = $courseInfo['real_id'];
- if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) {
+ if (CourseManager::is_user_subscribed_in_course($student_id, $course_code, true)) {
$avg_time_spent += Tracking::get_time_spent_on_the_course(
$student_id,
$courseId,
@@ -286,7 +286,7 @@ if ($export_csv) {
}
$csv_content = array_merge($csv_header, $content);
ob_end_clean();
- Export :: arrayToCsv($csv_content, 'reporting_teacher_list');
+ Export::arrayToCsv($csv_content, 'reporting_teacher_list');
exit;
} else {
Display::display_header($nameTools);
@@ -305,4 +305,4 @@ if ($export_csv) {
$table->display();
}
-Display :: display_footer();
+Display::display_footer();
diff --git a/main/mySpace/user_import.php b/main/mySpace/user_import.php
index 5ee672f7e9..d8440db638 100755
--- a/main/mySpace/user_import.php
+++ b/main/mySpace/user_import.php
@@ -87,7 +87,7 @@ if (isset($_POST['formSent']) && $_POST['formSent'] && $_FILES['import_file']['s
}
}
-Display :: display_header($tool_name);
+Display::display_header($tool_name);
if (isset($_FILES['import_file']) && $_FILES['import_file']['size'] == 0 && $_POST) {
echo Display::return_message(get_lang('ThisFieldIsRequired'), 'error');
@@ -162,4 +162,4 @@ $form->display();
)" class="selectpicker form-control">
+ echo Display::get_alphabet_options();
+ echo Display::get_numeric_options(0, 9, ''); ?>
';
- while ($user = Database:: fetch_array($rs)) {
+ while ($user = Database::fetch_array($rs)) {
$person_name =
$user['lastname'].' '.$user['firstname'].' ('.$user['username'].') '.$user['official_code'];
if ($showOfficialCode) {
@@ -737,7 +737,7 @@ $newLinks .= Display::url(