Loading...
 

History: Voting_System

Preview of version: 18

Voting_System is one simple yet very powerful use of Trackers in Tiki. This profile will enable the tracker feature and create a basic wiki page to act as a custom reduced interface to vote in the system, while hiding some fields to the end user, that are needed to ensure that the user is recognized as a member of the only group that can vote ("Group1"), and that only one vote per user is allowed.

Two users are created for demo purposes: user1, which belongs to group1, and user2, which belongs to group2. Therefore, only user1 can vote, beyond the admin, that can also vote since no permissions are checked against user admin, who has the ability to create and fine tune the system.

This page will be created:
Profile_Voting_System_voting_page

YAML
preferences: feature_trackers: y feature_wiki_argvariable: y useGroupHome: y limitedGoGroupHome: y trackerfield_autoincrement: y trackerfield_dropdownother: y wikiplugin_jq: y wikiplugin_tabs: y wikiplugin_tracker: y wikiplugin_trackerstat: y instructions: Profile_Voting_System_voting_page objects: - type: tracker ref: Voting_System data: name: Tracker for the Voting System description: > Voting for the New Board according to the proposal shown in the minutes from last general meeting. sort_default_order: desc sort_default_field: creation restrict_end: 0 restrict_start: 0 allow: - one_item_per_user show: - list_creation_date - creation_date - status_admin_only - type: tracker_field ref: voting_notaSobreLaVotaciN data: name: Note from the Voting System permname: notaSobreLaVotaciN tracker: $profileobject:Voting_System$ options: wikiparse: 1 max: 100 type: static order: 0 visible: admin_only description: | ^Choose the pre-selected, as proposed in the last General Meeting, or type in the full name of your personal proposal, at the "__Other__" box for the appropriate role. ~~red:Keep i mind that by writing something in the "__Other__" field, the different choice placed in the drop-down will be overridden. Moreover, if you choose "__Other__" in the drop-down, but you leave the box blank, that vote will be counted as "__Null Vote__", just as if you wrote the name and surname of someone who does not appear in the Members List~~. %%% %%%Please note that you can choose the option "__Blank vote__" or "__Null vote__", if you prefer, directly through from the drop-down itself. %%% %%%If you made a mistake and you want to correct your vote, all you have to do is to vote again, your old vote and will be replaced by your new choice.^ descparsed: y flags: - public - type: tracker_field ref: voting_presidente data: name: Presidency permname: presidente tracker: $profileobject:Voting_System$ options: options: - Mrs Mary Jones - Mrs Mary Jones - Blank vote - Null vote - Other type: dropdown_other order: 10 flags: - list - searchable - public - mandatory - type: tracker_field ref: voting_vicepresidente data: name: Vicepresidency permname: vicepresidente tracker: $profileobject:Voting_System$ options: options: - Armando Bronca PhD. - Armando Bronca PhD. - Blank vote - Null vote - Other type: dropdown_other order: 20 flags: - list - searchable - public - mandatory - type: tracker_field ref: voting_secretariado data: name: Secretarial permname: secretariado tracker: $profileobject:Voting_System$ options: options: - Mr John Smith - Mr John Smith - Blank vote - Null vote - Other type: dropdown_other order: 30 flags: - list - searchable - public - mandatory - type: tracker_field ref: voting_tesorerA data: name: Treasury permname: tesorerA tracker: $profileobject:Voting_System$ options: options: - Robin Hood Jr. - Robin Hood Jr. - Blank vote - Null vote - Other type: dropdown_other order: 40 flags: - list - searchable - public - mandatory - type: tracker_field ref: voting_vocalA_1 data: name: Extra Membership 1 permname: vocalA_1 tracker: $profileobject:Voting_System$ options: options: - John Doe Sr. - John Doe Sr. - Blank vote - Null vote - Other type: dropdown_other order: 50 flags: - list - searchable - public - mandatory - type: tracker_field ref: voting_vocalA_2 data: name: Extra Membership 2 permname: vocalA_2 tracker: $profileobject:Voting_System$ options: options: - Lara Croft - Lara Croft - Blank vote - Null vote - Other type: dropdown_other order: 60 flags: - list - searchable - public - mandatory - type: tracker_field ref: voting_vocalA_3 data: name: Extra Membership 3 permname: vocalA_3 tracker: $profileobject:Voting_System$ options: options: - Perico Los Palotes - Perico Los Palotes - Blank vote - Null vote - Other type: dropdown_other order: 70 flags: - list - searchable - public - mandatory - type: tracker_field ref: voting_vocalA_4 data: name: Extra Membership 4 permname: vocalA_4 tracker: $profileobject:Voting_System$ options: options: - Aytor Tilladepa Tatas - Aytor Tilladepa Tatas - Blank vote - Null vote - Other type: dropdown_other order: 80 flags: - list - searchable - public - mandatory - type: tracker_field ref: voting_usuario data: name: Username permname: usuario tracker: $profileobject:Voting_System$ options: autoassign: 1 notify: 1 type: user order: 90 visible: admin_only description: > ~~grey:''This field is necessary to check that the user is a member, and restrict the system to one vote per person in the members group. This field is only visible by the person voting at the time of the vote, and the system administrator to ensure that the system worked properly and there is a single vote per person, at any time if doubts arise about the voting system. No other member of the organization will have access to view voters. Also, once the voting period is over, and no computer issues were detected, then this user field will be deleted by the system administrator, so that the vote record will be completely anonymous regarding who voted what.''~~ descparsed: y flags: - list - mandatory - type: tracker_field ref: voting_voto data: name: 'Vote #' permname: voto tracker: $profileobject:Voting_System$ options: start: 1 prepend: '#' type: auto_increment order: 100 flags: - list - searchable - link - public


Groups

Create a group "group1" which has permission to cast a vote in the Voting system. The other group "group2" can't add items to that tracker (therefore, its members can't vote).

YAML
permissions: Group1: description: Members of the organization allowed to cast a vote in the Voting System home: $voting_page allow: - create_tracker_items - list_trackers - view_trackers include: [ Registered ] objects: - type: tracker id: $Voting_System allow: - create_tracker_items - list_trackers - view_trackers Group2: description: Other registered users to the site, that are not allowed to cast a vote in the Voting System allow: - create_tracker_items - list_trackers - view_trackers include: [ Registered ] objects: - type: tracker id: $Voting_System deny: - create_tracker_items - list_trackers - view_trackers



Users

Add a user to the group Members
YAML
objects: - type: user data: name: user1 pass: user1 email: user1@example.com change: n groups: [ Group1 ] - type: user data: name: user2 pass: user2 email: user2@example.com change: n groups: [ Group2 ]



Sample vote from user1


YAML
objects: - type: tracker_item ref: vote_001 data: tracker: $Voting_System status: values: - [ $voting_presidente, Mr Bean ] - [ $voting_vicepresidente, Armando Bronca PhD. ] - [ $voting_secretariado, Blank vote ] - [ $voting_tesorerA, Robin Hood Jr. ] - [ $voting_vocalA_1, Null vote ] - [ $voting_vocalA_2, foo ] - [ $voting_vocalA_3, Perico Los Palotes ] - [ $voting_vocalA_4, Aytor Tilladepa Tatas ] - [ $voting_usuario, user1 ] - [ $voting_voto, 1 ]


Add a form to add a vote and show the results from the voting


This will include: Profile_Voting_System_voting_page

YAML
instructions: Voting preferences: enable: [ feature_wiki ] objects: - type: wiki_page ref: voting_page data: name: Voting description: The Voting System lang: en content: wikicontent:Profile_Voting_System_voting_page


History

Advanced
Information Version
Sun 09 of Jan, 2022 00:09 GMT-0000 Xavier de Pedro adding empty reference to notaSobreLaVotaciN jus tin case 33
View
Sun 09 of Jan, 2022 00:05 GMT-0000 Xavier de Pedro removing single quotes from values, to see whether the item is inserted in the profile application 32
View
Sun 09 of Jan, 2022 00:03 GMT-0000 Xavier de Pedro added item status at the item definition 31
View
Sun 09 of Jan, 2022 00:00 GMT-0000 Xavier de Pedro surrouding values with single quotes and dollar sign with references to tracker fields 30
View
Sat 08 of Jan, 2022 23:58 GMT-0000 Xavier de Pedro surrouding values with single quotes 29
View
Sat 08 of Jan, 2022 23:55 GMT-0000 Xavier de Pedro testing another change to see if this error is avoided: Call to a member function getFieldData() on bool on line 3881 of /var/www/tiki23/lib/trackers/trackerlib.php 28
View
Thu 09 of Jun, 2016 11:56 GMT-0000 Xavier de Pedro fixed for Tiki15 where option "other" must be with lowercase to work properly (otherwise no extra field is displayed to allow input of the other option 27
View
Sat 23 of Jan, 2016 19:10 GMT-0000 Nelson Ko Code Plugin modified by editor. 26
View
Sat 23 of Jan, 2016 18:45 GMT-0000 Nelson Ko Code Plugin modified by editor. 25
View
Sat 23 of Jan, 2016 18:36 GMT-0000 Nelson Ko try long format reference to see if it solves trunk regression 24
View
Thu 22 of May, 2014 09:02 GMT-0000 Xavier de Pedro wording 23
View
Fri 31 of Jan, 2014 13:08 GMT-0000 Xavier de Pedro added remarksbox 22
View
Fri 31 of Jan, 2014 13:03 GMT-0000 Xavier de Pedro typo 21
View
Fri 31 of Jan, 2014 13:02 GMT-0000 Xavier de Pedro added some info on how to extend 20
View
Fri 31 of Jan, 2014 12:46 GMT-0000 Xavier de Pedro remove the notification to the user on changed item 19
View
Fri 31 of Jan, 2014 12:42 GMT-0000 Xavier de Pedro added status as null 18
View
Fri 31 of Jan, 2014 12:37 GMT-0000 Xavier de Pedro renamed tracker 17
View
Fri 31 of Jan, 2014 12:35 GMT-0000 Xavier de Pedro removed status 16
View
Fri 31 of Jan, 2014 12:31 GMT-0000 Xavier de Pedro added group home voting page for group1 15
View
Fri 31 of Jan, 2014 12:19 GMT-0000 Xavier de Pedro remove perm declaration for anons and registered 14
View
Fri 31 of Jan, 2014 12:04 GMT-0000 Xavier de Pedro spacing 13
View
Fri 31 of Jan, 2014 11:23 GMT-0000 Xavier de Pedro changed order again 12
View
Fri 31 of Jan, 2014 11:21 GMT-0000 Xavier de Pedro changed order 11
View
Fri 31 of Jan, 2014 11:01 GMT-0000 Xavier de Pedro added sample vote and fixed linked field to avoid getting usernames shown in the since_last_visit_new module 10
View
Fri 31 of Jan, 2014 10:44 GMT-0000 Xavier de Pedro hopefully fixed object perms 9
View
  • «
  • 1 (current)
  • 2