19declare(strict_types=1);
44 private \ILIAS\DI\Container
$dic;
51 $DIC->language()->loadLanguageModule(
'cmix');
61 $this->thisRunTS = time();
68 $this->lastRunTS = (
int) $settings->get(self::LAST_RUN_TS_SETTING_NAME,
"0");
74 $settings->set(self::LAST_RUN_TS_SETTING_NAME, (
string) $this->thisRunTS);
89 return 'xapi_results_evaluation';
94 return $this->dic->language()->txt(
"cron_xapi_results_evaluation");
99 return $this->dic->language()->txt(
"cron_xapi_results_evaluation_desc");
114 return JobScheduleType::DAILY;
127 foreach ($objects as
$objId) {
128 $this->log->debug(
'handle object (' .
$objId .
')');
137 $this->log->debug(
'skipped object due to launch mode (' .
$objId .
')');
143 $evaluation->evaluateReport($report);
157 $result->setStatus(JobResult::STATUS_OK);
167 $filter->setActivityId($object->getActivityId());
171 $object->getLrsType()->getLrsEndpointStatementsAggregationLink(),
176 $object->getLrsType()->getBasicAuth(),
180 return $request->queryReport($object->
getId());
187 $start = $end =
null;
189 if ($this->getLastRunTS() !== 0) {
197 $this->log->debug(
"use filter from ($start) until ($end)");
207 return array_unique(array_merge(
setStartDate(\ilCmiXapiDateTime $startDate)
setEndDate(\ilCmiXapiDateTime $endDate)
static updateFetchedUntilForObjects(ilCmiXapiDateTime $fetchedUntil, array $objectIds)
static getCmixObjectsHavingUsersMissingProxySuccess()
static getLogger(string $a_component_id)
Get component logger.
Component logger with individual log levels by component id.
static getObjectsHavingBypassProxyEnabledAndRegisteredUsers()
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObject Basic functions for all objects.
hasAutoActivation()
Is to be activated on "installation", does only work for ILIAS core cron jobs.
getXapiStatementsReport(ilObject $object, ilCmiXapiStatementsReportFilter $filter)
getDefaultScheduleValue()
const LAST_RUN_TS_SETTING_NAME