| 1 |
<?php |
|---|
| 2 |
/* |
|---|
| 3 |
* Created on Sep 23, 2007 |
|---|
| 4 |
* |
|---|
| 5 |
* @author Diego Andrés RamÃrez Aragón <diego@somosmas.org> |
|---|
| 6 |
*/ |
|---|
| 7 |
function groups_pagesetup() { |
|---|
| 8 |
global $PAGE,$CFG,$profile_id; |
|---|
| 9 |
$page_owner = $profile_id; |
|---|
| 10 |
|
|---|
| 11 |
if (defined("context") && context == "network") { |
|---|
| 12 |
if (isloggedin() && $page_owner == $_SESSION['userid']) { |
|---|
| 13 |
$PAGE->menu_sub[] = array ( |
|---|
| 14 |
'name' => 'friend:accesscontrols', |
|---|
| 15 |
'html' => a_href("{$CFG->wwwroot}mod/groups/",__gettext("Access controls"))); |
|---|
| 16 |
} |
|---|
| 17 |
} |
|---|
| 18 |
} |
|---|
| 19 |
|
|---|
| 20 |
function groups_init() { |
|---|
| 21 |
global $CFG, $function; |
|---|
| 22 |
|
|---|
| 23 |
// Functions to perform upon initialisation |
|---|
| 24 |
$function['groups:init'][] = $CFG->dirroot . "mod/groups/lib/groups_actions.php"; |
|---|
| 25 |
|
|---|
| 26 |
// Add user-owned groups to access levels |
|---|
| 27 |
$function['init'][] = $CFG->dirroot . "mod/groups/lib/groups_access_levels.php"; |
|---|
| 28 |
|
|---|
| 29 |
// Function to retrieve groups |
|---|
| 30 |
$function['groups:get'][] = $CFG->dirroot . "mod/groups/lib/get_groups.php"; |
|---|
| 31 |
$function['groups:get:external'][] = $CFG->dirroot . "mod/groups/lib/get_groups_external.php"; |
|---|
| 32 |
$function['groups:getmembership'][] = $CFG->dirroot . "mod/groups/lib/get_groups_membership.php"; |
|---|
| 33 |
|
|---|
| 34 |
// Group view / edit screen |
|---|
| 35 |
// $function['groups:editpage'][] = $CFG->dirroot . "mod/groups/lib/groups_display_membership.php"; |
|---|
| 36 |
$function['groups:editpage'][] = $CFG->dirroot . "mod/groups/lib/groups_explanation.php"; |
|---|
| 37 |
$function['groups:editpage'][] = $CFG->dirroot . "mod/groups/lib/groups_create.php"; |
|---|
| 38 |
$function['groups:editpage'][] = $CFG->dirroot . "mod/groups/lib/groups_edit_existing.php"; |
|---|
| 39 |
|
|---|
| 40 |
// Individual group editing function |
|---|
| 41 |
$function['groups:edit:display'][] = $CFG->dirroot . "mod/groups/lib/groups_edit_display.php"; |
|---|
| 42 |
|
|---|
| 43 |
// Check access levels |
|---|
| 44 |
$function['users:access_level_check'][] = $CFG->dirroot . "mod/groups/lib/group_access_level_check.php"; |
|---|
| 45 |
|
|---|
| 46 |
// Obtain SQL "where" string for access levels |
|---|
| 47 |
$function['users:access_level_sql_where'][] = $CFG->dirroot . "mod/groups/lib/function_access_level_sql_where.php"; |
|---|
| 48 |
|
|---|
| 49 |
} |
|---|
| 50 |
?> |
|---|