Moodle  2.2.1
http://www.collinsharper.com
course_publish_manager Class Reference

Public Member Functions

 add_course_publication ($huburl, $courseid, $enrollable, $hubcourseid)
 update_enrollable_course_publication ($publicationid)
 update_publication ($publication)
 get_publications ($huburl=null, $courseid=null, $enrollable=-1)
 get_publication ($hubcourseid, $huburl)
 get_course_publications ($courseid)
 get_registeredhub_by_publication ($publicationid)
 delete_publication ($publicationid)
 delete_hub_publications ($huburl, $enrollable=-1)
 get_block_instances_by_context ($contextid, $sort= '')
 get_sorted_subjects ()

Detailed Description

Definition at line 112 of file lib.php.


Member Function Documentation

add_course_publication ( huburl,
courseid,
enrollable,
hubcourseid 
)

Record a course publication

Parameters:
int$hubidthe hub id from the 'registered on hub' table
int$courseidthe course id from site point of view
int$enrollableif the course is enrollable = 1, if downloadable = 0
int$hubcourseidthe course id from the hub point of view

Definition at line 121 of file lib.php.

delete_hub_publications ( huburl,
enrollable = -1 
)

Delete publications for a hub

Parameters:
string$huburl
int$enrollable

Definition at line 237 of file lib.php.

delete_publication ( publicationid)

Delete a publication

Parameters:
int$publicationid

Definition at line 227 of file lib.php.

get_block_instances_by_context ( contextid,
sort = '' 
)

Get an array of all block instances for a given context

Parameters:
int$contextida context id
Returns:
array of block instances.

Definition at line 258 of file lib.php.

get_course_publications ( courseid)

Get all publication for a course

Parameters:
int$courseid
Returns:
array of publication

Definition at line 198 of file lib.php.

get_publication ( hubcourseid,
huburl 
)

Get a publication for a course id on a hub (which is either the id of the unique possible enrollable publication of a course, either an id of one of the downloadable publication)

Parameters:
int$hubcourseid
string$huburl
Returns:
object publication

Definition at line 187 of file lib.php.

get_publications ( huburl = null,
courseid = null,
enrollable = -1 
)

Get courses publications

Parameters:
int$hubidspecify a hub
int$courseidspecify a course
int$enrollablespecify type of publication (enrollable or downloadable)
Returns:
array of publications

Definition at line 160 of file lib.php.

get_registeredhub_by_publication ( publicationid)

Get the hub concerned by a publication

Parameters:
int$publicationid
Returns:
object the hub (id, name, url, token)

Definition at line 214 of file lib.php.

Retrieve all the sorted course subjects

Returns:
array $subjects

Definition at line 267 of file lib.php.

Here is the call graph for this function:

Update a enrollable course publication

Parameters:
int$publicationid

Definition at line 136 of file lib.php.

update_publication ( publication)

Update a course publication

Parameters:
object$publication

Definition at line 148 of file lib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations