[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

Book module core interaction API

Copyright: 2004-2011 Petr Skoda {@link http://skodak.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 636 lines (20 kb)
Included or required: 3 times
Referenced: 2 times
Includes or requires: 1 file
 mod/book/locallib.php

Defines 23 functions

  book_get_numbering_types()
  book_get_nav_types()
  book_get_nav_classes()
  book_get_extra_capabilities()
  book_add_instance()
  book_update_instance()
  book_delete_instance()
  book_print_recent_activity()
  book_reset_userdata()
  book_cron()
  book_grades()
  book_scale_used()
  book_scale_used_anywhere()
  book_get_view_actions()
  book_get_post_actions()
  book_supports()
  book_extend_settings_navigation()
  book_get_file_areas()
  book_get_file_info()
  book_pluginfile()
  book_page_type_list()
  book_export_contents()
  book_view()

Functions
Functions that are not part of a class:

book_get_numbering_types()   X-Ref
Returns list of available numbering types

return: array

book_get_nav_types()   X-Ref
Returns list of available navigation link types.

return: array

book_get_nav_classes()   X-Ref
Returns list of available navigation link CSS classes.

return: array

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

return: array

book_add_instance($data, $mform)   X-Ref
Add book instance.

param: stdClass $data
param: stdClass $mform
return: int new book instance id

book_update_instance($data, $mform)   X-Ref
Update book instance.

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

book_delete_instance($id)   X-Ref
Delete book instance by activity id

param: int $id
return: bool success

book_print_recent_activity($course, $viewfullnames, $timestart)   X-Ref
Given a course and a time, this module should find recent activity
that has occurred in book activities and print it out.

param: stdClass $course
param: bool $viewfullnames
param: int $timestart
return: bool true if there was output, or false is there was none

book_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

book_cron()   X-Ref
No cron in book.

return: bool

book_grades($bookid)   X-Ref
No grading in book.

param: int $bookid
return: null

book_scale_used($bookid, $scaleid)   X-Ref
This function returns if a scale is being used by one book
it it has support for grading and scales. Commented code should be
modified if necessary. See book, glossary or journal modules
as reference.

param: int $bookid
param: int $scaleid
return: boolean True if the scale is used by any journal

book_scale_used_anywhere($scaleid)   X-Ref
Checks if scale is being used by any instance of book

This is used to find out if scale used anywhere

param: int $scaleid
return: bool true if the scale is used by any book

book_get_view_actions()   X-Ref
Return read actions.

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

book_get_post_actions()   X-Ref
Return write actions.

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

book_supports($feature)   X-Ref
Supported features

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

book_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $booknode)   X-Ref
Adds module specific settings to the settings block

param: settings_navigation $settingsnav The settings navigation object
param: navigation_node $booknode The node to add module settings to
return: void

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

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

book_get_file_info($browser, $areas, $course, $cm, $context, $filearea, $itemid, $filepath, $filename)   X-Ref
File browsing support for book module chapter area.

param: object $browser
param: object $areas
param: object $course
param: object $cm
param: object $context
param: string $filearea
param: int $itemid
param: string $filepath
param: string $filename
return: object file_info instance or null if not found

book_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options=array()   X-Ref
Serves the book attachments. Implements needed access control ;-)

param: stdClass $course course object
param: cm_info $cm course module object
param: context $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

book_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
return: array

book_export_contents($cm, $baseurl)   X-Ref
Export book resource contents

param: stdClass $cm     Course module object
param: string $baseurl  Base URL for file downloads
return: array of file content

book_view($book, $chapter, $islastchapter, $course, $cm, $context)   X-Ref
Mark the activity completed (if required) and trigger the course_module_viewed event.

param: stdClass $book       book object
param: stdClass $chapter    chapter object
param: bool $islaschapter   is the las chapter of the book?
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