Skip to content

Commit

Permalink
Setting added $_configuration['allow_track_complete'] = false; BT#15020
Browse files Browse the repository at this point in the history
Allows more detail user tracking
  • Loading branch information
jmontoyaa committed Dec 6, 2018
1 parent f4570e3 commit 676d2c1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main/inc/lib/events.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2465,7 +2465,7 @@ public function portal_homepage_edited_event_send_mail_filter_func(&$values)
*/
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);
Expand Down
4 changes: 2 additions & 2 deletions main/inc/lib/tracking.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,9 @@ public static function getLpStats(
$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;
Expand Down
6 changes: 5 additions & 1 deletion main/install/configuration.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -1048,10 +1048,14 @@
// 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
Expand Down

0 comments on commit 676d2c1

Please sign in to comment.