I know there's already an issue with the same title, but I wanted to open a new discussion thread for this.

Here's a patch to the 6.x-1.x-dev version that allows multiple reviews per node. Two rewrites had already been posted on More than one review per node, with the request to post a patch and not a whole module.
We added features support to it. Since taxonomy does not support features yet, all settings and configuration pertaining to it are lost when moving/copying it to another drupal installation.
The code is working for us now, but it needs a lot of tidying up. Hope there are some people out there that want to give it a try and provide us with some feedback, so it might be committed on a future release of nodereview.

CommentFileSizeAuthor
nodereview-6.x-1.x-dev.patch64.87 KBJan van Diepen

Comments

batje’s picture

Title: Allow multiple reviews per node » Feature packed update

this version has several new existing features:

- Multiple Node-Review-Types. One Type might be "Expert Review", and the other "Simple Review" both review-types are seperate entities, with a seperate set of axes.
- Weighted axes calculation. If you think the Axe "Overall Quality" is twice as important for the end-score as "Nice Color", then you can do that now.
- Axes Taxonomy. Axes can be linked to a taxonomy. Taxonomies will show as collapsable fieldsets. If you have a LOT of axes, this is keeps the list managable.
- The textfield that was available on *every* axe was mandatory, in this version, it is configurable to be optional too.
- Features support. Build your node-review-types on one machine, and transfer them to another, using features: http://drupal.org/project/features

We are using this to review a big questionnaire on about 60 different axes, and it is suiting us pretty well so far.

Hope others like this too. Please give Jan or myself some feedback if you have any.

batje’s picture

Status: Active » Needs review
emilorol’s picture

Title: Feature packed update » Feature packed update - bug
Category: feature » bug
Priority: Normal » Critical

Hi,

I patch the main module with this patch and I run the installation. So far I can see the new features in place, but I keep getting this error:

user warning: Table 'mydb.nodereview_type' doesn't exist query: SELECT * FROM nodereview_type in /home/user/public_html/sites/all/modules/nodereview/nodereview.admin.inc on line 325.

To patch the files I use the following command:

patch < nodereview-6.x-1.x-dev.patch

Jan van Diepen’s picture

Installation installs the initial schema. Updates to the schema are implemented in the "update" functions in the install file. Running update.php should solve this. Good luck!

batje’s picture

Title: Feature packed update - bug » Feature packed update

removed the bug from the title.

We would love more feedback, btw.

liam mcdermott’s picture

Priority: Critical » Normal
Status: Needs review » Needs work

Firstly a general comment: normally patches are rolled from inside the directory the files are in, for NodeReview that would be inside the modules/nodereview directory, this patch was rolled from modules. There is something on this in the Drupal docs, but I can't find it so feel free to prove me wrong. :) Anyway, this isn't a deal-breaker just a little confusing.

The biggest hurdle for this patch is its size and complexity, patches should cover one thing and one thing only, otherwise module maintainers have a difficult time trying to decipher what the patch does and it will end up languishing in the queue forever. Therefore I recommend you break this patch up into smaller parts, each covering only one thing (and in separate -- well titled -- issues).

Another problem, I get the following error when viewing a node that is reviewable:

user warning: Table 'apc_twf_d6.twf_nodereview_type_nodetype' doesn't exist query: SELECT * FROM twf_nodereview_type_nodetype WHERE node_type = 'forum' in /home/liam/public_html/twf_drupal6/sites/all/modules/nodereview/nodereview.module on line 444.

This seems to be because the schema for {nodereview_type_nodetype} is defined in the module's update hook but not in the schema hook, meaning this patch will only work on sites that already have NodeReview installed.

summit’s picture

Subscribing, greetings, Martijn

danielhonrade’s picture

Status: Needs work » Needs review
danielhonrade’s picture

Status: Needs review » Needs work

This patch with this size is recommended to be a helper module or a plugin

batje’s picture

We would like to suggest to make this a 6.2-dev release.

Crell’s picture

Mega-patches that do many things are generally not accepted regardless. Please break up the new functionality up into separate patches unless it is simply non-functional unless done all at once.

danielhonrade’s picture

Status: Needs work » Postponed
danielhonrade’s picture

Category: bug » feature
danielhonrade’s picture

batjie,

I haven't tried the patch, a lot of things have changed on the recent dev, but I have questions:
1) Taxonomy terms is complicated to integrate as fieldsets, the axes may duplicate if you have 2 vocabularies attached to the node or if you have hierarchies of terms. Have you solved this?
2) Expert review and Simple review, does this translate to separate Review results?
3) Textfield as optional, you mean the textarea where the comments are? If so, this is fixed already.

tnx,
daniel

pindaman’s picture

any possibillities on multiple votes in drupal 7.
My php skills are limited.

I have managed to:
multiple votes for 1 user
average score is calculated on page.

one bug however.
In the review node the score is wrong. It has always the last vote score.
e.d user x makes 4 reviews. 4th review is scored an 8.
all text in reviews is different, but scores are set to 8 for all 4 reviews.
after review 5 (score 5), all scores are set to 5.
In voting_api it seems all votes are stored. But only the last score given by the user is being printed(that is the score with the highest vote_id).
simplified table looks like.

vote_id - entity_id - value - uid
10 - 20 - 50 - 12
11 - 20 - 80 - 12
12 - 20 - 70 - 12
13 - 20 - 80 - 12
14 - 20 - 50 - 12

I think a relation UID/entitiy_id needs also the vote_id.
Any php master out there to help out how to do that so the right value is attached to the review node.

Average score calculation is working as it it calculated by all values in the voting_api.

Thanks for reading/helping.

Pinda