[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/resource/ -> lib.php (summary)

(no description)

Copyright: 2009 Petr Skoda {@link http://skodak.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 521 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 19 functions

  resource_supports()
  resource_get_extra_capabilities()
  resource_reset_userdata()
  resource_get_view_actions()
  resource_get_post_actions()
  resource_add_instance()
  resource_update_instance()
  resource_set_display_options()
  resource_delete_instance()
  resource_get_coursemodule_info()
  resource_cm_info_view()
  resource_get_file_areas()
  resource_get_file_info()
  resource_pluginfile()
  resource_page_type_list()
  resource_export_contents()
  resource_dndupload_register()
  resource_dndupload_handle()
  resource_view()

Functions
Functions that are not part of a class:

resource_supports($feature)   X-Ref
List of features supported in Resource module

param: string $feature FEATURE_xx constant for requested feature
return: mixed True if module supports feature, false if not, null if doesn't know

resource_get_extra_capabilities()   X-Ref
Returns all other caps used in module

return: array

resource_reset_userdata($data)   X-Ref
This function is used by the reset_course_userdata function in moodlelib.

param: $data the data submitted from the reset course.
return: array status array

resource_get_view_actions()   X-Ref
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: array

resource_get_post_actions()   X-Ref
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: array

resource_add_instance($data, $mform)   X-Ref
Add resource instance.

param: object $data
param: object $mform
return: int new resource instance id

resource_update_instance($data, $mform)   X-Ref
Update resource instance.

param: object $data
param: object $mform
return: bool true

resource_set_display_options($data)   X-Ref
Updates display options based on form input.

Shared code used by resource_add_instance and resource_update_instance.

param: object $data Data object

resource_delete_instance($id)   X-Ref
Delete resource instance.

param: int $id
return: bool true

resource_get_coursemodule_info($coursemodule)   X-Ref
Given a course_module object, this function returns any
"extra" information that may be needed when printing
this activity in a course listing.

See {@link get_array_of_activities()} in course/lib.php

param: stdClass $coursemodule
return: cached_cm_info info

resource_cm_info_view(cm_info $cm)   X-Ref
Called when viewing course page. Shows extra details after the link if
enabled.

param: cm_info $cm Course module information

resource_get_file_areas($course, $cm, $context)   X-Ref
Lists all browsable file areas

param: stdClass $course course object
param: stdClass $cm course module object
param: stdClass $context context object
return: array

resource_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename)   X-Ref
File browsing support for resource module content area.

param: stdClass $browser file browser instance
param: stdClass $areas file areas
param: stdClass $course course object
param: stdClass $cm course module object
param: stdClass $context context object
param: string $filearea file area
param: int $itemid item ID
param: string $filepath file path
param: string $filename file name
return: file_info instance or null if not found

resource_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array()   X-Ref
Serves the resource files.

param: stdClass $course course object
param: stdClass $cm course module object
param: stdClass $context context object
param: string $filearea file area
param: array $args extra arguments
param: bool $forcedownload whether or not force download
param: array $options additional options affecting the file serving
return: bool false if file not found, does not return if found - just send the file

resource_page_type_list($pagetype, $parentcontext, $currentcontext)   X-Ref
Return a list of page types

param: string $pagetype current page type
param: stdClass $parentcontext Block's parent context
param: stdClass $currentcontext Current context of block

resource_export_contents($cm, $baseurl)   X-Ref
Export file resource contents

return: array of file content

resource_dndupload_register()   X-Ref
Register the ability to handle drag and drop file uploads

return: array containing details of the files / types the mod can handle

resource_dndupload_handle($uploadinfo)   X-Ref
Handle a file that has been uploaded

param: object $uploadinfo details of the file / content that has been uploaded
return: int instance id of the newly created mod

resource_view($resource, $course, $cm, $context)   X-Ref
Mark the activity completed (if required) and trigger the course_module_viewed event.

param: stdClass $resource   resource object
param: stdClass $course     course object
param: stdClass $cm         course module object
param: stdClass $context    context object



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1