Minor - Format code

pull/4272/head
Angel Fernando Quiroz Campos 3 years ago
parent 695310ba3f
commit 20be8a2a0c
  1. 8
      main/admin/access_url_add_courses_to_url.php
  2. 2
      main/admin/access_url_add_usergroup_to_url.php
  3. 6
      main/admin/access_url_add_users_to_url.php
  4. 2
      main/admin/access_url_check_user_session.php
  5. 2
      main/admin/access_url_edit.php
  6. 4
      main/admin/access_urls.php
  7. 2
      main/admin/add_courses_to_usergroup.php
  8. 2
      main/admin/add_sessions_to_promotion.php
  9. 2
      main/admin/add_sessions_to_usergroup.php
  10. 4
      main/admin/cli.php
  11. 8
      main/admin/configure_inscription.php
  12. 2
      main/admin/course_export.php
  13. 2
      main/admin/course_information.php
  14. 10
      main/admin/course_request_accepted.php
  15. 2
      main/admin/course_request_edit.php
  16. 6
      main/admin/course_request_rejected.php
  17. 2
      main/admin/course_request_review.php
  18. 4
      main/admin/course_user_import.php
  19. 4
      main/admin/dashboard_add_courses_to_user.php
  20. 4
      main/admin/dashboard_add_sessions_to_user.php
  21. 4
      main/admin/dashboard_add_users_to_user.php
  22. 2
      main/admin/event_type.php
  23. 4
      main/admin/export_certificates.php
  24. 2
      main/admin/index.php
  25. 2
      main/admin/languages.php
  26. 2
      main/admin/legal_list.php
  27. 4
      main/admin/skills_import.php
  28. 2
      main/admin/special_exports.php
  29. 4
      main/admin/sub_language.php
  30. 4
      main/admin/sub_language_add.php
  31. 8
      main/admin/subscribe_user2course.php
  32. 4
      main/admin/system_announcements.php
  33. 6
      main/admin/user_export.php
  34. 2
      main/admin/user_information.php
  35. 2
      main/auth/key/key_auth.class.php
  36. 14
      main/auth/profile.php
  37. 2
      main/common_cartridge/export/src/CcForum.php
  38. 14
      main/common_cartridge/export/src/CcVersion13.php
  39. 2
      main/common_cartridge/export/src/CcWebLink.php
  40. 12
      main/common_cartridge/export/src/base/CcVersion1.php
  41. 2
      main/common_cartridge/export/src/lib/assesment/Assesment1ResourceFile.php
  42. 26
      main/common_cartridge/export/src/lib/assesment/CcQtiMetadata.php
  43. 12
      main/common_cartridge/export/src/lib/assesment/CcQtiProfiletype.php
  44. 164
      main/common_cartridge/export/src/lib/assesment/CcQtiTags.php
  45. 50
      main/common_cartridge/export/src/lib/assesment/CcQtiValues.php
  46. 2
      main/common_cartridge/export/src/lib/assesment/CcXmlNamespace.php
  47. 12
      main/common_cartridge/import/Cc1p3Convert.php
  48. 2
      main/common_cartridge/import/Imscc13Import.php
  49. 14
      main/common_cartridge/import/src/base/CcBase.php
  50. 32
      main/common_cartridge/import/src/base/validator/CcValidateType.php
  51. 2
      main/course_home/2column.php
  52. 4
      main/coursecopy/copy_course_session.php
  53. 2
      main/coursecopy/copy_course_session_selected.php
  54. 4
      main/document/create_audio.php
  55. 4
      main/document/create_document.php
  56. 6
      main/document/create_draw.php
  57. 2
      main/document/edit_document.php
  58. 2
      main/document/edit_draw.php
  59. 2
      main/document/edit_paint.php
  60. 2
      main/document/save_pixlr.php
  61. 2
      main/dropbox/dropbox_functions.inc.php
  62. 10
      main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php
  63. 2
      main/exercise/comparative_group_report.php
  64. 12
      main/exercise/exercise.class.php
  65. 4
      main/exercise/exercise.php
  66. 2
      main/exercise/exercise_report.php
  67. 4
      main/exercise/exercise_result.class.php
  68. 2
      main/exercise/exercise_submit.php
  69. 6
      main/exercise/fill_blanks.class.php
  70. 4
      main/exercise/hotpotatoes_exercise_report.php
  71. 2
      main/exercise/question_create.php
  72. 2
      main/exercise/question_stats.php
  73. 2
      main/exercise/stats.php
  74. 2
      main/extra/create_exam.php
  75. 2
      main/extra/edit_intervention.php
  76. 20
      main/extra/group_space_tracking.php
  77. 114
      main/extra/myStudents.php
  78. 12
      main/extra/my_progress_ind.php
  79. 26
      main/extra/print_myStudents.php
  80. 10
      main/extra/userInfo.php
  81. 24
      main/extra/userInfoLib.php
  82. 2
      main/forum/editthread.php
  83. 2
      main/forum/forumqualify.php
  84. 4
      main/forum/forumsearch.php
  85. 70
      main/gradebook/gradebook.php
  86. 6
      main/gradebook/gradebook_add_cat.php
  87. 2
      main/gradebook/gradebook_add_eval.php
  88. 8
      main/gradebook/gradebook_add_link_select_course.php
  89. 4
      main/gradebook/gradebook_add_result.php
  90. 6
      main/gradebook/gradebook_add_user.php
  91. 8
      main/gradebook/gradebook_edit_all.php
  92. 2
      main/gradebook/gradebook_edit_eval.php
  93. 10
      main/gradebook/gradebook_edit_link.php
  94. 2
      main/gradebook/gradebook_edit_result.php
  95. 4
      main/gradebook/gradebook_showlog_eval.php
  96. 4
      main/gradebook/gradebook_showlog_link.php
  97. 2
      main/gradebook/gradebook_statistics.php
  98. 10
      main/gradebook/gradebook_view_result.php
  99. 2
      main/gradebook/index.php
  100. 8
      main/gradebook/lib/fe/catform.class.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -31,7 +31,7 @@ $tool_name = get_lang('AddCoursesToURL');
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('PlatformAdmin')];
$interbreadcrumb[] = ['url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs')];
Display :: display_header($tool_name);
Display::display_header($tool_name);
echo '<div class="actions">';
echo Display::url(
@ -91,8 +91,8 @@ unset($result);
<select name="first_letter_course" onchange="javascript:document.formulaire.form_sent.value='2'; document.formulaire.submit();">
<option value="">--</option>
<?php
echo Display:: get_alphabet_options($first_letter_course);
echo Display:: get_numeric_options(0, 9, $first_letter_course);
echo Display::get_alphabet_options($first_letter_course);
echo Display::get_numeric_options(0, 9, $first_letter_course);
?>
</select>
</td>
@ -136,4 +136,4 @@ unset($result);
</form>
<?php
Display :: display_footer();
Display::display_footer();

@ -122,4 +122,4 @@ $db_urls = Database::store_result($result);
</form>
<?php
Display :: display_footer();
Display::display_footer();

@ -29,7 +29,7 @@ $tool_name = get_lang('AddUsersToURL');
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('PlatformAdmin')];
$interbreadcrumb[] = ['url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs')];
Display :: display_header($tool_name);
Display::display_header($tool_name);
echo '<div class="actions">';
echo Display::url(
@ -102,7 +102,7 @@ unset($result);
<select name="first_letter_user" onchange="javascript:document.formulaire.form_sent.value='2'; document.formulaire.submit();">
<option value="">--</option>
<?php
echo Display :: get_alphabet_options($first_letter_user);
echo Display::get_alphabet_options($first_letter_user);
?>
</select>
</td>
@ -150,4 +150,4 @@ unset($result);
</form>
<?php
Display :: display_footer();
Display::display_footer();

@ -111,4 +111,4 @@ foreach ($session_list as $session_item) {
}
echo $html;
// footer
Display :: display_footer();
Display::display_footer();

@ -146,7 +146,7 @@ $tool_name = get_lang('AddUrl');
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('PlatformAdmin')];
$interbreadcrumb[] = ['url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs')];
Display :: display_header($tool_name);
Display::display_header($tool_name);
// URL Images
$form->addElement('file', 'url_image_1', 'URL Image 1 (PNG)');

@ -21,7 +21,7 @@ if (!api_get_multiple_access_url()) {
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('PlatformAdmin')];
$tool_name = get_lang('MultipleAccessURLs');
Display :: display_header($tool_name);
Display::display_header($tool_name);
$my_user_url_list = api_get_access_url_from_user(api_get_user_id());
$current_access_url_id = api_get_current_access_url_id();
@ -184,4 +184,4 @@ $table->set_header(3, get_lang('CreatedAt'));
$table->set_header(4, get_lang('Modify'), false);
$table->display();
Display :: display_footer();
Display::display_footer();

@ -217,7 +217,7 @@ if (!empty($errorMsg)) {
<select name="firstLetterUser" onchange = "xajax_search(this.value,'multiple')" >
<option value = "%">--</option>
<?php
echo Display :: get_alphabet_options(); ?>
echo Display::get_alphabet_options(); ?>
</select>
</td>
<td align="center">&nbsp;</td>

@ -178,7 +178,7 @@ if (!empty($errorMsg)) {
<select name="firstLetterUser" onchange = "xajax_search_sessions(this.value,'multiple')" >
<option value = "%">--</option>
<?php
echo Display :: get_alphabet_options(); ?>
echo Display::get_alphabet_options(); ?>
</select>
</td>
<td align="center">&nbsp;</td>

@ -199,7 +199,7 @@ if (!empty($errorMsg)) {
<select name="firstLetterUser" onchange = "xajax_search_usergroup_sessions(this.value,'multiple')" >
<option value = "%">--</option>
<?php
echo Display :: get_alphabet_options(); ?>
echo Display::get_alphabet_options(); ?>
</select>
<?php echo '<br />'; ?>
</td>

@ -21,7 +21,7 @@ $tool_name = get_lang('CommandLineInterpreter');
// setting breadcrumbs
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('PlatformAdmin')];
// including the header file (which includes the banner itself)
Display :: display_header($tool_name);
Display::display_header($tool_name);
switch ($_GET["cmd"]) {
case "clear_stapi":
echo "Are you sure you are willing to erase all storage api data (no backup)? <a href='cli.php?cmd=clear_stapi_confirm' >Yes</a>";
@ -36,4 +36,4 @@ switch ($_GET["cmd"]) {
break;
}
Display :: display_footer();
Display::display_footer();

@ -24,7 +24,7 @@ if (api_get_setting('allow_terms_conditions') === 'true') {
$term_preview = LegalManager::get_last_condition($language);
}
$tool_name = get_lang('TermsAndConditions');
Display:: display_header('');
Display::display_header('');
echo '<div class="actions-title">';
echo $tool_name;
echo '</div>';
@ -33,7 +33,7 @@ if (api_get_setting('allow_terms_conditions') === 'true') {
} else {
echo get_lang('ComingSoon');
}
Display:: display_footer();
Display::display_footer();
exit;
}
}
@ -151,7 +151,7 @@ if (!empty($action)) {
}
}
Display:: display_header($tool_name);
Display::display_header($tool_name);
echo Display::page_header($tool_name);
@ -464,4 +464,4 @@ switch ($action) {
break;
}
Display:: display_footer();
Display::display_footer();

@ -187,4 +187,4 @@ $form->setDefaults(['select_type' => '1', 'file_type' => 'csv', 'include_users'
$form->addButtonExport(get_lang('ExportCourses'));
$form->display();
Display :: display_footer();
Display::display_footer();

@ -152,7 +152,7 @@ if (Database::num_rows($res) > 0) {
$user[] = $obj->lastname;
$user[] = $obj->firstname;
}
$user[] = Display:: encrypted_mailto_link($obj->email, $obj->email);
$user[] = Display::encrypted_mailto_link($obj->email, $obj->email);
$user[] = $obj->course_status == 5 ? get_lang('Student') : get_lang('Teacher');
$user[] = '<a href="user_information.php?user_id='.$obj->user_id.'">'.
Display::return_icon('info2.png', get_lang('UserInfo')).'</a>';

@ -107,10 +107,10 @@ function get_request_data($from, $number_of_items, $column, $direction)
}
$sql .= " ORDER BY col$column $direction ";
$sql .= " LIMIT $from,$number_of_items";
$res = Database :: query($sql);
$res = Database::query($sql);
$course_requests = [];
while ($course_request = Database :: fetch_row($res)) {
while ($course_request = Database::fetch_row($res)) {
$course_request[5] = api_get_local_time($course_request[5]);
$course_requests[] = $course_request;
}
@ -153,10 +153,10 @@ if (!empty($message)) {
}
}
Display :: display_header($tool_name);
Display::display_header($tool_name);
if (!$course_validation_feature) {
Display :: display_footer();
Display::display_footer();
exit;
}
@ -193,4 +193,4 @@ $table->display();
/* FOOTER */
Display :: display_footer();
Display::display_footer();

@ -328,7 +328,7 @@ function get_caller_name($caller_id)
$interbreadcrumb[] = ['url' => 'index.php', 'name' => get_lang('PlatformAdmin')];
$interbreadcrumb[] = ['url' => 'course_list.php', 'name' => get_lang('CourseList')];
Display :: display_header($tool_name);
Display::display_header($tool_name);
if (!$course_validation_feature) {
// Disabled course validation feature - show nothing after the error message.

@ -138,10 +138,10 @@ function get_request_data($from, $number_of_items, $column, $direction)
}
$sql .= " ORDER BY col$column $direction ";
$sql .= " LIMIT $from,$number_of_items";
$res = Database :: query($sql);
$res = Database::query($sql);
$course_requests = [];
while ($course_request = Database :: fetch_row($res)) {
while ($course_request = Database::fetch_row($res)) {
$course_request[5] = api_get_local_time($course_request[5]);
$course_requests[] = $course_request;
}
@ -210,7 +210,7 @@ if (!empty($message)) {
Display::display_header($tool_name);
if (!$course_validation_feature) {
Display :: display_footer();
Display::display_footer();
exit;
}

@ -240,7 +240,7 @@ if (!empty($message)) {
Display::display_header($tool_name);
if (!$course_validation_feature) {
Display :: display_footer();
Display::display_footer();
exit;
}

@ -197,7 +197,7 @@ if ($form->validate()) {
}
// Displaying the header.
Display :: display_header($tool_name);
Display::display_header($tool_name);
if (count($errors) != 0) {
$error_message = '<ul>';
@ -228,4 +228,4 @@ adam;course01;<?php echo STUDENT; ?>
</blockquote>
<?php
Display :: display_footer();
Display::display_footer();

@ -88,7 +88,7 @@ function search_courses($needle, $type)
$rs = Database::query($sql);
$return .= '<select id="origin" name="NoAssignedCoursesList[]" multiple="multiple" size="20" >';
while ($course = Database :: fetch_array($rs)) {
while ($course = Database::fetch_array($rs)) {
$return .= '<option value="'.$course['code'].'" title="'.htmlspecialchars($course['title'], ENT_QUOTES).'">'.$course['title'].' ('.$course['code'].')</option>';
}
$return .= '</select>';
@ -247,7 +247,7 @@ if (!empty($msg)) {
<p><?php echo get_lang('FirstLetterCourse'); ?> :</p>
<select name="firstLetterCourse" class="selectpicker form-control" onchange = "xajax_search_courses(this.value,'multiple')">
<option value="%">--</option>
<?php echo Display :: get_alphabet_options($firstLetter); ?>
<?php echo Display::get_alphabet_options($firstLetter); ?>
</select>
<?php
} ?>

@ -83,7 +83,7 @@ function search_sessions($needle, $type)
}
$rs = Database::query($sql);
$return .= '<select class="form-control" id="origin" name="NoAssignedSessionsList[]" multiple="multiple" size="20">';
while ($session = Database :: fetch_array($rs)) {
while ($session = Database::fetch_array($rs)) {
$return .= '<option value="'.$session['id'].'" title="'.htmlspecialchars($session['name'], ENT_QUOTES).'">'.$session['name'].'</option>';
}
$return .= '</select>';
@ -243,7 +243,7 @@ $result = Database::query($sql);
<p><?php echo get_lang('FirstLetterSession'); ?> :</p>
<select class="selectpicker form-control" name="firstLetterSession" onchange = "xajax_search_sessions(this.value, 'multiple')">
<option value="%">--</option>
<?php echo Display :: get_alphabet_options($firstLetterSession); ?>
<?php echo Display::get_alphabet_options($firstLetterSession); ?>
</select>
<?php
} ?>

@ -151,7 +151,7 @@ function search_users($needle, $type = 'multiple')
$rs = Database::query($sql);
$i = 0;
while ($user = Database :: fetch_array($rs)) {
while ($user = Database::fetch_array($rs)) {
$i++;
if ($i <= 10) {
$person_name = api_get_person_name($user['firstname'], $user['lastname']);
@ -167,7 +167,7 @@ function search_users($needle, $type = 'multiple')
);
} else {
$return .= '<select id="origin" class="form-control" name="NoAssignedUsersList[]" multiple="multiple" size="15" ">';
while ($user = Database :: fetch_array($rs)) {
while ($user = Database::fetch_array($rs)) {
$person_name = api_get_person_name($user['firstname'], $user['lastname']);
$return .= '<option value="'.$user['user_id'].'" title="'.htmlspecialchars($person_name, ENT_QUOTES).'">'.$person_name.' ('.$user['username'].')</option>';
}

@ -406,4 +406,4 @@ echo Display::actions($action_array);
</form>
<?php
Display :: display_footer();
Display::display_footer();

@ -30,7 +30,7 @@ if ($form->validate()) {
$courseInfo = api_get_course_info_by_id($courseId);
$courseCode = $courseInfo['code'];
$cats = Category:: load(
$cats = Category::load(
null,
null,
$courseCode,
@ -60,4 +60,4 @@ if ($form->validate()) {
}
}
Display :: display_footer();
Display::display_footer();

@ -46,7 +46,7 @@ if (api_is_platform_admin()) {
/* ACTION HANDLING */
if (!empty($_POST['Register'])) {
api_register_campus(!$_POST['donotlistcampus']);
$message = Display :: return_message(get_lang('VersionCheckEnabled'), 'confirmation');
$message = Display::return_message(get_lang('VersionCheckEnabled'), 'confirmation');
Display::addFlash($message);
}
$keyword_url = Security::remove_XSS((empty($_GET['keyword']) ? '' : $_GET['keyword']));

@ -344,4 +344,4 @@ $table->set_form_actions($form_actions);
echo '<div id="id_content_message">&nbsp;</div>';
$table->display();
Display :: display_footer();
Display::display_footer();

@ -59,4 +59,4 @@ function count_mask()
return LegalManager::count();
}
Display :: display_footer();
Display::display_footer();

@ -174,7 +174,7 @@ if (!empty($_POST['formSent']) && $_FILES['import_file']['size'] !== 0) {
$interbreadcrumb[] = ["url" => 'skill_list.php', "name" => get_lang('ManageSkills')];
Display :: display_header($tool_name);
Display::display_header($tool_name);
if (!empty($error_message)) {
echo Display::return_message($error_message, 'error');
@ -214,4 +214,4 @@ $form->display();
<b>2</b>;<b>1</b>;<b>Chamilo Expert</b>;Chamilo is an open source LMS;<br />
</pre>
<?php
Display :: display_footer();
Display::display_footer();

@ -133,7 +133,7 @@ if ($export && $name) {
form_special_export();
} else {
echo Display::return_message(get_lang('ToExportSpecialSelect'), 'normal');
CourseSelectForm :: display_form_session_export($course);
CourseSelectForm::display_form_session_export($course);
}
} else {
form_special_export();

@ -93,7 +93,7 @@ if (!is_dir($path_folder) || strlen($all_data_of_language['dokeos_folder']) == 0
api_not_allowed(true);
}
Display :: display_header($language_name);
Display::display_header($language_name);
echo '<div class="actions-message" >';
echo $intro;
@ -384,4 +384,4 @@ $table->set_header(5, get_lang('Action'), false);
$table->setHideColumn(0);
$table->display();
Display :: display_footer();
Display::display_footer();

@ -276,7 +276,7 @@ if (isset($_POST['SubmitAddNewLanguage'])) {
}
}
Display:: display_header($language_name);
Display::display_header($language_name);
echo $msg;
@ -335,4 +335,4 @@ if (isset($_GET['action']) && $_GET['action'] == 'definenewsublanguage') {
/**
* Footer.
*/
Display:: display_footer();
Display::display_footer();

@ -38,7 +38,7 @@ function validate_filter() {
</script>';
// displaying the header
Display :: display_header($tool_name);
Display::display_header($tool_name);
$link_add_group = '<a href="usergroups.php">'.
Display::return_icon('multiple.gif', get_lang('RegistrationByUsersGroups')).get_lang('RegistrationByUsersGroups').'</a>';
@ -295,7 +295,7 @@ if (is_array($extra_field_list)) {
aria-label="<?php echo get_lang('FirstLetterUser'); ?>">
<option value="">--</option>
<?php
echo Display :: get_alphabet_options($first_letter_user);
echo Display::get_alphabet_options($first_letter_user);
?>
</select>
</td>
@ -309,7 +309,7 @@ if (is_array($extra_field_list)) {
aria-label="<?php echo get_lang('FirstLetterCourse'); ?>">
<option value="">--</option>
<?php
echo Display :: get_alphabet_options($first_letter_course);
echo Display::get_alphabet_options($first_letter_course);
?>
</select>
</td>
@ -357,4 +357,4 @@ if (is_array($extra_field_list)) {
</form>
<?php
Display :: display_footer();
Display::display_footer();

@ -318,7 +318,7 @@ if ($action_todo) {
}
if ($show_announcement_list) {
$announcements = SystemAnnouncementManager :: get_all_announcements();
$announcements = SystemAnnouncementManager::get_all_announcements();
$announcement_data = [];
foreach ($announcements as $index => $announcement) {
$row = [];
@ -364,4 +364,4 @@ if ($show_announcement_list) {
$table->display();
}
Display :: display_footer();
Display::display_footer();

@ -183,7 +183,7 @@ if ($form->validate()) {
}
}
$studentData = UserManager:: get_extra_user_data(
$studentData = UserManager::get_extra_user_data(
$user['UserId'],
true,
false
@ -214,6 +214,6 @@ if ($form->validate()) {
}
}
Display :: display_header($tool_name);
Display::display_header($tool_name);
$form->display();
Display :: display_footer();
Display::display_footer();

@ -346,7 +346,7 @@ if (count($sessions) > 0) {
}
$timeSpent = api_time_to_hms(
Tracking :: get_time_spent_on_the_course(
Tracking::get_time_spent_on_the_course(
$userId,
$courseInfo['real_id'],
$id_session

@ -41,7 +41,7 @@ use ChamiloSession as Session;
*/
class KeyAuth
{
const PARAM_ACCESS_TOKEN = 'access_token';
public const PARAM_ACCESS_TOKEN = 'access_token';
protected static $services = [];

@ -436,7 +436,7 @@ if ($form->validate()) {
$password = $user_data['password1'];
} else {
Display::addFlash(
Display:: return_message(
Display::return_message(
get_lang('CurrentPasswordEmptyOrIncorrect'),
'warning',
false
@ -466,7 +466,7 @@ if ($form->validate()) {
if (!check_user_email($user_data['email']) && empty($user_data['password0'])) {
Display::addFlash(
Display:: return_message(
Display::return_message(
get_lang('ToChangeYourEmailMustTypeYourPassword'),
'error',
false
@ -489,7 +489,7 @@ if ($form->validate()) {
$user_data['picture_uri'] = $new_picture;
Display::addFlash(
Display:: return_message(
Display::return_message(
get_lang('PictureUploaded'),
'normal',
false
@ -517,7 +517,7 @@ if ($form->validate()) {
}
$form->removeElement('productions_list');
Display::addFlash(
Display:: return_message(get_lang('FileDeleted'), 'normal', false)
Display::return_message(get_lang('FileDeleted'), 'normal', false)
);
}
@ -530,7 +530,7 @@ if ($form->validate()) {
$filtered_extension = true;
} else {
Display::addFlash(
Display:: return_message(
Display::return_message(
get_lang('ProductionUploaded'),
'normal',
false
@ -650,12 +650,12 @@ if ($form->validate()) {
if ($passwordWasChecked == false) {
Display::addFlash(
Display:: return_message(get_lang('ProfileReg'), 'normal', false)
Display::return_message(get_lang('ProfileReg'), 'normal', false)
);
} else {
if ($validPassword) {
Display::addFlash(
Display:: return_message(get_lang('ProfileReg'), 'normal', false)
Display::return_message(get_lang('ProfileReg'), 'normal', false)
);
}
}

@ -3,7 +3,7 @@
class CcForum extends CcGeneralFile
{
const DEAFULTNAME = 'discussion.xml';
public const DEAFULTNAME = 'discussion.xml';
protected $rootns = 'dt';
protected $rootname = 'topic';
protected $ccnamespaces = ['dt' => 'http://www.imsglobal.org/xsd/imsccv1p3/imsdt_v1p3',

@ -3,13 +3,13 @@
class CcVersion13 extends CcVersion1
{
const WEBCONTENT = 'webcontent';
const QUESTIONBANK = 'imsqti_xmlv1p3/imscc_xmlv1p3/question-bank';
const ASSESSMENT = 'imsqti_xmlv1p3/imscc_xmlv1p3/assessment';
const ASSOCIATEDCONTENT = 'associatedcontent/imscc_xmlv1p3/learning-application-resource';
const DISCUSSIONTOPIC = 'imsdt_xmlv1p3';
const WEBLINK = 'imswl_xmlv1p3';
const BASICLTI = 'imsbasiclti_xmlv1p3';
public const WEBCONTENT = 'webcontent';
public const QUESTIONBANK = 'imsqti_xmlv1p3/imscc_xmlv1p3/question-bank';
public const ASSESSMENT = 'imsqti_xmlv1p3/imscc_xmlv1p3/assessment';
public const ASSOCIATEDCONTENT = 'associatedcontent/imscc_xmlv1p3/learning-application-resource';
public const DISCUSSIONTOPIC = 'imsdt_xmlv1p3';
public const WEBLINK = 'imswl_xmlv1p3';
public const BASICLTI = 'imsbasiclti_xmlv1p3';
public static $checker = [self::WEBCONTENT,
self::ASSESSMENT,

@ -3,7 +3,7 @@
class CcWebLink extends CcGeneralFile
{
const DEAFULTNAME = 'weblink.xml';
public const DEAFULTNAME = 'weblink.xml';
protected $rootns = 'wl';
protected $rootname = 'webLink';

@ -6,12 +6,12 @@
*/
class CcVersion1 extends CcVersionBase
{
const WEBCONTENT = 'webcontent';
const QUESTIONBANK = 'imsqti_xmlv1p2/imscc_xmlv1p0/question-bank';
const ASSESSMENT = 'imsqti_xmlv1p2/imscc_xmlv1p0/assessment';
const ASSOCIATEDCONTENT = 'associatedcontent/imscc_xmlv1p0/learning-application-resource';
const DISCUSSIONTOPIC = 'imsdt_xmlv1p0';
const WEBLINK = 'imswl_xmlv1p0';
public const WEBCONTENT = 'webcontent';
public const QUESTIONBANK = 'imsqti_xmlv1p2/imscc_xmlv1p0/question-bank';
public const ASSESSMENT = 'imsqti_xmlv1p2/imscc_xmlv1p0/assessment';
public const ASSOCIATEDCONTENT = 'associatedcontent/imscc_xmlv1p0/learning-application-resource';
public const DISCUSSIONTOPIC = 'imsdt_xmlv1p0';
public const WEBLINK = 'imswl_xmlv1p0';
public static $checker = [self::WEBCONTENT,
self::ASSESSMENT,

@ -3,7 +3,7 @@
class Assesment1ResourceFile extends CcGeneralFile
{
const DEAFULTNAME = 'assesment.xml';
public const DEAFULTNAME = 'assesment.xml';
protected $rootns = 'xmlns';
protected $rootname = CcQtiTags::QUESTESTINTEROP;

@ -4,19 +4,19 @@
abstract class CcQtiMetadata
{
// Assessment.
const QMD_ASSESSMENTTYPE = 'qmd_assessmenttype';
const QMD_SCORETYPE = 'qmd_scoretype';
const QMD_FEEDBACKPERMITTED = 'qmd_feedbackpermitted';
const QMD_HINTSPERMITTED = 'qmd_hintspermitted';
const QMD_SOLUTIONSPERMITTED = 'qmd_solutionspermitted';
const QMD_TIMELIMIT = 'qmd_timelimit';
const CC_ALLOW_LATE_SUBMISSION = 'cc_allow_late_submission';
const CC_MAXATTEMPTS = 'cc_maxattempts';
const CC_PROFILE = 'cc_profile';
public const QMD_ASSESSMENTTYPE = 'qmd_assessmenttype';
public const QMD_SCORETYPE = 'qmd_scoretype';
public const QMD_FEEDBACKPERMITTED = 'qmd_feedbackpermitted';
public const QMD_HINTSPERMITTED = 'qmd_hintspermitted';
public const QMD_SOLUTIONSPERMITTED = 'qmd_solutionspermitted';
public const QMD_TIMELIMIT = 'qmd_timelimit';
public const CC_ALLOW_LATE_SUBMISSION = 'cc_allow_late_submission';
public const CC_MAXATTEMPTS = 'cc_maxattempts';
public const CC_PROFILE = 'cc_profile';
// Items.
const CC_WEIGHTING = 'cc_weighting';
const QMD_SCORINGPERMITTED = 'qmd_scoringpermitted';
const QMD_COMPUTERSCORED = 'qmd_computerscored';
const CC_QUESTION_CATEGORY = 'cc_question_category';
public const CC_WEIGHTING = 'cc_weighting';
public const QMD_SCORINGPERMITTED = 'qmd_scoringpermitted';
public const QMD_COMPUTERSCORED = 'qmd_computerscored';
public const CC_QUESTION_CATEGORY = 'cc_question_category';
}

@ -3,12 +3,12 @@
abstract class CcQtiProfiletype
{
const MULTIPLE_CHOICE = 'cc.multiple_choice.v0p1';
const MULTIPLE_RESPONSE = 'cc.multiple_response.v0p1';
const TRUE_FALSE = 'cc.true_false.v0p1';
const FIELD_ENTRY = 'cc.fib.v0p1';
const PATTERN_MATCH = 'cc.pattern_match.v0p1';
const ESSAY = 'cc.essay.v0p1';
public const MULTIPLE_CHOICE = 'cc.multiple_choice.v0p1';
public const MULTIPLE_RESPONSE = 'cc.multiple_response.v0p1';
public const TRUE_FALSE = 'cc.true_false.v0p1';
public const FIELD_ENTRY = 'cc.fib.v0p1';
public const PATTERN_MATCH = 'cc.pattern_match.v0p1';
public const ESSAY = 'cc.essay.v0p1';
/**
* validates a profile value.

@ -3,86 +3,86 @@
abstract class CcQtiTags
{
const QUESTESTINTEROP = 'questestinterop';
const ASSESSMENT = 'assessment';
const QTIMETADATA = 'qtimetadata';
const QTIMETADATAFIELD = 'qtimetadatafield';
const FIELDLABEL = 'fieldlabel';
const FIELDENTRY = 'fieldentry';
const SECTION = 'section';
const IDENT = 'ident';
const ITEM = 'item';
const TITLE = 'title';
const ITEMMETADATA = 'itemmetadata';
const PRESENTATION = 'presentation';
const MATERIAL = 'material';
const MATTEXT = 'mattext';
const MATREF = 'matref';
const MATBREAK = 'matbreak';
const TEXTTYPE = 'texttype';
const RESPONSE_LID = 'response_lid';
const RENDER_CHOICE = 'render_choice';
const RESPONSE_LABEL = 'response_label';
const RESPROCESSING = 'resprocessing';
const OUTCOMES = 'outcomes';
const DECVAR = 'decvar';
const RESPCONDITION = 'respcondition';
const CONDITIONVAR = 'conditionvar';
const OTHER = 'other';
const DISPLAYFEEDBACK = 'displayfeedback';
const MAXVALUE = 'maxvalue';
const MINVALUE = 'minvalue';
const VARNAME = 'varname';
const VARTYPE = 'vartype';
const CONTINUE_ = 'continue';
const FEEDBACKTYPE = 'feedbacktype';
const LINKREFID = 'linkrefid';
const VAREQUAL = 'varequal';
const RESPIDENT = 'respident';
const ITEMFEEDBACK = 'itemfeedback';
const FLOW_MAT = 'flow_mat';
const RCARDINALITY = 'rcardinality';
const CHARSET = 'charset';
const LABEL = 'label';
const URI = 'uri';
const WIDTH = 'width';
const HEIGHT = 'height';
const X0 = 'x0';
const Y0 = 'y0';
const XML_LANG = 'lang';
const XML_SPACE = 'space';
const RUBRIC = 'rubric';
const ALTMATERIAL = 'altmaterial';
const PRESENTATION_MATERIAL = 'presentation_material';
const T_CLASS = 'class';
const MATERIAL_REF = 'material_ref';
const RTIMING = 'rtiming';
const RENDER_FIB = 'render_fib';
const SHUFFLE = 'shuffle';
const MINNUMBER = 'minnumber';
const MAXNUMBER = 'maxnumber';
const ENCODING = 'encoding';
const MAXCHARS = 'maxchars';
const PROMPT = 'prompt';
const FIBTYPE = 'fibtype';
const ROWS = 'rows';
const COLUMNS = 'columns';
const LABELREFID = 'labelrefid';
const RSHUFFLE = 'rshuffle';
const MATCH_GROUP = 'match_group';
const MATCH_MAX = 'match_max';
const FLOW = 'flow';
const RESPONSE_STR = 'response_str';
const FLOW_LABEL = 'flow_label';
const SETVAR = 'setvar';
const ACTION = 'action';
const AND_ = 'and';
const NOT_ = 'not';
const CASE_ = 'case';
const VARSUBSTRING = 'varsubstring';
const HINT = 'hint';
const SOLUTION = 'solution';
const FEEDBACKSTYLE = 'feedbackstyle';
const SOLUTIONMATERIAL = 'solutionmaterial';
const HINTMATERIAL = 'hintmaterial';
public const QUESTESTINTEROP = 'questestinterop';
public const ASSESSMENT = 'assessment';
public const QTIMETADATA = 'qtimetadata';
public const QTIMETADATAFIELD = 'qtimetadatafield';
public const FIELDLABEL = 'fieldlabel';
public const FIELDENTRY = 'fieldentry';
public const SECTION = 'section';
public const IDENT = 'ident';
public const ITEM = 'item';
public const TITLE = 'title';
public const ITEMMETADATA = 'itemmetadata';
public const PRESENTATION = 'presentation';
public const MATERIAL = 'material';
public const MATTEXT = 'mattext';
public const MATREF = 'matref';
public const MATBREAK = 'matbreak';
public const TEXTTYPE = 'texttype';
public const RESPONSE_LID = 'response_lid';
public const RENDER_CHOICE = 'render_choice';
public const RESPONSE_LABEL = 'response_label';
public const RESPROCESSING = 'resprocessing';
public const OUTCOMES = 'outcomes';
public const DECVAR = 'decvar';
public const RESPCONDITION = 'respcondition';
public const CONDITIONVAR = 'conditionvar';
public const OTHER = 'other';
public const DISPLAYFEEDBACK = 'displayfeedback';
public const MAXVALUE = 'maxvalue';
public const MINVALUE = 'minvalue';
public const VARNAME = 'varname';
public const VARTYPE = 'vartype';
public const CONTINUE_ = 'continue';
public const FEEDBACKTYPE = 'feedbacktype';
public const LINKREFID = 'linkrefid';
public const VAREQUAL = 'varequal';
public const RESPIDENT = 'respident';
public const ITEMFEEDBACK = 'itemfeedback';
public const FLOW_MAT = 'flow_mat';
public const RCARDINALITY = 'rcardinality';
public const CHARSET = 'charset';
public const LABEL = 'label';
public const URI = 'uri';
public const WIDTH = 'width';
public const HEIGHT = 'height';
public const X0 = 'x0';
public const Y0 = 'y0';
public const XML_LANG = 'lang';
public const XML_SPACE = 'space';
public const RUBRIC = 'rubric';
public const ALTMATERIAL = 'altmaterial';
public const PRESENTATION_MATERIAL = 'presentation_material';
public const T_CLASS = 'class';
public const MATERIAL_REF = 'material_ref';
public const RTIMING = 'rtiming';
public const RENDER_FIB = 'render_fib';
public const SHUFFLE = 'shuffle';
public const MINNUMBER = 'minnumber';
public const MAXNUMBER = 'maxnumber';
public const ENCODING = 'encoding';
public const MAXCHARS = 'maxchars';
public const PROMPT = 'prompt';
public const FIBTYPE = 'fibtype';
public const ROWS = 'rows';
public const COLUMNS = 'columns';
public const LABELREFID = 'labelrefid';
public const RSHUFFLE = 'rshuffle';
public const MATCH_GROUP = 'match_group';
public const MATCH_MAX = 'match_max';
public const FLOW = 'flow';
public const RESPONSE_STR = 'response_str';
public const FLOW_LABEL = 'flow_label';
public const SETVAR = 'setvar';
public const ACTION = 'action';
public const AND_ = 'and';
public const NOT_ = 'not';
public const CASE_ = 'case';
public const VARSUBSTRING = 'varsubstring';
public const HINT = 'hint';
public const SOLUTION = 'solution';
public const FEEDBACKSTYLE = 'feedbackstyle';
public const SOLUTIONMATERIAL = 'solutionmaterial';
public const HINTMATERIAL = 'hintmaterial';
}

@ -3,29 +3,29 @@
abstract class CcQtiValues
{
const EXAM_PROFILE = 'cc.exam.v0p1';
const YES = 'Yes';
const NO = 'No';
const RESPONSE = 'Response';
const SOLUTION = 'Solution';
const HINT = 'Hint';
const EXAMINATION = 'Examination';
const PERCENTAGE = 'Percentage';
const UNLIMITED = 'unlimited';
const SINGLE = 'Single';
const MULTIPLE = 'Multiple';
const ORDERER = 'Ordered';
const ASTERISK = 'Asterisk';
const BOX = 'Box';
const DASHLINE = 'Dashline';
const UNDERLINE = 'Underline';
const DECIMAL = 'Decimal';
const INTEGER = 'Integer';
const SCIENTIFIC = 'Scientific';
const STRING = 'String';
const SCORE = 'SCORE';
const SET = 'Set';
const COMPLETE = 'Complete';
const TEXTTYPE = 'text/plain';
const HTMLTYPE = 'text/html';
public const EXAM_PROFILE = 'cc.exam.v0p1';
public const YES = 'Yes';
public const NO = 'No';
public const RESPONSE = 'Response';
public const SOLUTION = 'Solution';
public const HINT = 'Hint';
public const EXAMINATION = 'Examination';
public const PERCENTAGE = 'Percentage';
public const UNLIMITED = 'unlimited';
public const SINGLE = 'Single';
public const MULTIPLE = 'Multiple';
public const ORDERER = 'Ordered';
public const ASTERISK = 'Asterisk';
public const BOX = 'Box';
public const DASHLINE = 'Dashline';
public const UNDERLINE = 'Underline';
public const DECIMAL = 'Decimal';
public const INTEGER = 'Integer';
public const SCIENTIFIC = 'Scientific';
public const STRING = 'String';
public const SCORE = 'SCORE';
public const SET = 'Set';
public const COMPLETE = 'Complete';
public const TEXTTYPE = 'text/plain';
public const HTMLTYPE = 'text/html';
}

@ -3,5 +3,5 @@
abstract class CcXmlNamespace
{
const XML = 'http://www.w3.org/XML/1998/namespace';
public const XML = 'http://www.w3.org/XML/1998/namespace';
}

@ -3,12 +3,12 @@
class Cc1p3Convert extends CcBase
{
const CC_TYPE_FORUM = 'imsdt_xmlv1p3';
const CC_TYPE_QUIZ = 'imsqti_xmlv1p3/imscc_xmlv1p3/assessment';
const CC_TYPE_QUESTION_BANK = 'imsqti_xmlv1p3/imscc_xmlv1p3/question-bank';
const CC_TYPE_WEBLINK = 'imswl_xmlv1p3';
const CC_TYPE_ASSOCIATED_CONTENT = 'associatedcontent/imscc_xmlv1p3/learning-application-resource';
const CC_TYPE_BASICLTI = 'imsbasiclti_xmlv1p3';
public const CC_TYPE_FORUM = 'imsdt_xmlv1p3';
public const CC_TYPE_QUIZ = 'imsqti_xmlv1p3/imscc_xmlv1p3/assessment';
public const CC_TYPE_QUESTION_BANK = 'imsqti_xmlv1p3/imscc_xmlv1p3/question-bank';
public const CC_TYPE_WEBLINK = 'imswl_xmlv1p3';
public const CC_TYPE_ASSOCIATED_CONTENT = 'associatedcontent/imscc_xmlv1p3/learning-application-resource';
public const CC_TYPE_BASICLTI = 'imsbasiclti_xmlv1p3';
public static $namespaces = ['imscc' => 'http://www.imsglobal.org/xsd/imsccv1p3/imscp_v1p1',
'lomimscc' => 'http://ltsc.ieee.org/xsd/imsccv1p3/LOM/manifest',

@ -3,7 +3,7 @@
class Imscc13Import
{
const FORMAT_IMSCC13 = 'imscc13';
public const FORMAT_IMSCC13 = 'imscc13';
public function log($message, $level, $a = null, $depth = null, $display = false)
{

@ -3,13 +3,13 @@
class CcBase
{
const CC_TYPE_FORUM = 'imsdt_xmlv1p3';
const CC_TYPE_QUIZ = 'imsqti_xmlv1p3/imscc_xmlv1p3/assessment';
const CC_TYPE_QUESTION_BANK = 'imsqti_xmlv1p3/imscc_xmlv1p3/question-bank';
const CC_TYPE_WEBLINK = 'imswl_xmlv1p3';
const CC_TYPE_WEBCONTENT = 'webcontent';
const CC_TYPE_ASSOCIATED_CONTENT = 'associatedcontent/imscc_xmlv1p3/learning-application-resource';
const CC_TYPE_EMPTY = '';
public const CC_TYPE_FORUM = 'imsdt_xmlv1p3';
public const CC_TYPE_QUIZ = 'imsqti_xmlv1p3/imscc_xmlv1p3/assessment';
public const CC_TYPE_QUESTION_BANK = 'imsqti_xmlv1p3/imscc_xmlv1p3/question-bank';
public const CC_TYPE_WEBLINK = 'imswl_xmlv1p3';
public const CC_TYPE_WEBCONTENT = 'webcontent';
public const CC_TYPE_ASSOCIATED_CONTENT = 'associatedcontent/imscc_xmlv1p3/learning-application-resource';
public const CC_TYPE_EMPTY = '';
public static $restypes = ['associatedcontent/imscc_xmlv1p0/learning-application-resource', 'webcontent'];
public static $forumns = ['dt' => 'http://www.imsglobal.org/xsd/imsdt_v1p0'];

@ -3,22 +3,22 @@
class CcValidateType
{
const MANIFEST_VALIDATOR1 = 'cclibxml2validator.xsd';
const ASSESMENT_VALIDATOR1 = '/domainProfile_4/ims_qtiasiv1p2_localised.xsd';
const DISCUSSION_VALIDATOR1 = '/domainProfile_6/imsdt_v1p0_localised.xsd';
const WEBLINK_VALIDATOR1 = '/domainProfile_5/imswl_v1p0_localised.xsd';
const MANIFEST_VALIDATOR11 = 'cc11libxml2validator.xsd';
const BLTI_VALIDATOR11 = 'imslticc_v1p0p1.xsd';
const ASSESMENT_VALIDATOR11 = 'ccv1p1_qtiasiv1p2p1_v1p0.xsd';
const DISCUSSION_VALIDATOR11 = 'ccv1p1_imsdt_v1p1.xsd';
const WEBLINK_VALIDATOR11 = 'ccv1p1_imswl_v1p1.xsd';
const MANIFEST_VALIDATOR13 = 'cc13libxml2validator.xsd';
const BLTI_VALIDATOR13 = 'imslticc_v1p3.xsd';
const ASSESMENT_VALIDATOR13 = 'ccv1p3_qtiasiv1p2p1_v1p0.xsd';
const DISCUSSION_VALIDATOR13 = 'ccv1p3_imsdt_v1p3.xsd';
const WEBLINK_VALIDATOR13 = 'ccv1p3_imswl_v1p3.xsd';
public const MANIFEST_VALIDATOR1 = 'cclibxml2validator.xsd';
public const ASSESMENT_VALIDATOR1 = '/domainProfile_4/ims_qtiasiv1p2_localised.xsd';
public const DISCUSSION_VALIDATOR1 = '/domainProfile_6/imsdt_v1p0_localised.xsd';
public const WEBLINK_VALIDATOR1 = '/domainProfile_5/imswl_v1p0_localised.xsd';
public const MANIFEST_VALIDATOR11 = 'cc11libxml2validator.xsd';
public const BLTI_VALIDATOR11 = 'imslticc_v1p0p1.xsd';
public const ASSESMENT_VALIDATOR11 = 'ccv1p1_qtiasiv1p2p1_v1p0.xsd';
public const DISCUSSION_VALIDATOR11 = 'ccv1p1_imsdt_v1p1.xsd';
public const WEBLINK_VALIDATOR11 = 'ccv1p1_imswl_v1p1.xsd';
public const MANIFEST_VALIDATOR13 = 'cc13libxml2validator.xsd';
public const BLTI_VALIDATOR13 = 'imslticc_v1p3.xsd';
public const ASSESMENT_VALIDATOR13 = 'ccv1p3_qtiasiv1p2p1_v1p0.xsd';
public const DISCUSSION_VALIDATOR13 = 'ccv1p3_imsdt_v1p3.xsd';
public const WEBLINK_VALIDATOR13 = 'ccv1p3_imswl_v1p3.xsd';
/**
* @var string

@ -28,7 +28,7 @@ if (api_is_allowed_to_edit(null, true)) {
$msgDestroy = get_lang('DelLk').'<br />';
$msgDestroy .= '<a href="'.api_get_self().'">'.get_lang('No').'</a>&nbsp;|&nbsp;';
$msgDestroy .= '<a href="'.api_get_self().'?destroy=yes&amp;id='.$id.'">'.get_lang('Yes').'</a>';
$show_message .= Display :: return_message($msgDestroy, 'confirmation', false);
$show_message .= Display::return_message($msgDestroy, 'confirmation', false);
} elseif (isset($_GET['destroy']) && $_GET['destroy']) {
/*
* Process hiding a tools from available tools.

@ -214,7 +214,7 @@ function search_courses($id_session, $type)
$course_list_destination = [];
$return .= '<select id="destination" name="SessionCoursesListDestination[]" class="form-control">';
while ($course = Database :: fetch_array($rs)) {
while ($course = Database::fetch_array($rs)) {
$course_list_destination[] = $course['code'];
$return .= '<option value="'.$course['code'].'" title="'.@htmlspecialchars($course['title'].' ('.$course['visual_code'].')', ENT_QUOTES, api_get_system_encoding()).'">'.$course['title'].' ('.$course['visual_code'].')</option>';
}
@ -395,7 +395,7 @@ if (Security::check_token('post') && (
$hiddenFields['origin_session'] = $origin_session;
// Add token to Course select form
$hiddenFields['sec_token'] = Security::get_token();
CourseSelectForm :: display_form($course, $hiddenFields, true);
CourseSelectForm::display_form($course, $hiddenFields, true);
echo '<div style="float:right"><a href="javascript:window.history.go(-1);">'.
Display::return_icon(
'back.png',

@ -375,7 +375,7 @@ if (($action === 'course_select_form') ||
$hiddenFields['origin_course'] = api_get_course_id();
$hiddenFields['origin_session'] = api_get_session_id();
CourseSelectForm :: display_form($course, $hiddenFields, true);
CourseSelectForm::display_form($course, $hiddenFields, true);
echo '<div style="float:right"><a href="javascript:window.history.go(-1);">'.
Display::return_icon(

@ -87,7 +87,7 @@ if (!empty($groupId)) {
"url" => "../group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace'),
];
$group = GroupManager:: get_group_properties($groupId);
$group = GroupManager::get_group_properties($groupId);
$path = explode('/', $dir);
if ('/'.$path[1] != $group['directory']) {
api_not_allowed(true);
@ -142,7 +142,7 @@ if (isset($_POST['text2voice_mode']) && $_POST['text2voice_mode'] == 'google') {
downloadAudioGoogle($filepath, $dir);
}
Display:: display_header($nameTools, 'Doc');
Display::display_header($nameTools, 'Doc');
echo '<div class="actions">';
echo '<a href="document.php?id='.$document_id.'">';

@ -631,7 +631,7 @@ if ($form->validate()) {
}
}
Display :: display_header($nameTools, "Doc");
Display::display_header($nameTools, "Doc");
// link back to the documents overview
if ($is_certificate_mode) {
$actionsLeft = '<a href="document.php?'.api_get_cidreq().'&certificate=true&id='.$folder_id.'&selectcat='.$select_cat.'">'.
@ -678,5 +678,5 @@ if ($form->validate()) {
'.$form->returnForm().'
</div>
</div></div>';
Display :: display_footer();
Display::display_footer();
}

@ -83,7 +83,7 @@ if (!empty($groupId)) {
"url" => "../group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace'),
];
$group = GroupManager :: get_group_properties($groupId);
$group = GroupManager::get_group_properties($groupId);
$path = explode('/', $dir);
if ('/'.$path[1] != $group['directory']) {
api_not_allowed(true);
@ -134,7 +134,7 @@ if (empty($document_data['parents'])) {
];
}
}
Display :: display_header($nameTools, 'Doc');
Display::display_header($nameTools, 'Doc');
echo '<div class="actions">';
echo '<a href="document.php?id='.$document_id.'">'.
@ -169,4 +169,4 @@ if (api_browser_support('svg')) {
echo Display::return_message(get_lang('BrowserDontSupportsSVG'), 'error');
}
Display :: display_footer();
Display::display_footer();

@ -375,7 +375,7 @@ $groupInfo = GroupManager::get_group_properties(api_get_group_id());
if ($owner_id == api_get_user_id() ||
api_is_platform_admin() ||
$is_allowed_to_edit || GroupManager:: is_user_in_group(
$is_allowed_to_edit || GroupManager::is_user_in_group(
api_get_user_id(),
$groupInfo
)

@ -130,7 +130,7 @@ if (!$is_allowedToEdit) {
Event::event_access_tool(TOOL_DOCUMENT);
Display :: display_header($nameTools, 'Doc');
Display::display_header($nameTools, 'Doc');
echo '<div class="actions">';
echo '<a href="document.php?id='.$parent_id.'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';

@ -125,7 +125,7 @@ if (!$is_allowedToEdit) {
Event::event_access_tool(TOOL_DOCUMENT);
Display :: display_header($nameTools, 'Doc');
Display::display_header($nameTools, 'Doc');
echo '<div class="actions">';
echo '<a href="document.php?id='.$parent_id.'&'.api_get_cidreq().'">'.
Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>';

@ -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 = '';

@ -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,

@ -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';

@ -85,7 +85,7 @@ if ($exportXls) {
}
Display::display_header($nameTools, get_lang('Exercise'));
$actions = '<a href="exercise_report.php?exerciseId='.$exerciseId.'&'.api_get_cidreq().'">'.
Display:: return_icon(
Display::return_icon(
'back.png',
get_lang('GoBackToQuestionList'),
'',

@ -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";
}

@ -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,

@ -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;

@ -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,

@ -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,

@ -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';

@ -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 = '<script>
@ -325,4 +325,4 @@ $(function() {
<?php
echo Display::grid_html('results');
Display :: display_footer();
Display::display_footer();

@ -53,7 +53,7 @@ $sql = "SELECT iid, title, type, description, results_disabled
ORDER BY title ASC";
$result = Database::query($sql);
$exercises['-'] = '-'.get_lang('SelectExercise').'-';
while ($row = Database :: fetch_array($result)) {
while ($row = Database::fetch_array($result)) {
$exercises[$row['iid']] = cut($row['title'], EXERCISE_MAX_NAME_SIZE);
}
$form->addElement('select', 'exercise', get_lang('Exercise'), $exercises);

@ -188,7 +188,7 @@ $htmlHeadXtra[] = '<script>
Display::display_header($nameTools, get_lang('Exercise'));
$actions = '<a href="exercise_report.php?exerciseId='.$exerciseId.'&'.api_get_cidreq().'">'.
Display:: return_icon(
Display::return_icon(
'back.png',
get_lang('GoBackToQuestionList'),
'',

@ -366,7 +366,7 @@ $interbreadcrumb[] = [
$tpl = new Template(get_lang('ReportByQuestion'));
$actions = '<a href="exercise_report.php?exerciseId='.$exerciseId.'&'.api_get_cidreq().'">'.
Display:: return_icon(
Display::return_icon(
'back.png',
get_lang('GoBackToQuestionList'),
'',

@ -8,7 +8,7 @@ if (empty($allow)) {
exit;
}
$table = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$ex_user_id = isset($_GET['ex_user_id']) ? (int) $_GET['ex_user_id'] : '';
$mod_no = isset($_GET['mod_no']) ? Database::escape_string($_GET['mod_no']) : '';
$score_ex = isset($_GET['score_ex']) ? Database::escape_string($_GET['score_ex']) : '';

@ -13,7 +13,7 @@ api_block_anonymous_users();
Display::display_header();
$num = isset($_GET['num']) ? (int) $_GET['num'] : 0;
$student_idd = isset($_GET['student_id']) ? (int) $_GET['student_id'] : 0;
$tbl_stats_exercices = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$tbl_stats_exercices = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
?>
<form action="update_intervention.php" method="post" name="save_intercention">

@ -18,12 +18,12 @@ require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php';
/* MAIN CODE */
$group_id = api_get_group_id();
$user_id = api_get_user_id();
$current_group = GroupManager:: get_group_properties($group_id);
$current_group = GroupManager::get_group_properties($group_id);
// regroup table names for maintenance purpose
if (!api_is_allowed_to_edit(false, true) && !$is_group_member) {
api_not_allowed(true);
}
$tbl_stats_exercices_temp = Database:: get_main_table(track_e_exercices_temp);
$tbl_stats_exercices_temp = Database::get_main_table(track_e_exercices_temp);
//on vide la table temp qui recoit les examen complétés
$query = "TRUNCATE TABLE $tbl_stats_exercices_temp ";
$result = Database::query($query);
@ -151,15 +151,15 @@ $table->set_header(10, get_lang('GroupCalendar'), false, 'align="center"');
$table->set_header(11, get_lang('Details'), false);
// Database table definition
$table_group_user = Database:: get_course_table(TABLE_GROUP_USER);
$table_user = Database:: get_main_table(TABLE_MAIN_USER);
$table_group_user = Database::get_course_table(TABLE_GROUP_USER);
$table_user = Database::get_main_table(TABLE_MAIN_USER);
// $tbl_personal_agenda = Database :: get_user_personal_table(TABLE_PERSONAL_AGENDA);
$tbl_personal_agenda = Database:: get_main_table(TABLE_PERSONAL_AGENDA);
$tbl_course = Database:: get_main_table(TABLE_MAIN_COURSE);
$tbl_stats_exercices = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$tbl_stats_exercices_temp = Database:: get_main_table(track_e_exercices_temp);
$tbl_group_course_info = Database:: get_course_table(TABLE_GROUP);
$tbl_personal_agenda = Database::get_main_table(TABLE_PERSONAL_AGENDA);
$tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
$tbl_stats_exercices = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$tbl_stats_exercices_temp = Database::get_main_table(track_e_exercices_temp);
$tbl_group_course_info = Database::get_course_table(TABLE_GROUP);
$course_id = api_get_course_int_id();
//on trouve le vrai groupID
@ -365,7 +365,7 @@ while ($resulta = Database::fetch_array($result)) {
}
$diff = abs($diff);
$last_connection_date = Tracking:: get_last_connection_date($user_in_groupe, true);
$last_connection_date = Tracking::get_last_connection_date($user_in_groupe, true);
if ($last_connection_date == '') {
$last_connection_date = get_lang('NoConnexion');
}

@ -162,12 +162,12 @@ if (isset($_GET['details'])) {
}
// Database Table Definitions
$tbl_course_user = Database:: get_main_table(TABLE_MAIN_COURSE_USER);
$tbl_stats_access = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS);
$tbl_stats_exercices = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$tbl_personal_agenda = Database:: get_main_table(TABLE_PERSONAL_AGENDA);
$tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$tbl_stats_access = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS);
$tbl_stats_exercices = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$tbl_personal_agenda = Database::get_main_table(TABLE_PERSONAL_AGENDA);
$TABLECALHORAIRE = Database:: get_course_table(TABLE_CAL_HORAIRE);
$TABLECALHORAIRE = Database::get_course_table(TABLE_CAL_HORAIRE);
if (isset($_GET['user_id']) && $_GET['user_id'] != '') {
$user_id = intval($_GET['user_id']);
@ -244,7 +244,7 @@ if (api_is_session_admin() || api_is_drh()) {
if (!empty($session_by_session_admin)) {
foreach ($session_by_session_admin as $session_coached_by_user) {
$courses_followed_by_coach = Tracking:: get_courses_list_from_session($session_coached_by_user['id']);
$courses_followed_by_coach = Tracking::get_courses_list_from_session($session_coached_by_user['id']);
$courses_in_session_by_coach[$session_coached_by_user['id']] = $courses_followed_by_coach;
}
}
@ -266,7 +266,7 @@ $sql = "SELECT c_id
user_id = ".intval($user_info['user_id']);
$rs = Database::query($sql);
while ($row = Database:: fetch_array($rs)) {
while ($row = Database::fetch_array($rs)) {
if ($drh_can_access_all_courses) {
$courses_in_session[0][] = $row['c_id'];
} else {
@ -282,7 +282,7 @@ $sql = 'SELECT session_id, c_id
WHERE user_id='.intval($user_info['user_id']);
$rs = Database::query($sql);
$tmp_sessions = [];
while ($row = Database:: fetch_array($rs, 'ASSOC')) {
while ($row = Database::fetch_array($rs, 'ASSOC')) {
$tmp_sessions[] = $row['session_id'];
if ($drh_can_access_all_courses) {
if (in_array($row['session_id'], $tmp_sessions)) {
@ -332,23 +332,23 @@ if (!empty($studentId)) {
echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'.
Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>';
echo '<a href="'.api_get_self().'?'.Security:: remove_XSS($_SERVER['QUERY_STRING']).'&export=csv">'.
echo '<a href="'.api_get_self().'?'.Security::remove_XSS($_SERVER['QUERY_STRING']).'&export=csv">'.
Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a> ';
echo '<a href="'.api_get_self().'?'.Security:: remove_XSS($_SERVER['QUERY_STRING']).'&export=xls">'.
echo '<a href="'.api_get_self().'?'.Security::remove_XSS($_SERVER['QUERY_STRING']).'&export=xls">'.
Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM).'</a> ';
if (!empty($user_info['email'])) {
$send_mail = '<a href="mailto:'.$user_info['email'].'">'.
Display:: return_icon('mail_send.png', get_lang('SendMail'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('mail_send.png', get_lang('SendMail'), '', ICON_SIZE_MEDIUM).'</a>';
} else {
$send_mail = Display:: return_icon('mail_send_na.png', get_lang('SendMail'), '', ICON_SIZE_MEDIUM);
$send_mail = Display::return_icon('mail_send_na.png', get_lang('SendMail'), '', ICON_SIZE_MEDIUM);
}
echo $send_mail;
if (!empty($studentId) && !empty($course_code)) {
// Only show link to connection details if course and student were defined in the URL
echo '<a href="access_details.php?student='.$studentId.'&course='.$course_code.'&origin='.$origin.'&cidReq='.$course_code.'&id_session='.$sessionId.'">'.
Display:: return_icon('statistics.png', get_lang('AccessDetails'), '', ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('statistics.png', get_lang('AccessDetails'), '', ICON_SIZE_MEDIUM).'</a>';
}
if (api_can_login_as($studentId)) {
echo '<a href="'.api_get_path(
@ -372,7 +372,7 @@ if (!empty($studentId)) {
// get average of score and average of progress by student
$avg_student_progress = $avg_student_score = 0;
if (CourseManager:: is_user_subscribed_in_course($user_info['user_id'], $course_code, true)) {
if (CourseManager::is_user_subscribed_in_course($user_info['user_id'], $course_code, true)) {
$avg_student_progress = Tracking::get_avg_student_progress(
$user_info['user_id'],
$course_code,
@ -393,7 +393,7 @@ if (!empty($studentId)) {
$time_spent_on_the_course = 0;
if (!empty($courseInfo)) {
$time_spent_on_the_course = api_time_to_hms(
Tracking:: get_time_spent_on_the_course(
Tracking::get_time_spent_on_the_course(
$user_info['user_id'],
$courseInfo['real_id'],
$sessionId
@ -402,12 +402,12 @@ if (!empty($studentId)) {
}
// get information about connections on the platform by student
$first_connection_date = Tracking:: get_first_connection_date($user_info['user_id']);
$first_connection_date = Tracking::get_first_connection_date($user_info['user_id']);
if ($first_connection_date == '') {
$first_connection_date = get_lang('NoConnexion');
}
$last_connection_date = Tracking:: get_last_connection_date($user_info['user_id'], true);
$last_connection_date = Tracking::get_last_connection_date($user_info['user_id'], true);
if ($last_connection_date == '') {
$last_connection_date = get_lang('NoConnexion');
}
@ -550,7 +550,7 @@ if (!empty($studentId)) {
<td align="right">
<?php
echo get_lang('Progress').' ';
Display:: display_icon(
Display::display_icon(
'info3.gif',
get_lang('ScormAndLPProgressTotalAverage'),
['align' => 'absmiddle', 'hspace' => '3px']
@ -562,7 +562,7 @@ if (!empty($studentId)) {
<td align="right">
<?php
echo get_lang('Score').' ';
Display:: display_icon(
Display::display_icon(
'info3.gif',
get_lang('ScormAndLPTestTotalAverage'),
['align' => 'absmiddle', 'hspace' => '3px']
@ -700,9 +700,9 @@ if (!empty($studentId)) {
$courseId = $courseInfoItem['real_id'];
$courseCodeItem = $courseInfoItem['code'];
if (CourseManager:: is_user_subscribed_in_course($studentId, $courseCodeItem, true)) {
if (CourseManager::is_user_subscribed_in_course($studentId, $courseCodeItem, true)) {
$time_spent_on_course = api_time_to_hms(
Tracking:: get_time_spent_on_the_course($user_info['user_id'], $courseId, $sId)
Tracking::get_time_spent_on_the_course($user_info['user_id'], $courseId, $sId)
);
// get average of faults in attendances by student
@ -755,7 +755,7 @@ if (!empty($studentId)) {
$sId
);
$score = Tracking:: get_avg_student_score($user_info['user_id'], $courseCodeItem, [], $sId);
$score = Tracking::get_avg_student_score($user_info['user_id'], $courseCodeItem, [], $sId);
$progress = empty($progress) ? '0%' : $progress.'%';
$score = empty($score) ? '0%' : $score.'%';
@ -802,7 +802,7 @@ if (!empty($studentId)) {
if ($user_info['status'] != INVITEE) {
$csv_content[] = [];
$csv_content[] = [str_replace('&nbsp;', '', $table_title)];
$t_lp = Database:: get_course_table(TABLE_LP_MAIN);
$t_lp = Database::get_course_table(TABLE_LP_MAIN);
// csv export headers
$csv_content[] = [];
@ -853,7 +853,7 @@ if (!empty($studentId)) {
<th>
<?php
echo get_lang('Time').' ';
Display:: display_icon(
Display::display_icon(
'info3.gif',
get_lang('TotalTimeByCourse'),
['align' => 'absmiddle', 'hspace' => '3px']
@ -862,7 +862,7 @@ if (!empty($studentId)) {
<th>
<?php
echo get_lang('AverageScore').' ';
Display:: display_icon(
Display::display_icon(
'info3.gif',
get_lang('AverageIsCalculatedBasedInAllAttempts'),
['align' => 'absmiddle', 'hspace' => '3px']
@ -878,7 +878,7 @@ if (!empty($studentId)) {
</th>
<th><?php
echo get_lang('Progress').' ';
Display:: display_icon(
Display::display_icon(
'info3.gif',
get_lang('LPProgressScore'),
['align' => 'absmiddle', 'hspace' => '3px']
@ -886,7 +886,7 @@ if (!empty($studentId)) {
</th>
<th><?php
echo get_lang('LastConnexion').' ';
Display:: display_icon(
Display::display_icon(
'info3.gif',
get_lang('LastTimeTheCourseWasUsed'),
['align' => 'absmiddle', 'hspace' => '3px']
@ -961,7 +961,7 @@ if (!empty($studentId)) {
);
// Latest exercise results in a LP
$score_latest = Tracking:: get_avg_student_score(
$score_latest = Tracking::get_avg_student_score(
$studentId,
$course_code,
[$lp_id],
@ -1070,7 +1070,7 @@ if (!empty($studentId)) {
<tr>
<th><?php echo get_lang('Exercises'); ?></th>
<th><?php echo get_lang('LearningPath'); ?></th>
<th><?php echo get_lang('AvgCourseScore').' '.Display:: return_icon(
<th><?php echo get_lang('AvgCourseScore').' '.Display::return_icon(
'info3.gif',
get_lang('AverageScore'),
['align' => 'absmiddle', 'hspace' => '3px']
@ -1090,7 +1090,7 @@ if (!empty($studentId)) {
get_lang('Attempts'),
];
$t_quiz = Database:: get_course_table(TABLE_QUIZ_TEST);
$t_quiz = Database::get_course_table(TABLE_QUIZ_TEST);
$sessionCondition = api_get_session_condition(
$sessionId,
true,
@ -1107,8 +1107,8 @@ if (!empty($studentId)) {
$result_exercices = Database::query($sql);
$i = 0;
if (Database:: num_rows($result_exercices) > 0) {
while ($exercices = Database:: fetch_array($result_exercices)) {
if (Database::num_rows($result_exercices) > 0) {
while ($exercices = Database::fetch_array($result_exercices)) {
$exercise_id = intval($exercices['iid']);
$count_attempts = Tracking::count_student_exercise_attempts(
$studentId,
@ -1183,8 +1183,8 @@ if (!empty($studentId)) {
ORDER BY exe_date DESC
LIMIT 1";
$result_last_attempt = Database::query($sql);
if (Database:: num_rows($result_last_attempt) > 0) {
$id_last_attempt = Database:: result($result_last_attempt, 0, 0);
if (Database::num_rows($result_last_attempt) > 0) {
$id_last_attempt = Database::result($result_last_attempt, 0, 0);
if ($count_attempts > 0) {
echo '<a href="../exercise/exercise_show.php?id='.$id_last_attempt.
'&cidReq='.$course_code.
@ -1465,7 +1465,7 @@ while ($a_courses = Database::fetch_array($result2)) {
}
api_display_tool_title($nameTools);
$tbl_personal_agenda = Database:: get_main_table(TABLE_PERSONAL_AGENDA);
$tbl_personal_agenda = Database::get_main_table(TABLE_PERSONAL_AGENDA);
$now = date('Y-m-d');
//on compte le nombre de m% dans l'agenda pour chaque module
$sqljtot = "SELECT COUNT( * ) AS TOT
@ -1662,7 +1662,7 @@ if ($end_date < '2010-01-01') {
</tr>
<?php
$tbl_stats_exercices = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$tbl_stats_exercices = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$sqlinter = "SELECT *
FROM $tbl_stats_exercices
WHERE
@ -1788,10 +1788,10 @@ if (empty($_GET['details'])) {
if (!empty($courses)) {
foreach ($courses as $course_code) {
if (CourseManager:: is_user_subscribed_in_course($studentId, $course_code, true)) {
$course_info = CourseManager:: get_course_information($course_code);
if (CourseManager::is_user_subscribed_in_course($studentId, $course_code, true)) {
$course_info = CourseManager::get_course_information($course_code);
$time_spent_on_course = api_time_to_hms(
Tracking:: get_time_spent_on_the_course($user_info['user_id'], $course_code, $session_id)
Tracking::get_time_spent_on_the_course($user_info['user_id'], $course_code, $session_id)
);
//on sort le c_id avec le code du cours
$sql8 = "SELECT *
@ -1895,7 +1895,7 @@ if (empty($_GET['details'])) {
null,
$session_id
);
$score = Tracking:: get_avg_student_score($user_info['user_id'], $course_code, null, $session_id);
$score = Tracking::get_avg_student_score($user_info['user_id'], $course_code, null, $session_id);
$progress = empty($progress) ? '0%' : $progress.'%';
$score = empty($score) ? '0%' : $score.'%';
@ -1947,7 +1947,7 @@ if (empty($_GET['details'])) {
} else {
$csv_content[] = [];
$csv_content[] = [str_replace('&nbsp;', '', $table_title)];
$t_lp = Database:: get_course_table(TABLE_LP_MAIN);
$t_lp = Database::get_course_table(TABLE_LP_MAIN);
// csv export headers
$csv_content[] = [];
@ -1975,7 +1975,7 @@ if (empty($_GET['details'])) {
}
$rs_lp = Database::query($sql_lp);
if (Database:: num_rows($rs_lp) > 0) {
if (Database::num_rows($rs_lp) > 0) {
?>
<!-- LPs-->
<table class="table table-hover table-striped data_table">
@ -1983,31 +1983,31 @@ if (empty($_GET['details'])) {
<th><?php echo get_lang('Learnpaths'); ?></th>
<th><?php echo get_lang('FirstConnexion'); ?></th>
<th><?php echo get_lang('Time').' ';
Display:: display_icon(
Display::display_icon(
'info3.gif',
get_lang('TotalTimeByCourse'),
['align' => 'absmiddle', 'hspace' => '3px']
); ?></th>
<th><?php echo get_lang('AverageScore').' ';
Display:: display_icon(
Display::display_icon(
'info3.gif',
get_lang('AverageIsCalculatedBasedInAllAttempts'),
['align' => 'absmiddle', 'hspace' => '3px']
); ?></th>
<th><?php echo get_lang('LatestAttemptAverageScore').' ';
Display:: display_icon(
Display::display_icon(
'info3.gif',
get_lang('AverageIsCalculatedBasedInTheLatestAttempts'),
['align' => 'absmiddle', 'hspace' => '3px']
); ?></th>
<th><?php echo get_lang('Progress').' ';
Display:: display_icon(
Display::display_icon(
'info3.gif',
get_lang('LPProgressScore'),
['align' => 'absmiddle', 'hspace' => '3px']
); ?></th>
<th><?php echo get_lang('LastConnexion').' ';
Display:: display_icon(
Display::display_icon(
'info3.gif',
get_lang('LastTimeTheCourseWasUsed'),
['align' => 'absmiddle', 'hspace' => '3px']
@ -2031,7 +2031,7 @@ if (empty($_GET['details'])) {
$rs2 = Database::query($sql2);
$first_connection_date_to_module = Database::result($rs2, 0, 0);
$i = 0;
while ($learnpath = Database:: fetch_array($rs_lp)) {
while ($learnpath = Database::fetch_array($rs_lp)) {
$lp_id = intval($learnpath['id']);
$lp_name = $learnpath['name'];
$any_result = false;
@ -2089,7 +2089,7 @@ if (empty($_GET['details'])) {
);
// Latest exercise results in a LP
$score_latest = Tracking:: get_avg_student_score(
$score_latest = Tracking::get_avg_student_score(
$studentId,
$course_code,
[$lp_id],
@ -2192,7 +2192,7 @@ if (empty($_GET['details'])) {
<tr>
<th><?php echo get_lang('Exercises'); ?></th>
<th><?php echo get_lang('LearningPath'); ?></th>
<th><?php echo get_lang('AvgCourseScore').' '.Display:: return_icon(
<th><?php echo get_lang('AvgCourseScore').' '.Display::return_icon(
'info3.gif',
get_lang('AverageScore'),
['align' => 'absmiddle', 'hspace' => '3px']
@ -2211,7 +2211,7 @@ if (empty($_GET['details'])) {
get_lang('Attempts'),
];
$t_quiz = Database:: get_course_table(TABLE_QUIZ_TEST);
$t_quiz = Database::get_course_table(TABLE_QUIZ_TEST);
$sql = "SELECT quiz.title, iid FROM $t_quiz AS quiz
WHERE
quiz.c_id = $c_id AND
@ -2220,8 +2220,8 @@ if (empty($_GET['details'])) {
ORDER BY quiz.title ASC ";
$result_exercices = Database::query($sql);
$i = 0;
if (Database:: num_rows($result_exercices) > 0) {
while ($exercices = Database:: fetch_array($result_exercices)) {
if (Database::num_rows($result_exercices) > 0) {
while ($exercices = Database::fetch_array($result_exercices)) {
$exercise_id = intval($exercices['iid']);
$count_attempts = Tracking::count_student_exercise_attempts(
$studentId,
@ -2294,8 +2294,8 @@ if (empty($_GET['details'])) {
status = ""
ORDER BY exe_date DESC LIMIT 1';
$result_last_attempt = Database::query($sql_last_attempt);
if (Database:: num_rows($result_last_attempt) > 0) {
$id_last_attempt = Database:: result($result_last_attempt, 0, 0);
if (Database::num_rows($result_last_attempt) > 0) {
$id_last_attempt = Database::result($result_last_attempt, 0, 0);
if ($count_attempts > 0) {
echo '<a href="../exercice/exercise_show.php?id='.$id_last_attempt.'&cidReq='.$course_code.'&session_id='.$session_id.'&student='.$studentId.'&origin='.(empty($_GET['origin']) ? 'tracking' : Security::remove_XSS(
$_GET['origin']
@ -2450,7 +2450,7 @@ if (empty($_GET['details'])) {
if ($export_csv) {
ob_end_clean();
Export:: export_table_csv($csv_content, 'reporting_student');
Export::export_table_csv($csv_content, 'reporting_student');
exit;
}
?>
@ -2621,4 +2621,4 @@ echo '<a target="_blank"
</tr>
</table>
<?php Display:: display_footer();
<?php Display::display_footer();

@ -14,8 +14,8 @@ $nameTools = get_lang('MyProgress');
$this_section = 'session_my_progress_ind';
$_user = api_get_user_info();
$tbl_stats_exercices = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$tbl_stats_access = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS);
$tbl_stats_exercices = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
$tbl_stats_access = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS);
Display::display_header($nameTools);
@ -126,7 +126,7 @@ while ($a_courses = Database::fetch_array($result2)) {
api_display_tool_title($nameTools);
$now = date('Y-m-d');
$tbl_personal_agenda = Database:: get_main_table(TABLE_PERSONAL_AGENDA);
$tbl_personal_agenda = Database::get_main_table(TABLE_PERSONAL_AGENDA);
//on compte le nombre de m% dans l'agenda pour chaque module
$sqljtot = "SELECT COUNT( * ) AS TOT
@ -329,7 +329,7 @@ while ($a_courses = Database::fetch_array($result2)) {
// The Tracking Class still uses the course code rather then the course id.
$tracking_c_code = $course_code_id['code'];
// time spent on the course
$time_spent_on_course = api_time_to_hms(Tracking:: get_time_spent_on_the_course($user_id, $c_id, $session_id));
$time_spent_on_course = api_time_to_hms(Tracking::get_time_spent_on_the_course($user_id, $c_id, $session_id));
// firts connection date
$sql2 = "SELECT STR_TO_DATE(access_date,'%Y-%m-%d')
FROM $tbl_stats_access
@ -388,11 +388,11 @@ while ($a_courses = Database::fetch_array($result2)) {
$end_date_module = $row[1];
//fin de trouver la date de fin prévue du module
//progression en %
$t_lp = Database:: get_course_table(TABLE_LP_MAIN);
$t_lp = Database::get_course_table(TABLE_LP_MAIN);
$sql_lp = " SELECT lp.name, lp.id FROM $t_lp lp WHERE c_id = '$c_id' ORDER BY lp.display_order";
$rs_lp = Database::query($sql_lp);
$i = 0;
while ($learnpath = Database:: fetch_array($rs_lp)) {
while ($learnpath = Database::fetch_array($rs_lp)) {
$lp_id = intval($learnpath['id']);
$lp_name = $learnpath['name'];
$any_result = false;

@ -18,10 +18,10 @@ if (isset($_GET['from']) && $_GET['from'] == 'myspace') {
//$nameTools = get_lang('StudentDetails');
$cidReset = true;
$get_course_code = Security:: remove_XSS($_GET['course']);
$get_course_code = Security::remove_XSS($_GET['course']);
if (isset($_GET['details'])) {
if (!empty($_GET['origin']) && $_GET['origin'] == 'user_course') {
$course_info = CourseManager:: get_course_information($get_course_code);
$course_info = CourseManager::get_course_information($get_course_code);
if (empty($cidReq)) {
$interbreadcrumb[] = [
"url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'],
@ -34,7 +34,7 @@ if (isset($_GET['details'])) {
];
} else {
if (!empty($_GET['origin']) && $_GET['origin'] == 'tracking_course') {
$course_info = CourseManager:: get_course_information($get_course_code);
$course_info = CourseManager::get_course_information($get_course_code);
if (empty($cidReq)) {
//$interbreadcrumb[] = array ("url" => api_get_path(WEB_COURSE_PATH).$course_info['directory'], 'name' => $course_info['title']);
}
@ -53,7 +53,7 @@ if (isset($_GET['details'])) {
"name" => get_lang('SessionList'),
];
$interbreadcrumb[] = [
'url' => "../admin/resume_session.php?id_session=".Security:: remove_XSS($_GET['id_session']),
'url' => "../admin/resume_session.php?id_session=".Security::remove_XSS($_GET['id_session']),
"name" => get_lang('SessionOverview'),
];
} else {
@ -63,13 +63,13 @@ if (isset($_GET['details'])) {
];
if (isset($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
$interbreadcrumb[] = [
"url" => "student.php?id_coach=".Security:: remove_XSS($_GET['id_coach']),
"url" => "student.php?id_coach=".Security::remove_XSS($_GET['id_coach']),
"name" => get_lang("CoachStudents"),
];
$interbreadcrumb[] = [
"url" => "myStudents.php?student=".Security:: remove_XSS(
"url" => "myStudents.php?student=".Security::remove_XSS(
$_GET['student']
).'&id_coach='.Security:: remove_XSS($_GET['id_coach']),
).'&id_coach='.Security::remove_XSS($_GET['id_coach']),
"name" => get_lang("StudentDetails"),
];
} else {
@ -78,7 +78,7 @@ if (isset($_GET['details'])) {
"name" => get_lang("MyStudents"),
];
$interbreadcrumb[] = [
"url" => "myStudents.php?student=".Security:: remove_XSS($_GET['student']),
"url" => "myStudents.php?student=".Security::remove_XSS($_GET['student']),
"name" => get_lang("StudentDetails"),
];
}
@ -97,7 +97,7 @@ if (isset($_GET['details'])) {
"name" => get_lang('SessionList'),
];
$interbreadcrumb[] = [
'url' => "../admin/resume_session.php?id_session=".Security:: remove_XSS($_GET['id_session']),
'url' => "../admin/resume_session.php?id_session=".Security::remove_XSS($_GET['id_session']),
"name" => get_lang('SessionOverview'),
];
} else {
@ -108,14 +108,14 @@ if (isset($_GET['details'])) {
if (isset($_GET['id_coach']) && intval($_GET['id_coach']) != 0) {
if (isset($_GET['id_session']) && intval($_GET['id_session']) != 0) {
$interbreadcrumb[] = [
"url" => "student.php?id_coach=".Security:: remove_XSS(
"url" => "student.php?id_coach=".Security::remove_XSS(
$_GET['id_coach']
)."&id_session=".$_GET['id_session'],
"name" => get_lang("CoachStudents"),
];
} else {
$interbreadcrumb[] = [
"url" => "student.php?id_coach=".Security:: remove_XSS($_GET['id_coach']),
"url" => "student.php?id_coach=".Security::remove_XSS($_GET['id_coach']),
"name" => get_lang("CoachStudents"),
];
}
@ -135,8 +135,8 @@ if (!api_is_allowed_to_edit() && !api_is_coach() && !api_is_drh() && !api_is_cou
api_not_allowed(true);
}
Display:: display_header($nameTools);
$tbl_stats_exercices = Database:: get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
Display::display_header($nameTools);
$tbl_stats_exercices = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
if (isset($_GET['user_id']) && $_GET['user_id'] != '') {
$user_id = intval($_GET['user_id']);

@ -9,7 +9,7 @@ if (empty($allow)) {
exit;
}
$TABLECALHORAIRE = Database :: get_course_table(cal_horaire);
$TABLECALHORAIRE = Database::get_course_table(cal_horaire);
$htmlHeadXtra[] = '<script>
function show_image(image,width,height) {
width = parseInt(width) + 20;
@ -31,15 +31,15 @@ if (api_is_anonymous()) {
}
//prepare variables used in userInfoLib.php functions
$TBL_USERINFO_DEF = Database:: get_course_table(TABLE_USER_INFO_DEF);
$TBL_USERINFO_CONTENT = Database:: get_course_table(TABLE_USER_INFO_CONTENT);
$TBL_USERINFO_DEF = Database::get_course_table(TABLE_USER_INFO_DEF);
$TBL_USERINFO_CONTENT = Database::get_course_table(TABLE_USER_INFO_CONTENT);
if ($tool_info['visibility'] == 1) {
$interbreadcrumb[] = ['url' => 'user.php', 'name' => get_lang('Users')];
}
if ($origin != 'learnpath') { //so we are not in learnpath tool
Display :: display_header($nameTools, "User");
Display::display_header($nameTools, "User");
$origin = Security::remove_XSS($_GET['origin']);
} else {
?> <link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CODE_PATH); ?>css/default.css" /> <?php
@ -309,7 +309,7 @@ if ($displayMode == "viewDefEdit") {
}
echo "<td><button class=\"save\" type=\"submit\" name=\"submit\">".get_lang('SaveChanges')."</button></td>\n", "</tr>", "</table>", "</form>\n";
if (api_get_setting('show_email_addresses') == 'true') {
echo "<p>".Display:: encrypted_mailto_link($mainUserInfo['email'], $mainUserInfo['email'])."</p>";
echo "<p>".Display::encrypted_mailto_link($mainUserInfo['email'], $mainUserInfo['email'])."</p>";
}
if (api_get_setting('extended_profile') == 'true') {

@ -96,8 +96,8 @@ function edit_cat_def($id, $title, $comment, $nbline)
*/
function remove_cat_def($id, $force = false)
{
$TBL_USERINFO_DEF = Database:: get_course_table(TABLE_USER_INFO_DEF);
$TBL_USERINFO_CONTENT = Database:: get_course_table(TABLE_USER_INFO_CONTENT);
$TBL_USERINFO_DEF = Database::get_course_table(TABLE_USER_INFO_DEF);
$TBL_USERINFO_CONTENT = Database::get_course_table(TABLE_USER_INFO_CONTENT);
$id = strval(intval($id));
@ -132,7 +132,7 @@ function remove_cat_def($id, $force = false)
*/
function move_cat_rank($id, $direction) // up & down.
{
$TBL_USERINFO_DEF = Database:: get_course_table(userinfo_def);
$TBL_USERINFO_DEF = Database::get_course_table(userinfo_def);
$id = strval(intval($id));
if (0 == (int) $id || !($direction == "up" || $direction == "down")) {
@ -167,7 +167,7 @@ function move_cat_rank($id, $direction) // up & down.
*/
function move_cat_rank_by_rank($rank, $direction) // up & down.
{
$TBL_USERINFO_DEF = Database:: get_course_table(userinfo_def);
$TBL_USERINFO_DEF = Database::get_course_table(userinfo_def);
if (0 == (int) $rank || !($direction == "up" || $direction == "down")) {
return false;
@ -243,8 +243,8 @@ function update_user_course_properties($user_id, $course_code, $properties, $hor
WHERE user_id = $user_id";
Database::query($sql2);
//on récupère l'horaire
$tbl_personal_agenda = Database:: get_main_table(TABLE_PERSONAL_AGENDA);
$TABLECALDATES = Database:: get_course_table(cal_dates);
$tbl_personal_agenda = Database::get_main_table(TABLE_PERSONAL_AGENDA);
$TABLECALDATES = Database::get_course_table(cal_dates);
$jour = 0;
$sql3 = "SELECT date FROM $TABLECALDATES
WHERE
@ -435,8 +435,8 @@ function cleanout_cat_content($user_id, $definition_id)
*/
function get_course_user_info($user_id)
{
$TBL_USERINFO_DEF = Database:: get_course_table(TABLE_USER_INFO_DEF);
$TBL_USERINFO_CONTENT = Database:: get_course_table(TABLE_USER_INFO_CONTENT);
$TBL_USERINFO_DEF = Database::get_course_table(TABLE_USER_INFO_DEF);
$TBL_USERINFO_CONTENT = Database::get_course_table(TABLE_USER_INFO_CONTENT);
$user_id = (int) $user_id;
$sql = "SELECT cat.id catId, cat.title,
@ -471,8 +471,8 @@ function get_course_user_info($user_id)
*/
function get_cat_content($userId, $catId)
{
$TBL_USERINFO_DEF = Database:: get_course_table(TABLE_USER_INFO_DEF);
$TBL_USERINFO_CONTENT = Database:: get_course_table(TABLE_USER_INFO_CONTENT);
$TBL_USERINFO_DEF = Database::get_course_table(TABLE_USER_INFO_DEF);
$TBL_USERINFO_CONTENT = Database::get_course_table(TABLE_USER_INFO_CONTENT);
$userId = (int) $userId;
$catId = (int) $catId;
@ -507,7 +507,7 @@ function get_cat_content($userId, $catId)
*/
function get_cat_def($catId)
{
$TBL_USERINFO_DEF = Database:: get_course_table(TABLE_USER_INFO_DEF);
$TBL_USERINFO_DEF = Database::get_course_table(TABLE_USER_INFO_DEF);
$catId = (int) $catId;
$sql = "SELECT id, title, comment, line_count, rank FROM $TBL_USERINFO_DEF WHERE id = $catId";
@ -536,7 +536,7 @@ function get_cat_def($catId)
*/
function get_cat_def_list()
{
$TBL_USERINFO_DEF = Database:: get_course_table(TABLE_USER_INFO_DEF);
$TBL_USERINFO_DEF = Database::get_course_table(TABLE_USER_INFO_DEF);
$sql = "SELECT id catId, title, comment , line_count
FROM $TBL_USERINFO_DEF

@ -89,7 +89,7 @@ if (api_is_invitee()) {
$groupId = api_get_group_id();
if (!empty($groupId)) {
$groupProperties = GroupManager:: get_group_properties($groupId);
$groupProperties = GroupManager::get_group_properties($groupId);
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.$cidreq,
'name' => get_lang('Groups'),

@ -338,5 +338,5 @@ if (api_is_allowed_to_edit() && $counter > 0) {
}
if ($origin != 'learnpath') {
Display:: display_footer();
Display::display_footer();
}

@ -46,7 +46,7 @@ if (api_is_in_gradebook()) {
$groupId = api_get_group_id();
if ($origin == 'group') {
$group_properties = GroupManager:: get_group_properties($groupId);
$group_properties = GroupManager::get_group_properties($groupId);
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'group/group.php?'.api_get_cidreq(),
'name' => get_lang('Groups'),
@ -89,5 +89,5 @@ forum_search();
// Footer
if ('learnpath' != $origin) {
Display :: display_footer();
Display::display_footer();
}

@ -45,7 +45,7 @@ $filter_warning_msg = true;
//this is called when there is no data for the course admin
if (isset($_GET['createallcategories'])) {
GradebookUtils::block_students();
$coursecat = Category :: get_not_created_course_categories(api_get_user_id());
$coursecat = Category::get_not_created_course_categories(api_get_user_id());
if (!count($coursecat) == 0) {
foreach ($coursecat as $row) {
$cat = new Category();
@ -68,7 +68,7 @@ if (isset($_GET['createallcategories'])) {
if (isset($_GET['movecat'])) {
$move_cat = (int) $_GET['movecat'];
GradebookUtils::block_students();
$cats = Category :: load($move_cat);
$cats = Category::load($move_cat);
if (!isset($_GET['targetcat'])) {
$move_form = new CatForm(
CatForm::TYPE_MOVE,
@ -85,7 +85,7 @@ if (isset($_GET['movecat'])) {
}
} else {
$get_target_cat = Security::remove_XSS($_GET['targetcat']);
$targetcat = Category :: load($get_target_cat);
$targetcat = Category::load($get_target_cat);
$course_to_crsind = ($cats[0]->get_course_code() != null && $targetcat[0]->get_course_code() == null);
if (!($course_to_crsind && !isset($_GET['confirm']))) {
@ -102,7 +102,7 @@ if (isset($_GET['movecat'])) {
if (isset($_GET['moveeval'])) {
GradebookUtils::block_students();
$get_move_eval = Security::remove_XSS($_GET['moveeval']);
$evals = Evaluation :: load($get_move_eval);
$evals = Evaluation::load($get_move_eval);
if (!isset($_GET['targetcat'])) {
$move_form = new EvalForm(
EvalForm::TYPE_MOVE,
@ -121,7 +121,7 @@ if (isset($_GET['moveeval'])) {
}
} else {
$get_target_cat = Security::remove_XSS($_GET['targetcat']);
$targetcat = Category :: load($get_target_cat);
$targetcat = Category::load($get_target_cat);
$course_to_crsind = ($evals[0]->get_course_code() != null && $targetcat[0]->get_course_code() == null);
if (!($course_to_crsind && !isset($_GET['confirm']))) {
@ -148,7 +148,7 @@ if (isset($_GET['movelink'])) {
api_get_self().'?movelink='.$get_move_link.'&selectcat='.$selectcat
);
if ($move_form->validate()) {
$targetcat = Category :: load($move_form->exportValue('move_cat'));
$targetcat = Category::load($move_form->exportValue('move_cat'));
$link[0]->move_to_cat($targetcat[0]);
unset($link);
header('Location: '.api_get_self().'?linkmoved=&selectcat='.$selectcat);
@ -164,7 +164,7 @@ if (isset($_GET['visiblecat'])) {
} else {
$visibility_command = 0;
}
$cats = Category :: load($_GET['visiblecat']);
$cats = Category::load($_GET['visiblecat']);
$cats[0]->set_visible($visibility_command);
$cats[0]->save();
$cats[0]->apply_visibility_to_children();
@ -179,7 +179,7 @@ if (isset($_GET['visiblecat'])) {
}
if (isset($_GET['deletecat'])) {
GradebookUtils::block_students();
$cats = Category :: load($_GET['deletecat']);
$cats = Category::load($_GET['deletecat']);
//delete all categories,subcategories and results
if ($cats[0] != null) {
if ($cats[0]->get_id() != 0) {
@ -200,7 +200,7 @@ if (isset($_GET['visibleeval'])) {
$visibility_command = 0;
}
$eval = Evaluation :: load($_GET['visibleeval']);
$eval = Evaluation::load($_GET['visibleeval']);
$eval[0]->set_visible($visibility_command);
$eval[0]->save();
unset($eval);
@ -215,7 +215,7 @@ if (isset($_GET['visibleeval'])) {
if (isset($_GET['deleteeval'])) {
GradebookUtils::block_students();
$eval = Evaluation :: load($_GET['deleteeval']);
$eval = Evaluation::load($_GET['deleteeval']);
if ($eval[0] != null) {
$eval[0]->delete_with_results();
}
@ -230,7 +230,7 @@ if (isset($_GET['visiblelink'])) {
} else {
$visibility_command = 0;
}
$link = LinkFactory :: load($_GET['visiblelink']);
$link = LinkFactory::load($_GET['visiblelink']);
$link[0]->set_visible($visibility_command);
$link[0]->save();
unset($link);
@ -246,7 +246,7 @@ if (isset($_GET['deletelink'])) {
GradebookUtils::block_students();
//fixing #5229
if (!empty($_GET['deletelink'])) {
$link = LinkFactory:: load($_GET['deletelink']);
$link = LinkFactory::load($_GET['deletelink']);
if ($link[0] != null) {
$link[0]->delete();
}
@ -288,14 +288,14 @@ if (isset($_POST['action'])) {
$number_of_deleted_links = 0;
foreach ($_POST['id'] as $indexstr) {
if (api_substr($indexstr, 0, 4) == 'CATE') {
$cats = Category :: load(api_substr($indexstr, 4));
$cats = Category::load(api_substr($indexstr, 4));
if ($cats[0] != null) {
$cats[0]->delete_all();
}
$number_of_deleted_categories++;
}
if (api_substr($indexstr, 0, 4) == 'EVAL') {
$eval = Evaluation :: load(api_substr($indexstr, 4));
$eval = Evaluation::load(api_substr($indexstr, 4));
if ($eval[0] != null) {
$eval[0]->delete_with_results();
}
@ -304,7 +304,7 @@ if (isset($_POST['action'])) {
if (api_substr($indexstr, 0, 4) == 'LINK') {
$id = api_substr($indexstr, 4);
if (!empty($id)) {
$link = LinkFactory :: load();
$link = LinkFactory::load();
if ($link[0] != null) {
$link[0]->delete();
}
@ -318,18 +318,18 @@ if (isset($_POST['action'])) {
case 'setvisible':
foreach ($_POST['id'] as $indexstr) {
if (api_substr($indexstr, 0, 4) == 'CATE') {
$cats = Category:: load(api_substr($indexstr, 4));
$cats = Category::load(api_substr($indexstr, 4));
$cats[0]->set_visible(1);
$cats[0]->save();
$cats[0]->apply_visibility_to_children();
}
if (api_substr($indexstr, 0, 4) == 'EVAL') {
$eval = Evaluation:: load(api_substr($indexstr, 4));
$eval = Evaluation::load(api_substr($indexstr, 4));
$eval[0]->set_visible(1);
$eval[0]->save();
}
if (api_substr($indexstr, 0, 4) == 'LINK') {
$link = LinkFactory:: load(api_substr($indexstr, 4));
$link = LinkFactory::load(api_substr($indexstr, 4));
$link[0]->set_visible(1);
$link[0]->save();
}
@ -340,18 +340,18 @@ if (isset($_POST['action'])) {
case 'setinvisible':
foreach ($_POST['id'] as $indexstr) {
if (api_substr($indexstr, 0, 4) == 'CATE') {
$cats = Category:: load(api_substr($indexstr, 4));
$cats = Category::load(api_substr($indexstr, 4));
$cats[0]->set_visible(0);
$cats[0]->save();
$cats[0]->apply_visibility_to_children();
}
if (api_substr($indexstr, 0, 4) == 'EVAL') {
$eval = Evaluation:: load(api_substr($indexstr, 4));
$eval = Evaluation::load(api_substr($indexstr, 4));
$eval[0]->set_visible(0);
$eval[0]->save();
}
if (api_substr($indexstr, 0, 4) == 'LINK') {
$link = LinkFactory:: load(api_substr($indexstr, 4));
$link = LinkFactory::load(api_substr($indexstr, 4));
$link[0]->set_visible(0);
$link[0]->save();
}
@ -419,7 +419,7 @@ if (!isset($_GET['exportpdf']) && !isset($_GET['export_certificate'])) {
'url' => Category::getUrl().'selectcat='.$selectcat,
'name' => get_lang('ToolGradebook'),
];
Display :: display_header(get_lang('FlatView'));
Display::display_header(get_lang('FlatView'));
} elseif (isset($_GET['search'])) {
$interbreadcrumb[] = [
'url' => Category::getUrl(),
@ -439,9 +439,9 @@ if (!isset($_GET['exportpdf']) && !isset($_GET['export_certificate'])) {
];
}
}
Display :: display_header('');
Display::display_header('');
} else {
Display :: display_header('');
Display::display_header('');
}
}
@ -458,7 +458,7 @@ if (empty($selectcat)) {
// search form
$simple_search_form = new UserForm(
UserForm :: TYPE_SIMPLE_SEARCH,
UserForm::TYPE_SIMPLE_SEARCH,
null,
'simple_search_form',
null,
@ -474,7 +474,7 @@ if ($simple_search_form->validate() && (empty($keyword))) {
}
if (!empty($keyword)) {
$cats = Category :: load($category);
$cats = Category::load($category);
$allcat = [];
if ((isset($_GET['selectcat']) && $_GET['selectcat'] == 0) && isset($_GET['search'])) {
$allcat = $cats[0]->get_subcategories(null);
@ -487,7 +487,7 @@ if (!empty($keyword)) {
}
} elseif (isset($_GET['studentoverview'])) {
//@todo this code seems to be deprecated because the gradebook tab is off
$cats = Category :: load($category);
$cats = Category::load($category);
$stud_id = (api_is_allowed_to_edit() ? null : api_get_user_id());
$allcat = [];
$alleval = $cats[0]->get_evaluations($stud_id, true);
@ -501,7 +501,7 @@ if (!empty($keyword)) {
get_lang('Date'),
get_lang('Results'),
];
$data_array = $datagen->get_data(GradebookDataGenerator :: GDG_SORT_NAME, 0, null, true);
$data_array = $datagen->get_data(GradebookDataGenerator::GDG_SORT_NAME, 0, null, true);
$newarray = [];
foreach ($data_array as $data) {
$newarray[] = array_slice($data, 1);
@ -535,14 +535,14 @@ if (!empty($keyword)) {
if (!api_is_allowed_to_edit(true, true)) {
$user_id = api_get_user_id();
}
$category = Category :: load($_GET['cat_id']);
$category = Category::load($_GET['cat_id']);
if ($category[0]->is_certificate_available($user_id)) {
$user = api_get_user_info($user_id);
$scoredisplay = ScoreDisplay :: instance();
$scoredisplay = ScoreDisplay::instance();
$scorecourse = $category[0]->calc_score($user_id);
$scorecourse_display = (isset($scorecourse) ? $scoredisplay->display_score($scorecourse, SCORE_AVERAGE) : get_lang('NoResultsAvailable'));
$cattotal = Category :: load(0);
$cattotal = Category::load(0);
$scoretotal = $cattotal[0]->calc_score($user_id);
$scoretotal_display = (isset($scoretotal) ? $scoredisplay->display_score($scoretotal, SCORE_PERCENT) : get_lang('NoResultsAvailable'));
@ -575,7 +575,7 @@ if (!empty($keyword)) {
}
exit;
} else {
$cats = Category :: load($category);
$cats = Category::load($category);
$stud_id = (api_is_allowed_to_edit() ? null : api_get_user_id());
$allcat = $cats[0]->get_subcategories($stud_id);
$alleval = $cats[0]->get_evaluations($stud_id);
@ -618,7 +618,7 @@ if (empty($allcat) && empty($alleval) && empty($alllink) &&
}
// Here we are in a sub category
if ($category != '0') {
DisplayGradebook:: header(
DisplayGradebook::header(
$cats[0],
1,
$_GET['selectcat'],
@ -628,7 +628,7 @@ if ($category != '0') {
);
} else {
// This is the root category
DisplayGradebook:: header(
DisplayGradebook::header(
$cats[0],
count($allcat) == '0' && !isset($_GET['search']) ? 0 : 1,
0,
@ -638,4 +638,4 @@ if ($category != '0') {
);
}
$gradebooktable->display();
Display :: display_footer();
Display::display_footer();

@ -18,7 +18,7 @@ $catadd = new Category();
$my_user_id = api_get_user_id();
$catadd->set_user_id($my_user_id);
$catadd->set_parent_id($get_select_cat);
$catcourse = Category :: load($get_select_cat);
$catcourse = Category::load($get_select_cat);
if ($_in_course) {
$catadd->set_course_code($course_code);
@ -114,11 +114,11 @@ if (!$_in_course) {
];
}
$interbreadcrumb[] = ['url' => 'index.php?'.api_get_cidreq(), 'name' => get_lang('ToolGradebook')];
Display :: display_header(get_lang('NewCategory'));
Display::display_header(get_lang('NewCategory'));
$display_form = true;
if ($display_form) {
$form->display();
}
Display :: display_footer();
Display::display_footer();

@ -132,4 +132,4 @@ if ($evaladd->get_course_code() == null) {
Display::display_header(get_lang('NewEvaluation'));
$form->display();
Display :: display_footer();
Display::display_footer();

@ -13,9 +13,9 @@ $selectCat = isset($_GET['selectcat']) ? (int) $_GET['selectcat'] : 0;
$catadd = new Category();
$catadd->set_user_id(api_get_user_id());
$catadd->set_parent_id($selectCat);
$catcourse = Category :: load($selectCat);
$catcourse = Category::load($selectCat);
$form = new CatForm(
CatForm :: TYPE_SELECT_COURSE,
CatForm::TYPE_SELECT_COURSE,
$catadd,
'add_cat_form',
null,
@ -35,6 +35,6 @@ $interbreadcrumb[] = [
'url' => Category::getUrl().'selectcat='.$selectCat,
'name' => get_lang('Gradebook'),
];
Display :: display_header(get_lang('NewCategory'));
Display::display_header(get_lang('NewCategory'));
$form->display();
Display :: display_footer();
Display::display_footer();

@ -59,7 +59,7 @@ $interbreadcrumb[] = [
'url' => Category::getUrl(),
'name' => get_lang('Gradebook'),
];
Display :: display_header(get_lang('AddResult'));
Display::display_header(get_lang('AddResult'));
DisplayGradebook::display_header_result($evaluation[0], null, 0, 0);
echo $table;
Display :: display_footer();
Display::display_footer();

@ -71,12 +71,12 @@ $interbreadcrumb[] = [
'url' => 'gradebook_view_result.php?selecteval='.Security::remove_XSS($_GET['selecteval']).'&'.api_get_cidreq(),
'name' => get_lang('ViewResult'),
];
Display :: display_header(get_lang('AddUserToEval'));
Display::display_header(get_lang('AddUserToEval'));
if (isset($_GET['erroroneuser'])) {
echo Display::return_message(get_lang('AtLeastOneUser'), 'warning', false);
}
DisplayGradebook :: display_header_result($evaluation[0], null, 0, 0);
DisplayGradebook::display_header_result($evaluation[0], null, 0, 0);
echo '<div class="main">';
echo $add_user_form->toHtml();
echo '</div>';
Display :: display_footer();
Display::display_footer();

@ -247,13 +247,13 @@ if (!isset($_GET['exportpdf']) && !isset($_GET['export_certificate'])) {
'url' => Category::getUrl().'selectcat='.$my_selectcat,
'name' => get_lang('Gradebook'),
];
Display:: display_header(get_lang('FlatView'));
Display::display_header(get_lang('FlatView'));
} elseif (isset($_GET['search'])) {
$interbreadcrumb[] = [
'url' => Category::getUrl().'selectcat='.$my_selectcat,
'name' => get_lang('Gradebook'),
];
Display:: display_header(get_lang('SearchResults'));
Display::display_header(get_lang('SearchResults'));
} else {
$interbreadcrumb[] = [
'url' => Category::getUrl().'selectcat=1',
@ -263,7 +263,7 @@ if (!isset($_GET['exportpdf']) && !isset($_GET['export_certificate'])) {
'url' => '#',
'name' => get_lang('EditAllWeights'),
];
Display:: display_header('');
Display::display_header('');
}
}
?>
@ -309,4 +309,4 @@ echo Display::return_message(sprintf(get_lang('TotalWeightMustBeX'), $original_t
</button>
</form>
<?php
Display:: display_footer();
Display::display_footer();

@ -31,7 +31,7 @@ if ($form->validate()) {
$eval->set_course_code($values['hid_course_code']);
$eval->set_category_id($values['hid_category_id']);
$parent_cat = Category :: load($values['hid_category_id']);
$parent_cat = Category::load($values['hid_category_id']);
$final_weight = $values['weight_mask'];
$eval->set_weight($final_weight);

@ -17,7 +17,7 @@ $tbl_forum_thread = Database::get_course_table(TABLE_FORUM_THREAD);
$tbl_attendance = Database::get_course_table(TABLE_ATTENDANCE);
$em = Database::getManager();
$linkarray = LinkFactory :: load($_GET['editlink']);
$linkarray = LinkFactory::load($_GET['editlink']);
/** @var AbstractLink $link */
$link = $linkarray[0];
if ($link->is_locked() && !api_is_platform_admin()) {
@ -30,7 +30,7 @@ $course_code = api_get_course_id();
$session_id = api_get_session_id();
if ($session_id == 0) {
$cats = Category:: load(
$cats = Category::load(
null,
null,
$course_code,
@ -53,7 +53,7 @@ $form = new LinkAddEditForm(
);
if ($form->validate()) {
$values = $form->exportValues();
$parent_cat = Category :: load($values['select_gradebook']);
$parent_cat = Category::load($values['select_gradebook']);
$final_weight = $values['weight_mask'];
$link->set_weight($final_weight);
@ -142,6 +142,6 @@ $(function() {
});
</script>';
Display :: display_header(get_lang('EditLink'));
Display::display_header(get_lang('EditLink'));
$form->display();
Display :: display_footer();
Display::display_footer();

@ -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();

@ -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();

@ -34,7 +34,7 @@ echo '</div>';
$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();

@ -106,4 +106,4 @@ if (!$displayScore->is_custom() || empty($displays)) {
$html .= '</table>';
echo $html;
}
Display :: display_footer();
Display::display_footer();

@ -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++;
}

@ -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,

@ -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;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save