Search moodle.org's
Developer Documentation


External course API

Copyright: 2009 Petr Skodak
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 2001 lines (91 kb)
Included or required:0 times
Referenced: 15 times
Includes or requires: 0 files

Defines 2 classes


Class: core_course_external  - X-Ref

Course external functions

get_course_contents_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_course_contents($courseid, $options = array()   X-Ref
Get course contents

param: int $courseid course id
param: array $options These options are not used yet, might be used in later version
return: array

get_course_contents_returns()   X-Ref
Returns description of method result value

return: external_description

get_courses_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_courses($options = array()   X-Ref
Get courses

param: array $options It contains an array (list of ids)
return: array

get_courses_returns()   X-Ref
Returns description of method result value

return: external_description

create_courses_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

create_courses($courses)   X-Ref
Create  courses

param: array $courses
return: array courses (id and shortname only)

create_courses_returns()   X-Ref
Returns description of method result value

return: external_description

update_courses_parameters()   X-Ref
Update courses

return: external_function_parameters

update_courses($courses)   X-Ref
Update courses

param: array $courses

update_courses_returns()   X-Ref
Returns description of method result value

return: external_description

delete_courses_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

delete_courses($courseids)   X-Ref
Delete courses

param: array $courseids A list of course ids

delete_courses_returns()   X-Ref
Returns description of method result value

return: external_description

duplicate_course_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

duplicate_course($courseid, $fullname, $shortname, $categoryid, $visible = 1, $options = array()   X-Ref
Duplicate a course

param: int $courseid
param: string $fullname Duplicated course fullname
param: string $shortname Duplicated course shortname
param: int $categoryid Duplicated course parent category id
param: int $visible Duplicated course availability
param: array $options List of backup options
return: array New course info

duplicate_course_returns()   X-Ref
Returns description of method result value

return: external_description

import_course_parameters()   X-Ref
Returns description of method parameters for import_course

return: external_function_parameters

import_course($importfrom, $importto, $deletecontent = 0, $options = array()   X-Ref
Imports a course

param: int $importfrom The id of the course we are importing from
param: int $importto The id of the course we are importing to
param: bool $deletecontent Whether to delete the course we are importing to content
param: array $options List of backup options
return: null

import_course_returns()   X-Ref
Returns description of method result value

return: external_description

get_categories_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_categories($criteria = array()   X-Ref
Get categories

param: array $criteria Criteria to match the results
param: booln $addsubcategories obtain only the category (false) or its subcategories (true - default)
return: array list of categories

compare_categories_by_path($category1, $category2)   X-Ref
Sort categories array by path
private function: only used by get_categories

param: array $category1
param: array $category2
return: int result of strcmp

compare_categories_by_sortorder($category1, $category2)   X-Ref
Sort categories array by sortorder
private function: only used by get_categories

param: array $category1
param: array $category2
return: int result of strcmp

get_categories_returns()   X-Ref
Returns description of method result value

return: external_description

create_categories_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

create_categories($categories)   X-Ref
Create categories

param: array $categories - see create_categories_parameters() for the array structure
return: array - see create_categories_returns() for the array structure

create_categories_returns()   X-Ref
Returns description of method parameters

return: external_function_parameters

update_categories_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

update_categories($categories)   X-Ref
Update categories

param: array $categories The list of categories to update
return: null

update_categories_returns()   X-Ref
Returns description of method result value

return: external_description

delete_categories_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

delete_categories($categories)   X-Ref
Delete categories

param: array $categories A list of category ids
return: array

delete_categories_returns()   X-Ref
Returns description of method parameters

return: external_function_parameters

delete_modules_parameters()   X-Ref
Describes the parameters for delete_modules.

return: external_external_function_parameters

delete_modules($cmids)   X-Ref
Deletes a list of provided module instances.

param: array $cmids the course module ids

delete_modules_returns()   X-Ref
Describes the delete_modules return value.

return: external_single_structure

Class: moodle_course_external  - X-Ref

Deprecated course external functions

get_courses_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

get_courses($options)   X-Ref
Get courses

param: array $options
return: array

get_courses_returns()   X-Ref
Returns description of method result value

return: external_description

create_courses_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

create_courses($courses)   X-Ref
Create  courses

param: array $courses
return: array courses (id and shortname only)

create_courses_returns()   X-Ref
Returns description of method result value

return: external_description

Search This Site: