Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Files | Namespaces | Classes | Functions | Variables
mod_imscp

Files

file  access.php
 Capability definitions for the imscp module.
 
file  activity.php
 Search area for mod_imscp activities.
 
file  activity_base.php
 Activity base class.
 
file  backup_imscp_activity_task.class.php
 Defines backup_imscp_activity_task class.
 
file  backup_imscp_stepslib.php
 Define all the backup steps that will be used by the backup_imscp_activity_task.
 
file  cognitive_depth.php
 Cognitive depth indicator - imscp.
 
file  course_module_instance_list_viewed.php
 The mod_imscp instance list viewed event.
 
file  course_module_viewed.php
 The mod_imscp course module viewed event.
 
file  external.php
 IMSCP external API.
 
file  install.php
 Post installation and migration code.
 
file  lib.php
 mod_imscp data generator.
 
file  lib.php
 Mandatory public API of imscp module.
 
file  lib.php
 Provides support for the conversion of moodle1 backup to the moodle2 format.
 
file  locallib.php
 Private imscp module utility functions.
 
file  log.php
 Definition of log events.
 
file  mod_form.php
 This file contains the forms to create and edit an instance of this module.
 
file  provider.php
 Privacy Subsystem implementation for mod_imscp.
 
file  restore_imscp_activity_task.class.php
 Defines restore_imscp_activity_task class.
 
file  restore_imscp_stepslib.php
 Define all the restore steps that will be used by the restore_imscp_activity_task.
 
file  services.php
 IMSCP external functions and service definitions.
 
file  settings.php
 IMS CP module admin settings and defaults.
 
file  social_breadth.php
 Social breadth indicator - imscp.
 
file  upgrade.php
 IMS CP module upgrade code.
 
file  version.php
 IMS CP module version information.
 

Namespaces

 mod_imscp\analytics\indicator
  
 
 mod_imscp\event
  
 
 mod_imscp\privacy
  
 
 mod_imscp\search
  
 

Classes

class  backup_imscp_activity_structure_step
 Define the complete imscp structure for backup, with file and id annotations. More...
 
class  backup_imscp_activity_task
 Provides the steps to perform one complete backup of the IMSCP instance. More...
 
class  imscp_file_info
 File browsing support class. More...
 
class  mod_imscp\analytics\indicator\activity_base
 Activity base class. More...
 
class  mod_imscp\analytics\indicator\cognitive_depth
 Cognitive depth indicator - imscp. More...
 
class  mod_imscp\analytics\indicator\social_breadth
 Social breadth indicator - imscp. More...
 
class  mod_imscp\event\course_module_instance_list_viewed
 The mod_imscp instance list viewed event class. More...
 
class  mod_imscp\event\course_module_viewed
 The mod_imscp course module viewed event class. More...
 
class  mod_imscp\privacy\provider
 Privacy Subsystem for mod_imscp implementing null_provider. More...
 
class  mod_imscp\search\activity
 Search area for mod_imscp activities. More...
 
class  mod_imscp_external
 
class  mod_imscp_generator
 
class  mod_imscp_mod_form
 IMS CP configuration form. More...
 
class  moodle1_mod_imscp_handler
 imscp conversion handler. More...
 
class  restore_imscp_activity_structure_step
 Structure step to restore one imscp activity. More...
 
class  restore_imscp_activity_task
 Provides the settings and steps to perform one complete restore of the activity. More...
 

Functions

 imscp_add_instance ($data, $mform)
 Add imscp instance. More...
 
 imscp_check_updates_since (cm_info $cm, $from, $filter=array())
 Check if the module has any update that affects the current user since a given time. More...
 
 imscp_delete_instance ($id)
 Delete imscp instance. More...
 
 imscp_export_contents ($cm, $baseurl)
 Export imscp resource contents. More...
 
 imscp_get_file_areas ($course, $cm, $context)
 
 imscp_get_file_info ($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename)
 
 imscp_get_post_actions ()
 List the actions that correspond to a post of this module. More...
 
 imscp_get_view_actions ()
 List the actions that correspond to a view of this module. More...
 
 imscp_htmllize_item ($item, $imscp, $cm)
 Internal function - creates htmls structure suitable for YUI tree.
 
 imscp_page_type_list ($pagetype, $parentcontext, $currentcontext)
 Return a list of page types. More...
 
 imscp_parse_manifestfile ($manifestfilecontents, $imscp, $context)
 Parse the contents of a IMS package's manifest file. More...
 
 imscp_parse_structure ($imscp, $context)
 Parse an IMS content package's manifest file to determine its structure. More...
 
 imscp_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array())
 
 imscp_print_content ($imscp, $cm, $course)
 Print IMSCP content to page. More...
 
 imscp_recursive_href ($manifestfilename, $imscp, $context)
 
 imscp_recursive_item ($xmlitem, $level, $resources)
 
 imscp_reset_userdata ($data)
 This function is used by the reset_course_userdata function in moodlelib. More...
 
 imscp_supports ($feature)
 List of features supported in IMS CP module. More...
 
 imscp_update_instance ($data, $mform)
 Update imscp instance. More...
 
 imscp_view ($imscp, $course, $cm, $context)
 Mark the activity completed (if required) and trigger the course_module_viewed event. More...
 
 mod_imscp_core_calendar_provide_event_action (calendar_event $event, core_calendar\action_factory $factory, int $userid=0)
 This function receives a calendar event and returns the action associated with it, or null if there is none. More...
 
 xmldb_imscp_install ()
 Stub for database installation.
 
 xmldb_imscp_upgrade ($oldversion)
 Stub for database upgrade. More...
 

Variables

 $capabilities
 
 $functions
 
 $logs
 
$plugin component = 'mod_imscp'
 
$plugin cron = 0
 
$plugin requires = 2019111200
 
$plugin version = 2019111800
 

Detailed Description

Function Documentation

◆ imscp_add_instance()

imscp_add_instance (   $data,
  $mform 
)

Add imscp instance.

Parameters
object$data
object$mform
Return values
intnew imscp instance id

◆ imscp_check_updates_since()

imscp_check_updates_since ( cm_info  $cm,
  $from,
  $filter = array() 
)

Check if the module has any update that affects the current user since a given time.

Parameters
cm_info$cmcourse module data
int$fromthe time to check updates from
array$filterif we need to check only specific updates
Return values
stdClassan object with the different type of areas indicating if they were updated or not
Since
Moodle 3.2

◆ imscp_delete_instance()

imscp_delete_instance (   $id)

Delete imscp instance.

Parameters
int$id
Return values
booltrue

◆ imscp_export_contents()

imscp_export_contents (   $cm,
  $baseurl 
)

Export imscp resource contents.

Parameters
stdClass$cmCourse module object
string$baseurlBase URL for file downloads
Return values
arrayof file content

◆ imscp_get_post_actions()

imscp_get_post_actions ( )

List the actions that correspond to a post of this module.

This is used by the participation report.

Note: This is not used by new logging system. Event with crud = ('c' || 'u' || 'd') and edulevel = LEVEL_PARTICIPATING will be considered as post action.

Return values
array

◆ imscp_get_view_actions()

imscp_get_view_actions ( )

List the actions that correspond to a view of this module.

This is used by the participation report.

Note: This is not used by new logging system. Event with crud = 'r' and edulevel = LEVEL_PARTICIPATING will be considered as view action.

Return values
array

◆ imscp_page_type_list()

imscp_page_type_list (   $pagetype,
  $parentcontext,
  $currentcontext 
)

Return a list of page types.

Parameters
string$pagetypecurrent page type
stdClass$parentcontextBlock's parent context
stdClass$currentcontextCurrent context of block
Return values
array::$modulepagetypelist

◆ imscp_parse_manifestfile()

imscp_parse_manifestfile (   $manifestfilecontents,
  $imscp,
  $context 
)

Parse the contents of a IMS package's manifest file.

Parameters
string$manifestfilecontentsthe contents of the manifest file
Return values
array

◆ imscp_parse_structure()

imscp_parse_structure (   $imscp,
  $context 
)

Parse an IMS content package's manifest file to determine its structure.

Parameters
object$imscp
object$context
Return values
array

◆ imscp_print_content()

imscp_print_content (   $imscp,
  $cm,
  $course 
)

Print IMSCP content to page.

Parameters
stdClass$imscpmodule instance.
stdClass$cmcourse module.
stdClass$courserecord.

◆ imscp_reset_userdata()

imscp_reset_userdata (   $data)

This function is used by the reset_course_userdata function in moodlelib.

Parameters
stdClass$datathe data submitted from the reset course.
Return values
arraystatus array

◆ imscp_supports()

imscp_supports (   $feature)

List of features supported in IMS CP module.

Parameters
string$featureFEATURE_xx constant for requested feature
Return values
mixedTrue if module supports feature, false if not, null if doesn't know

◆ imscp_update_instance()

imscp_update_instance (   $data,
  $mform 
)

Update imscp instance.

Parameters
object$data
object$mform
Return values
booltrue

◆ imscp_view()

imscp_view (   $imscp,
  $course,
  $cm,
  $context 
)

Mark the activity completed (if required) and trigger the course_module_viewed event.

Parameters
stdClass$imscpimscp object
stdClass$coursecourse object
stdClass$cmcourse module object
stdClass$contextcontext object
Since
Moodle 3.0

◆ mod_imscp_core_calendar_provide_event_action()

mod_imscp_core_calendar_provide_event_action ( calendar_event  $event,
core_calendar\action_factory  $factory,
int  $userid = 0 
)

This function receives a calendar event and returns the action associated with it, or null if there is none.

This is used by block_myoverview in order to display the event appropriately. If null is returned then the event is not displayed on the block.

Parameters
calendar_event$event
core_calendar\action_factory$factory
int$useridUser id to use for all capability checks, etc. Set to 0 for current user (default).
Return values
core_calendar

◆ xmldb_imscp_upgrade()

xmldb_imscp_upgrade (   $oldversion)

Stub for database upgrade.

Parameters
int$oldversion

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= array(
'mod/imscp:view' => array(
'captype' => 'read',
'contextlevel' => CONTEXT_MODULE,
'archetypes' => array(
'guest' => CAP_ALLOW,
'user' => CAP_ALLOW,
)
),
'mod/imscp:addinstance' => array(
'riskbitmask' => RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
),
'clonepermissionsfrom' => 'moodle/course:manageactivities'
),
)

◆ $functions

$functions
Initial value:
= array(
'mod_imscp_view_imscp' => array(
'classname' => 'mod_imscp_external',
'methodname' => 'view_imscp',
'description' => 'Simulate the view.php web interface imscp: trigger events, completion, etc...',
'type' => 'write',
'capabilities' => 'mod/imscp:view',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),
'mod_imscp_get_imscps_by_courses' => array(
'classname' => 'mod_imscp_external',
'methodname' => 'get_imscps_by_courses',
'description' => 'Returns a list of IMSCP instances in a provided set of courses,
if no courses are provided then all the IMSCP instances the user has access to will be returned.',
'type' => 'read',
'capabilities' => 'mod/imscp:view',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
),
)

◆ $logs

$logs
Initial value:
= array(
array('module' => 'imscp', 'action' => 'view', 'mtable' => 'imscp', 'field' => 'name'),
array('module' => 'imscp', 'action' => 'view all', 'mtable' => 'imscp', 'field' => 'name'),
array('module' => 'imscp', 'action' => 'update', 'mtable' => 'imscp', 'field' => 'name'),
array('module' => 'imscp', 'action' => 'add', 'mtable' => 'imscp', 'field' => 'name'),
)
MOODLE_OFFICIAL_MOBILE_SERVICE
const MOODLE_OFFICIAL_MOBILE_SERVICE
Moodle mobile app service name.
Definition: moodlelib.php:501
CONTEXT_COURSE
const CONTEXT_COURSE
Course context level - one instances for each course.
Definition: accesslib.php:128
CAP_ALLOW
const CAP_ALLOW
Allow permission, overrides CAP_PREVENT defined in parent contexts.
Definition: accesslib.php:115
CONTEXT_MODULE
const CONTEXT_MODULE
Course module context level - one instance for each course module.
Definition: accesslib.php:130
RISK_XSS
const RISK_XSS
Capability allows user to add scripted content - see http://docs.moodle.org/dev/Hardening_new_Roles_s...
Definition: accesslib.php:143