Thread: Rating Option or Ranking Option

This question is not answered. Helpful answers available: 4. Correct answers available: 1.


Permlink Replies: 12 - Pages: 1 - Last Post: Apr 9, 2009 7:26 AM Last Post By: user634694
user634694

Posts: 83
Registered: 05/05/08
Rating Option or Ranking Option
Posted: Apr 7, 2009 5:43 AM
 
Click to report abuse...   Click to reply to this thread Reply
Hi all,

I have a new challange, In my Report i have column called as Rating so i want to implement in my Report this Ratings are given by the users depending on their visit to Link as the Rating will be rated as STAR IMAGE'S like 5 Stars or 4Stars
3 or 2 or 1, depending on the number of users visited the link. I want is this feature available in Apex Tool or anybody is aware of it would like to share by any other method....
Example
======
User1=4
User2=5
Total Users=(User1+User2)=2

Total Rating=(4+5)=9

Ranking=Total Rating/(Total Users)=9/2=4.5 Then the Final Ranking=4.5
so we can display 4 or 5 Stars Images Glowing like

Hoping for some positive responce regarding the same from all the forum experts....

Thanking and Regards,
Suri
Roel

Posts: 1,936
Registered: 05/04/99
Re: Rating Option or Ranking Option
Posted: Apr 7, 2009 6:02 AM   in response to: user634694 in response to: user634694
Helpful
Click to report abuse...   Click to reply to this thread Reply
Hello Suri,

Start with the APEX_WORKSPACE_ACTIVITY_LOG....

Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this reply by marking it as either Helpful or Correct ;-)
user634694

Posts: 83
Registered: 05/05/08
Re: Rating Option or Ranking Option
Posted: Apr 8, 2009 2:25 AM   in response to: Roel in response to: Roel
 
Click to report abuse...   Click to reply to this thread Reply
Hi Roel,
Can you please elaborate regarding APEX_WORKSPACE_ACTIVITY_LOG, how to start with and all.....

Thanking and Regards,
Suri
Roel

Posts: 1,936
Registered: 05/04/99
Re: Rating Option or Ranking Option
Posted: Apr 8, 2009 2:31 AM   in response to: user634694 in response to: user634694
 
Click to report abuse...   Click to reply to this thread Reply
Hello Suri,

Did you take a look at that view? It contains per user the number of times a page is accessed. If you want a real rating (like 'Excellent', 'Bad' etc) than you have to create your own tables and functions. But I guess this view gives you a start. You can spot the popular pages. You can even write queries like: Users that visited this page, visited these other pages also (like a Amazon recommendation type of functionality).

Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this reply by marking it as either Helpful or Correct ;-)
user634694

Posts: 83
Registered: 05/05/08
Re: Rating Option or Ranking Option
Posted: Apr 8, 2009 3:30 AM   in response to: Roel in response to: Roel
 
Click to report abuse...   Click to reply to this thread Reply
Thanks a lot Roel,

But how it possible to embedded that star images and make it dynamic alter, like we see in Amazon recommendation
the progess Bars alter according to the Ratings
can you share some thoughts on this..


Thanking and Regards,
Suri

Roel

Posts: 1,936
Registered: 05/04/99
Re: Rating Option or Ranking Option
Posted: Apr 8, 2009 4:12 AM   in response to: user634694 in response to: user634694
 
Click to report abuse...   Click to reply to this thread Reply
Depends on when you want to give something a 3, 4, or 5 star rating.
But to give you an idea:
select page_name, perc
, case
when perc > 50 then '<img src="/i/stars5.gif" />'
when perc > 40 then '<img src="/i/stars4.gif" />'
when perc > 30 then '<img src="/i/stars3.gif" />'
when perc > 20 then '<img src="/i/stars2.gif" />'
when perc > 10 then '<img src="/i/stars1.gif" />'
else '<img src="/i/white_boxbr.gif" />'
end rating
from
( select page_name
, round(100*hits/total) perc
from
( select distinct page_id
, page_name
, count(*) over (partition by page_id, page_name) hits
, count(*) over (partition by 1) total
from APEX_WORKSPACE_ACTIVITY_LOG
where application_id = :APP_ID
order by 3 desc
)
)

There is an example on : [apex.oracle.com|http://apex.oracle.com/pls/otn/f?p=41715:14]...but it is rather slow on that multi-multi-workspace instance. On my laptop it runs fine..
user634694

Posts: 83
Registered: 05/05/08
Re: Rating Option or Ranking Option
Posted: Apr 8, 2009 7:18 AM   in response to: Roel in response to: Roel
 
Click to report abuse...   Click to reply to this thread Reply
Hi Role,

Thanks a lot for quick response and helpful reply, can we have the Rating Like which we have in this link

http://my.oracle.com/portal/page/myo/North%20America%20Sales%20and%20Consulting%20Website/NAOrganizations/NAOverlay/TBU/NA%20TBU%20Home
then click on the Retriver

after search like CRM when the user clicks on the links he give his inadvisable ratings manually by clicking, so that the record is tracked in the backbend Total Ratings=10 for link=Doc1 and Total Users=5
Then the Avg(Rating)=20/5=4 form the user for the link Doc1
Its very difficult to convince, but if go by the URL what i have given then i think you can put some thoughts on it or if you are aware of some helpful url or links it will be really helpful....

Hoping for some positive responce....

Thanks and Regards,
Suri

Roel

Posts: 1,936
Registered: 05/04/99
Re: Rating Option or Ranking Option
Posted: Apr 8, 2009 7:25 AM   in response to: user634694 in response to: user634694
 
Click to report abuse...   Click to reply to this thread Reply
Suri,

I can't get to the link you provided. Is it an internal Oracle thing?

Roel
user634694

Posts: 83
Registered: 05/05/08
Re: Rating Option or Ranking Option
Posted: Apr 8, 2009 7:33 AM   in response to: Roel in response to: Roel
 
Click to report abuse...   Click to reply to this thread Reply
Hi Roel,

Thanks for reply anyways i will manage to send u sone snap shorts...

or try this link http://retriever.oraclecorp.com:7785/pls/apex/f?p=113:31:2568529431644559::NO:RP:KEYWORD:

Thanks

suri

Edited by: user634694 on Apr 8, 2009 7:34 AM
Roel

Posts: 1,936
Registered: 05/04/99
Re: Rating Option or Ranking Option
Posted: Apr 8, 2009 7:43 AM   in response to: user634694 in response to: user634694
 
Click to report abuse...   Click to reply to this thread Reply
That's also "Oracle only"...
user634694

Posts: 83
Registered: 05/05/08
Re: Rating Option or Ranking Option
Posted: Apr 9, 2009 12:11 AM   in response to: Roel in response to: Roel
 
Click to report abuse...   Click to reply to this thread Reply
Hi Roel,
I have sent some snapshots to your mail id...
Thanks in Advance

Regards,
Suri
Roel

Posts: 1,936
Registered: 05/04/99
Re: Rating Option or Ranking Option
Posted: Apr 9, 2009 12:27 AM   in response to: user634694 in response to: user634694
 
Click to report abuse...   Click to reply to this thread Reply
Suri,

At Amazon they're using the AREA tag. An AREA is a part of an image (look [here|http://www.w3schools.com/TAGS/tag_area.asp] for more info). On an AREA they defined onmouseover and onclick events. The onmouseover changes the color of the image and the onclick saves the value.

The code for the 3th star is:

<area onclick="amz_js_saveRating(3, 'rating', savedRatingrating); amz_js_swapStars(3, 'rating');" onmouseover="amz_js_swapStars(3, 'rating');" coords="24,0,36,12" alt="3 stars" href="#" shape="rect"/>


And the functions that are used are:

function amz_js_saveRating(rating, formName, variableName) {
  variableName.value = rating;
  document.getElementById(formName).value = rating;
  document.getElementById(formName).savedValue.value = rating;
  amz_js_updateAltText(rating, formName);
}
 
function amz_js_swapStars(rating, formName) {
  imageName = "stars" + formName;
  imageObj = document.getElementById(imageName);
  imageObj.src = getStarsImage(rating).src;
}
 
function amz_js_updateAltText(rating, formName) {
  imageName = "stars" + formName;
  ratingString = getSelectedRatingString(rating);
  imageObj = document.getElementById(imageName);
  imageObj.setAttribute("alt", ratingString);
}


So maybe this gives you an idea how that can be done!

HTH Roel
user634694

Posts: 83
Registered: 05/05/08
Re: Rating Option or Ranking Option
Posted: Apr 9, 2009 4:52 AM   in response to: Roel in response to: Roel
 
Click to report abuse...   Click to reply to this thread Reply
Hi Roel,

Thanks for speedy response, can you please give me hints how we can implement in Apex and where and may i know whats this parameter stands for formName is this the name of the link(doc) the user click and also abt variableName ratingString if you dont mind can you please share your thoughts....

Thanks in Advance..........

And got one link it may be helpfull you can have a look
Link is [http://apex.oracle.com/pls/otn/f?p=11933:122]

Thanking and Regards,
Suri

Edited by: user634694 on Apr 9, 2009 4:53 AM

Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums