Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)

Directories

directory backup
  
 

Functions

 imscp_add_instance ($data, $mform)
 Add imscp instance.
 
 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.
 
 imscp_delete_instance ($id)
 Delete imscp instance.
 
 imscp_export_contents ($cm, $baseurl)
 Export imscp resource contents.
 
 imscp_get_file_areas ($course, $cm, $context)
 Lists all browsable file areas.
 
 imscp_get_file_info ($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename)
 File browsing support for imscp module ontent area.
 
 imscp_get_post_actions ()
 List the actions that correspond to a post of this module.
 
 imscp_get_view_actions ()
 List the actions that correspond to a view of this module.
 
 imscp_page_type_list ($pagetype, $parentcontext, $currentcontext)
 Return a list of page types.
 
 imscp_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array())
 Serves the imscp files.
 
 imscp_reset_userdata ($data)
 This function is used by the reset_course_userdata function in moodlelib.
 
 imscp_supports ($feature)
 List of features supported in IMS CP module.
 
 imscp_update_instance ($data, $mform)
 Update imscp instance.
 
 imscp_view ($imscp, $course, $cm, $context)
 Mark the activity completed (if required) and trigger the course_module_viewed event.
 
 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.
 

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_file_areas()

imscp_get_file_areas ( $course,
$cm,
$context )

Lists all browsable file areas.

Parameters
stdClass$coursecourse object
stdClass$cmcourse module object
stdClass$contextcontext object
Return values
array

◆ imscp_get_file_info()

imscp_get_file_info ( $browser,
$areas,
$course,
$cm,
$context,
$filearea,
$itemid,
$filepath,
$filename )

File browsing support for imscp module ontent area.

Parameters
file_browser$browserfile browser
stdClass$areasfile areas
stdClass$coursecourse object
stdClass$cmcourse module object
stdClass$contextcontext object
string$fileareafile area
int$itemiditem ID
string$filepathfile path
string$filenamefile name
Return values
file_infoinstance or null if not found

◆ 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_pluginfile()

imscp_pluginfile ( $course,
$cm,
$context,
$filearea,
$args,
$forcedownload,
array $options = array() )

Serves the imscp files.

Parameters
stdClass$coursecourse object
stdClass$cmcourse module object
stdClass$contextcontext object
string$fileareafile area
array$argsextra arguments
bool$forcedownloadwhether or not force download
array$optionsadditional options affecting the file serving
Return values
boolfalse if file not found, does not return if found - justsend the file

◆ 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 or string for the module purpose.

◆ 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\local\event\entities\action_interface|null