Return comprehensive activity monitoring data.
@return array
761201
public function getData()
    {
        $awaiting = $this->getNumberOfAssessments(DeliveryExecution::STATE_AWAITING);
        $authorized = $this->getNumberOfAssessments(DeliveryExecution::STATE_AUTHORIZED);
        $paused = $this->getNumberOfAssessments(DeliveryExecution::STATE_PAUSED);
        $active = $this->getNumberOfAssessments(DeliveryExecution::STATE_ACTIVE);
        $current = $awaiting + $authorized + $paused + $active;
        $assessments = [
            self::GROUPFIELD_USER_ACTIVITY => [
                self::FIELD_ACTIVE_PROCTORS => $this->getNumberOfActiveUsers(ProctorService::ROLE_PROCTOR),
                self::FIELD_ACTIVE_TEST_TAKERS => $this->getNumberOfActiveUsers(TaoRoles::DELIVERY),
            ],
            self::FIELD_TOTAL_ASSESSMENTS => $this->getNumberOfAssessments(),
            self::FIELD_TOTAL_CURRENT_ASSESSMENTS => $current,
            self::STATE_AWAITING_ASSESSMENT => $awaiting,
            self::STATE_AUTHORIZED_BUT_NOT_STARTED_ASSESSMENTS => $authorized,
            self::STATE_PAUSED_ASSESSMENTS => $paused,
            self::STATE_IN_PROGRESS_ASSESSMENTS => $active
        ];

        return $assessments;
    }
1166059
public function getVisitorsLocations()
    {
        $period = $this->analyticsDuration();

        $data = Analytics::performQuery($period, 'ga:sessions', [
            'dimensions'  => 'ga:country',
            'sort'        => '-ga:sessions',
            'max-results' => 50
        ]);

        $items = [];
        if ($data->rows) {
            $items = $data->rows;
        }

        foreach ($items as $k => $item) {
            $items[$k][1] = intval($items[$k][1]);
        }

        return json_response($items);
    }
81343
protected function getStatusData() : array
    {
        $statusData = [
            'version' => self::VERSION,
            'starttime' => '',
            'uptime' => '',
            'active_worker' => [],
            'job_info' => [],
        ];

        $starttime = date('Y-m-d H:i:s', $this->startTime);
        $start = new \DateTime($starttime);
        $now = new \DateTime('now');
        $uptime = $start->diff($now)->format('%ad %Hh %Im %Ss');
        $statusData['starttime'] = $starttime;
        $statusData['uptime'] = $uptime;

        foreach (array_keys($this->processes) as $poolName) {
            if (!isset($statusData['active_worker'][$poolName])) {
                $statusData['active_worker'][$poolName] = 0;
            }
            /** @var Process $process */
            foreach ($this->processes[$poolName] as $process) {
                $processIsRunning = $process->isRunning();
                if ($processIsRunning === true) {
                    $statusData['active_worker'][$poolName]++;
                }
            }
        }
        $statusData['job_info']['job_requests_total'] = $this->totalJobRequests;
        $statusData['job_info']['queue_length'] = $this->jobsInQueue;
        $statusData['job_info']['worker_stats'] = $this->workerStats;
        return $statusData;
    }
282429
public function getAllData() {
        $aReturn = Array();
        foreach (get_class_vars(get_class()) as $keyVars => $valueVars) {
            if ($keyVars != '_snmpHost') {
                $indexVar = str_replace('_', '', $keyVars);
                $aReturn[$indexVar] = $this->{$keyVars};
            }
        }
        return $aReturn;
    }
816589
public function getStats() {
		return array(
			'inserts' => $this->cacheInserts,
			'deletes' => $this->cacheDeletes,
			'max'     => $this->maxCacheCount,
			'count'   => $this->count,
			'hits'    => $this->cacheHits,
			'misses'  => $this->cacheMisses
		);
	}
90284
public function getStats()
    {
        if (!$this->enabled)
            return array();

        $stats = @$this->getConnection()->getStats();

        $this->Logger->debug('Retrieved Stats');
        $this->Logger->debug($stats);

        return $stats;
    }
733739
public function getAvailableCoreStats()
    {
        $result = [];
        if ($this->fs->isDirectory(DIR_LANGUAGES)) {
            foreach ($this->fs->directories(DIR_LANGUAGES) as $localeDirectory) {
                $localeID = basename($localeDirectory);
                if (preg_match('/^[a-z]{2,3}($|_)/', $localeID)) {
                    $mo = DIR_LANGUAGES . '/' . $localeID . '/LC_MESSAGES/messages.mo';
                    if ($this->fs->isFile($mo)) {
                        $result[$localeID] = $this->getMoFileStats($mo);
                    }
                }
            }
        }

        return $result;
    }
718415
public function assessmentActivityData()
    {
        $service = $this->getServiceLocator()->get(ActivityMonitoringService::SERVICE_ID);
        $data = $service->getData();

        $this->returnJson([
            'success' => true,
            'data' => $data
        ]);
    }
26797
public function getData()
    {
        return [
            self::GIVEN_NAMES_ATTR  => $this->givenNames,
            self::FAMILY_NAME_ATTR  => $this->familyName,
            self::SSN_ATTR => $this->ssn,
            self::ADDRESS_ATTR => $this->amlAddress->getData(),
        ];
    }
1282434
public function getInspectionData()
    {
        return [
            static::PARAM_COMPOSER_JSON      => $this->composer,
            static::PARAM_COMPOSER_LOCK      => $this->composerLock,
            static::PARAM_COMPOSER_INSTALLED => $this->composerInstalled,
        ];
    }
143172
public function get_behaviour_data() {
        $result = array();
        foreach ($this->data as $name => $value) {
            if ($name[0] == '-') {
                $result[substr($name, 1)] = $value;
            }
        }
        return $result;
    }
354147
public function getStatuses()
    {
        return [
            self::STATUS_PENDING,
            self::STATUS_PROCESSING,
            self::STATUS_COMPLETE,
            self::STATUS_FAILED,
            self::STATUS_REFUNDED,
            self::STATUS_REFUNDED_PARTIAL,
        ];
    }
303757
public function get_activities_and_headings() {
        global $OUTPUT;
        $moduleinfo = get_fast_modinfo($this->courseid);
        $sections = $moduleinfo->get_sections();
        $data = new stdClass;
        $data->courseid = $this->courseid;
        $data->sesskey = sesskey();
        $data->helpicon = $OUTPUT->help_icon('bulkcompletiontracking', 'core_completion');
        $data->sections = [];
        foreach ($sections as $sectionnumber => $section) {
            $sectioninfo = $moduleinfo->get_section_info($sectionnumber);

            $sectionobject = new stdClass();
            $sectionobject->sectionnumber = $sectionnumber;
            $sectionobject->name = get_section_name($this->courseid, $sectioninfo);
            $sectionobject->activities = $this->get_activities($section, true);
            $data->sections[] = $sectionobject;
        }
        return $data;
    }
198411
public function getStatusesHuman()
    {
        return [
            self::STATUS_PENDING          => 'Pending',
            self::STATUS_PROCESSING       => 'Processing',
            self::STATUS_COMPLETE         => 'Complete',
            self::STATUS_FAILED           => 'Failed',
            self::STATUS_REFUNDED         => 'Refunded',
            self::STATUS_REFUNDED_PARTIAL => 'Partially Refunded',
        ];
    }
740272
public function status() {
		$timeout = Config::defaultworkertimeout();
		$thresholdTime = (new FrozenTime())->subSeconds($timeout);

		$results = $this->find()
			->where(['modified >' => $thresholdTime])
			->orderDesc('modified')
			->enableHydration(false)
			->all()
			->toArray();

		if (!$results) {
			return [];
		}

		$count = count($results);
		$record = array_shift($results);
		/** @var \Cake\I18n\FrozenTime $time */
		$time = $record['modified'];

		return [
			'time' => $time,
			'workers' => $count,
		];
	}
1164610
public function getVisitors()
	{
		if( !$this->_open )
		{
			trigger_error( "Log File not read", E_USER_ERROR );
			return 0;
		}
		$remote_addrs	= array();	
		$counter	= 0;
		foreach( $this->data as $entry )
		{
			if( $entry['remote_addr'] != $this->skip )
			{
				if( isset( $remote_addrs[$entry['remote_addr']] ) )
				{
					if( $remote_addrs[$entry['remote_addr']] < $entry['timestamp'] - 30 * 60 )
						$counter ++;
					$remote_addrs[$entry['remote_addr']]	= $entry['timestamp'];
				}
				else
				{
					$counter ++;
					$remote_addrs[$entry['remote_addr']]	= $entry['timestamp'];
				}
			}
		}
		return $counter;
	}
604121
public function getUserInfo(): array
    {
        $data = [
            'isMobile' => 'false',
            'includeKalsysInfos' => 'false',
            'token' => $this->token,
        ];
        $response = $this->doGet('/np/users/me', $data);
        $userInfo = json_decode($response, true);

        return $userInfo;
    }