Setting added $_configuration['allow_track_complete'] = false; BT#15020

Allows more detail user tracking
pull/2757/head
Julio Montoya 7 years ago
parent f4570e39d5
commit 676d2c17fe
  1. 2
      main/inc/lib/events.lib.php
  2. 4
      main/inc/lib/tracking.lib.php
  3. 6
      main/install/configuration.dist.php

@ -2465,7 +2465,7 @@ class Event
*/
public static function registerLog($logInfo)
{
if (!api_get_configuration_value('lp_minimum_time')) {
if (!api_get_configuration_value('allow_track_complete')) {
return false;
}
$loginAs = (int) (Session::read('login_as') === true);

@ -437,9 +437,9 @@ class Tracking
$time_for_total = $row['mytime'];
// ## NSR sistema de tiempos nuevo
if (api_get_configuration_value('lp_minimum_time')) {
if (api_get_configuration_value('allow_track_complete')) {
$timeCourse = self::getCalculateTime($user_id, $session_id);
$_SESSION['trackTimeCourse'] = $timeCourse;
Session::write('trackTimeCourse', $timeCourse);
$lp_time = $timeCourse[TOOL_LEARNPATH];
$lpTime = (int) $lp_time[$lp_id];
$time_for_total = $lpTime;

@ -1048,10 +1048,14 @@ VALUES (2, 13, 'session_courses_read_only_mode', 'Lock Course In Session', 1, 1,
// Add a minimum time limit to be in the learning path
// in order to get the last item completed
// Requires a DB change:
// CREATE TABLE track_e_access_complete (id int(11) NOT NULL AUTO_INCREMENT, user_id int(11) NOT NULL, date_reg datetime NOT NULL, tool varchar(255) NOT NULL, tool_id int(11) NOT NULL, tool_id_detail int(11) NOT NULL, action varchar(255) NOT NULL, action_details varchar(255) NOT NULL, current_id int(11) NOT NULL, ip_user varchar(255) NOT NULL, user_agent varchar(255) NOT NULL, session_id int(11) NOT NULL, c_id int(11) NOT NULL, ch_sid varchar(255) NOT NULL, login_as int(11) NOT NULL, info longtext NOT NULL, url text NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=13989 DEFAULT CHARSET=utf8;
// ALTER TABLE c_lp ADD accumulate_work_time INT NOT NULL;
//$_configuration['lp_minimum_time'] = false;
// Allow detail user activity
// CREATE TABLE track_e_access_complete (id int(11) NOT NULL AUTO_INCREMENT, user_id int(11) NOT NULL, date_reg datetime NOT NULL, tool varchar(255) NOT NULL, tool_id int(11) NOT NULL, tool_id_detail int(11) NOT NULL, action varchar(255) NOT NULL, action_details varchar(255) NOT NULL, current_id int(11) NOT NULL, ip_user varchar(255) NOT NULL, user_agent varchar(255) NOT NULL, session_id int(11) NOT NULL, c_id int(11) NOT NULL, ch_sid varchar(255) NOT NULL, login_as int(11) NOT NULL, info longtext NOT NULL, url text NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=13989 DEFAULT CHARSET=utf8;
//$_configuration['allow_track_complete'] = false;
// ------ Custom DB changes (keep this at the end)
// Add user activation by confirmation email
// This option prevents the new user to login in the platform if your account is not confirmed via email

Loading…
Cancel
Save