Minor - format code, remove logs

pull/2762/head
Julio Montoya 7 years ago
parent 9a3b9b039c
commit 67a59fe873
  1. 1
      main/announcements/announcements.php
  2. 1
      main/auth/profile.php
  3. 1
      main/calendar/agenda.php
  4. 1
      main/calendar/agenda_list.php
  5. 1
      main/chat/chat.php
  6. 1
      main/course_description/index.php
  7. 1
      main/dropbox/index.php
  8. 1
      main/exercise/exercise.php
  9. 1
      main/exercise/exercise_submit.php
  10. 1
      main/exercise/overview.php
  11. 17
      main/forum/forumfunction.inc.php
  12. 1
      main/forum/index.php
  13. 1
      main/forum/newthread.php
  14. 1
      main/forum/reply.php
  15. 1
      main/forum/viewforum.php
  16. 2
      main/forum/viewforumcategory.php
  17. 1
      main/forum/viewthread.php
  18. 1
      main/gradebook/gradebook_add_cat.php
  19. 2
      main/gradebook/gradebook_add_eval.php
  20. 1
      main/gradebook/gradebook_add_link.php
  21. 1
      main/gradebook/index.php
  22. 1
      main/gradebook/my_certificates.php
  23. 1
      main/inc/ajax/agenda.ajax.php
  24. 1
      main/inc/ajax/course_chat.ajax.php
  25. 2
      main/inc/lib/online.inc.php
  26. 2
      main/inc/lib/tracking.lib.php
  27. 1
      main/inc/lib/usermanager.lib.php
  28. 1
      main/messages/inbox.php
  29. 1
      main/messages/new_message.php
  30. 1
      main/messages/outbox.php
  31. 1
      main/messages/view_message.php
  32. 1
      main/mySpace/index.php
  33. 1
      main/notebook/index.php
  34. 1
      main/survey/fillsurvey.php
  35. 1
      main/survey/survey_list.php
  36. 5
      main/template/default/learnpath/view.tpl
  37. 1
      main/work/work.php
  38. 1
      plugin/bbb/start.php
  39. 1
      user_portal.php

@ -93,7 +93,6 @@ $homeUrl = api_get_self().'?action=list&'.api_get_cidreq();
$content = ''; $content = '';
$searchFormToString = ''; $searchFormToString = '';
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_ANNOUNCEMENT, 'tool' => TOOL_ANNOUNCEMENT,
'tool_id' => 0, 'tool_id' => 0,

@ -21,7 +21,6 @@ if ($allowSocialTool) {
$this_section = SECTION_SOCIAL; $this_section = SECTION_SOCIAL;
} }
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => 'profile', 'tool' => 'profile',
'tool_id' => 0, 'tool_id' => 0,

@ -29,7 +29,6 @@ if (empty($action)) {
exit; exit;
} }
// ## NSR
$logInfo = [ $logInfo = [
'tool' => TOOL_CALENDAR_EVENT, 'tool' => TOOL_CALENDAR_EVENT,
'tool_id' => 0, 'tool_id' => 0,

@ -6,7 +6,6 @@
*/ */
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';
// ## NSR
$logInfo = [ $logInfo = [
'tool' => TOOL_CALENDAR_EVENT, 'tool' => TOOL_CALENDAR_EVENT,
'tool_id' => 0, 'tool_id' => 0,

@ -9,7 +9,6 @@ api_protect_course_script(true);
Event::event_access_tool(TOOL_CHAT); Event::event_access_tool(TOOL_CHAT);
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_CHAT, 'tool' => TOOL_CHAT,
'tool_id' => 0, 'tool_id' => 0,

@ -18,7 +18,6 @@ define('ADD_BLOCK', 8);
// current section // current section
$this_section = SECTION_COURSES; $this_section = SECTION_COURSES;
// ## NSR
$logInfo = [ $logInfo = [
'tool' => TOOL_COURSE_DESCRIPTION, 'tool' => TOOL_COURSE_DESCRIPTION,
'tool_id' => 0, 'tool_id' => 0,

@ -26,7 +26,6 @@ $showSentReceivedTabs = true;
// Do the tracking // Do the tracking
Event::event_access_tool(TOOL_DROPBOX); Event::event_access_tool(TOOL_DROPBOX);
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_DROPBOX, 'tool' => TOOL_DROPBOX,
'tool_id' => 0, 'tool_id' => 0,

@ -153,7 +153,6 @@ if ($origin != 'learnpath') {
Event::event_access_tool(TOOL_QUIZ); Event::event_access_tool(TOOL_QUIZ);
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_QUIZ, 'tool' => TOOL_QUIZ,
'tool_id' => (int) $exerciseId, 'tool_id' => (int) $exerciseId,

@ -93,7 +93,6 @@ $current_question = isset($_REQUEST['num']) ? intval($_REQUEST['num']) : null;
$currentAnswer = isset($_REQUEST['num_answer']) ? intval($_REQUEST['num_answer']) : null; $currentAnswer = isset($_REQUEST['num_answer']) ? intval($_REQUEST['num_answer']) : null;
$endExercise = isset($_REQUEST['end_exercise']) && $_REQUEST['end_exercise'] == 1 ? true : false; $endExercise = isset($_REQUEST['end_exercise']) && $_REQUEST['end_exercise'] == 1 ? true : false;
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_QUIZ, 'tool' => TOOL_QUIZ,
'tool_id' => $exerciseId, 'tool_id' => $exerciseId,

@ -39,7 +39,6 @@ $learnpath_item_id = isset($_REQUEST['learnpath_item_id']) ? intval($_REQUEST['l
$learnpathItemViewId = isset($_REQUEST['learnpath_item_view_id']) ? intval($_REQUEST['learnpath_item_view_id']) : null; $learnpathItemViewId = isset($_REQUEST['learnpath_item_view_id']) ? intval($_REQUEST['learnpath_item_view_id']) : null;
$origin = api_get_origin(); $origin = api_get_origin();
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_QUIZ, 'tool' => TOOL_QUIZ,
'tool_id' => $exercise_id, 'tool_id' => $exercise_id,

@ -614,7 +614,7 @@ function store_forumcategory($values, $courseInfo = [], $showMessage = true)
api_get_user_id() api_get_user_id()
); );
$return_message = get_lang('ForumCategoryEdited'); $return_message = get_lang('ForumCategoryEdited');
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => 0, 'tool_id' => 0,
@ -657,7 +657,7 @@ function store_forumcategory($values, $courseInfo = [], $showMessage = true)
} }
$return_message = get_lang('ForumCategoryAdded'); $return_message = get_lang('ForumCategoryAdded');
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => 0, 'tool_id' => 0,
@ -863,7 +863,7 @@ function store_forum($values, $courseInfo = [], $returnId = false)
$return_message = get_lang('ForumEdited'); $return_message = get_lang('ForumEdited');
$forumId = $values['forum_id']; $forumId = $values['forum_id'];
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => $values['forum_id'], 'tool_id' => $values['forum_id'],
@ -923,7 +923,7 @@ function store_forum($values, $courseInfo = [], $returnId = false)
$courseInfo $courseInfo
); );
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => $forumId, 'tool_id' => $forumId,
@ -2657,7 +2657,7 @@ function updateThread($values)
return ''; return '';
} }
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => $values['forum_id'], 'tool_id' => $values['forum_id'],
@ -2914,7 +2914,7 @@ function store_thread(
$visible = 1; $visible = 1;
} }
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => $values['forum_id'], 'tool_id' => $values['forum_id'],
@ -2955,7 +2955,7 @@ function store_thread(
$lastPostId = $lastPost->getIid(); $lastPostId = $lastPost->getIid();
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => $values['forum_id'], 'tool_id' => $values['forum_id'],
@ -3765,7 +3765,7 @@ function store_reply($current_forum, $values, $courseId = 0, $userId = 0)
); );
add_forum_attachment_file('', $new_post_id); add_forum_attachment_file('', $new_post_id);
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => $values['forum_id'], 'tool_id' => $values['forum_id'],
@ -3963,7 +3963,6 @@ function show_edit_post_form(
*/ */
function store_edit_post($forumInfo, $values) function store_edit_post($forumInfo, $values)
{ {
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => $_GET['forum'], 'tool_id' => $_GET['forum'],

@ -122,7 +122,6 @@ $whatsnew_post_info = Session::read('whatsnew_post_info');
/* TRACKING */ /* TRACKING */
Event::event_access_tool(TOOL_FORUM); Event::event_access_tool(TOOL_FORUM);
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => 0, 'tool_id' => 0,

@ -44,7 +44,6 @@ $origin = api_get_origin();
$current_forum = get_forum_information($_GET['forum']); $current_forum = get_forum_information($_GET['forum']);
$current_forum_category = get_forumcategory_information($current_forum['forum_category']); $current_forum_category = get_forumcategory_information($current_forum['forum_category']);
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => (int) $_GET['forum'], 'tool_id' => (int) $_GET['forum'],

@ -155,7 +155,6 @@ $my_action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : ''
$my_post = isset($_GET['post']) ? Security::remove_XSS($_GET['post']) : ''; $my_post = isset($_GET['post']) ? Security::remove_XSS($_GET['post']) : '';
$my_elements = isset($_SESSION['formelements']) ? $_SESSION['formelements'] : ''; $my_elements = isset($_SESSION['formelements']) ? $_SESSION['formelements'] : '';
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => $forumId, 'tool_id' => $forumId,

@ -103,7 +103,6 @@ if (!empty($groupId)) {
$my_search = isset($_GET['search']) ? $_GET['search'] : ''; $my_search = isset($_GET['search']) ? $_GET['search'] : '';
$my_action = isset($_GET['action']) ? $_GET['action'] : ''; $my_action = isset($_GET['action']) ? $_GET['action'] : '';
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => $my_forum, 'tool_id' => $my_forum,

@ -122,10 +122,8 @@ if (api_is_allowed_to_edit(false, true)) {
$html .= search_link(); $html .= search_link();
$html .= '</div>'; $html .= '</div>';
/* ACTIONS */
echo $html; echo $html;
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => 0, 'tool_id' => 0,

@ -126,7 +126,6 @@ if (!api_is_allowed_to_edit(false, true) &&
/* Actions */ /* Actions */
$my_action = isset($_GET['action']) ? $_GET['action'] : ''; $my_action = isset($_GET['action']) ? $_GET['action'] : '';
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_FORUM, 'tool' => TOOL_FORUM,
'tool_id' => $_GET['forum'], 'tool_id' => $_GET['forum'],

@ -90,7 +90,6 @@ if ($form->validate()) {
$cat->set_visible($visible); $cat->set_visible($visible);
$result = $cat->add(); $result = $cat->add();
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_GRADEBOOK, 'tool' => TOOL_GRADEBOOK,
'tool_id' => 0, 'tool_id' => 0,

@ -64,7 +64,7 @@ if ($form->validate()) {
} }
$eval->set_visible($visible); $eval->set_visible($visible);
$eval->add(); $eval->add();
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_GRADEBOOK, 'tool' => TOOL_GRADEBOOK,
'tool_id' => 0, 'tool_id' => 0,

@ -132,7 +132,6 @@ if (isset($typeSelected) && $typeSelected != '0') {
$link->add(); $link->add();
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_GRADEBOOK, 'tool' => TOOL_GRADEBOOK,
'tool_id' => 0, 'tool_id' => 0,

@ -66,7 +66,6 @@ $(document).ready(function() {
}); });
</script>'; </script>';
// ## NSR - log
$list_actions = []; $list_actions = [];
$list_values = []; $list_values = [];
if (isset($_GET['movecat'])) { if (isset($_GET['movecat'])) {

@ -12,7 +12,6 @@ $cidReset = true;
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => 'MyCertificates', 'tool' => 'MyCertificates',
'tool_id' => 0, 'tool_id' => 0,

@ -19,7 +19,6 @@ if ($type == 'course') {
api_protect_course_script(true); api_protect_course_script(true);
} }
// ## NSR
$logInfo = [ $logInfo = [
'tool' => TOOL_CALENDAR_EVENT, 'tool' => TOOL_CALENDAR_EVENT,
'tool_id' => 0, 'tool_id' => 0,

@ -19,7 +19,6 @@ $courseChatUtils = new CourseChatUtils($courseId, $userId, $sessionId, $groupId)
switch ($_REQUEST['action']) { switch ($_REQUEST['action']) {
case 'chat_logout': case 'chat_logout':
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_CHAT, 'tool' => TOOL_CHAT,
'tool_id' => 0, 'tool_id' => 0,

@ -131,8 +131,6 @@ function online_logout($user_id = null, $logout_redirect = false)
WHERE login_id='$i_id_last_connection'"; WHERE login_id='$i_id_last_connection'";
Database::query($sql); Database::query($sql);
} }
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => 'logout', 'tool' => 'logout',
'tool_id' => 0, 'tool_id' => 0,

@ -450,7 +450,7 @@ class Tracking
if ($score == 0) { if ($score == 0) {
$maxscore = $row['mymaxscore']; $maxscore = $row['mymaxscore'];
} else { } else {
if ($row['item_type'] == 'sco') { if ($row['item_type'] === 'sco') {
if (!empty($row['myviewmaxscore']) && $row['myviewmaxscore'] > 0) { if (!empty($row['myviewmaxscore']) && $row['myviewmaxscore'] > 0) {
$maxscore = $row['myviewmaxscore']; $maxscore = $row['myviewmaxscore'];
} elseif ($row['myviewmaxscore'] === '') { } elseif ($row['myviewmaxscore'] === '') {

@ -5970,7 +5970,6 @@ SQL;
} }
if ($userId) { if ($userId) {
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => 'logout', 'tool' => 'logout',
'tool_id' => 0, 'tool_id' => 0,

@ -14,7 +14,6 @@ if (api_get_setting('allow_message_tool') != 'true') {
api_not_allowed(true); api_not_allowed(true);
} }
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => 'Messages', 'tool' => 'Messages',
'tool_id' => 0, 'tool_id' => 0,

@ -22,7 +22,6 @@ if (api_get_setting('allow_message_tool') !== 'true') {
api_not_allowed(true); api_not_allowed(true);
} }
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => 'Messages', 'tool' => 'Messages',
'tool_id' => 0, 'tool_id' => 0,

@ -13,7 +13,6 @@ if (api_get_setting('allow_message_tool') != 'true') {
api_not_allowed(true); api_not_allowed(true);
} }
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => 'Messages', 'tool' => 'Messages',
'tool_id' => 0, 'tool_id' => 0,

@ -47,7 +47,6 @@ if (empty($_GET['id'])) {
$message = ''; $message = '';
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => 'Messages', 'tool' => 'Messages',
'tool_id' => 0, 'tool_id' => 0,

@ -37,7 +37,6 @@ $skipData = api_get_configuration_value('tracking_skip_generic_data');
// Access control // Access control
api_block_anonymous_users(); api_block_anonymous_users();
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => SECTION_TRACKING, 'tool' => SECTION_TRACKING,
'tool_id' => 0, 'tool_id' => 0,

@ -37,7 +37,6 @@ $tool = TOOL_NOTEBOOK;
// Tracking // Tracking
Event::event_access_tool(TOOL_NOTEBOOK); Event::event_access_tool(TOOL_NOTEBOOK);
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_NOTEBOOK, 'tool' => TOOL_NOTEBOOK,
'tool_id' => 0, 'tool_id' => 0,

@ -160,7 +160,6 @@ if (!isset($_POST['finish_survey']) &&
api_not_allowed(true, get_lang('YouAlreadyFilledThisSurvey')); api_not_allowed(true, get_lang('YouAlreadyFilledThisSurvey'));
} }
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_SURVEY, 'tool' => TOOL_SURVEY,
'tool_id' => $survey_invitation['survey_invitation_id'], 'tool_id' => $survey_invitation['survey_invitation_id'],

@ -28,7 +28,6 @@ $action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : null;
// Tracking // Tracking
Event::event_access_tool(TOOL_SURVEY); Event::event_access_tool(TOOL_SURVEY);
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_SURVEY, 'tool' => TOOL_SURVEY,
'tool_id' => 0, 'tool_id' => 0,

@ -47,7 +47,7 @@
window.tiempo_corriendo = setInterval(function(){ window.tiempo_corriendo = setInterval(function(){
// Segundos // Segundos
tiempo.segundo++; tiempo.segundo++;
if(tiempo.segundo >= 60) { if (tiempo.segundo >= 60) {
tiempo.segundo = 0; tiempo.segundo = 0;
tiempo.minuto++; tiempo.minuto++;
} }
@ -58,8 +58,7 @@
} }
// Minutos // Minutos
if(tiempo.minuto >= 60) if (tiempo.minuto >= 60) {
{
tiempo.minuto = 0; tiempo.minuto = 0;
tiempo.hora++; tiempo.hora++;
} }

@ -120,7 +120,6 @@ if (!empty($groupId)) {
// Stats // Stats
Event::event_access_tool(TOOL_STUDENTPUBLICATION); Event::event_access_tool(TOOL_STUDENTPUBLICATION);
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => TOOL_STUDENTPUBLICATION, 'tool' => TOOL_STUDENTPUBLICATION,
'tool_id' => 0, 'tool_id' => 0,

@ -11,7 +11,6 @@ require_once __DIR__.'/../../vendor/autoload.php';
$course_plugin = 'bbb'; //needed in order to load the plugin lang variables $course_plugin = 'bbb'; //needed in order to load the plugin lang variables
require_once __DIR__.'/config.php'; require_once __DIR__.'/config.php';
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => 'Videoconference', 'tool' => 'Videoconference',
'tool_id' => 0, 'tool_id' => 0,

@ -34,7 +34,6 @@ $this_section = SECTION_COURSES;
api_block_anonymous_users(); // Only users who are logged in can proceed. api_block_anonymous_users(); // Only users who are logged in can proceed.
// ## NSR - log
$logInfo = [ $logInfo = [
'tool' => SECTION_COURSES, 'tool' => SECTION_COURSES,
'tool_id' => 0, 'tool_id' => 0,

Loading…
Cancel
Save