Drupal Priorities Module

by admin | 17th February 2010

Priorities is a Drupal 6 module that helps on choosing the best and prioritizing alternatives among a set of various proposals. The scoring is based on users’ participative contribution through rating each and every alternative with a level of priority.

Description

The Priorities Drupal module allows users to set priorities to some sets of nodes. Each survey applies to nodes with a specific taxonomy term. The Priorities module comes with a new node type, Alternative, dedicated to surveys. But you can also include in a survey nodes of any node type, provided that the specific taxonomy term related to the survey is attached to these nodes. Authorised users can set a priority to each node inside a survey. The priority is chosen between a set of six levels (by default: Very important, Important, Mid important, Not important, Don’t know and Won’t say). Results are computed to sort nodes, ranking first the node of utmost importance for voting users.

A typical usage of this module is to help in a decision making process. For each decision, a new survey is created, generating a new taxonomy term. Then, create a node with this taxonomy term attached for each alternative in this survey. The Priorities module will allow users to give a priority level to each alternative and will show results sorted by score.

Note that it can also be used for other purposes than prioritization, for eg. to highlight points of consensus and dissent in a domain or among a group.

Label and color of each level of priority is configurable, as well as title, node type and taxonomy term for each survey.

Since revision 6.x-2.9, the status of each survey can be set to public (authorized users can answer to the survey and see its on-going results), active (authorized users can only answer the survey), closed(authorized users can only see its results) or disabled (users cannot answer the survey, nor see its results).

Approach

This module uses gradual notation of each level of priority (ranging for instance from Very important to Not important at all), together with choices such as I don’t know or Don’t want to say. The levels are associated to a colour scale. Such a method was proposed by Régnier for his “abacus”.This module uses gradual notation of each level of priority (ranging for instance from Very important to Not important at all), together with choices such as I don’t know or Don’t want to say. The levels are associated to a colour scale. Such a method was proposed by Régnier for his “abacus”.

License

This software is distributed other the terms of the GNU General Public Licence Version 2 or any later version.

Downloads

Priorities Drupal module can be downloaded from the Drupal contributed modules website.

Requirements

Drupal 6 with (built-in) Taxonomy module enabled.

Installation

Install as usual with Drupal modules, see http://drupal.org/node/70151 for further information.

Upgrade

In versions 6.x-1, each survey was identified by a node type, whereas in versions 6.x-2 a taxonomy term, included in a dedicated vocabulary, is used for that purpose. The benefit from this new architecture is that the create content page is not going to be a mile long for those who wish to use this module to create lots of different surveys.

Nevertheless, in versions 6.x-2, you can still specify that a survey uses nodes of a specific content type (instead of default Alternative content type which comes with Priorities module). Thus, when upgrading from 6.x-1 to 6.x-2, the existing surveys will be kept, using the same content types. Simply, a taxonomy term is created whose name is the survey title, followed by ” Alternative”. This taxonomy term is automactically added to each existing alternative of this survey when updating database.

The other major improvement of versions 6.x-2 is that user access rights can now be fine tuned for every survey created. Therefore, do not forget to set permissions for set priorities for survey title and get priorities for survey title for every survey created. Upgrading from versions 6.X-1 does not set these permissions.

Note also that for clarity purpose, what was called set of priorities in versions 6.x-1 is called now survey in versions 6.x-2.

Configuration

  • Configure user permissions on Administer › User management › Permissions › priorities module:
    administer priorities
    Users in roles with the administer priorities permission will be able to create new surveys, update or delete existing surveys, and modify settings of Priorities module.
    create priorities_alternative nodes
    Users in roles with the create priorities_alternative nodes permission will be able to create new alternatives of default node type for surveys.
    edit own priorities_alternative nodes
    Users in roles with the edit own priorities_alternative nodes permission will be able to update alternatives of default node type for surveys they’ve created.
    edit any priorities_alternative node
    Users in roles with the edit any priorities_alternative node permission will be able to update any alternative of default node type for surveys.
    delete own priorities_alternative nodes
    Users in roles with the delete own priorities_alternative nodes permission will be able to delete alternatives of default node type for surveys they’ve created.
    delete any priorities_alternative node
    Users in roles with the delete any priorities_alternative node permission will be able to delete any alternative of default node type for surveys.
    set priorities for all surveys
    Users in roles with the set priorities for all surveys permission will be able to set priorities for all surveys.
    get priorities for all surveys
    Users in roles with the get priorities for all surveys permission will be able to see results for all surveys.
  • Customize on Administer › Site configuration › Priorities settings:
    • the title of pages to set priorities and get results (these titles will be appended to the title of the survey).
    • the name and color (in hexadecimal RGB code, ex. #ADADAD) of priority levels.
  • Add a new survey on Administer › Site configuration › Priorities settings › Add a survey:
    • Choose a machine-readable name for this survey and a title (this title will be prepended to the title of pages set previously for setting priorities or getting results).
    • Optionnaly, choose the node type associated with this survey, any content of this node type will require the taxonomy term described below to be set. Defaults to Alternative node type, which is included in the Priorities module.
    • Optionnaly, choose the name of the taxonomy term associated with all alternatives of this survey, any node of the above node type with this taxonomy term will be considered as an alternative for this survey. Default to the title of the survey with Alternative appended. You can also choose a description for this taxonomy term (this description only shows up when managing taxonomy).
  • For every survey survey title created, configure also the following user permissions on Administer › User management › Permissions › priorities module:
    set priorities for survey title
    Users in roles with the set priorities for survey title permission will be able to set priorities on the survey survey title.
    get priorities for survey title
    Users in roles with the get priorities for survey title permission will be able to see results of the survey survey title.

    Note that you have to configure these permissions each time you create a new survey.

    Since revision 6.x-2.9, you can avoid the configuration of permissions each time you create a survey, by setting set/get priorities for all surveys permissions (see above), which take precedence over set/get priorities for survey title permissions.

Usage

For any configured survey survey_name:

  • authorized users can set priorities on priorities/survey_name/set
  • authorized users can get results on priorities/survey_name/results

Example

Let’s say you have to design a fancy brand new website – or improve the look & feel of an existing one – for a customer. As usual in the webdesign job, in order to fulfill your customer’s request, you’ve got to achieve a whole bunch of tasks… And oviously you won’t have time or resources to achieve them all. Therefore you’ve got to choose which tasks are more important and which ones can be left for future – which often ends to be never. In a nutshell: you have to prioritize your webdesign tasks.


Slideshow with
all screenshots

The Priorities module is specifically designed to help you in such a prioritization, by taking into account users’ preferences. Indeed, with the module, the list of taks is presented to a panel of users – i.e. users belonging a Drupal role – who are asked to assign a level of priority to each and every design task. You’ll end-up with a sorted list of tasks, ordered by authorized users’ preferences.

The process to implement this participative prioritization is rather simple. You can click on the right side picture to see a slideshow of screenshots with each step.

  • First, you have to enable the Priorities module just as usual Drupal module on
    Administer › Site building › Modules
  • As shown on
    Administer › Content management › Content types

    the Priorities module comes with a new content type: Alternative. This will be the default content type for all alternatives of any survey. 

  • Each survey will be related to a taxonomy term inside the Priorities Surveys vocabulary, which is created by the Priorities module, as shown on
    Administer › Content management › Taxonomy

     

  • When the Priorities module is installed from scratch, the Priorities Surveys vocabulary do not include any taxonomy term, as shown on
    Administer › Content management › Taxonomy › List terms

     

  • For now, no survey have been added yet, as you can see on
    Administer › Site configuration › Priorities settings

     

  • So, just add a new survey, by choosing a machine-readable name and a meaningful title on
    Administer › Site configuration › Priorities settings › Add a survey

    Optionnaly, you can also choose another content type than the default Alternative, the name of the taxonomy term associated with all alternatives of this survey, and a description for this term. 

  • The new survey related to your webdesign issue appears now on the list of all surveys on
    Administer › Content management › Taxonomy › List terms

    On the example screenshot, another survey Painting Colors has also been created. 

  • Also, each taxonomy term created for each survey appears now in the Priorities Surveys vocabulary on
    Administer › Site configuration › Priorities settings › List surveys

     

  • You can configure how priorities information – that is both the form where users set a priority to each alternative and the page presenting the prioritized results – is displayed to users, by choosing the title of both pages, and the name and color of each priority level on
    Administer › Site configuration › Priorities settings › Settings

     

  • When alternatives are presented, you surely do not want to display information about who has created them and when, this is set by default for the Alternative content type. But you can always change this behaviour and display post information for alternatives by checking the box(es) related to content type(s) enabled for surveys on
    Administer › Site building › Themes › Configure

     

  • Now you can create an alternative as Alternative node with the property (taxonomy term) Priorities Surveys set to Webdesign Task on
    Create content › Alternative

     

  • Repeat the previous step for all alternatives of your webdesign survey, as you can see on
    Administer › Content management › Content

     

  • Alternatives for other surveys can be created in the same way, just choose the appropriate Priorities Surveys property when creating contents. Note that an alternative can be included in several surveys by choosing a multiple value for the Priorities Surveys property.
     

  • Then you have to select Drupal users roles who are able to set priority levels to alternatives, and those who can see the prioritized results on
    Administer › User management › Permissions › priorities module

    In the screenshot example, the results of your Webdesign survey can be accessed by anybody, while only authenticated users can set priorities in this survey. There is also another survey, Painting Colors that can be seen only by authenticated users, but only almighty administrators can set priorities for this survey. Note also that only administrator can manage – i.e. create/edit/delete – Alternative nodes and configure – i.e. apply settings to and create/edit/delete surveys for – the Priorities module. 

  • Authorized users can now set a level of priority for each alternative of your survey, which appears in the list of surveys on
    Surveys

     

  • They just have to fill the form on
    Surveys › Webdesign – Set priorities

     

  • And finally, prioritized results can be accessed either on
    SurveysWebdesign

    or on

    Surveys › Webdesign – Your Priorities
    
    

     

Integration with organic groups

Priorities module can perfectly works with Organic groups:

  • Alternative content type should be configured as a post in a group.
  • Access rights for og are fulfilled.
  • A survey is displayed (to be answered, or to see its results) to a specific user if and only if there is only one alternative in this survey which this user has access to.
  • These properties allow to propose different alternatives for the same surveys, according to group(s) the user belongs to.
  • A list of surveys accessible from a group can simply be retrieved and displayed with:

    print theme('priorities_surveys', priorities_get_surveys($gid));

    with $gid being the group identifier.

    Contact

    Current maintainer: Gérald SÉDRATI-DINET – http://drupal.org/user/616006

Comments are closed.