Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/cohort/lib.php File Reference

Go to the source code of this file.

Data Structures

class  cohort_candidate_selector
class  cohort_existing_selector

Namespaces

namespace  core

Functions

 cohort_add_cohort ($cohort)
 cohort_update_cohort ($cohort)
 cohort_delete_cohort ($cohort)
 cohort_delete_category ($category)
 cohort_add_member ($cohortid, $userid)
 cohort_remove_member ($cohortid, $userid)
 cohort_get_visible_list ($course)
 cohort_get_cohorts ($contextid, $page=0, $perpage=25, $search= '')

Function Documentation

cohort_add_cohort ( cohort)

Add new cohort.

Parameters:
object$cohort
Returns:
int

Definition at line 35 of file lib.php.

Here is the call graph for this function:

cohort_add_member ( cohortid,
userid 
)

Remove cohort member

Parameters:
int$cohortid
int$userid
Returns:
void

Definition at line 133 of file lib.php.

Here is the call graph for this function:

cohort_delete_category ( category)

Somehow deal with cohorts when deleting course category, we can not just delete them because they might be used in enrol plugins or referenced in external systems.

Parameters:
object$category
Returns:
void

Definition at line 108 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

cohort_delete_cohort ( cohort)

Delete cohort.

Parameters:
object$cohort
Returns:
void

Definition at line 88 of file lib.php.

Here is the call graph for this function:

cohort_get_cohorts ( contextid,
page = 0,
perpage = 25,
search = '' 
)

Get all the cohorts.

moodle_database $DB

Parameters:
int$contextid
int$pagenumber of the current page
int$perpageitems per page
string$searchsearch string
Returns:
array Array(totalcohorts => int, cohorts => array)

Definition at line 203 of file lib.php.

cohort_get_visible_list ( course)

Returns list of visible cohorts in course.

Parameters:
object$course
bool$enrolledtrue means include only cohorts with enrolled users
Returns:
array

Definition at line 164 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

cohort_remove_member ( cohortid,
userid 
)

Add cohort member

Parameters:
int$cohortid
int$userid
Returns:
void

Definition at line 150 of file lib.php.

Here is the call graph for this function:

cohort_update_cohort ( cohort)

Update existing cohort.

Parameters:
object$cohort
Returns:
void

Definition at line 72 of file lib.php.

Here is the call graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations