Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
report_usersessions

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.
 
 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 = 2024041600
 
$plugin component = 'report_usersessions'
 
$plugin version = 2024042200
 

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