Forum OpenACS Q&A: Re: Ratings package status?
In my checkout of HEAD, at least, ratings/sql/oracle is empty.
Ooops! Looking at what's inside the sql/oracle would have been a good idea... or cvs co -Pd :)
The "context_object_id" column is not fill automatically with the context_id of the object but with whatever is passed as context_object_id by the page that uses ratings. So if you use the ratings proc (should be an include btw), say, in forums package in the page that display 1 thread, you can pass the forum_id as context_object_id.
The aggregating stuff in Jeff's original code aggregates ratings by type of users (registered, anonymous, all), if I understood correctly the identifiers:
create table rating_aggregates (
references rating_dimensions(dimension_id) on delete cascade,
references acs_objects(object_id) on delete cascade
primary key (object_id, dimension_id)
Regarding other Viaro's changes: the duplication of code can be cleaned up and I forgot to mention that they added scripts to view a summary (or details) of the ratings (by object, by user who rated), that can be interesting. The question is if those summaries should be restricted to users with admin privilege or not.
Still seems a bit odd to me. Since it only supports PG, it would be easy enough to say "average the ratings for all the child objects of child forum_id" when you want to display that, and cache the result if you're worried about performance.
Anyway, it's not a dotlrn or core package obviously, so you guys at UNED should just do what you want, right?
Since Oracle support obviously is not an issue for this package :)