Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
tool_usertours

Namespaces

namespace  tool_usertours
  
 
namespace  tool_usertours\event
  
 
namespace  tool_usertours\local\clientside_filter
  
 
namespace  tool_usertours\local\filter
  
 
namespace  tool_usertours\local\forms
  
 
namespace  tool_usertours\local\table
  
 
namespace  tool_usertours\local\target
  
 
namespace  tool_usertours\output
  
 
namespace  tool_usertours\privacy
  
 

Classes

class  behat_tool_usertours
 User tour related steps definitions. More...
 
class  tool_usertours\cache
 Cache manager. More...
 
class  tool_usertours\configuration
 Step configuration detail class. More...
 
class  tool_usertours\helper
 Tour helper. More...
 
class  tool_usertours\local\clientside_filter\clientside_filter
 Clientside filter base. More...
 
class  tool_usertours\local\clientside_filter\cssselector
 Course filter. More...
 
class  tool_usertours\local\filter\accessdate
 Access date filter. More...
 
class  tool_usertours\local\filter\base
 Filter base. More...
 
class  tool_usertours\local\filter\category
 Category filter. More...
 
class  tool_usertours\local\filter\course
 Course filter. More...
 
class  tool_usertours\local\filter\courseformat
 Course format filter. More...
 
class  tool_usertours\local\filter\role
 Theme filter. More...
 
class  tool_usertours\local\filter\theme
 Theme filter. More...
 
class  tool_usertours\local\forms\editstep
 Form for editing steps. More...
 
class  tool_usertours\local\forms\edittour
 Form for editing tours. More...
 
class  tool_usertours\local\forms\importtour
 Form for importing tours. More...
 
class  tool_usertours\local\table\step_list
 Table to show the list of steps in a tour. More...
 
class  tool_usertours\local\table\tour_list
 Table to show the list of tours. More...
 
class  tool_usertours\local\target\base
 Target base. More...
 
class  tool_usertours\local\target\block
 Block target. More...
 
class  tool_usertours\local\target\selector
 Selector target. More...
 
class  tool_usertours\local\target\unattached
 A step designed to be orphaned. More...
 
class  tool_usertours\manager
 Tour manager. More...
 
class  tool_usertours\output\renderer
 Renderer. More...
 
class  tool_usertours\output\step
 Tour Step Renderable. More...
 
class  tool_usertours\output\tour
 Tour renderable. More...
 
class  tool_usertours\privacy\provider
 Implementation of the privacy subsystem plugin provider for the user tours feature. More...
 
class  tool_usertours\step
 Step class. More...
 
class  tool_usertours\target
 Target class. More...
 
class  tool_usertours\tour
 Tour class. More...
 

Functions

 tool_usertours_before_footer ()
 Add JS to bootstrap tours.
 
 tool_usertours_extend_navigation_user ()
 Extend the user navigation to bootstrap tours.
 
 tool_usertours_get_fontawesome_icon_map ()
 Map icons for font-awesome themes.
 
 tool_usertours_inplace_editable ($itemtype, $itemid, $newvalue)
 Manage inplace editable saves.
 
 tool_usertours_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload, array $options=[])
 Serves any files associated with the user tour content.
 
 xmldb_tool_usertours_install ()
 Perform the post-install procedures.
 
 xmldb_tool_usertours_upgrade ($oldversion)
 Upgrade the user tours plugin.
 

Variables

 $capabilities
 
 $capabilities
 
 $definitions
 
 $functions
 
 $plugin = 2023041800
 
$plugin component = 'tool_usertours'
 
$plugin version = 2023042400
 

Detailed Description

Function Documentation

◆ tool_usertours_before_footer()

tool_usertours_before_footer ( )

Add JS to bootstrap tours.

Only in Moodle 3.3+

◆ tool_usertours_inplace_editable()

tool_usertours_inplace_editable ( $itemtype,
$itemid,
$newvalue )

Manage inplace editable saves.

Parameters
string$itemtypeThe type of item.
int$itemidThe ID of the item.
mixed$newvalueThe new value
Return values
core\output\inplace_editable

◆ tool_usertours_pluginfile()

tool_usertours_pluginfile ( $course,
$cm,
$context,
$filearea,
$args,
$forcedownload,
array $options = [] )

Serves any files associated with the user tour content.

Parameters
stdClass$courseCourse object
stdClass$cmCourse module object
context$contextContext
string$fileareaFile area for data privacy
array$argsArguments
bool$forcedownloadIf we are forcing the download
array$optionsMore options
Return values
boolReturns false if we don't find a file.

◆ xmldb_tool_usertours_upgrade()

xmldb_tool_usertours_upgrade ( $oldversion)

Upgrade the user tours plugin.

Parameters
int$oldversionThe old version of the user tours plugin
Return values
bool

Variable Documentation

◆ $capabilities [1/2]

$capabilities
Initial value:
= array(
'tool/usertours:managetours' => [
'captype' => 'write',
'riskbitmask' => RISK_XSS,
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => [
'manager' => CAP_ALLOW,
]
],
)
const CONTEXT_SYSTEM
System context level - only one instance in every system.
Definition accesslib.php:122
const CAP_ALLOW
Allow permission, overrides CAP_PREVENT defined in parent contexts.
Definition accesslib.php:115
const RISK_XSS
Capability allows user to add scripted content - see
Definition accesslib.php:143

◆ $capabilities [2/2]

$capabilities
Initial value:
= [
'tool/usertours:managetours',
]

◆ $definitions

$definitions
Initial value:
= array(
'tourdata' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 1,
),
'stepdata' => array(
'mode' => cache_store::MODE_APPLICATION,
'simplekeys' => true,
'simpledata' => true,
'staticacceleration' => true,
'staticaccelerationsize' => 1,
),
)