3 declare(strict_types=0);
37 public function __construct(
int $a_id = 0,
bool $a_call_by_reference =
true)
50 $this->learning_progress = $a_enable;
64 return (
bool)
$ilSetting->get(
"enable_tracking",
'0');
69 $this->tracking_user_related = $a_enable;
82 return (
bool)
$ilSetting->get(
'save_user_related_data',
'0');
90 return (
bool)
$ilSetting->get(
'object_statistics',
'0');
95 $this->object_statistics_enabled = $newValue;
105 $this->session_statistics_enabled = $newValue;
118 return (
bool)
$ilSetting->get(
'session_statistics',
'1');
123 $this->valid_time = $a_time_span;
137 "tracking_time_span",
138 (
string) self::DEFAULT_TIME_SPAN
144 $this->is_change_event_tracking_enabled = $newValue;
156 $this->extended_data = $a_value;
161 return (
bool) ($this->extended_data & $a_code);
171 "save_user_related_data",
175 "tracking_time_span",
178 $this->
settings->set(
"lp_extended_data", (
string) $this->extended_data);
189 "session_statistics",
201 (
bool) $this->
settings->get(
"enable_tracking",
'0')
204 (
bool) $this->
settings->get(
"save_user_related_data",
'0')
207 (
bool) $this->
settings->get(
"object_statistics",
'0')
211 "tracking_time_span",
212 (
string) self::DEFAULT_TIME_SPAN
216 (
bool) $this->
settings->get(
"lp_learner",
'1')
219 (
bool) $this->
settings->get(
"session_statistics",
'1')
222 (
bool) $this->
settings->get(
"lp_list_gui",
'0')
230 (
int) $this->
settings->get(
"lp_extended_data",
'0')
238 $ilDB = $DIC[
'ilDB'];
240 'DELETE FROM read_event WHERE usr_id = %s ',
241 $ilDB->quote($a_usr_id,
'integer')
246 'DELETE FROM write_event WHERE usr_id = %s ',
247 $ilDB->quote($a_usr_id,
'integer')
251 $query =
"DELETE FROM ut_lp_marks WHERE usr_id = " .
$ilDB->quote(
258 "DELETE FROM ut_online WHERE usr_id = " .
259 $ilDB->quote($a_usr_id,
"integer")
267 $rbacsystem = $DIC[
'rbacsystem'];
269 $obj_id = array_pop($obj_ids);
272 return $rbacsystem->checkAccess(
"lp_other_users",
$ref_id);
277 $this->lp_learner = $a_value;
290 return (
bool)
$ilSetting->get(
"lp_learner",
'1');
295 $this->lp_list_gui = $a_value;
308 return (
bool)
$ilSetting->get(
"lp_list_gui",
'0');
enableSessionStatistics(bool $newValue)
const EXTENDED_DATA_LAST_ACCESS
enableChangeEventTracking(bool $newValue)
static _deleteUser(int $a_usr_id)
hasLearningProgressListGUI()
static _enabledObjectStatistics()
static _hasLearningProgressLearner()
hasExtendedData(int $a_code)
static _getAllReferences(int $id)
get all reference ids for object ID
setLearningProgressLearner(bool $a_value)
enableObjectStatistics(bool $newValue)
static _hasLearningProgressOtherUsers()
const EXTENDED_DATA_READ_COUNT
__construct(int $a_id=0, bool $a_call_by_reference=true)
hasLearningProgressLearner()
bool $tracking_user_related
static _getObjectsByType(string $obj_type="", int $owner=null)
enabledSessionStatistics()
setValidTimeSpan(int $a_time_span)
bool $is_change_event_tracking_enabled
This variable holds the enabled state of the change event tracking.
static _enabledUserRelatedData()
static _enabledLearningProgress()
bool $session_statistics_enabled
enabledChangeEventTracking()
bool $object_statistics_enabled
enableLearningProgress(bool $a_enable)
setExtendedData(int $a_value)
const EXTENDED_DATA_SPENT_SECONDS
static _hasLearningProgressListGUI()
enabledLearningProgress()
static _isActive()
Returns true, if change event tracking is active.
__construct(Container $dic, ilPlugin $plugin)
enabledObjectStatistics()
static _enabledSessionStatistics()
setLearningProgressListGUI(bool $a_value)
enableUserRelatedData(bool $a_enable)
static _getValidTimeSpan()