Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Files | Namespaces | Classes | Functions | Variables
report_usersessions

Files

file  access.php
 Capabilities for this report.
 
file  lib.php
 Lib API functions.
 
file  locallib.php
 Lib API functions.
 
file  provider.php
 Privacy Subsystem implementation for report_usersessions.
 
file  version.php
 Version info.
 

Namespaces

namespace  report_usersessions\privacy
  
 

Classes

class  report_usersessions\privacy\provider
 Privacy Subsystem for report_usersessions implementing null_provider. More...
 

Functions

 report_usersessions_extend_navigation_user ($navigation, $user, $course)
 This function extends the course navigation with the report items. More...
 
 report_usersessions_format_duration ($duration)
 Show user friendly duration since last activity. More...
 
 report_usersessions_format_ip ($ip)
 Show some user friendly IP address info. More...
 
 report_usersessions_kill_session ($id)
 Kill user session. More...
 
 report_usersessions_myprofile_navigation (core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course)
 Add nodes to myprofile page. More...
 

Variables

 $capabilities
 
 $plugin = 2020060900
 
$plugin component = 'report_usersessions'
 
$plugin version = 2020061500
 

Detailed Description

Function Documentation

◆ report_usersessions_extend_navigation_user()

report_usersessions_extend_navigation_user (   $navigation,
  $user,
  $course 
)

This function extends the course navigation with the report items.

Parameters
navigation_node$navigationThe navigation node to extend
stdClass$user
stdClass$courseThe course to object for the report

◆ report_usersessions_format_duration()

report_usersessions_format_duration (   $duration)

Show user friendly duration since last activity.

Parameters
int$durationin seconds
Return values
string

◆ report_usersessions_format_ip()

report_usersessions_format_ip (   $ip)

Show some user friendly IP address info.

Parameters
string$ip
Return values
string

◆ report_usersessions_kill_session()

report_usersessions_kill_session (   $id)

Kill user session.

Parameters
int$id
Return values
void

◆ report_usersessions_myprofile_navigation()

report_usersessions_myprofile_navigation ( core_user\output\myprofile\tree  $tree,
  $user,
  $iscurrentuser,
  $course 
)

Add nodes to myprofile page.

Parameters
core_user::output::myprofile::tree$treeTree object
stdClass$useruser object
bool$iscurrentuser
stdClass$courseCourse object
Return values
bool

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= array(
'report/usersessions:manageownsessions' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_USER,
'archetypes' => array(
'user' => CAP_ALLOW,
),
'clonepermissionsfrom' => 'moodle/user:changeownpassword'
),
)
const CONTEXT_USER
User context level - one instance for each user describing what others can do to user.
Definition: accesslib.php:124
const CAP_ALLOW
Allow permission, overrides CAP_PREVENT defined in parent contexts.
Definition: accesslib.php:115