Go to the source code of this file.
Namespaces | |
namespace | pragyan |
Widget Framework for Pragyan CMS (c) 2010 Pragyan Team http://www.gnu.org/licenses/ GNU Public License For more details, see README Add support for File Upload/Download via the widget's configurations Reload Widgets ,Get Widget Instances. see bottom. | |
Functions | |
getGroupRow ($groupName) | |
getGroupIdFromName ($groupName) | |
getGroupIdFromFormId ($formId) | |
getFormIdFromGroupId ($groupId) | |
shiftGroupPriority ($userId, $groupName, $direction= 'up', $userMaxPriority, $shiftNeighbours=true) | |
getUsersRegisteredToGroup ($groupId) | |
associateGroupWithForm ($groupId, $formId) | |
unassociateFormFromGroup ($groupId) | |
getAssociableFormsList ($userId, $emptyFormsOnly=false) | |
emptyGroup ($groupName, $silent=false) | |
deleteGroup ($groupName) | |
isGroupEmpty ($groupId) | |
addUserToGroupName ($groupName, $userId) | |
addUserToGroupId ($groupId, $userId) | |
removeUserFromGroupId ($groupId, $userId) | |
reevaluateGroupPriorities ($modifiableGroups) | |
getGroupAssociatedWithForm ($formId) | |
getGroupsFromUserId ($userId) |
addUserToGroupId | ( | $ | groupId, | |
$ | userId | |||
) |
Definition at line 390 of file group.lib.php.
addUserToGroupName | ( | $ | groupName, | |
$ | userId | |||
) |
Definition at line 372 of file group.lib.php.
associateGroupWithForm | ( | $ | groupId, | |
$ | formId | |||
) |
Copy group users to form
Update group table, copy all users to group
Definition at line 224 of file group.lib.php.
deleteGroup | ( | $ | groupName | ) |
Definition at line 353 of file group.lib.php.
emptyGroup | ( | $ | groupName, | |
$ | silent = false | |||
) |
Definition at line 326 of file group.lib.php.
getAssociableFormsList | ( | $ | userId, | |
$ | emptyFormsOnly = false | |||
) |
List containing form id, page title, page path
Definition at line 297 of file group.lib.php.
getFormIdFromGroupId | ( | $ | groupId | ) |
getFormIdFromGroupId Returns the form id of the given group id
Definition at line 78 of file group.lib.php.
getGroupAssociatedWithForm | ( | $ | formId | ) |
Definition at line 439 of file group.lib.php.
getGroupIdFromFormId | ( | $ | formId | ) |
getGroupIdFromFormId Returns the group id of the given form id
Definition at line 60 of file group.lib.php.
getGroupIdFromName | ( | $ | groupName | ) |
Definition at line 52 of file group.lib.php.
getGroupRow | ( | $ | groupName | ) |
Admin page should be able to move perm_rank up and down and check if create and view exists for everything and if the admin has all premissions or not. If the admin does not then it gives him the permission. OR this could also be implemented through the getPermissions function
Groups -> This is what grant will have : Ability to create a group and give its description and a priority. Change priority of other groups below one's own priority Ability to associate an empty group with a form. During this association make sure that only those forms are listed whose form_loginrequired is 1 and to which the guy has editregistrants permission. Also copy all users from the form to the group. Call a function in form which gives list of all registered users to a form. Ability to unassociate with a form. Empty the group then. Ability to empty a group -> only those forms whose form_id is 0 (for other forms give a link to the form edit page.) Ability to add remove people from a group -> only those forms whose form_id is 0 Returns all information about a particular group from the `groups` TABLE
$groupName | Name of the group, whose information is to be returned |
Definition at line 46 of file group.lib.php.
getGroupsFromUserId | ( | $ | userId | ) |
Definition at line 451 of file group.lib.php.
getUsersRegisteredToGroup | ( | $ | groupId | ) |
Definition at line 213 of file group.lib.php.
isGroupEmpty | ( | $ | groupId | ) |
Definition at line 365 of file group.lib.php.
reevaluateGroupPriorities | ( | $ | modifiableGroups | ) |
Definition at line 420 of file group.lib.php.
removeUserFromGroupId | ( | $ | groupId, | |
$ | userId | |||
) |
Definition at line 405 of file group.lib.php.
shiftGroupPriority | ( | $ | userId, | |
$ | groupName, | |||
$ | direction = 'up' , |
|||
$ | userMaxPriority, | |||
$ | shiftNeighbours = true | |||
) |
Moves a group up one step by priority
$groupName | The name that identifies the group | |
$shiftUp | Boolean, indicating whether groups of higher priority should be shifted up, or whether this group should be moved beside the next higher priority group |
Check if the user is shifting a group with priority = maxprioritygroup, and if he belongs to that group, stop him!
No shifting to a priority less than 1. No shifting to a priority greater than the user's maximum priority group. Shift neighbours: if there are other groups with priority same as the given group, we want the group to go from its current priority place to just before the next higher priority For this, check if there are groups with priority = curpriority + 1 or curpriority - 1 for moving down. if yes, shift everything up by 1 update curpriority to curpriority + 1 else set group's priority to next higher existing priority No shift neighbours: Take group from current priority to next higher existing priority, if the priority is less than user's max priority group's priority
no other groups on same level. find next higher existing priority level
Definition at line 97 of file group.lib.php.
unassociateFormFromGroup | ( | $ | groupId | ) |
Definition at line 283 of file group.lib.php.