Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
report_usersessions

Directories

directory classes
  
 

Namespaces

namespace  report_usersessions\privacy
 Privacy Subsystem implementation for report_usersessions.
 

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.
 
 report_usersessions_format_duration ($duration)
 Show user friendly duration since last activity.
 
 report_usersessions_format_ip ($ip)
 Show some user friendly IP address info.
 
 report_usersessions_kill_session ($id)
 Kill user session.
 
 report_usersessions_myprofile_navigation (core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course)
 Add nodes to myprofile page.
 

Variables

 $capabilities
 
 $plugin = 2023100400
 
$plugin component = 'report_usersessions'
 
$plugin version = 2023100900
 

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